Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

feat: add `schema_design_service.proto` (#7000)

boojack8194bd0105b5
diff --git a/frontend/src/types/proto/v1/schema_design_service.ts b/frontend/src/types/proto/v1/schema_design_service.ts
new file mode 100644
index 0000000000..c2b834d71e
--- /dev/null
+++ b/frontend/src/types/proto/v1/schema_design_service.ts
@@ -0,0 +1,1256 @@
+/* eslint-disable */
+import type { CallContext, CallOptions } from "nice-grpc-common";
+import * as _m0 from "protobufjs/minimal";
+import { Empty } from "../google/protobuf/empty";
+import { FieldMask } from "../google/protobuf/field_mask";
+import { Timestamp } from "../google/protobuf/timestamp";
+import { Engine, engineFromJSON, engineToJSON } from "./common";
+import { DatabaseMetadata } from "./database_service";
+
+export const protobufPackage = "bytebase.v1";
+
+export interface SchemaDesign {
+ /**
+ * The name of the schema design.
+ * Format: projects/{project}/schemaDesigns/{schemaDesign}
+ */
+ name: string;
+ /** The title of schema design. AKA sheet's title. */
+ title: string;
+ /** Current editing schema. */
+ schema: string;
+ schemaMetadata?: DatabaseMetadata;
+ baselineSchema: string;
+ baselineSchemaMetadata?: DatabaseMetadata;
+ engine: Engine;
+ /**
+ * The name of the baseline database.
+ * Format: instances/{instance}/databases/{database}
+ */
+ baselineDatabase: string;
+ schemaVersion: string;
+ /**
+ * The creator of the schema design.
+ * Format: users/{email}
+ */
+ creator: string;
+ /**
+ * The updater of the schema design.
+ * Format: users/{email}
+ */
+ updater: string;
+ createTime?: Date;
+ updateTime?: Date;
+}
+
+export interface GetSchemaDesignRequest {
+ /**
+ * The name of the schema design to retrieve.
+ * Format: projects/{project}/schemaDesigns/{schemaDesign}
+ */
+ name: string;
+}
+
+export interface ListSchemaDesignsRequest {
+ /**
+ * The parent resource of the schema design.
+ * Foramt: projects/{project}
+ */
+ parent: string;
+ /**
+ * To filter the search result.
+ * Format: only support the following spec for now:
+ * - `creator = users/{email}`, `creator != users/{email}`
+ * - `starred = true`, `starred = false`.
+ * Not support empty filter for now.
+ */
+ filter: string;
+ /**
+ * The maximum number of schema designs to return. The service may return fewer than
+ * this value.
+ * If unspecified, at most 50 schema designs will be returned.
+ * The maximum value is 1000; values above 1000 will be coerced to 1000.
+ */
+ pageSize: number;
+ /**
+ * A page token, received from a previous `ListSchemaDesigns` call.
+ * Provide this to retrieve the subsequent page.
+ *
+ * When paginating, all other parameters provided to `ListSchemaDesigns` must match
+ * the call that provided the page token.
+ */
+ pageToken: string;
+}
+
+export interface ListSchemaDesignsResponse {
+ /** The schema designs from the specified request. */
+ schemaDesigns: SchemaDesign[];
+ /**
+ * A token, which can be sent as `page_token` to retrieve the next page.
+ * If this field is omitted, there are no subsequent pages.
+ */
+ nextPageToken: string;
+}
+
+export interface CreateSchemaDesignRequest {
+ /**
+ * The parent, which owns this collection of schema designs.
+ * Format: project/{project}
+ * Use "projects/-" to list all schema designs.
+ */
+ parent: string;
+ schemaDesign?: SchemaDesign;
+}
+
+export interface UpdateSchemaDesignRequest {
+ /**
+ * The schema design to update.
+ *
+ * The schema design's `name` field is used to identify the schema design to update.
+ * Format: projects/{project}/schemaDesigns/{schemaDesign}
+ */
+ schemaDesign?: SchemaDesign;
+ /** The list of fields to update. */
+ updateMask?: string[];
+}
+
+export interface DeleteSchemaDesignRequest {
+ /**
+ * The name of the schema design to delete.
+ * Format: projects/{project}/schemaDesigns/{schemaDesign}
+ */
+ name: string;
+}
+
+function createBaseSchemaDesign(): SchemaDesign {
+ return {
+ name: "",
+ title: "",
+ schema: "",
+ schemaMetadata: undefined,
+ baselineSchema: "",
+ baselineSchemaMetadata: undefined,
+ engine: 0,
+ baselineDatabase: "",
+ schemaVersion: "",
+ creator: "",
+ updater: "",
+ createTime: undefined,
+ updateTime: undefined,
+ };
+}
+
+export const SchemaDesign = {
+ encode(message: SchemaDesign, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
+ if (message.name !== "") {
+ writer.uint32(10).string(message.name);
+ }
+ if (message.title !== "") {
+ writer.uint32(18).string(message.title);
+ }
+ if (message.schema !== "") {
+ writer.uint32(26).string(message.schema);
+ }
+ if (message.schemaMetadata !== undefined) {
+ DatabaseMetadata.encode(message.schemaMetadata, writer.uint32(34).fork()).ldelim();
+ }
+ if (message.baselineSchema !== "") {
+ writer.uint32(42).string(message.baselineSchema);
+ }
+ if (message.baselineSchemaMetadata !== undefined) {
+ DatabaseMetadata.encode(message.baselineSchemaMetadata, writer.uint32(50).fork()).ldelim();
+ }
+ if (message.engine !== 0) {
+ writer.uint32(56).int32(message.engine);
+ }
+ if (message.baselineDatabase !== "") {
+ writer.uint32(66).string(message.baselineDatabase);
+ }
+ if (message.schemaVersion !== "") {
+ writer.uint32(74).string(message.schemaVersion);
+ }
+ if (message.creator !== "") {
+ writer.uint32(82).string(message.creator);
+ }
+ if (message.updater !== "") {
+ writer.uint32(90).string(message.updater);
+ }
+ if (message.createTime !== undefined) {
+ Timestamp.encode(toTimestamp(message.createTime), writer.uint32(98).fork()).ldelim();
+ }
+ if (message.updateTime !== undefined) {
+ Timestamp.encode(toTimestamp(message.updateTime), writer.uint32(106).fork()).ldelim();
+ }
+ return writer;
+ },
+
+ decode(input: _m0.Reader | Uint8Array, length?: number): SchemaDesign {
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseSchemaDesign();
+ 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.title = reader.string();
+ continue;
+ case 3:
+ if (tag !== 26) {
+ break;
+ }
+
+ message.schema = reader.string();
+ continue;
+ case 4:
+ if (tag !== 34) {
+ break;
+ }
+
+ message.schemaMetadata = DatabaseMetadata.decode(reader, reader.uint32());
+ continue;
+ case 5:
+ if (tag !== 42) {
+ break;
+ }
+
+ message.baselineSchema = reader.string();
+ continue;
+ case 6:
+ if (tag !== 50) {
+ break;
+ }
+
+ message.baselineSchemaMetadata = DatabaseMetadata.decode(reader, reader.uint32());
+ continue;
+ case 7:
+ if (tag !== 56) {
+ break;
+ }
+
+ message.engine = reader.int32() as any;
+ continue;
+ case 8:
+ if (tag !== 66) {
+ break;
+ }
+
+ message.baselineDatabase = reader.string();
+ continue;
+ case 9:
+ if (tag !== 74) {
+ break;
+ }
+
+ message.schemaVersion = reader.string();
+ continue;
+ case 10:
+ if (tag !== 82) {
+ break;
+ }
+
+ message.creator = reader.string();
+ continue;
+ case 11:
+ if (tag !== 90) {
+ break;
+ }
+
+ message.updater = reader.string();
+ continue;
+ case 12:
+ if (tag !== 98) {
+ break;
+ }
+
+ message.createTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
+ continue;
+ case 13:
+ if (tag !== 106) {
+ break;
+ }
+
+ message.updateTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
+ continue;
+ }
+ if ((tag & 7) === 4 || tag === 0) {
+ break;
+ }
+ reader.skipType(tag & 7);
+ }
+ return message;
+ },
+
+ fromJSON(object: any): SchemaDesign {
+ return {
+ name: isSet(object.name) ? String(object.name) : "",
+ title: isSet(object.title) ? String(object.title) : "",
+ schema: isSet(object.schema) ? String(object.schema) : "",
+ schemaMetadata: isSet(object.schemaMetadata) ? DatabaseMetadata.fromJSON(object.schemaMetadata) : undefined,
+ baselineSchema: isSet(object.baselineSchema) ? String(object.baselineSchema) : "",
+ baselineSchemaMetadata: isSet(object.baselineSchemaMetadata)
+ ? DatabaseMetadata.fromJSON(object.baselineSchemaMetadata)
+ : undefined,
+ engine: isSet(object.engine) ? engineFromJSON(object.engine) : 0,
+ baselineDatabase: isSet(object.baselineDatabase) ? String(object.baselineDatabase) : "",
+ schemaVersion: isSet(object.schemaVersion) ? String(object.schemaVersion) : "",
+ creator: isSet(object.creator) ? String(object.creator) : "",
+ updater: isSet(object.updater) ? String(object.updater) : "",
+ createTime: isSet(object.createTime) ? fromJsonTimestamp(object.createTime) : undefined,
+ updateTime: isSet(object.updateTime) ? fromJsonTimestamp(object.updateTime) : undefined,
+ };
+ },
+
+ toJSON(message: SchemaDesign): unknown {
+ const obj: any = {};
+ message.name !== undefined && (obj.name = message.name);
+ message.title !== undefined && (obj.title = message.title);
+ message.schema !== undefined && (obj.schema = message.schema);
+ message.schemaMetadata !== undefined &&
+ (obj.schemaMetadata = message.schemaMetadata ? DatabaseMetadata.toJSON(message.schemaMetadata) : undefined);
+ message.baselineSchema !== undefined && (obj.baselineSchema = message.baselineSchema);
+ message.baselineSchemaMetadata !== undefined && (obj.baselineSchemaMetadata = message.baselineSchemaMetadata
+ ? DatabaseMetadata.toJSON(message.baselineSchemaMetadata)
+ : undefined);
+ message.engine !== undefined && (obj.engine = engineToJSON(message.engine));
+ message.baselineDatabase !== undefined && (obj.baselineDatabase = message.baselineDatabase);
+ message.schemaVersion !== undefined && (obj.schemaVersion = message.schemaVersion);
+ message.creator !== undefined && (obj.creator = message.creator);
+ message.updater !== undefined && (obj.updater = message.updater);
+ message.createTime !== undefined && (obj.createTime = message.createTime.toISOString());
+ message.updateTime !== undefined && (obj.updateTime = message.updateTime.toISOString());
+ return obj;
+ },
+
+ create(base?: DeepPartial<SchemaDesign>): SchemaDesign {
+ return SchemaDesign.fromPartial(base ?? {});
+ },
+
+ fromPartial(object: DeepPartial<SchemaDesign>): SchemaDesign {
+ const message = createBaseSchemaDesign();
+ message.name = object.name ?? "";
+ message.title = object.title ?? "";
+ message.schema = object.schema ?? "";
+ message.schemaMetadata = (object.schemaMetadata !== undefined && object.schemaMetadata !== null)
+ ? DatabaseMetadata.fromPartial(object.schemaMetadata)
+ : undefined;
+ message.baselineSchema = object.baselineSchema ?? "";
+ message.baselineSchemaMetadata =
+ (object.baselineSchemaMetadata !== undefined && object.baselineSchemaMetadata !== null)
+ ? DatabaseMetadata.fromPartial(object.baselineSchemaMetadata)
+ : undefined;
+ message.engine = object.engine ?? 0;
+ message.baselineDatabase = object.baselineDatabase ?? "";
+ message.schemaVersion = object.schemaVersion ?? "";
+ message.creator = object.creator ?? "";
+ message.updater = object.updater ?? "";
+ message.createTime = object.createTime ?? undefined;
+ message.updateTime = object.updateTime ?? undefined;
+ return message;
+ },
+};
+
+function createBaseGetSchemaDesignRequest(): GetSchemaDesignRequest {
+ return { name: "" };
+}
+
+export const GetSchemaDesignRequest = {
+ encode(message: GetSchemaDesignRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
+ if (message.name !== "") {
+ writer.uint32(10).string(message.name);
+ }
+ return writer;
+ },
+
+ decode(input: _m0.Reader | Uint8Array, length?: number): GetSchemaDesignRequest {
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseGetSchemaDesignRequest();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ if (tag !== 10) {
+ break;
+ }
+
+ message.name = reader.string();
+ continue;
+ }
+ if ((tag & 7) === 4 || tag === 0) {
+ break;
+ }
+ reader.skipType(tag & 7);
+ }
+ return message;
+ },
+
+ fromJSON(object: any): GetSchemaDesignRequest {
+ return { name: isSet(object.name) ? String(object.name) : "" };
+ },
+
+ toJSON(message: GetSchemaDesignRequest): unknown {
+ const obj: any = {};
+ message.name !== undefined && (obj.name = message.name);
+ return obj;
+ },
+
+ create(base?: DeepPartial<GetSchemaDesignRequest>): GetSchemaDesignRequest {
+ return GetSchemaDesignRequest.fromPartial(base ?? {});
+ },
+
+ fromPartial(object: DeepPartial<GetSchemaDesignRequest>): GetSchemaDesignRequest {
+ const message = createBaseGetSchemaDesignRequest();
+ message.name = object.name ?? "";
+ return message;
+ },
+};
+
+function createBaseListSchemaDesignsRequest(): ListSchemaDesignsRequest {
+ return { parent: "", filter: "", pageSize: 0, pageToken: "" };
+}
+
+export const ListSchemaDesignsRequest = {
+ encode(message: ListSchemaDesignsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
+ if (message.parent !== "") {
+ writer.uint32(10).string(message.parent);
+ }
+ if (message.filter !== "") {
+ writer.uint32(18).string(message.filter);
+ }
+ if (message.pageSize !== 0) {
+ writer.uint32(24).int32(message.pageSize);
+ }
+ if (message.pageToken !== "") {
+ writer.uint32(34).string(message.pageToken);
+ }
+ return writer;
+ },
+
+ decode(input: _m0.Reader | Uint8Array, length?: number): ListSchemaDesignsRequest {
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseListSchemaDesignsRequest();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ if (tag !== 10) {
+ break;
+ }
+
+ message.parent = reader.string();
+ continue;
+ case 2:
+ if (tag !== 18) {
+ break;
+ }
+
+ message.filter = reader.string();
+ continue;
+ case 3:
+ if (tag !== 24) {
+ break;
+ }
+
+ message.pageSize = reader.int32();
+ continue;
+ case 4:
+ if (tag !== 34) {
+ break;
+ }
+
+ message.pageToken = reader.string();
+ continue;
+ }
+ if ((tag & 7) === 4 || tag === 0) {
+ break;
+ }
+ reader.skipType(tag & 7);
+ }
+ return message;
+ },
+
+ fromJSON(object: any): ListSchemaDesignsRequest {
+ return {
+ parent: isSet(object.parent) ? String(object.parent) : "",
+ filter: isSet(object.filter) ? String(object.filter) : "",
+ pageSize: isSet(object.pageSize) ? Number(object.pageSize) : 0,
+ pageToken: isSet(object.pageToken) ? String(object.pageToken) : "",
+ };
+ },
+
+ toJSON(message: ListSchemaDesignsRequest): unknown {
+ const obj: any = {};
+ message.parent !== undefined && (obj.parent = message.parent);
+ message.filter !== undefined && (obj.filter = message.filter);
+ message.pageSize !== undefined && (obj.pageSize = Math.round(message.pageSize));
+ message.pageToken !== undefined && (obj.pageToken = message.pageToken);
+ return obj;
+ },
+
+ create(base?: DeepPartial<ListSchemaDesignsRequest>): ListSchemaDesignsRequest {
+ return ListSchemaDesignsRequest.fromPartial(base ?? {});
+ },
+
+ fromPartial(object: DeepPartial<ListSchemaDesignsRequest>): ListSchemaDesignsRequest {
+ const message = createBaseListSchemaDesignsRequest();
+ message.parent = object.parent ?? "";
+ message.filter = object.filter ?? "";
+ message.pageSize = object.pageSize ?? 0;
+ message.pageToken = object.pageToken ?? "";
+ return message;
+ },
+};
+
+function createBaseListSchemaDesignsResponse(): ListSchemaDesignsResponse {
+ return { schemaDesigns: [], nextPageToken: "" };
+}
+
+export const ListSchemaDesignsResponse = {
+ encode(message: ListSchemaDesignsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
+ for (const v of message.schemaDesigns) {
+ SchemaDesign.encode(v!, writer.uint32(10).fork()).ldelim();
+ }
+ if (message.nextPageToken !== "") {
+ writer.uint32(18).string(message.nextPageToken);
+ }
+ return writer;
+ },
+
+ decode(input: _m0.Reader | Uint8Array, length?: number): ListSchemaDesignsResponse {
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseListSchemaDesignsResponse();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ if (tag !== 10) {
+ break;
+ }
+
+ message.schemaDesigns.push(SchemaDesign.decode(reader, reader.uint32()));
+ continue;
+ case 2:
+ if (tag !== 18) {
+ break;
+ }
+
+ message.nextPageToken = reader.string();
+ continue;
+ }
+ if ((tag & 7) === 4 || tag === 0) {
+ break;
+ }
+ reader.skipType(tag & 7);
+ }
+ return message;
+ },
+
+ fromJSON(object: any): ListSchemaDesignsResponse {
+ return {
+ schemaDesigns: Array.isArray(object?.schemaDesigns)
+ ? object.schemaDesigns.map((e: any) => SchemaDesign.fromJSON(e))
+ : [],
+ nextPageToken: isSet(object.nextPageToken) ? String(object.nextPageToken) : "",
+ };
+ },
+
+ toJSON(message: ListSchemaDesignsResponse): unknown {
+ const obj: any = {};
+ if (message.schemaDesigns) {
+ obj.schemaDesigns = message.schemaDesigns.map((e) => e ? SchemaDesign.toJSON(e) : undefined);
+ } else {
+ obj.schemaDesigns = [];
+ }
+ message.nextPageToken !== undefined && (obj.nextPageToken = message.nextPageToken);
+ return obj;
+ },
+
+ create(base?: DeepPartial<ListSchemaDesignsResponse>): ListSchemaDesignsResponse {
+ return ListSchemaDesignsResponse.fromPartial(base ?? {});
+ },
+
+ fromPartial(object: DeepPartial<ListSchemaDesignsResponse>): ListSchemaDesignsResponse {
+ const message = createBaseListSchemaDesignsResponse();
+ message.schemaDesigns = object.schemaDesigns?.map((e) => SchemaDesign.fromPartial(e)) || [];
+ message.nextPageToken = object.nextPageToken ?? "";
+ return message;
+ },
+};
+
+function createBaseCreateSchemaDesignRequest(): CreateSchemaDesignRequest {
+ return { parent: "", schemaDesign: undefined };
+}
+
+export const CreateSchemaDesignRequest = {
+ encode(message: CreateSchemaDesignRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
+ if (message.parent !== "") {
+ writer.uint32(10).string(message.parent);
+ }
+ if (message.schemaDesign !== undefined) {
+ SchemaDesign.encode(message.schemaDesign, writer.uint32(18).fork()).ldelim();
+ }
+ return writer;
+ },
+
+ decode(input: _m0.Reader | Uint8Array, length?: number): CreateSchemaDesignRequest {
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseCreateSchemaDesignRequest();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ if (tag !== 10) {
+ break;
+ }
+
+ message.parent = reader.string();
+ continue;
+ case 2:
+ if (tag !== 18) {
+ break;
+ }
+
+ message.schemaDesign = SchemaDesign.decode(reader, reader.uint32());
+ continue;
+ }
+ if ((tag & 7) === 4 || tag === 0) {
+ break;
+ }
+ reader.skipType(tag & 7);
+ }
+ return message;
+ },
+
+ fromJSON(object: any): CreateSchemaDesignRequest {
+ return {
+ parent: isSet(object.parent) ? String(object.parent) : "",
+ schemaDesign: isSet(object.schemaDesign) ? SchemaDesign.fromJSON(object.schemaDesign) : undefined,
+ };
+ },
+
+ toJSON(message: CreateSchemaDesignRequest): unknown {
+ const obj: any = {};
+ message.parent !== undefined && (obj.parent = message.parent);
+ message.schemaDesign !== undefined &&
+ (obj.schemaDesign = message.schemaDesign ? SchemaDesign.toJSON(message.schemaDesign) : undefined);
+ return obj;
+ },
+
+ create(base?: DeepPartial<CreateSchemaDesignRequest>): CreateSchemaDesignRequest {
+ return CreateSchemaDesignRequest.fromPartial(base ?? {});
+ },
+
+ fromPartial(object: DeepPartial<CreateSchemaDesignRequest>): CreateSchemaDesignRequest {
+ const message = createBaseCreateSchemaDesignRequest();
+ message.parent = object.parent ?? "";
+ message.schemaDesign = (object.schemaDesign !== undefined && object.schemaDesign !== null)
+ ? SchemaDesign.fromPartial(object.schemaDesign)
+ : undefined;
+ return message;
+ },
+};
+
+function createBaseUpdateSchemaDesignRequest(): UpdateSchemaDesignRequest {
+ return { schemaDesign: undefined, updateMask: undefined };
+}
+
+export const UpdateSchemaDesignRequest = {
+ encode(message: UpdateSchemaDesignRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
+ if (message.schemaDesign !== undefined) {
+ SchemaDesign.encode(message.schemaDesign, writer.uint32(10).fork()).ldelim();
+ }
+ if (message.updateMask !== undefined) {
+ FieldMask.encode(FieldMask.wrap(message.updateMask), writer.uint32(18).fork()).ldelim();
+ }
+ return writer;
+ },
+
+ decode(input: _m0.Reader | Uint8Array, length?: number): UpdateSchemaDesignRequest {
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseUpdateSchemaDesignRequest();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ if (tag !== 10) {
+ break;
+ }
+
+ message.schemaDesign = SchemaDesign.decode(reader, reader.uint32());
+ continue;
+ case 2:
+ if (tag !== 18) {
+ break;
+ }
+
+ message.updateMask = FieldMask.unwrap(FieldMask.decode(reader, reader.uint32()));
+ continue;
+ }
+ if ((tag & 7) === 4 || tag === 0) {
+ break;
+ }
+ reader.skipType(tag & 7);
+ }
+ return message;
+ },
+
+ fromJSON(object: any): UpdateSchemaDesignRequest {
+ return {
+ schemaDesign: isSet(object.schemaDesign) ? SchemaDesign.fromJSON(object.schemaDesign) : undefined,
+ updateMask: isSet(object.updateMask) ? FieldMask.unwrap(FieldMask.fromJSON(object.updateMask)) : undefined,
+ };
+ },
+
+ toJSON(message: UpdateSchemaDesignRequest): unknown {
+ const obj: any = {};
+ message.schemaDesign !== undefined &&
+ (obj.schemaDesign = message.schemaDesign ? SchemaDesign.toJSON(message.schemaDesign) : undefined);
+ message.updateMask !== undefined && (obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask)));
+ return obj;
+ },
+
+ create(base?: DeepPartial<UpdateSchemaDesignRequest>): UpdateSchemaDesignRequest {
+ return UpdateSchemaDesignRequest.fromPartial(base ?? {});
+ },
+
+ fromPartial(object: DeepPartial<UpdateSchemaDesignRequest>): UpdateSchemaDesignRequest {
+ const message = createBaseUpdateSchemaDesignRequest();
+ message.schemaDesign = (object.schemaDesign !== undefined && object.schemaDesign !== null)
+ ? SchemaDesign.fromPartial(object.schemaDesign)
+ : undefined;
+ message.updateMask = object.updateMask ?? undefined;
+ return message;
+ },
+};
+
+function createBaseDeleteSchemaDesignRequest(): DeleteSchemaDesignRequest {
+ return { name: "" };
+}
+
+export const DeleteSchemaDesignRequest = {
+ encode(message: DeleteSchemaDesignRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
+ if (message.name !== "") {
+ writer.uint32(10).string(message.name);
+ }
+ return writer;
+ },
+
+ decode(input: _m0.Reader | Uint8Array, length?: number): DeleteSchemaDesignRequest {
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseDeleteSchemaDesignRequest();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ if (tag !== 10) {
+ break;
+ }
+
+ message.name = reader.string();
+ continue;
+ }
+ if ((tag & 7) === 4 || tag === 0) {
+ break;
+ }
+ reader.skipType(tag & 7);
+ }
+ return message;
+ },
+
+ fromJSON(object: any): DeleteSchemaDesignRequest {
+ return { name: isSet(object.name) ? String(object.name) : "" };
+ },
+
+ toJSON(message: DeleteSchemaDesignRequest): unknown {
+ const obj: any = {};
+ message.name !== undefined && (obj.name = message.name);
+ return obj;
+ },
+
+ create(base?: DeepPartial<DeleteSchemaDesignRequest>): DeleteSchemaDesignRequest {
+ return DeleteSchemaDesignRequest.fromPartial(base ?? {});
+ },
+
+ fromPartial(object: DeepPartial<DeleteSchemaDesignRequest>): DeleteSchemaDesignRequest {
+ const message = createBaseDeleteSchemaDesignRequest();
+ message.name = object.name ?? "";
+ return message;
+ },
+};
+
+export type SchemaDesignServiceDefinition = typeof SchemaDesignServiceDefinition;
+export const SchemaDesignServiceDefinition = {
+ name: "SchemaDesignService",
+ fullName: "bytebase.v1.SchemaDesignService",
+ methods: {
+ getSchemaDesign: {
+ name: "GetSchemaDesign",
+ requestType: GetSchemaDesignRequest,
+ requestStream: false,
+ responseType: SchemaDesign,
+ responseStream: false,
+ options: {
+ _unknownFields: {
+ 8410: [new Uint8Array([4, 110, 97, 109, 101])],
+ 578365826: [
+ new Uint8Array([
+ 39,
+ 18,
+ 37,
+ 47,
+ 118,
+ 49,
+ 47,
+ 123,
+ 110,
+ 97,
+ 109,
+ 101,
+ 61,
+ 112,
+ 114,
+ 111,
+ 106,
+ 101,
+ 99,
+ 116,
+ 115,
+ 47,
+ 42,
+ 47,
+ 115,
+ 99,
+ 104,
+ 101,
+ 109,
+ 97,
+ 68,
+ 101,
+ 115,
+ 105,
+ 103,
+ 110,
+ 115,
+ 47,
+ 42,
+ 125,
+ ]),
+ ],
+ },
+ },
+ },
+ listSchemaDesigns: {
+ name: "ListSchemaDesigns",
+ requestType: ListSchemaDesignsRequest,
+ requestStream: false,
+ responseType: ListSchemaDesignsResponse,
+ responseStream: false,
+ options: {
+ _unknownFields: {
+ 8410: [new Uint8Array([0])],
+ 578365826: [
+ new Uint8Array([
+ 39,
+ 18,
+ 37,
+ 47,
+ 118,
+ 49,
+ 47,
+ 123,
+ 112,
+ 97,
+ 114,
+ 101,
+ 110,
+ 116,
+ 61,
+ 112,
+ 114,
+ 111,
+ 106,
+ 101,
+ 99,
+ 116,
+ 115,
+ 47,
+ 42,
+ 125,
+ 47,
+ 115,
+ 99,
+ 104,
+ 101,
+ 109,
+ 97,
+ 68,
+ 101,
+ 115,
+ 105,
+ 103,
+ 110,
+ 115,
+ ]),
+ ],
+ },
+ },
+ },
+ createSchemaDesign: {
+ name: "CreateSchemaDesign",
+ requestType: CreateSchemaDesignRequest,
+ requestStream: false,
+ responseType: SchemaDesign,
+ responseStream: false,
+ options: {
+ _unknownFields: {
+ 8410: [
+ new Uint8Array([
+ 19,
+ 112,
+ 97,
+ 114,
+ 101,
+ 110,
+ 116,
+ 44,
+ 115,
+ 99,
+ 104,
+ 101,
+ 109,
+ 97,
+ 68,
+ 101,
+ 115,
+ 105,
+ 103,
+ 110,
+ ]),
+ ],
+ 578365826: [
+ new Uint8Array([
+ 53,
+ 58,
+ 13,
+ 115,
+ 99,
+ 104,
+ 101,
+ 109,
+ 97,
+ 95,
+ 100,
+ 101,
+ 115,
+ 105,
+ 103,
+ 110,
+ 34,
+ 36,
+ 47,
+ 118,
+ 49,
+ 47,
+ 123,
+ 112,
+ 97,
+ 114,
+ 101,
+ 110,
+ 116,
+ 61,
+ 112,
+ 114,
+ 111,
+ 106,
+ 101,
+ 99,
+ 116,
+ 115,
+ 47,
+ 42,
+ 125,
+ 47,
+ 115,
+ 99,
+ 104,
+ 101,
+ 109,
+ 97,
+ 68,
+ 101,
+ 115,
+ 105,
+ 103,
+ 110,
+ ]),
+ ],
+ },
+ },
+ },
+ updateSchemaDesign: {
+ name: "UpdateSchemaDesign",
+ requestType: UpdateSchemaDesignRequest,
+ requestStream: false,
+ responseType: SchemaDesign,
+ responseStream: false,
+ options: {
+ _unknownFields: {
+ 8410: [
+ new Uint8Array([
+ 24,
+ 115,
+ 99,
+ 104,
+ 101,
+ 109,
+ 97,
+ 68,
+ 101,
+ 115,
+ 105,
+ 103,
+ 110,
+ 44,
+ 117,
+ 112,
+ 100,
+ 97,
+ 116,
+ 101,
+ 95,
+ 109,
+ 97,
+ 115,
+ 107,
+ ]),
+ ],
+ 578365826: [
+ new Uint8Array([
+ 68,
+ 58,
+ 13,
+ 115,
+ 99,
+ 104,
+ 101,
+ 109,
+ 97,
+ 95,
+ 100,
+ 101,
+ 115,
+ 105,
+ 103,
+ 110,
+ 50,
+ 51,
+ 47,
+ 118,
+ 49,
+ 47,
+ 123,
+ 115,
+ 99,
+ 104,
+ 101,
+ 109,
+ 97,
+ 95,
+ 100,
+ 101,
+ 115,
+ 105,
+ 103,
+ 110,
+ 46,
+ 110,
+ 97,
+ 109,
+ 101,
+ 61,
+ 112,
+ 114,
+ 111,
+ 106,
+ 101,
+ 99,
+ 116,
+ 115,
+ 47,
+ 42,
+ 47,
+ 115,
+ 99,
+ 104,
+ 101,
+ 109,
+ 97,
+ 68,
+ 101,
+ 115,
+ 105,
+ 103,
+ 110,
+ 115,
+ 47,
+ 42,
+ 125,
+ ]),
+ ],
+ },
+ },
+ },
+ deleteSchemaDesign: {
+ name: "DeleteSchemaDesign",
+ requestType: DeleteSchemaDesignRequest,
+ requestStream: false,
+ responseType: Empty,
+ responseStream: false,
+ options: {
+ _unknownFields: {
+ 8410: [new Uint8Array([4, 110, 97, 109, 101])],
+ 578365826: [
+ new Uint8Array([
+ 39,
+ 42,
+ 37,
+ 47,
+ 118,
+ 49,
+ 47,
+ 123,
+ 110,
+ 97,
+ 109,
+ 101,
+ 61,
+ 112,
+ 114,
+ 111,
+ 106,
+ 101,
+ 99,
+ 116,
+ 115,
+ 47,
+ 42,
+ 47,
+ 115,
+ 99,
+ 104,
+ 101,
+ 109,
+ 97,
+ 68,
+ 101,
+ 115,
+ 105,
+ 103,
+ 110,
+ 115,
+ 47,
+ 42,
+ 125,
+ ]),
+ ],
+ },
+ },
+ },
+ },
+} as const;
+
+export interface SchemaDesignServiceImplementation<CallContextExt = {}> {
+ getSchemaDesign(
+ request: GetSchemaDesignRequest,
+ context: CallContext & CallContextExt,
+ ): Promise<DeepPartial<SchemaDesign>>;
+ listSchemaDesigns(
+ request: ListSchemaDesignsRequest,
+ context: CallContext & CallContextExt,
+ ): Promise<DeepPartial<ListSchemaDesignsResponse>>;
+ createSchemaDesign(
+ request: CreateSchemaDesignRequest,
+ context: CallContext & CallContextExt,
+ ): Promise<DeepPartial<SchemaDesign>>;
+ updateSchemaDesign(
+ request: UpdateSchemaDesignRequest,
+ context: CallContext & CallContextExt,
+ ): Promise<DeepPartial<SchemaDesign>>;
+ deleteSchemaDesign(
+ request: DeleteSchemaDesignRequest,
+ context: CallContext & CallContextExt,
+ ): Promise<DeepPartial<Empty>>;
+}
+
+export interface SchemaDesignServiceClient<CallOptionsExt = {}> {
+ getSchemaDesign(
+ request: DeepPartial<GetSchemaDesignRequest>,
+ options?: CallOptions & CallOptionsExt,
+ ): Promise<SchemaDesign>;
+ listSchemaDesigns(
+ request: DeepPartial<ListSchemaDesignsRequest>,
+ options?: CallOptions & CallOptionsExt,
+ ): Promise<ListSchemaDesignsResponse>;
+ createSchemaDesign(
+ request: DeepPartial<CreateSchemaDesignRequest>,
+ options?: CallOptions & CallOptionsExt,
+ ): Promise<SchemaDesign>;
+ updateSchemaDesign(
+ request: DeepPartial<UpdateSchemaDesignRequest>,
+ options?: CallOptions & CallOptionsExt,
+ ): Promise<SchemaDesign>;
+ deleteSchemaDesign(
+ request: DeepPartial<DeleteSchemaDesignRequest>,
+ options?: CallOptions & CallOptionsExt,
+ ): Promise<Empty>;
+}
+
+type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
+
+export type DeepPartial<T> = T extends Builtin ? T
+ : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
+ : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
+ : Partial<T>;
+
+function toTimestamp(date: Date): Timestamp {
+ const seconds = date.getTime() / 1_000;
+ const nanos = (date.getTime() % 1_000) * 1_000_000;
+ return { seconds, nanos };
+}
+
+function fromTimestamp(t: Timestamp): Date {
+ let millis = (t.seconds || 0) * 1_000;
+ millis += (t.nanos || 0) / 1_000_000;
+ return new Date(millis);
+}
+
+function fromJsonTimestamp(o: any): Date {
+ if (o instanceof Date) {
+ return o;
+ } else if (typeof o === "string") {
+ return new Date(o);
+ } else {
+ return fromTimestamp(Timestamp.fromJSON(o));
+ }
+}
+
+function isSet(value: any): boolean {
+ return value !== null && value !== undefined;
+}
diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.md
index 6719494317..f6f3b259a7 100644
--- a/proto/gen/grpc-doc/v1/README.md
+++ b/proto/gen/grpc-doc/v1/README.md
@@ -470,6 +470,17 @@
- [RolloutService](#bytebase-v1-RolloutService)
+- [v1/schema_design_service.proto](#v1_schema_design_service-proto)
+ - [CreateSchemaDesignRequest](#bytebase-v1-CreateSchemaDesignRequest)
+ - [DeleteSchemaDesignRequest](#bytebase-v1-DeleteSchemaDesignRequest)
+ - [GetSchemaDesignRequest](#bytebase-v1-GetSchemaDesignRequest)
+ - [ListSchemaDesignsRequest](#bytebase-v1-ListSchemaDesignsRequest)
+ - [ListSchemaDesignsResponse](#bytebase-v1-ListSchemaDesignsResponse)
+ - [SchemaDesign](#bytebase-v1-SchemaDesign)
+ - [UpdateSchemaDesignRequest](#bytebase-v1-UpdateSchemaDesignRequest)
+
+ - [SchemaDesignService](#bytebase-v1-SchemaDesignService)
+
- [v1/subscription_service.proto](#v1_subscription_service-proto)
- [Feature](#bytebase-v1-Feature)
- [Feature.MatrixEntry](#bytebase-v1-Feature-MatrixEntry)
@@ -7526,6 +7537,163 @@ Type is the database change type.
+<a name="v1_schema_design_service-proto"></a>
+<p align="right"><a href="#top">Top</a></p>
+
+## v1/schema_design_service.proto
+
+
+
+<a name="bytebase-v1-CreateSchemaDesignRequest"></a>
+
+### CreateSchemaDesignRequest
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| parent | [string](#string) | | The parent, which owns this collection of schema designs. Format: project/{project} Use &#34;projects/-&#34; to list all schema designs. |
+| schema_design | [SchemaDesign](#bytebase-v1-SchemaDesign) | | |
+
+
+
+
+
+
+<a name="bytebase-v1-DeleteSchemaDesignRequest"></a>
+
+### DeleteSchemaDesignRequest
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| name | [string](#string) | | The name of the schema design to delete. Format: projects/{project}/schemaDesigns/{schemaDesign} |
+
+
+
+
+
+
+<a name="bytebase-v1-GetSchemaDesignRequest"></a>
+
+### GetSchemaDesignRequest
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| name | [string](#string) | | The name of the schema design to retrieve. Format: projects/{project}/schemaDesigns/{schemaDesign} |
+
+
+
+
+
+
+<a name="bytebase-v1-ListSchemaDesignsRequest"></a>
+
+### ListSchemaDesignsRequest
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| parent | [string](#string) | | The parent resource of the schema design. Foramt: projects/{project} |
+| filter | [string](#string) | | To filter the search result. Format: only support the following spec for now: - `creator = users/{email}`, `creator != users/{email}` - `starred = true`, `starred = false`. Not support empty filter for now. |
+| page_size | [int32](#int32) | | The maximum number of schema designs to return. The service may return fewer than this value. If unspecified, at most 50 schema designs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |
+| page_token | [string](#string) | | A page token, received from a previous `ListSchemaDesigns` call. Provide this to retrieve the subsequent page.
+
+When paginating, all other parameters provided to `ListSchemaDesigns` must match the call that provided the page token. |
+
+
+
+
+
+
+<a name="bytebase-v1-ListSchemaDesignsResponse"></a>
+
+### ListSchemaDesignsResponse
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| schema_designs | [SchemaDesign](#bytebase-v1-SchemaDesign) | repeated | The schema designs from the specified request. |
+| next_page_token | [string](#string) | | A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |
+
+
+
+
+
+
+<a name="bytebase-v1-SchemaDesign"></a>
+
+### SchemaDesign
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| name | [string](#string) | | The name of the schema design. Format: projects/{project}/schemaDesigns/{schemaDesign} |
+| title | [string](#string) | | The title of schema design. AKA sheet&#39;s title. |
+| schema | [string](#string) | | Current editing schema. |
+| schema_metadata | [DatabaseMetadata](#bytebase-v1-DatabaseMetadata) | | |
+| baseline_schema | [string](#string) | | |
+| baseline_schema_metadata | [DatabaseMetadata](#bytebase-v1-DatabaseMetadata) | | |
+| engine | [Engine](#bytebase-v1-Engine) | | |
+| baseline_database | [string](#string) | | The name of the baseline database. Format: instances/{instance}/databases/{database} |
+| schema_version | [string](#string) | | |
+| creator | [string](#string) | | The creator of the schema design. Format: users/{email} |
+| updater | [string](#string) | | The updater of the schema design. Format: users/{email} |
+| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
+| update_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
+
+
+
+
+
+
+<a name="bytebase-v1-UpdateSchemaDesignRequest"></a>
+
+### UpdateSchemaDesignRequest
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| schema_design | [SchemaDesign](#bytebase-v1-SchemaDesign) | | The schema design to update.
+
+The schema design&#39;s `name` field is used to identify the schema design to update. Format: projects/{project}/schemaDesigns/{schemaDesign} |
+| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | The list of fields to update. |
+
+
+
+
+
+
+
+
+
+
+
+
+<a name="bytebase-v1-SchemaDesignService"></a>
+
+### SchemaDesignService
+
+
+| Method Name | Request Type | Response Type | Description |
+| ----------- | ------------ | ------------- | ------------|
+| GetSchemaDesign | [GetSchemaDesignRequest](#bytebase-v1-GetSchemaDesignRequest) | [SchemaDesign](#bytebase-v1-SchemaDesign) | |
+| ListSchemaDesigns | [ListSchemaDesignsRequest](#bytebase-v1-ListSchemaDesignsRequest) | [ListSchemaDesignsResponse](#bytebase-v1-ListSchemaDesignsResponse) | |
+| CreateSchemaDesign | [CreateSchemaDesignRequest](#bytebase-v1-CreateSchemaDesignRequest) | [SchemaDesign](#bytebase-v1-SchemaDesign) | |
+| UpdateSchemaDesign | [UpdateSchemaDesignRequest](#bytebase-v1-UpdateSchemaDesignRequest) | [SchemaDesign](#bytebase-v1-SchemaDesign) | |
+| DeleteSchemaDesign | [DeleteSchemaDesignRequest](#bytebase-v1-DeleteSchemaDesignRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | |
+
+
+
+
+
<a name="v1_subscription_service-proto"></a>
<p align="right"><a href="#top">Top</a></p>
diff --git a/proto/generated-go/v1/schema_design_service.pb.go b/proto/generated-go/v1/schema_design_service.pb.go
new file mode 100644
index 0000000000..d2fd423af9
--- /dev/null
+++ b/proto/generated-go/v1/schema_design_service.pb.go
@@ -0,0 +1,862 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.31.0
+// protoc (unknown)
+// source: v1/schema_design_service.proto
+
+package v1
+
+import (
+ _ "google.golang.org/genproto/googleapis/api/annotations"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ emptypb "google.golang.org/protobuf/types/known/emptypb"
+ fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb"
+ timestamppb "google.golang.org/protobuf/types/known/timestamppb"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type SchemaDesign struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The name of the schema design.
+ // Format: projects/{project}/schemaDesigns/{schemaDesign}
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ // The title of schema design. AKA sheet's title.
+ Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
+ // Current editing schema.
+ Schema string `protobuf:"bytes,3,opt,name=schema,proto3" json:"schema,omitempty"`
+ SchemaMetadata *DatabaseMetadata `protobuf:"bytes,4,opt,name=schema_metadata,json=schemaMetadata,proto3" json:"schema_metadata,omitempty"`
+ BaselineSchema string `protobuf:"bytes,5,opt,name=baseline_schema,json=baselineSchema,proto3" json:"baseline_schema,omitempty"`
+ BaselineSchemaMetadata *DatabaseMetadata `protobuf:"bytes,6,opt,name=baseline_schema_metadata,json=baselineSchemaMetadata,proto3" json:"baseline_schema_metadata,omitempty"`
+ Engine Engine `protobuf:"varint,7,opt,name=engine,proto3,enum=bytebase.v1.Engine" json:"engine,omitempty"`
+ // The name of the baseline database.
+ // Format: instances/{instance}/databases/{database}
+ BaselineDatabase string `protobuf:"bytes,8,opt,name=baseline_database,json=baselineDatabase,proto3" json:"baseline_database,omitempty"`
+ SchemaVersion string `protobuf:"bytes,9,opt,name=schema_version,json=schemaVersion,proto3" json:"schema_version,omitempty"`
+ // The creator of the schema design.
+ // Format: users/{email}
+ Creator string `protobuf:"bytes,10,opt,name=creator,proto3" json:"creator,omitempty"`
+ // The updater of the schema design.
+ // Format: users/{email}
+ Updater string `protobuf:"bytes,11,opt,name=updater,proto3" json:"updater,omitempty"`
+ CreateTime *timestamppb.Timestamp `protobuf:"bytes,12,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
+ UpdateTime *timestamppb.Timestamp `protobuf:"bytes,13,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"`
+}
+
+func (x *SchemaDesign) Reset() {
+ *x = SchemaDesign{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_v1_schema_design_service_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *SchemaDesign) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SchemaDesign) ProtoMessage() {}
+
+func (x *SchemaDesign) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_schema_design_service_proto_msgTypes[0]
+ 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 SchemaDesign.ProtoReflect.Descriptor instead.
+func (*SchemaDesign) Descriptor() ([]byte, []int) {
+ return file_v1_schema_design_service_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *SchemaDesign) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *SchemaDesign) GetTitle() string {
+ if x != nil {
+ return x.Title
+ }
+ return ""
+}
+
+func (x *SchemaDesign) GetSchema() string {
+ if x != nil {
+ return x.Schema
+ }
+ return ""
+}
+
+func (x *SchemaDesign) GetSchemaMetadata() *DatabaseMetadata {
+ if x != nil {
+ return x.SchemaMetadata
+ }
+ return nil
+}
+
+func (x *SchemaDesign) GetBaselineSchema() string {
+ if x != nil {
+ return x.BaselineSchema
+ }
+ return ""
+}
+
+func (x *SchemaDesign) GetBaselineSchemaMetadata() *DatabaseMetadata {
+ if x != nil {
+ return x.BaselineSchemaMetadata
+ }
+ return nil
+}
+
+func (x *SchemaDesign) GetEngine() Engine {
+ if x != nil {
+ return x.Engine
+ }
+ return Engine_ENGINE_UNSPECIFIED
+}
+
+func (x *SchemaDesign) GetBaselineDatabase() string {
+ if x != nil {
+ return x.BaselineDatabase
+ }
+ return ""
+}
+
+func (x *SchemaDesign) GetSchemaVersion() string {
+ if x != nil {
+ return x.SchemaVersion
+ }
+ return ""
+}
+
+func (x *SchemaDesign) GetCreator() string {
+ if x != nil {
+ return x.Creator
+ }
+ return ""
+}
+
+func (x *SchemaDesign) GetUpdater() string {
+ if x != nil {
+ return x.Updater
+ }
+ return ""
+}
+
+func (x *SchemaDesign) GetCreateTime() *timestamppb.Timestamp {
+ if x != nil {
+ return x.CreateTime
+ }
+ return nil
+}
+
+func (x *SchemaDesign) GetUpdateTime() *timestamppb.Timestamp {
+ if x != nil {
+ return x.UpdateTime
+ }
+ return nil
+}
+
+type GetSchemaDesignRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The name of the schema design to retrieve.
+ // Format: projects/{project}/schemaDesigns/{schemaDesign}
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+}
+
+func (x *GetSchemaDesignRequest) Reset() {
+ *x = GetSchemaDesignRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_v1_schema_design_service_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetSchemaDesignRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetSchemaDesignRequest) ProtoMessage() {}
+
+func (x *GetSchemaDesignRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_schema_design_service_proto_msgTypes[1]
+ 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 GetSchemaDesignRequest.ProtoReflect.Descriptor instead.
+func (*GetSchemaDesignRequest) Descriptor() ([]byte, []int) {
+ return file_v1_schema_design_service_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *GetSchemaDesignRequest) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+type ListSchemaDesignsRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The parent resource of the schema design.
+ // Foramt: projects/{project}
+ Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
+ // To filter the search result.
+ // Format: only support the following spec for now:
+ // - `creator = users/{email}`, `creator != users/{email}`
+ // - `starred = true`, `starred = false`.
+ // Not support empty filter for now.
+ Filter string `protobuf:"bytes,2,opt,name=filter,proto3" json:"filter,omitempty"`
+ // The maximum number of schema designs to return. The service may return fewer than
+ // this value.
+ // If unspecified, at most 50 schema designs will be returned.
+ // The maximum value is 1000; values above 1000 will be coerced to 1000.
+ PageSize int32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
+ // A page token, received from a previous `ListSchemaDesigns` call.
+ // Provide this to retrieve the subsequent page.
+ //
+ // When paginating, all other parameters provided to `ListSchemaDesigns` must match
+ // the call that provided the page token.
+ PageToken string `protobuf:"bytes,4,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
+}
+
+func (x *ListSchemaDesignsRequest) Reset() {
+ *x = ListSchemaDesignsRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_v1_schema_design_service_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListSchemaDesignsRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListSchemaDesignsRequest) ProtoMessage() {}
+
+func (x *ListSchemaDesignsRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_schema_design_service_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 ListSchemaDesignsRequest.ProtoReflect.Descriptor instead.
+func (*ListSchemaDesignsRequest) Descriptor() ([]byte, []int) {
+ return file_v1_schema_design_service_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *ListSchemaDesignsRequest) GetParent() string {
+ if x != nil {
+ return x.Parent
+ }
+ return ""
+}
+
+func (x *ListSchemaDesignsRequest) GetFilter() string {
+ if x != nil {
+ return x.Filter
+ }
+ return ""
+}
+
+func (x *ListSchemaDesignsRequest) GetPageSize() int32 {
+ if x != nil {
+ return x.PageSize
+ }
+ return 0
+}
+
+func (x *ListSchemaDesignsRequest) GetPageToken() string {
+ if x != nil {
+ return x.PageToken
+ }
+ return ""
+}
+
+type ListSchemaDesignsResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The schema designs from the specified request.
+ SchemaDesigns []*SchemaDesign `protobuf:"bytes,1,rep,name=schema_designs,json=schemaDesigns,proto3" json:"schema_designs,omitempty"`
+ // A token, which can be sent as `page_token` to retrieve the next page.
+ // If this field is omitted, there are no subsequent pages.
+ NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
+}
+
+func (x *ListSchemaDesignsResponse) Reset() {
+ *x = ListSchemaDesignsResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_v1_schema_design_service_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListSchemaDesignsResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListSchemaDesignsResponse) ProtoMessage() {}
+
+func (x *ListSchemaDesignsResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_schema_design_service_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 ListSchemaDesignsResponse.ProtoReflect.Descriptor instead.
+func (*ListSchemaDesignsResponse) Descriptor() ([]byte, []int) {
+ return file_v1_schema_design_service_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *ListSchemaDesignsResponse) GetSchemaDesigns() []*SchemaDesign {
+ if x != nil {
+ return x.SchemaDesigns
+ }
+ return nil
+}
+
+func (x *ListSchemaDesignsResponse) GetNextPageToken() string {
+ if x != nil {
+ return x.NextPageToken
+ }
+ return ""
+}
+
+type CreateSchemaDesignRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The parent, which owns this collection of schema designs.
+ // Format: project/{project}
+ // Use "projects/-" to list all schema designs.
+ Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
+ SchemaDesign *SchemaDesign `protobuf:"bytes,2,opt,name=schema_design,json=schemaDesign,proto3" json:"schema_design,omitempty"`
+}
+
+func (x *CreateSchemaDesignRequest) Reset() {
+ *x = CreateSchemaDesignRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_v1_schema_design_service_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CreateSchemaDesignRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CreateSchemaDesignRequest) ProtoMessage() {}
+
+func (x *CreateSchemaDesignRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_schema_design_service_proto_msgTypes[4]
+ 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 CreateSchemaDesignRequest.ProtoReflect.Descriptor instead.
+func (*CreateSchemaDesignRequest) Descriptor() ([]byte, []int) {
+ return file_v1_schema_design_service_proto_rawDescGZIP(), []int{4}
+}
+
+func (x *CreateSchemaDesignRequest) GetParent() string {
+ if x != nil {
+ return x.Parent
+ }
+ return ""
+}
+
+func (x *CreateSchemaDesignRequest) GetSchemaDesign() *SchemaDesign {
+ if x != nil {
+ return x.SchemaDesign
+ }
+ return nil
+}
+
+type UpdateSchemaDesignRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The schema design to update.
+ //
+ // The schema design's `name` field is used to identify the schema design to update.
+ // Format: projects/{project}/schemaDesigns/{schemaDesign}
+ SchemaDesign *SchemaDesign `protobuf:"bytes,1,opt,name=schema_design,json=schemaDesign,proto3" json:"schema_design,omitempty"`
+ // The list of fields to update.
+ UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`
+}
+
+func (x *UpdateSchemaDesignRequest) Reset() {
+ *x = UpdateSchemaDesignRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_v1_schema_design_service_proto_msgTypes[5]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UpdateSchemaDesignRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UpdateSchemaDesignRequest) ProtoMessage() {}
+
+func (x *UpdateSchemaDesignRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_schema_design_service_proto_msgTypes[5]
+ 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 UpdateSchemaDesignRequest.ProtoReflect.Descriptor instead.
+func (*UpdateSchemaDesignRequest) Descriptor() ([]byte, []int) {
+ return file_v1_schema_design_service_proto_rawDescGZIP(), []int{5}
+}
+
+func (x *UpdateSchemaDesignRequest) GetSchemaDesign() *SchemaDesign {
+ if x != nil {
+ return x.SchemaDesign
+ }
+ return nil
+}
+
+func (x *UpdateSchemaDesignRequest) GetUpdateMask() *fieldmaskpb.FieldMask {
+ if x != nil {
+ return x.UpdateMask
+ }
+ return nil
+}
+
+type DeleteSchemaDesignRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The name of the schema design to delete.
+ // Format: projects/{project}/schemaDesigns/{schemaDesign}
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+}
+
+func (x *DeleteSchemaDesignRequest) Reset() {
+ *x = DeleteSchemaDesignRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_v1_schema_design_service_proto_msgTypes[6]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DeleteSchemaDesignRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DeleteSchemaDesignRequest) ProtoMessage() {}
+
+func (x *DeleteSchemaDesignRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_schema_design_service_proto_msgTypes[6]
+ 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 DeleteSchemaDesignRequest.ProtoReflect.Descriptor instead.
+func (*DeleteSchemaDesignRequest) Descriptor() ([]byte, []int) {
+ return file_v1_schema_design_service_proto_rawDescGZIP(), []int{6}
+}
+
+func (x *DeleteSchemaDesignRequest) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+var File_v1_schema_design_service_proto protoreflect.FileDescriptor
+
+var file_v1_schema_design_service_proto_rawDesc = []byte{
+ 0x0a, 0x1e, 0x76, 0x31, 0x2f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x64, 0x65, 0x73, 0x69,
+ 0x67, 0x6e, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x12, 0x0b, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x1c, 0x67,
+ 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61,
+ 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f,
+ 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69,
+ 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x62, 0x75, 0x66, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x2e, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e,
+ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x76, 0x31, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x62,
+ 0x61, 0x73, 0x65, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x22, 0xf6, 0x04, 0x0a, 0x0c, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x73, 0x69,
+ 0x67, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18,
+ 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x1b, 0x0a, 0x06,
+ 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41,
+ 0x03, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x46, 0x0a, 0x0f, 0x73, 0x63, 0x68,
+ 0x65, 0x6d, 0x61, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,
+ 0x2e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
+ 0x61, 0x52, 0x0e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
+ 0x61, 0x12, 0x2c, 0x0a, 0x0f, 0x62, 0x61, 0x73, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x73, 0x63,
+ 0x68, 0x65, 0x6d, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52,
+ 0x0e, 0x62, 0x61, 0x73, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12,
+ 0x5c, 0x0a, 0x18, 0x62, 0x61, 0x73, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x73, 0x63, 0x68, 0x65,
+ 0x6d, 0x61, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x06, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x1d, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e,
+ 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,
+ 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x16, 0x62, 0x61, 0x73, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x53,
+ 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x2b, 0x0a,
+ 0x06, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e,
+ 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x67, 0x69,
+ 0x6e, 0x65, 0x52, 0x06, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x12, 0x30, 0x0a, 0x11, 0x62, 0x61,
+ 0x73, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x18,
+ 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x05, 0x52, 0x10, 0x62, 0x61, 0x73, 0x65,
+ 0x6c, 0x69, 0x6e, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x0e,
+ 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x09,
+ 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x05, 0x52, 0x0d, 0x73, 0x63, 0x68, 0x65, 0x6d,
+ 0x61, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61,
+ 0x74, 0x6f, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x07,
+ 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x1d, 0x0a, 0x07, 0x75, 0x70, 0x64, 0x61, 0x74,
+ 0x65, 0x72, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x07, 0x75,
+ 0x70, 0x64, 0x61, 0x74, 0x65, 0x72, 0x12, 0x40, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65,
+ 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f,
+ 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69,
+ 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x63, 0x72,
+ 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x40, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61,
+ 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e,
+ 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
+ 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a,
+ 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x31, 0x0a, 0x16, 0x47, 0x65,
+ 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x71,
+ 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x8b, 0x01,
+ 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x73, 0x69,
+ 0x67, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x06, 0x70, 0x61,
+ 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52,
+ 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65,
+ 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12,
+ 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01,
+ 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a,
+ 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x85, 0x01, 0x0a, 0x19,
+ 0x4c, 0x69, 0x73, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x73, 0x69, 0x67, 0x6e,
+ 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0e, 0x73, 0x63, 0x68,
+ 0x65, 0x6d, 0x61, 0x5f, 0x64, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28,
+ 0x0b, 0x32, 0x19, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e,
+ 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x52, 0x0d, 0x73, 0x63,
+ 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e,
+ 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f,
+ 0x6b, 0x65, 0x6e, 0x22, 0x73, 0x0a, 0x19, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x63, 0x68,
+ 0x65, 0x6d, 0x61, 0x44, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+ 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x3e, 0x0a, 0x0d, 0x73, 0x63, 0x68, 0x65,
+ 0x6d, 0x61, 0x5f, 0x64, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32,
+ 0x19, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x63,
+ 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x52, 0x0c, 0x73, 0x63, 0x68, 0x65,
+ 0x6d, 0x61, 0x44, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x22, 0x9d, 0x01, 0x0a, 0x19, 0x55, 0x70, 0x64,
+ 0x61, 0x74, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x52,
+ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x43, 0x0a, 0x0d, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61,
+ 0x5f, 0x64, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e,
+ 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65,
+ 0x6d, 0x61, 0x44, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0c, 0x73,
+ 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x12, 0x3b, 0x0a, 0x0b, 0x75,
+ 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
+ 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
+ 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x75, 0x70,
+ 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x34, 0x0a, 0x19, 0x44, 0x65, 0x6c, 0x65,
+ 0x74, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x52, 0x65,
+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x32, 0xb1,
+ 0x06, 0x0a, 0x13, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x53,
+ 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x87, 0x01, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x53, 0x63,
+ 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x12, 0x23, 0x2e, 0x62, 0x79, 0x74,
+ 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65,
+ 0x6d, 0x61, 0x44, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
+ 0x19, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x63,
+ 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x22, 0x34, 0xda, 0x41, 0x04, 0x6e,
+ 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x27, 0x12, 0x25, 0x2f, 0x76, 0x31, 0x2f, 0x7b,
+ 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f,
+ 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x73, 0x2f, 0x2a, 0x7d,
+ 0x12, 0x94, 0x01, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44,
+ 0x65, 0x73, 0x69, 0x67, 0x6e, 0x73, 0x12, 0x25, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,
+ 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44,
+ 0x65, 0x73, 0x69, 0x67, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e,
+ 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74,
+ 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x73, 0x52, 0x65, 0x73,
+ 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x30, 0xda, 0x41, 0x00, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x27,
+ 0x12, 0x25, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72,
+ 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61,
+ 0x44, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x73, 0x12, 0xaa, 0x01, 0x0a, 0x12, 0x43, 0x72, 0x65, 0x61,
+ 0x74, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x12, 0x26,
+ 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65,
+ 0x61, 0x74, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x52,
+ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,
+ 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x73, 0x69, 0x67,
+ 0x6e, 0x22, 0x51, 0xda, 0x41, 0x13, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x73, 0x63, 0x68,
+ 0x65, 0x6d, 0x61, 0x44, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x35, 0x3a,
+ 0x0d, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x64, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x22, 0x24,
+ 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a,
+ 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65,
+ 0x73, 0x69, 0x67, 0x6e, 0x12, 0xbe, 0x01, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53,
+ 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x12, 0x26, 0x2e, 0x62, 0x79,
+ 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
+ 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x71, 0x75,
+ 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76,
+ 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x22, 0x65,
+ 0xda, 0x41, 0x18, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x2c,
+ 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02,
+ 0x44, 0x3a, 0x0d, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x64, 0x65, 0x73, 0x69, 0x67, 0x6e,
+ 0x32, 0x33, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x64, 0x65,
+ 0x73, 0x69, 0x67, 0x6e, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63,
+ 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x73, 0x69, 0x67,
+ 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x8a, 0x01, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65,
+ 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x12, 0x26, 0x2e, 0x62,
+ 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74,
+ 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x71,
+ 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x34, 0xda, 0x41,
+ 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x27, 0x2a, 0x25, 0x2f, 0x76, 0x31,
+ 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f,
+ 0x2a, 0x2f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x73, 0x2f,
+ 0x2a, 0x7d, 0x42, 0x11, 0x5a, 0x0f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2d,
+ 0x67, 0x6f, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_v1_schema_design_service_proto_rawDescOnce sync.Once
+ file_v1_schema_design_service_proto_rawDescData = file_v1_schema_design_service_proto_rawDesc
+)
+
+func file_v1_schema_design_service_proto_rawDescGZIP() []byte {
+ file_v1_schema_design_service_proto_rawDescOnce.Do(func() {
+ file_v1_schema_design_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_v1_schema_design_service_proto_rawDescData)
+ })
+ return file_v1_schema_design_service_proto_rawDescData
+}
+
+var file_v1_schema_design_service_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
+var file_v1_schema_design_service_proto_goTypes = []interface{}{
+ (*SchemaDesign)(nil), // 0: bytebase.v1.SchemaDesign
+ (*GetSchemaDesignRequest)(nil), // 1: bytebase.v1.GetSchemaDesignRequest
+ (*ListSchemaDesignsRequest)(nil), // 2: bytebase.v1.ListSchemaDesignsRequest
+ (*ListSchemaDesignsResponse)(nil), // 3: bytebase.v1.ListSchemaDesignsResponse
+ (*CreateSchemaDesignRequest)(nil), // 4: bytebase.v1.CreateSchemaDesignRequest
+ (*UpdateSchemaDesignRequest)(nil), // 5: bytebase.v1.UpdateSchemaDesignRequest
+ (*DeleteSchemaDesignRequest)(nil), // 6: bytebase.v1.DeleteSchemaDesignRequest
+ (*DatabaseMetadata)(nil), // 7: bytebase.v1.DatabaseMetadata
+ (Engine)(0), // 8: bytebase.v1.Engine
+ (*timestamppb.Timestamp)(nil), // 9: google.protobuf.Timestamp
+ (*fieldmaskpb.FieldMask)(nil), // 10: google.protobuf.FieldMask
+ (*emptypb.Empty)(nil), // 11: google.protobuf.Empty
+}
+var file_v1_schema_design_service_proto_depIdxs = []int32{
+ 7, // 0: bytebase.v1.SchemaDesign.schema_metadata:type_name -> bytebase.v1.DatabaseMetadata
+ 7, // 1: bytebase.v1.SchemaDesign.baseline_schema_metadata:type_name -> bytebase.v1.DatabaseMetadata
+ 8, // 2: bytebase.v1.SchemaDesign.engine:type_name -> bytebase.v1.Engine
+ 9, // 3: bytebase.v1.SchemaDesign.create_time:type_name -> google.protobuf.Timestamp
+ 9, // 4: bytebase.v1.SchemaDesign.update_time:type_name -> google.protobuf.Timestamp
+ 0, // 5: bytebase.v1.ListSchemaDesignsResponse.schema_designs:type_name -> bytebase.v1.SchemaDesign
+ 0, // 6: bytebase.v1.CreateSchemaDesignRequest.schema_design:type_name -> bytebase.v1.SchemaDesign
+ 0, // 7: bytebase.v1.UpdateSchemaDesignRequest.schema_design:type_name -> bytebase.v1.SchemaDesign
+ 10, // 8: bytebase.v1.UpdateSchemaDesignRequest.update_mask:type_name -> google.protobuf.FieldMask
+ 1, // 9: bytebase.v1.SchemaDesignService.GetSchemaDesign:input_type -> bytebase.v1.GetSchemaDesignRequest
+ 2, // 10: bytebase.v1.SchemaDesignService.ListSchemaDesigns:input_type -> bytebase.v1.ListSchemaDesignsRequest
+ 4, // 11: bytebase.v1.SchemaDesignService.CreateSchemaDesign:input_type -> bytebase.v1.CreateSchemaDesignRequest
+ 5, // 12: bytebase.v1.SchemaDesignService.UpdateSchemaDesign:input_type -> bytebase.v1.UpdateSchemaDesignRequest
+ 6, // 13: bytebase.v1.SchemaDesignService.DeleteSchemaDesign:input_type -> bytebase.v1.DeleteSchemaDesignRequest
+ 0, // 14: bytebase.v1.SchemaDesignService.GetSchemaDesign:output_type -> bytebase.v1.SchemaDesign
+ 3, // 15: bytebase.v1.SchemaDesignService.ListSchemaDesigns:output_type -> bytebase.v1.ListSchemaDesignsResponse
+ 0, // 16: bytebase.v1.SchemaDesignService.CreateSchemaDesign:output_type -> bytebase.v1.SchemaDesign
+ 0, // 17: bytebase.v1.SchemaDesignService.UpdateSchemaDesign:output_type -> bytebase.v1.SchemaDesign
+ 11, // 18: bytebase.v1.SchemaDesignService.DeleteSchemaDesign:output_type -> google.protobuf.Empty
+ 14, // [14:19] is the sub-list for method output_type
+ 9, // [9:14] is the sub-list for method input_type
+ 9, // [9:9] is the sub-list for extension type_name
+ 9, // [9:9] is the sub-list for extension extendee
+ 0, // [0:9] is the sub-list for field type_name
+}
+
+func init() { file_v1_schema_design_service_proto_init() }
+func file_v1_schema_design_service_proto_init() {
+ if File_v1_schema_design_service_proto != nil {
+ return
+ }
+ file_v1_common_proto_init()
+ file_v1_database_service_proto_init()
+ if !protoimpl.UnsafeEnabled {
+ file_v1_schema_design_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*SchemaDesign); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_v1_schema_design_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetSchemaDesignRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_v1_schema_design_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListSchemaDesignsRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_v1_schema_design_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListSchemaDesignsResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_v1_schema_design_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CreateSchemaDesignRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_v1_schema_design_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UpdateSchemaDesignRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_v1_schema_design_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DeleteSchemaDesignRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_v1_schema_design_service_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 7,
+ NumExtensions: 0,
+ NumServices: 1,
+ },
+ GoTypes: file_v1_schema_design_service_proto_goTypes,
+ DependencyIndexes: file_v1_schema_design_service_proto_depIdxs,
+ MessageInfos: file_v1_schema_design_service_proto_msgTypes,
+ }.Build()
+ File_v1_schema_design_service_proto = out.File
+ file_v1_schema_design_service_proto_rawDesc = nil
+ file_v1_schema_design_service_proto_goTypes = nil
+ file_v1_schema_design_service_proto_depIdxs = nil
+}
diff --git a/proto/generated-go/v1/schema_design_service.pb.gw.go b/proto/generated-go/v1/schema_design_service.pb.gw.go
new file mode 100644
index 0000000000..e4b6cb6809
--- /dev/null
+++ b/proto/generated-go/v1/schema_design_service.pb.gw.go
@@ -0,0 +1,683 @@
+// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
+// source: v1/schema_design_service.proto
+
+/*
+Package v1 is a reverse proxy.
+
+It translates gRPC into RESTful JSON APIs.
+*/
+package v1
+
+import (
+ "context"
+ "io"
+ "net/http"
+
+ "github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
+ "github.com/grpc-ecosystem/grpc-gateway/v2/utilities"
+ "google.golang.org/grpc"
+ "google.golang.org/grpc/codes"
+ "google.golang.org/grpc/grpclog"
+ "google.golang.org/grpc/metadata"
+ "google.golang.org/grpc/status"
+ "google.golang.org/protobuf/proto"
+)
+
+// Suppress "imported and not used" errors
+var _ codes.Code
+var _ io.Reader
+var _ status.Status
+var _ = runtime.String
+var _ = utilities.NewDoubleArray
+var _ = metadata.Join
+
+func request_SchemaDesignService_GetSchemaDesign_0(ctx context.Context, marshaler runtime.Marshaler, client SchemaDesignServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq GetSchemaDesignRequest
+ var metadata runtime.ServerMetadata
+
+ var (
+ val string
+ ok bool
+ err error
+ _ = err
+ )
+
+ val, ok = pathParams["name"]
+ if !ok {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name")
+ }
+
+ protoReq.Name, err = runtime.String(val)
+ if err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
+ }
+
+ msg, err := client.GetSchemaDesign(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ return msg, metadata, err
+
+}
+
+func local_request_SchemaDesignService_GetSchemaDesign_0(ctx context.Context, marshaler runtime.Marshaler, server SchemaDesignServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq GetSchemaDesignRequest
+ var metadata runtime.ServerMetadata
+
+ var (
+ val string
+ ok bool
+ err error
+ _ = err
+ )
+
+ val, ok = pathParams["name"]
+ if !ok {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name")
+ }
+
+ protoReq.Name, err = runtime.String(val)
+ if err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
+ }
+
+ msg, err := server.GetSchemaDesign(ctx, &protoReq)
+ return msg, metadata, err
+
+}
+
+var (
+ filter_SchemaDesignService_ListSchemaDesigns_0 = &utilities.DoubleArray{Encoding: map[string]int{"parent": 0}, Base: []int{1, 2, 0, 0}, Check: []int{0, 1, 2, 2}}
+)
+
+func request_SchemaDesignService_ListSchemaDesigns_0(ctx context.Context, marshaler runtime.Marshaler, client SchemaDesignServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq ListSchemaDesignsRequest
+ var metadata runtime.ServerMetadata
+
+ var (
+ val string
+ ok bool
+ err error
+ _ = err
+ )
+
+ val, ok = pathParams["parent"]
+ if !ok {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "parent")
+ }
+
+ protoReq.Parent, err = runtime.String(val)
+ if err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err)
+ }
+
+ if err := req.ParseForm(); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SchemaDesignService_ListSchemaDesigns_0); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+
+ msg, err := client.ListSchemaDesigns(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ return msg, metadata, err
+
+}
+
+func local_request_SchemaDesignService_ListSchemaDesigns_0(ctx context.Context, marshaler runtime.Marshaler, server SchemaDesignServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq ListSchemaDesignsRequest
+ var metadata runtime.ServerMetadata
+
+ var (
+ val string
+ ok bool
+ err error
+ _ = err
+ )
+
+ val, ok = pathParams["parent"]
+ if !ok {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "parent")
+ }
+
+ protoReq.Parent, err = runtime.String(val)
+ if err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err)
+ }
+
+ if err := req.ParseForm(); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SchemaDesignService_ListSchemaDesigns_0); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+
+ msg, err := server.ListSchemaDesigns(ctx, &protoReq)
+ return msg, metadata, err
+
+}
+
+func request_SchemaDesignService_CreateSchemaDesign_0(ctx context.Context, marshaler runtime.Marshaler, client SchemaDesignServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq CreateSchemaDesignRequest
+ var metadata runtime.ServerMetadata
+
+ newReader, berr := utilities.IOReaderFactory(req.Body)
+ if berr != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
+ }
+ if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.SchemaDesign); err != nil && err != io.EOF {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+
+ var (
+ val string
+ ok bool
+ err error
+ _ = err
+ )
+
+ val, ok = pathParams["parent"]
+ if !ok {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "parent")
+ }
+
+ protoReq.Parent, err = runtime.String(val)
+ if err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err)
+ }
+
+ msg, err := client.CreateSchemaDesign(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ return msg, metadata, err
+
+}
+
+func local_request_SchemaDesignService_CreateSchemaDesign_0(ctx context.Context, marshaler runtime.Marshaler, server SchemaDesignServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq CreateSchemaDesignRequest
+ var metadata runtime.ServerMetadata
+
+ newReader, berr := utilities.IOReaderFactory(req.Body)
+ if berr != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
+ }
+ if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.SchemaDesign); err != nil && err != io.EOF {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+
+ var (
+ val string
+ ok bool
+ err error
+ _ = err
+ )
+
+ val, ok = pathParams["parent"]
+ if !ok {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "parent")
+ }
+
+ protoReq.Parent, err = runtime.String(val)
+ if err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err)
+ }
+
+ msg, err := server.CreateSchemaDesign(ctx, &protoReq)
+ return msg, metadata, err
+
+}
+
+var (
+ filter_SchemaDesignService_UpdateSchemaDesign_0 = &utilities.DoubleArray{Encoding: map[string]int{"schema_design": 0, "schemaDesign": 1, "name": 2}, Base: []int{1, 3, 4, 5, 2, 0, 0, 0, 0}, Check: []int{0, 1, 1, 1, 2, 5, 2, 3, 4}}
+)
+
+func request_SchemaDesignService_UpdateSchemaDesign_0(ctx context.Context, marshaler runtime.Marshaler, client SchemaDesignServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq UpdateSchemaDesignRequest
+ var metadata runtime.ServerMetadata
+
+ newReader, berr := utilities.IOReaderFactory(req.Body)
+ if berr != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
+ }
+ if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.SchemaDesign); err != nil && err != io.EOF {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ if protoReq.UpdateMask == nil || len(protoReq.UpdateMask.GetPaths()) == 0 {
+ if fieldMask, err := runtime.FieldMaskFromRequestBody(newReader(), protoReq.SchemaDesign); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ } else {
+ protoReq.UpdateMask = fieldMask
+ }
+ }
+
+ var (
+ val string
+ ok bool
+ err error
+ _ = err
+ )
+
+ val, ok = pathParams["schema_design.name"]
+ if !ok {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "schema_design.name")
+ }
+
+ err = runtime.PopulateFieldFromPath(&protoReq, "schema_design.name", val)
+ if err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "schema_design.name", err)
+ }
+
+ if err := req.ParseForm(); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SchemaDesignService_UpdateSchemaDesign_0); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+
+ msg, err := client.UpdateSchemaDesign(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ return msg, metadata, err
+
+}
+
+func local_request_SchemaDesignService_UpdateSchemaDesign_0(ctx context.Context, marshaler runtime.Marshaler, server SchemaDesignServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq UpdateSchemaDesignRequest
+ var metadata runtime.ServerMetadata
+
+ newReader, berr := utilities.IOReaderFactory(req.Body)
+ if berr != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
+ }
+ if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.SchemaDesign); err != nil && err != io.EOF {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ if protoReq.UpdateMask == nil || len(protoReq.UpdateMask.GetPaths()) == 0 {
+ if fieldMask, err := runtime.FieldMaskFromRequestBody(newReader(), protoReq.SchemaDesign); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ } else {
+ protoReq.UpdateMask = fieldMask
+ }
+ }
+
+ var (
+ val string
+ ok bool
+ err error
+ _ = err
+ )
+
+ val, ok = pathParams["schema_design.name"]
+ if !ok {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "schema_design.name")
+ }
+
+ err = runtime.PopulateFieldFromPath(&protoReq, "schema_design.name", val)
+ if err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "schema_design.name", err)
+ }
+
+ if err := req.ParseForm(); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SchemaDesignService_UpdateSchemaDesign_0); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+
+ msg, err := server.UpdateSchemaDesign(ctx, &protoReq)
+ return msg, metadata, err
+
+}
+
+func request_SchemaDesignService_DeleteSchemaDesign_0(ctx context.Context, marshaler runtime.Marshaler, client SchemaDesignServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq DeleteSchemaDesignRequest
+ var metadata runtime.ServerMetadata
+
+ var (
+ val string
+ ok bool
+ err error
+ _ = err
+ )
+
+ val, ok = pathParams["name"]
+ if !ok {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name")
+ }
+
+ protoReq.Name, err = runtime.String(val)
+ if err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
+ }
+
+ msg, err := client.DeleteSchemaDesign(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ return msg, metadata, err
+
+}
+
+func local_request_SchemaDesignService_DeleteSchemaDesign_0(ctx context.Context, marshaler runtime.Marshaler, server SchemaDesignServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq DeleteSchemaDesignRequest
+ var metadata runtime.ServerMetadata
+
+ var (
+ val string
+ ok bool
+ err error
+ _ = err
+ )
+
+ val, ok = pathParams["name"]
+ if !ok {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name")
+ }
+
+ protoReq.Name, err = runtime.String(val)
+ if err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
+ }
+
+ msg, err := server.DeleteSchemaDesign(ctx, &protoReq)
+ return msg, metadata, err
+
+}
+
+// RegisterSchemaDesignServiceHandlerServer registers the http handlers for service SchemaDesignService to "mux".
+// UnaryRPC :call SchemaDesignServiceServer directly.
+// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
+// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterSchemaDesignServiceHandlerFromEndpoint instead.
+func RegisterSchemaDesignServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server SchemaDesignServiceServer) error {
+
+ mux.Handle("GET", pattern_SchemaDesignService_GetSchemaDesign_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ var stream runtime.ServerTransportStream
+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.SchemaDesignService/GetSchemaDesign", runtime.WithHTTPPathPattern("/v1/{name=projects/*/schemaDesigns/*}"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := local_request_SchemaDesignService_GetSchemaDesign_0(annotatedContext, inboundMarshaler, server, req, pathParams)
+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+
+ forward_SchemaDesignService_GetSchemaDesign_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ mux.Handle("GET", pattern_SchemaDesignService_ListSchemaDesigns_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ var stream runtime.ServerTransportStream
+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.SchemaDesignService/ListSchemaDesigns", runtime.WithHTTPPathPattern("/v1/{parent=projects/*}/schemaDesigns"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := local_request_SchemaDesignService_ListSchemaDesigns_0(annotatedContext, inboundMarshaler, server, req, pathParams)
+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+
+ forward_SchemaDesignService_ListSchemaDesigns_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ mux.Handle("POST", pattern_SchemaDesignService_CreateSchemaDesign_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ var stream runtime.ServerTransportStream
+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.SchemaDesignService/CreateSchemaDesign", runtime.WithHTTPPathPattern("/v1/{parent=projects/*}/schemaDesign"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := local_request_SchemaDesignService_CreateSchemaDesign_0(annotatedContext, inboundMarshaler, server, req, pathParams)
+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+
+ forward_SchemaDesignService_CreateSchemaDesign_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ mux.Handle("PATCH", pattern_SchemaDesignService_UpdateSchemaDesign_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ var stream runtime.ServerTransportStream
+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.SchemaDesignService/UpdateSchemaDesign", runtime.WithHTTPPathPattern("/v1/{schema_design.name=projects/*/schemaDesigns/*}"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := local_request_SchemaDesignService_UpdateSchemaDesign_0(annotatedContext, inboundMarshaler, server, req, pathParams)
+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+
+ forward_SchemaDesignService_UpdateSchemaDesign_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ mux.Handle("DELETE", pattern_SchemaDesignService_DeleteSchemaDesign_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ var stream runtime.ServerTransportStream
+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.SchemaDesignService/DeleteSchemaDesign", runtime.WithHTTPPathPattern("/v1/{name=projects/*/schemaDesigns/*}"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := local_request_SchemaDesignService_DeleteSchemaDesign_0(annotatedContext, inboundMarshaler, server, req, pathParams)
+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+
+ forward_SchemaDesignService_DeleteSchemaDesign_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ return nil
+}
+
+// RegisterSchemaDesignServiceHandlerFromEndpoint is same as RegisterSchemaDesignServiceHandler but
+// automatically dials to "endpoint" and closes the connection when "ctx" gets done.
+func RegisterSchemaDesignServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
+ conn, err := grpc.DialContext(ctx, endpoint, opts...)
+ if err != nil {
+ return err
+ }
+ defer func() {
+ if err != nil {
+ if cerr := conn.Close(); cerr != nil {
+ grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
+ }
+ return
+ }
+ go func() {
+ <-ctx.Done()
+ if cerr := conn.Close(); cerr != nil {
+ grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
+ }
+ }()
+ }()
+
+ return RegisterSchemaDesignServiceHandler(ctx, mux, conn)
+}
+
+// RegisterSchemaDesignServiceHandler registers the http handlers for service SchemaDesignService to "mux".
+// The handlers forward requests to the grpc endpoint over "conn".
+func RegisterSchemaDesignServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {
+ return RegisterSchemaDesignServiceHandlerClient(ctx, mux, NewSchemaDesignServiceClient(conn))
+}
+
+// RegisterSchemaDesignServiceHandlerClient registers the http handlers for service SchemaDesignService
+// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "SchemaDesignServiceClient".
+// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "SchemaDesignServiceClient"
+// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
+// "SchemaDesignServiceClient" to call the correct interceptors.
+func RegisterSchemaDesignServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SchemaDesignServiceClient) error {
+
+ mux.Handle("GET", pattern_SchemaDesignService_GetSchemaDesign_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.SchemaDesignService/GetSchemaDesign", runtime.WithHTTPPathPattern("/v1/{name=projects/*/schemaDesigns/*}"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := request_SchemaDesignService_GetSchemaDesign_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+
+ forward_SchemaDesignService_GetSchemaDesign_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ mux.Handle("GET", pattern_SchemaDesignService_ListSchemaDesigns_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.SchemaDesignService/ListSchemaDesigns", runtime.WithHTTPPathPattern("/v1/{parent=projects/*}/schemaDesigns"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := request_SchemaDesignService_ListSchemaDesigns_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+
+ forward_SchemaDesignService_ListSchemaDesigns_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ mux.Handle("POST", pattern_SchemaDesignService_CreateSchemaDesign_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.SchemaDesignService/CreateSchemaDesign", runtime.WithHTTPPathPattern("/v1/{parent=projects/*}/schemaDesign"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := request_SchemaDesignService_CreateSchemaDesign_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+
+ forward_SchemaDesignService_CreateSchemaDesign_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ mux.Handle("PATCH", pattern_SchemaDesignService_UpdateSchemaDesign_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.SchemaDesignService/UpdateSchemaDesign", runtime.WithHTTPPathPattern("/v1/{schema_design.name=projects/*/schemaDesigns/*}"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := request_SchemaDesignService_UpdateSchemaDesign_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+
+ forward_SchemaDesignService_UpdateSchemaDesign_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ mux.Handle("DELETE", pattern_SchemaDesignService_DeleteSchemaDesign_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ var err error
+ var annotatedContext context.Context
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.SchemaDesignService/DeleteSchemaDesign", runtime.WithHTTPPathPattern("/v1/{name=projects/*/schemaDesigns/*}"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := request_SchemaDesignService_DeleteSchemaDesign_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+
+ forward_SchemaDesignService_DeleteSchemaDesign_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ return nil
+}
+
+var (
+ pattern_SchemaDesignService_GetSchemaDesign_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 4, 4, 5, 3}, []string{"v1", "projects", "schemaDesigns", "name"}, ""))
+
+ pattern_SchemaDesignService_ListSchemaDesigns_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 2, 5, 2, 2, 3}, []string{"v1", "projects", "parent", "schemaDesigns"}, ""))
+
+ pattern_SchemaDesignService_CreateSchemaDesign_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 2, 5, 2, 2, 3}, []string{"v1", "projects", "parent", "schemaDesign"}, ""))
+
+ pattern_SchemaDesignService_UpdateSchemaDesign_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 4, 4, 5, 3}, []string{"v1", "projects", "schemaDesigns", "schema_design.name"}, ""))
+
+ pattern_SchemaDesignService_DeleteSchemaDesign_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 4, 4, 5, 3}, []string{"v1", "projects", "schemaDesigns", "name"}, ""))
+)
+
+var (
+ forward_SchemaDesignService_GetSchemaDesign_0 = runtime.ForwardResponseMessage
+
+ forward_SchemaDesignService_ListSchemaDesigns_0 = runtime.ForwardResponseMessage
+
+ forward_SchemaDesignService_CreateSchemaDesign_0 = runtime.ForwardResponseMessage
+
+ forward_SchemaDesignService_UpdateSchemaDesign_0 = runtime.ForwardResponseMessage
+
+ forward_SchemaDesignService_DeleteSchemaDesign_0 = runtime.ForwardResponseMessage
+)
diff --git a/proto/generated-go/v1/schema_design_service_grpc.pb.go b/proto/generated-go/v1/schema_design_service_grpc.pb.go
new file mode 100644
index 0000000000..38f190faf3
--- /dev/null
+++ b/proto/generated-go/v1/schema_design_service_grpc.pb.go
@@ -0,0 +1,258 @@
+// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
+// versions:
+// - protoc-gen-go-grpc v1.3.0
+// - protoc (unknown)
+// source: v1/schema_design_service.proto
+
+package v1
+
+import (
+ context "context"
+ grpc "google.golang.org/grpc"
+ codes "google.golang.org/grpc/codes"
+ status "google.golang.org/grpc/status"
+ emptypb "google.golang.org/protobuf/types/known/emptypb"
+)
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the grpc package it is being compiled against.
+// Requires gRPC-Go v1.32.0 or later.
+const _ = grpc.SupportPackageIsVersion7
+
+const (
+ SchemaDesignService_GetSchemaDesign_FullMethodName = "/bytebase.v1.SchemaDesignService/GetSchemaDesign"
+ SchemaDesignService_ListSchemaDesigns_FullMethodName = "/bytebase.v1.SchemaDesignService/ListSchemaDesigns"
+ SchemaDesignService_CreateSchemaDesign_FullMethodName = "/bytebase.v1.SchemaDesignService/CreateSchemaDesign"
+ SchemaDesignService_UpdateSchemaDesign_FullMethodName = "/bytebase.v1.SchemaDesignService/UpdateSchemaDesign"
+ SchemaDesignService_DeleteSchemaDesign_FullMethodName = "/bytebase.v1.SchemaDesignService/DeleteSchemaDesign"
+)
+
+// SchemaDesignServiceClient is the client API for SchemaDesignService service.
+//
+// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
+type SchemaDesignServiceClient interface {
+ GetSchemaDesign(ctx context.Context, in *GetSchemaDesignRequest, opts ...grpc.CallOption) (*SchemaDesign, error)
+ ListSchemaDesigns(ctx context.Context, in *ListSchemaDesignsRequest, opts ...grpc.CallOption) (*ListSchemaDesignsResponse, error)
+ CreateSchemaDesign(ctx context.Context, in *CreateSchemaDesignRequest, opts ...grpc.CallOption) (*SchemaDesign, error)
+ UpdateSchemaDesign(ctx context.Context, in *UpdateSchemaDesignRequest, opts ...grpc.CallOption) (*SchemaDesign, error)
+ DeleteSchemaDesign(ctx context.Context, in *DeleteSchemaDesignRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
+}
+
+type schemaDesignServiceClient struct {
+ cc grpc.ClientConnInterface
+}
+
+func NewSchemaDesignServiceClient(cc grpc.ClientConnInterface) SchemaDesignServiceClient {
+ return &schemaDesignServiceClient{cc}
+}
+
+func (c *schemaDesignServiceClient) GetSchemaDesign(ctx context.Context, in *GetSchemaDesignRequest, opts ...grpc.CallOption) (*SchemaDesign, error) {
+ out := new(SchemaDesign)
+ err := c.cc.Invoke(ctx, SchemaDesignService_GetSchemaDesign_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *schemaDesignServiceClient) ListSchemaDesigns(ctx context.Context, in *ListSchemaDesignsRequest, opts ...grpc.CallOption) (*ListSchemaDesignsResponse, error) {
+ out := new(ListSchemaDesignsResponse)
+ err := c.cc.Invoke(ctx, SchemaDesignService_ListSchemaDesigns_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *schemaDesignServiceClient) CreateSchemaDesign(ctx context.Context, in *CreateSchemaDesignRequest, opts ...grpc.CallOption) (*SchemaDesign, error) {
+ out := new(SchemaDesign)
+ err := c.cc.Invoke(ctx, SchemaDesignService_CreateSchemaDesign_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *schemaDesignServiceClient) UpdateSchemaDesign(ctx context.Context, in *UpdateSchemaDesignRequest, opts ...grpc.CallOption) (*SchemaDesign, error) {
+ out := new(SchemaDesign)
+ err := c.cc.Invoke(ctx, SchemaDesignService_UpdateSchemaDesign_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *schemaDesignServiceClient) DeleteSchemaDesign(ctx context.Context, in *DeleteSchemaDesignRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
+ out := new(emptypb.Empty)
+ err := c.cc.Invoke(ctx, SchemaDesignService_DeleteSchemaDesign_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+// SchemaDesignServiceServer is the server API for SchemaDesignService service.
+// All implementations must embed UnimplementedSchemaDesignServiceServer
+// for forward compatibility
+type SchemaDesignServiceServer interface {
+ GetSchemaDesign(context.Context, *GetSchemaDesignRequest) (*SchemaDesign, error)
+ ListSchemaDesigns(context.Context, *ListSchemaDesignsRequest) (*ListSchemaDesignsResponse, error)
+ CreateSchemaDesign(context.Context, *CreateSchemaDesignRequest) (*SchemaDesign, error)
+ UpdateSchemaDesign(context.Context, *UpdateSchemaDesignRequest) (*SchemaDesign, error)
+ DeleteSchemaDesign(context.Context, *DeleteSchemaDesignRequest) (*emptypb.Empty, error)
+ mustEmbedUnimplementedSchemaDesignServiceServer()
+}
+
+// UnimplementedSchemaDesignServiceServer must be embedded to have forward compatible implementations.
+type UnimplementedSchemaDesignServiceServer struct {
+}
+
+func (UnimplementedSchemaDesignServiceServer) GetSchemaDesign(context.Context, *GetSchemaDesignRequest) (*SchemaDesign, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method GetSchemaDesign not implemented")
+}
+func (UnimplementedSchemaDesignServiceServer) ListSchemaDesigns(context.Context, *ListSchemaDesignsRequest) (*ListSchemaDesignsResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method ListSchemaDesigns not implemented")
+}
+func (UnimplementedSchemaDesignServiceServer) CreateSchemaDesign(context.Context, *CreateSchemaDesignRequest) (*SchemaDesign, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method CreateSchemaDesign not implemented")
+}
+func (UnimplementedSchemaDesignServiceServer) UpdateSchemaDesign(context.Context, *UpdateSchemaDesignRequest) (*SchemaDesign, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method UpdateSchemaDesign not implemented")
+}
+func (UnimplementedSchemaDesignServiceServer) DeleteSchemaDesign(context.Context, *DeleteSchemaDesignRequest) (*emptypb.Empty, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method DeleteSchemaDesign not implemented")
+}
+func (UnimplementedSchemaDesignServiceServer) mustEmbedUnimplementedSchemaDesignServiceServer() {}
+
+// UnsafeSchemaDesignServiceServer may be embedded to opt out of forward compatibility for this service.
+// Use of this interface is not recommended, as added methods to SchemaDesignServiceServer will
+// result in compilation errors.
+type UnsafeSchemaDesignServiceServer interface {
+ mustEmbedUnimplementedSchemaDesignServiceServer()
+}
+
+func RegisterSchemaDesignServiceServer(s grpc.ServiceRegistrar, srv SchemaDesignServiceServer) {
+ s.RegisterService(&SchemaDesignService_ServiceDesc, srv)
+}
+
+func _SchemaDesignService_GetSchemaDesign_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(GetSchemaDesignRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(SchemaDesignServiceServer).GetSchemaDesign(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: SchemaDesignService_GetSchemaDesign_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(SchemaDesignServiceServer).GetSchemaDesign(ctx, req.(*GetSchemaDesignRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _SchemaDesignService_ListSchemaDesigns_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(ListSchemaDesignsRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(SchemaDesignServiceServer).ListSchemaDesigns(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: SchemaDesignService_ListSchemaDesigns_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(SchemaDesignServiceServer).ListSchemaDesigns(ctx, req.(*ListSchemaDesignsRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _SchemaDesignService_CreateSchemaDesign_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(CreateSchemaDesignRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(SchemaDesignServiceServer).CreateSchemaDesign(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: SchemaDesignService_CreateSchemaDesign_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(SchemaDesignServiceServer).CreateSchemaDesign(ctx, req.(*CreateSchemaDesignRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _SchemaDesignService_UpdateSchemaDesign_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(UpdateSchemaDesignRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(SchemaDesignServiceServer).UpdateSchemaDesign(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: SchemaDesignService_UpdateSchemaDesign_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(SchemaDesignServiceServer).UpdateSchemaDesign(ctx, req.(*UpdateSchemaDesignRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _SchemaDesignService_DeleteSchemaDesign_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(DeleteSchemaDesignRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(SchemaDesignServiceServer).DeleteSchemaDesign(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: SchemaDesignService_DeleteSchemaDesign_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(SchemaDesignServiceServer).DeleteSchemaDesign(ctx, req.(*DeleteSchemaDesignRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+// SchemaDesignService_ServiceDesc is the grpc.ServiceDesc for SchemaDesignService service.
+// It's only intended for direct use with grpc.RegisterService,
+// and not to be introspected or modified (even as a copy)
+var SchemaDesignService_ServiceDesc = grpc.ServiceDesc{
+ ServiceName: "bytebase.v1.SchemaDesignService",
+ HandlerType: (*SchemaDesignServiceServer)(nil),
+ Methods: []grpc.MethodDesc{
+ {
+ MethodName: "GetSchemaDesign",
+ Handler: _SchemaDesignService_GetSchemaDesign_Handler,
+ },
+ {
+ MethodName: "ListSchemaDesigns",
+ Handler: _SchemaDesignService_ListSchemaDesigns_Handler,
+ },
+ {
+ MethodName: "CreateSchemaDesign",
+ Handler: _SchemaDesignService_CreateSchemaDesign_Handler,
+ },
+ {
+ MethodName: "UpdateSchemaDesign",
+ Handler: _SchemaDesignService_UpdateSchemaDesign_Handler,
+ },
+ {
+ MethodName: "DeleteSchemaDesign",
+ Handler: _SchemaDesignService_DeleteSchemaDesign_Handler,
+ },
+ },
+ Streams: []grpc.StreamDesc{},
+ Metadata: "v1/schema_design_service.proto",
+}
diff --git a/proto/v1/schema_design_service.proto b/proto/v1/schema_design_service.proto
new file mode 100644
index 0000000000..134e61d10e
--- /dev/null
+++ b/proto/v1/schema_design_service.proto
@@ -0,0 +1,152 @@
+syntax = "proto3";
+
+package bytebase.v1;
+
+import "google/api/annotations.proto";
+import "google/api/client.proto";
+import "google/api/field_behavior.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/timestamp.proto";
+import "v1/common.proto";
+import "v1/database_service.proto";
+
+option go_package = "generated-go/v1";
+
+service SchemaDesignService {
+ rpc GetSchemaDesign(GetSchemaDesignRequest) returns (SchemaDesign) {
+ option (google.api.http) = {get: "/v1/{name=projects/*/schemaDesigns/*}"};
+ option (google.api.method_signature) = "name";
+ }
+
+ rpc ListSchemaDesigns(ListSchemaDesignsRequest) returns (ListSchemaDesignsResponse) {
+ option (google.api.http) = {get: "/v1/{parent=projects/*}/schemaDesigns"};
+ option (google.api.method_signature) = "";
+ }
+
+ rpc CreateSchemaDesign(CreateSchemaDesignRequest) returns (SchemaDesign) {
+ option (google.api.http) = {
+ post: "/v1/{parent=projects/*}/schemaDesign"
+ body: "schema_design"
+ };
+ option (google.api.method_signature) = "parent,schemaDesign";
+ }
+
+ rpc UpdateSchemaDesign(UpdateSchemaDesignRequest) returns (SchemaDesign) {
+ option (google.api.http) = {
+ patch: "/v1/{schema_design.name=projects/*/schemaDesigns/*}"
+ body: "schema_design"
+ };
+ option (google.api.method_signature) = "schemaDesign,update_mask";
+ }
+
+ rpc DeleteSchemaDesign(DeleteSchemaDesignRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = {delete: "/v1/{name=projects/*/schemaDesigns/*}"};
+ option (google.api.method_signature) = "name";
+ }
+}
+
+message SchemaDesign {
+ // The name of the schema design.
+ // Format: projects/{project}/schemaDesigns/{schemaDesign}
+ string name = 1;
+
+ // The title of schema design. AKA sheet's title.
+ string title = 2;
+
+ // Current editing schema.
+ string schema = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+ DatabaseMetadata schema_metadata = 4;
+
+ string baseline_schema = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+ DatabaseMetadata baseline_schema_metadata = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+ Engine engine = 7;
+
+ // The name of the baseline database.
+ // Format: instances/{instance}/databases/{database}
+ string baseline_database = 8 [(google.api.field_behavior) = IMMUTABLE];
+
+ string schema_version = 9 [(google.api.field_behavior) = IMMUTABLE];
+
+ // The creator of the schema design.
+ // Format: users/{email}
+ string creator = 10 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+ // The updater of the schema design.
+ // Format: users/{email}
+ string updater = 11 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+ google.protobuf.Timestamp create_time = 12 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+ google.protobuf.Timestamp update_time = 13 [(google.api.field_behavior) = OUTPUT_ONLY];
+}
+
+message GetSchemaDesignRequest {
+ // The name of the schema design to retrieve.
+ // Format: projects/{project}/schemaDesigns/{schemaDesign}
+ string name = 1 [(google.api.field_behavior) = REQUIRED];
+}
+
+message ListSchemaDesignsRequest {
+ // The parent resource of the schema design.
+ // Foramt: projects/{project}
+ string parent = 1 [(google.api.field_behavior) = REQUIRED];
+
+ // To filter the search result.
+ // Format: only support the following spec for now:
+ // - `creator = users/{email}`, `creator != users/{email}`
+ // - `starred = true`, `starred = false`.
+ // Not support empty filter for now.
+ string filter = 2;
+
+ // The maximum number of schema designs to return. The service may return fewer than
+ // this value.
+ // If unspecified, at most 50 schema designs will be returned.
+ // The maximum value is 1000; values above 1000 will be coerced to 1000.
+ int32 page_size = 3;
+
+ // A page token, received from a previous `ListSchemaDesigns` call.
+ // Provide this to retrieve the subsequent page.
+ //
+ // When paginating, all other parameters provided to `ListSchemaDesigns` must match
+ // the call that provided the page token.
+ string page_token = 4;
+}
+
+message ListSchemaDesignsResponse {
+ // The schema designs from the specified request.
+ repeated SchemaDesign schema_designs = 1;
+
+ // A token, which can be sent as `page_token` to retrieve the next page.
+ // If this field is omitted, there are no subsequent pages.
+ string next_page_token = 2;
+}
+
+message CreateSchemaDesignRequest {
+ // The parent, which owns this collection of schema designs.
+ // Format: project/{project}
+ // Use "projects/-" to list all schema designs.
+ string parent = 1;
+
+ SchemaDesign schema_design = 2;
+}
+
+message UpdateSchemaDesignRequest {
+ // The schema design to update.
+ //
+ // The schema design's `name` field is used to identify the schema design to update.
+ // Format: projects/{project}/schemaDesigns/{schemaDesign}
+ SchemaDesign schema_design = 1 [(google.api.field_behavior) = REQUIRED];
+
+ // The list of fields to update.
+ google.protobuf.FieldMask update_mask = 2;
+}
+
+message DeleteSchemaDesignRequest {
+ // The name of the schema design to delete.
+ // Format: projects/{project}/schemaDesigns/{schemaDesign}
+ string name = 1 [(google.api.field_behavior) = REQUIRED];
+}