diff --git a/internal/cmd/generate.go b/internal/cmd/generate.go index 567504d279..cea706d5d9 100644 --- a/internal/cmd/generate.go +++ b/internal/cmd/generate.go @@ -12,6 +12,7 @@ import ( "strings" "github.com/kyleconroy/sqlc/internal/codegen/golang" + "github.com/kyleconroy/sqlc/internal/codegen/json" "github.com/kyleconroy/sqlc/internal/codegen/kotlin" "github.com/kyleconroy/sqlc/internal/codegen/python" "github.com/kyleconroy/sqlc/internal/compiler" @@ -138,6 +139,12 @@ func Generate(ctx context.Context, e Env, dir, filename string, stderr io.Writer Gen: config.SQLGen{Python: sql.Gen.Python}, }) } + if sql.Gen.JSON != nil { + pairs = append(pairs, outPair{ + SQL: sql, + Gen: config.SQLGen{JSON: sql.Gen.JSON}, + }) + } } for _, sql := range pairs { @@ -205,6 +212,9 @@ func Generate(ctx context.Context, e Env, dir, filename string, stderr io.Writer case sql.Gen.Python != nil: out = combo.Python.Out genfunc = python.Generate + case sql.Gen.JSON != nil: + out = combo.JSON.Out + genfunc = json.Generate default: panic("missing language backend") } diff --git a/internal/cmd/shim.go b/internal/cmd/shim.go index 7eb0220d31..8e864741e8 100644 --- a/internal/cmd/shim.go +++ b/internal/cmd/shim.go @@ -59,6 +59,7 @@ func pluginSettings(cs config.CombinedSettings) *plugin.Settings { Python: pluginPythonCode(cs.Python), Kotlin: pluginKotlinCode(cs.Kotlin), Go: pluginGoCode(cs.Go), + Json: pluginJSONCode(cs.JSON), } } @@ -124,6 +125,13 @@ func pluginKotlinCode(s config.SQLKotlin) *plugin.KotlinCode { } } +func pluginJSONCode(s config.SQLJSON) *plugin.JSONCode { + return &plugin.JSONCode{ + Out: s.Out, + Indent: s.Indent, + } +} + func pluginCatalog(c *catalog.Catalog) *plugin.Catalog { var schemas []*plugin.Schema for _, s := range c.Schemas { diff --git a/internal/codegen/json/gen.go b/internal/codegen/json/gen.go new file mode 100644 index 0000000000..6e11ef0a07 --- /dev/null +++ b/internal/codegen/json/gen.go @@ -0,0 +1,40 @@ +package json + +import ( + ejson "encoding/json" + + "google.golang.org/protobuf/encoding/protojson" + + "github.com/kyleconroy/sqlc/internal/plugin" +) + +func Generate(req *plugin.CodeGenRequest) (*plugin.CodeGenResponse, error) { + indent := "" + if req.Settings != nil && req.Settings.Json != nil { + indent = req.Settings.Json.Indent + } + // The output of protojson has randomized whitespace + // https://github.com/golang/protobuf/issues/1082 + m := &protojson.MarshalOptions{ + EmitUnpopulated: true, + Indent: "", + UseProtoNames: true, + } + data, err := m.Marshal(req) + if err != nil { + return nil, err + } + var rm ejson.RawMessage = data + blob, err := ejson.MarshalIndent(rm, "", indent) + if err != nil { + return nil, err + } + return &plugin.CodeGenResponse{ + Files: []*plugin.File{ + { + Name: "codegen_request.json", + Contents: append(blob, '\n'), + }, + }, + }, nil +} diff --git a/internal/config/config.go b/internal/config/config.go index 08d6a57f1c..bbb4729880 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -114,6 +114,7 @@ type SQLGen struct { Go *SQLGo `json:"go,omitempty" yaml:"go"` Kotlin *SQLKotlin `json:"kotlin,omitempty" yaml:"kotlin"` Python *SQLPython `json:"python,omitempty" yaml:"python"` + JSON *SQLJSON `json:"json,omitempty" yaml:"json"` } type SQLGo struct { @@ -155,6 +156,11 @@ type SQLPython struct { EmitPydanticModels bool `json:"emit_pydantic_models,omitempty" yaml:"emit_pydantic_models"` } +type SQLJSON struct { + Out string `json:"out" yaml:"out"` + Indent string `json:"indent,omitempty" yaml:"indent"` +} + type Override struct { // name of the golang type to use, e.g. `github.com/segmentio/ksuid.KSUID` GoType GoType `json:"go_type" yaml:"go_type"` @@ -352,6 +358,7 @@ type CombinedSettings struct { Go SQLGo Kotlin SQLKotlin Python SQLPython + JSON SQLJSON Rename map[string]string Overrides []Override } @@ -379,5 +386,8 @@ func Combine(conf Config, pkg SQL) CombinedSettings { cs.Python = *pkg.Gen.Python cs.Overrides = append(cs.Overrides, pkg.Gen.Python.Overrides...) } + if pkg.Gen.JSON != nil { + cs.JSON = *pkg.Gen.JSON + } return cs } diff --git a/internal/config/v_two.go b/internal/config/v_two.go index 3f0db3cda4..144577dd08 100644 --- a/internal/config/v_two.go +++ b/internal/config/v_two.go @@ -75,6 +75,11 @@ func v2ParseConfig(rd io.Reader) (Config, error) { } } } + if conf.SQL[j].Gen.JSON != nil { + if conf.SQL[j].Gen.JSON.Out == "" { + return conf, ErrNoOutPath + } + } } return conf, nil } diff --git a/internal/endtoend/endtoend_test.go b/internal/endtoend/endtoend_test.go index e3756b22f3..e3989ffcad 100644 --- a/internal/endtoend/endtoend_test.go +++ b/internal/endtoend/endtoend_test.go @@ -116,7 +116,10 @@ func cmpDirectory(t *testing.T, dir string, actual map[string]string) { if file.IsDir() { return nil } - if !strings.HasSuffix(path, ".go") && !strings.HasSuffix(path, ".kt") && !strings.HasSuffix(path, ".py") { + if !strings.HasSuffix(path, ".go") && !strings.HasSuffix(path, ".kt") && !strings.HasSuffix(path, ".py") && !strings.HasSuffix(path, ".json") { + return nil + } + if filepath.Base(path) == "sqlc.json" { return nil } if strings.Contains(path, "/kotlin/build") { @@ -126,7 +129,8 @@ func cmpDirectory(t *testing.T, dir string, actual map[string]string) { return nil } if strings.Contains(path, "/python/.venv") || strings.Contains(path, "/python/src/tests/") || - strings.HasSuffix(path, "__init__.py") || strings.Contains(path, "/python/src/dbtest/") { + strings.HasSuffix(path, "__init__.py") || strings.Contains(path, "/python/src/dbtest/") || + strings.Contains(path, "/python/.mypy_cache") { return nil } blob, err := os.ReadFile(path) diff --git a/internal/endtoend/testdata/codegen_json/gen/codegen_request.json b/internal/endtoend/testdata/codegen_json/gen/codegen_request.json new file mode 100644 index 0000000000..0d7657e0d7 --- /dev/null +++ b/internal/endtoend/testdata/codegen_json/gen/codegen_request.json @@ -0,0 +1,491 @@ +{ + "settings": { + "version": "2", + "engine": "postgresql", + "schema": [ + "postgresql/schema.sql" + ], + "queries": [ + "postgresql/query.sql" + ], + "rename": {}, + "overrides": [], + "python": { + "emit_exact_table_names": false, + "emit_sync_querier": false, + "emit_async_querier": false, + "package": "", + "out": "", + "emit_pydantic_models": false + }, + "kotlin": { + "emit_exact_table_names": false, + "package": "", + "out": "" + }, + "go": { + "emit_interface": false, + "emit_json_tags": false, + "emit_db_tags": false, + "emit_prepared_queries": false, + "emit_exact_table_names": false, + "emit_empty_slices": false, + "emit_exported_queries": false, + "emit_result_struct_pointers": false, + "emit_params_struct_pointers": false, + "emit_methods_with_db_argument": false, + "json_tags_case_style": "", + "package": "", + "out": "", + "sql_package": "", + "output_db_file_name": "", + "output_models_file_name": "", + "output_querier_file_name": "", + "output_files_suffix": "" + }, + "json": { + "out": "gen", + "indent": " " + } + }, + "catalog": { + "comment": "", + "default_schema": "public", + "name": "", + "schemas": [ + { + "comment": "", + "name": "public", + "tables": [ + { + "rel": { + "catalog": "", + "schema": "", + "name": "authors" + }, + "columns": [ + { + "name": "id", + "not_null": true, + "is_array": false, + "comment": "", + "length": -1, + "is_named_param": false, + "is_func_call": false, + "scope": "", + "table": { + "catalog": "", + "schema": "", + "name": "authors" + }, + "table_alias": "", + "type": { + "catalog": "", + "schema": "", + "name": "bigserial" + } + }, + { + "name": "name", + "not_null": true, + "is_array": false, + "comment": "", + "length": -1, + "is_named_param": false, + "is_func_call": false, + "scope": "", + "table": { + "catalog": "", + "schema": "", + "name": "authors" + }, + "table_alias": "", + "type": { + "catalog": "", + "schema": "", + "name": "text" + } + }, + { + "name": "bio", + "not_null": false, + "is_array": false, + "comment": "", + "length": -1, + "is_named_param": false, + "is_func_call": false, + "scope": "", + "table": { + "catalog": "", + "schema": "", + "name": "authors" + }, + "table_alias": "", + "type": { + "catalog": "", + "schema": "", + "name": "text" + } + } + ], + "comment": "" + } + ], + "enums": [], + "composite_types": [] + }, + { + "comment": "", + "name": "pg_temp", + "tables": [], + "enums": [], + "composite_types": [] + }, + { + "comment": "", + "name": "pg_catalog", + "tables": [], + "enums": [], + "composite_types": [] + } + ] + }, + "queries": [ + { + "text": "SELECT id, name, bio FROM authors\nWHERE id = $1 LIMIT 1", + "name": "GetAuthor", + "cmd": ":one", + "columns": [ + { + "name": "id", + "not_null": true, + "is_array": false, + "comment": "", + "length": -1, + "is_named_param": false, + "is_func_call": false, + "scope": "", + "table": { + "catalog": "", + "schema": "", + "name": "authors" + }, + "table_alias": "", + "type": { + "catalog": "", + "schema": "", + "name": "bigserial" + } + }, + { + "name": "name", + "not_null": true, + "is_array": false, + "comment": "", + "length": -1, + "is_named_param": false, + "is_func_call": false, + "scope": "", + "table": { + "catalog": "", + "schema": "", + "name": "authors" + }, + "table_alias": "", + "type": { + "catalog": "", + "schema": "", + "name": "text" + } + }, + { + "name": "bio", + "not_null": false, + "is_array": false, + "comment": "", + "length": -1, + "is_named_param": false, + "is_func_call": false, + "scope": "", + "table": { + "catalog": "", + "schema": "", + "name": "authors" + }, + "table_alias": "", + "type": { + "catalog": "", + "schema": "", + "name": "text" + } + } + ], + "params": [ + { + "number": 1, + "column": { + "name": "id", + "not_null": true, + "is_array": false, + "comment": "", + "length": -1, + "is_named_param": false, + "is_func_call": false, + "scope": "", + "table": { + "catalog": "", + "schema": "", + "name": "authors" + }, + "table_alias": "", + "type": { + "catalog": "", + "schema": "", + "name": "bigserial" + } + } + } + ], + "comments": [], + "filename": "query.sql", + "insert_into_table": null + }, + { + "text": "SELECT id, name, bio FROM authors\nORDER BY name", + "name": "ListAuthors", + "cmd": ":many", + "columns": [ + { + "name": "id", + "not_null": true, + "is_array": false, + "comment": "", + "length": -1, + "is_named_param": false, + "is_func_call": false, + "scope": "", + "table": { + "catalog": "", + "schema": "", + "name": "authors" + }, + "table_alias": "", + "type": { + "catalog": "", + "schema": "", + "name": "bigserial" + } + }, + { + "name": "name", + "not_null": true, + "is_array": false, + "comment": "", + "length": -1, + "is_named_param": false, + "is_func_call": false, + "scope": "", + "table": { + "catalog": "", + "schema": "", + "name": "authors" + }, + "table_alias": "", + "type": { + "catalog": "", + "schema": "", + "name": "text" + } + }, + { + "name": "bio", + "not_null": false, + "is_array": false, + "comment": "", + "length": -1, + "is_named_param": false, + "is_func_call": false, + "scope": "", + "table": { + "catalog": "", + "schema": "", + "name": "authors" + }, + "table_alias": "", + "type": { + "catalog": "", + "schema": "", + "name": "text" + } + } + ], + "params": [], + "comments": [], + "filename": "query.sql", + "insert_into_table": null + }, + { + "text": "INSERT INTO authors (\n name, bio\n) VALUES (\n $1, $2\n)\nRETURNING id, name, bio", + "name": "CreateAuthor", + "cmd": ":one", + "columns": [ + { + "name": "id", + "not_null": true, + "is_array": false, + "comment": "", + "length": -1, + "is_named_param": false, + "is_func_call": false, + "scope": "", + "table": { + "catalog": "", + "schema": "", + "name": "authors" + }, + "table_alias": "", + "type": { + "catalog": "", + "schema": "", + "name": "bigserial" + } + }, + { + "name": "name", + "not_null": true, + "is_array": false, + "comment": "", + "length": -1, + "is_named_param": false, + "is_func_call": false, + "scope": "", + "table": { + "catalog": "", + "schema": "", + "name": "authors" + }, + "table_alias": "", + "type": { + "catalog": "", + "schema": "", + "name": "text" + } + }, + { + "name": "bio", + "not_null": false, + "is_array": false, + "comment": "", + "length": -1, + "is_named_param": false, + "is_func_call": false, + "scope": "", + "table": { + "catalog": "", + "schema": "", + "name": "authors" + }, + "table_alias": "", + "type": { + "catalog": "", + "schema": "", + "name": "text" + } + } + ], + "params": [ + { + "number": 1, + "column": { + "name": "name", + "not_null": true, + "is_array": false, + "comment": "", + "length": -1, + "is_named_param": false, + "is_func_call": false, + "scope": "", + "table": { + "catalog": "", + "schema": "public", + "name": "authors" + }, + "table_alias": "", + "type": { + "catalog": "", + "schema": "", + "name": "text" + } + } + }, + { + "number": 2, + "column": { + "name": "bio", + "not_null": false, + "is_array": false, + "comment": "", + "length": -1, + "is_named_param": false, + "is_func_call": false, + "scope": "", + "table": { + "catalog": "", + "schema": "public", + "name": "authors" + }, + "table_alias": "", + "type": { + "catalog": "", + "schema": "", + "name": "text" + } + } + } + ], + "comments": [], + "filename": "query.sql", + "insert_into_table": { + "catalog": "", + "schema": "", + "name": "authors" + } + }, + { + "text": "DELETE FROM authors\nWHERE id = $1", + "name": "DeleteAuthor", + "cmd": ":exec", + "columns": [], + "params": [ + { + "number": 1, + "column": { + "name": "id", + "not_null": true, + "is_array": false, + "comment": "", + "length": -1, + "is_named_param": false, + "is_func_call": false, + "scope": "", + "table": { + "catalog": "", + "schema": "", + "name": "authors" + }, + "table_alias": "", + "type": { + "catalog": "", + "schema": "", + "name": "bigserial" + } + } + } + ], + "comments": [], + "filename": "query.sql", + "insert_into_table": null + } + ], + "sqlc_version": "v1.13.0" +} diff --git a/internal/endtoend/testdata/codegen_json/postgresql/query.sql b/internal/endtoend/testdata/codegen_json/postgresql/query.sql new file mode 100644 index 0000000000..75e38b2caf --- /dev/null +++ b/internal/endtoend/testdata/codegen_json/postgresql/query.sql @@ -0,0 +1,19 @@ +-- name: GetAuthor :one +SELECT * FROM authors +WHERE id = $1 LIMIT 1; + +-- name: ListAuthors :many +SELECT * FROM authors +ORDER BY name; + +-- name: CreateAuthor :one +INSERT INTO authors ( + name, bio +) VALUES ( + $1, $2 +) +RETURNING *; + +-- name: DeleteAuthor :exec +DELETE FROM authors +WHERE id = $1; diff --git a/internal/endtoend/testdata/codegen_json/postgresql/schema.sql b/internal/endtoend/testdata/codegen_json/postgresql/schema.sql new file mode 100644 index 0000000000..b4fad78497 --- /dev/null +++ b/internal/endtoend/testdata/codegen_json/postgresql/schema.sql @@ -0,0 +1,5 @@ +CREATE TABLE authors ( + id BIGSERIAL PRIMARY KEY, + name text NOT NULL, + bio text +); diff --git a/internal/endtoend/testdata/codegen_json/sqlc.json b/internal/endtoend/testdata/codegen_json/sqlc.json new file mode 100644 index 0000000000..70c16d69b4 --- /dev/null +++ b/internal/endtoend/testdata/codegen_json/sqlc.json @@ -0,0 +1,16 @@ +{ + "version": "2", + "sql": [ + { + "schema": "postgresql/schema.sql", + "queries": "postgresql/query.sql", + "engine": "postgresql", + "gen": { + "json": { + "out": "gen", + "indent": " " + } + } + } + ] +} diff --git a/internal/plugin/codegen.pb.go b/internal/plugin/codegen.pb.go index c199ee3978..e0cde33cbd 100644 --- a/internal/plugin/codegen.pb.go +++ b/internal/plugin/codegen.pb.go @@ -323,6 +323,7 @@ type Settings struct { Python *PythonCode `protobuf:"bytes,8,opt,name=python,proto3" json:"python,omitempty"` Kotlin *KotlinCode `protobuf:"bytes,9,opt,name=kotlin,proto3" json:"kotlin,omitempty"` Go *GoCode `protobuf:"bytes,10,opt,name=go,proto3" json:"go,omitempty"` + Json *JSONCode `protobuf:"bytes,11,opt,name=json,proto3" json:"json,omitempty"` } func (x *Settings) Reset() { @@ -420,6 +421,13 @@ func (x *Settings) GetGo() *GoCode { return nil } +func (x *Settings) GetJson() *JSONCode { + if x != nil { + return x.Json + } + return nil +} + type PythonCode struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -753,6 +761,61 @@ func (x *GoCode) GetOutputFilesSuffix() string { return "" } +type JSONCode struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Out string `protobuf:"bytes,1,opt,name=out,proto3" json:"out,omitempty"` + Indent string `protobuf:"bytes,2,opt,name=indent,proto3" json:"indent,omitempty"` +} + +func (x *JSONCode) Reset() { + *x = JSONCode{} + if protoimpl.UnsafeEnabled { + mi := &file_plugin_codegen_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *JSONCode) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*JSONCode) ProtoMessage() {} + +func (x *JSONCode) ProtoReflect() protoreflect.Message { + mi := &file_plugin_codegen_proto_msgTypes[8] + 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 JSONCode.ProtoReflect.Descriptor instead. +func (*JSONCode) Descriptor() ([]byte, []int) { + return file_plugin_codegen_proto_rawDescGZIP(), []int{8} +} + +func (x *JSONCode) GetOut() string { + if x != nil { + return x.Out + } + return "" +} + +func (x *JSONCode) GetIndent() string { + if x != nil { + return x.Indent + } + return "" +} + type Catalog struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -767,7 +830,7 @@ type Catalog struct { func (x *Catalog) Reset() { *x = Catalog{} if protoimpl.UnsafeEnabled { - mi := &file_plugin_codegen_proto_msgTypes[8] + mi := &file_plugin_codegen_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -780,7 +843,7 @@ func (x *Catalog) String() string { func (*Catalog) ProtoMessage() {} func (x *Catalog) ProtoReflect() protoreflect.Message { - mi := &file_plugin_codegen_proto_msgTypes[8] + mi := &file_plugin_codegen_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -793,7 +856,7 @@ func (x *Catalog) ProtoReflect() protoreflect.Message { // Deprecated: Use Catalog.ProtoReflect.Descriptor instead. func (*Catalog) Descriptor() ([]byte, []int) { - return file_plugin_codegen_proto_rawDescGZIP(), []int{8} + return file_plugin_codegen_proto_rawDescGZIP(), []int{9} } func (x *Catalog) GetComment() string { @@ -839,7 +902,7 @@ type Schema struct { func (x *Schema) Reset() { *x = Schema{} if protoimpl.UnsafeEnabled { - mi := &file_plugin_codegen_proto_msgTypes[9] + mi := &file_plugin_codegen_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -852,7 +915,7 @@ func (x *Schema) String() string { func (*Schema) ProtoMessage() {} func (x *Schema) ProtoReflect() protoreflect.Message { - mi := &file_plugin_codegen_proto_msgTypes[9] + mi := &file_plugin_codegen_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -865,7 +928,7 @@ func (x *Schema) ProtoReflect() protoreflect.Message { // Deprecated: Use Schema.ProtoReflect.Descriptor instead. func (*Schema) Descriptor() ([]byte, []int) { - return file_plugin_codegen_proto_rawDescGZIP(), []int{9} + return file_plugin_codegen_proto_rawDescGZIP(), []int{10} } func (x *Schema) GetComment() string { @@ -915,7 +978,7 @@ type CompositeType struct { func (x *CompositeType) Reset() { *x = CompositeType{} if protoimpl.UnsafeEnabled { - mi := &file_plugin_codegen_proto_msgTypes[10] + mi := &file_plugin_codegen_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -928,7 +991,7 @@ func (x *CompositeType) String() string { func (*CompositeType) ProtoMessage() {} func (x *CompositeType) ProtoReflect() protoreflect.Message { - mi := &file_plugin_codegen_proto_msgTypes[10] + mi := &file_plugin_codegen_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -941,7 +1004,7 @@ func (x *CompositeType) ProtoReflect() protoreflect.Message { // Deprecated: Use CompositeType.ProtoReflect.Descriptor instead. func (*CompositeType) Descriptor() ([]byte, []int) { - return file_plugin_codegen_proto_rawDescGZIP(), []int{10} + return file_plugin_codegen_proto_rawDescGZIP(), []int{11} } func (x *CompositeType) GetName() string { @@ -971,7 +1034,7 @@ type Enum struct { func (x *Enum) Reset() { *x = Enum{} if protoimpl.UnsafeEnabled { - mi := &file_plugin_codegen_proto_msgTypes[11] + mi := &file_plugin_codegen_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -984,7 +1047,7 @@ func (x *Enum) String() string { func (*Enum) ProtoMessage() {} func (x *Enum) ProtoReflect() protoreflect.Message { - mi := &file_plugin_codegen_proto_msgTypes[11] + mi := &file_plugin_codegen_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -997,7 +1060,7 @@ func (x *Enum) ProtoReflect() protoreflect.Message { // Deprecated: Use Enum.ProtoReflect.Descriptor instead. func (*Enum) Descriptor() ([]byte, []int) { - return file_plugin_codegen_proto_rawDescGZIP(), []int{11} + return file_plugin_codegen_proto_rawDescGZIP(), []int{12} } func (x *Enum) GetName() string { @@ -1034,7 +1097,7 @@ type Table struct { func (x *Table) Reset() { *x = Table{} if protoimpl.UnsafeEnabled { - mi := &file_plugin_codegen_proto_msgTypes[12] + mi := &file_plugin_codegen_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1047,7 +1110,7 @@ func (x *Table) String() string { func (*Table) ProtoMessage() {} func (x *Table) ProtoReflect() protoreflect.Message { - mi := &file_plugin_codegen_proto_msgTypes[12] + mi := &file_plugin_codegen_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1060,7 +1123,7 @@ func (x *Table) ProtoReflect() protoreflect.Message { // Deprecated: Use Table.ProtoReflect.Descriptor instead. func (*Table) Descriptor() ([]byte, []int) { - return file_plugin_codegen_proto_rawDescGZIP(), []int{12} + return file_plugin_codegen_proto_rawDescGZIP(), []int{13} } func (x *Table) GetRel() *Identifier { @@ -1097,7 +1160,7 @@ type Identifier struct { func (x *Identifier) Reset() { *x = Identifier{} if protoimpl.UnsafeEnabled { - mi := &file_plugin_codegen_proto_msgTypes[13] + mi := &file_plugin_codegen_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1110,7 +1173,7 @@ func (x *Identifier) String() string { func (*Identifier) ProtoMessage() {} func (x *Identifier) ProtoReflect() protoreflect.Message { - mi := &file_plugin_codegen_proto_msgTypes[13] + mi := &file_plugin_codegen_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1123,7 +1186,7 @@ func (x *Identifier) ProtoReflect() protoreflect.Message { // Deprecated: Use Identifier.ProtoReflect.Descriptor instead. func (*Identifier) Descriptor() ([]byte, []int) { - return file_plugin_codegen_proto_rawDescGZIP(), []int{13} + return file_plugin_codegen_proto_rawDescGZIP(), []int{14} } func (x *Identifier) GetCatalog() string { @@ -1169,7 +1232,7 @@ type Column struct { func (x *Column) Reset() { *x = Column{} if protoimpl.UnsafeEnabled { - mi := &file_plugin_codegen_proto_msgTypes[14] + mi := &file_plugin_codegen_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1182,7 +1245,7 @@ func (x *Column) String() string { func (*Column) ProtoMessage() {} func (x *Column) ProtoReflect() protoreflect.Message { - mi := &file_plugin_codegen_proto_msgTypes[14] + mi := &file_plugin_codegen_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1195,7 +1258,7 @@ func (x *Column) ProtoReflect() protoreflect.Message { // Deprecated: Use Column.ProtoReflect.Descriptor instead. func (*Column) Descriptor() ([]byte, []int) { - return file_plugin_codegen_proto_rawDescGZIP(), []int{14} + return file_plugin_codegen_proto_rawDescGZIP(), []int{15} } func (x *Column) GetName() string { @@ -1293,7 +1356,7 @@ type Query struct { func (x *Query) Reset() { *x = Query{} if protoimpl.UnsafeEnabled { - mi := &file_plugin_codegen_proto_msgTypes[15] + mi := &file_plugin_codegen_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1306,7 +1369,7 @@ func (x *Query) String() string { func (*Query) ProtoMessage() {} func (x *Query) ProtoReflect() protoreflect.Message { - mi := &file_plugin_codegen_proto_msgTypes[15] + mi := &file_plugin_codegen_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1319,7 +1382,7 @@ func (x *Query) ProtoReflect() protoreflect.Message { // Deprecated: Use Query.ProtoReflect.Descriptor instead. func (*Query) Descriptor() ([]byte, []int) { - return file_plugin_codegen_proto_rawDescGZIP(), []int{15} + return file_plugin_codegen_proto_rawDescGZIP(), []int{16} } func (x *Query) GetText() string { @@ -1390,7 +1453,7 @@ type Parameter struct { func (x *Parameter) Reset() { *x = Parameter{} if protoimpl.UnsafeEnabled { - mi := &file_plugin_codegen_proto_msgTypes[16] + mi := &file_plugin_codegen_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1403,7 +1466,7 @@ func (x *Parameter) String() string { func (*Parameter) ProtoMessage() {} func (x *Parameter) ProtoReflect() protoreflect.Message { - mi := &file_plugin_codegen_proto_msgTypes[16] + mi := &file_plugin_codegen_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1416,7 +1479,7 @@ func (x *Parameter) ProtoReflect() protoreflect.Message { // Deprecated: Use Parameter.ProtoReflect.Descriptor instead. func (*Parameter) Descriptor() ([]byte, []int) { - return file_plugin_codegen_proto_rawDescGZIP(), []int{16} + return file_plugin_codegen_proto_rawDescGZIP(), []int{17} } func (x *Parameter) GetNumber() int32 { @@ -1447,7 +1510,7 @@ type CodeGenRequest struct { func (x *CodeGenRequest) Reset() { *x = CodeGenRequest{} if protoimpl.UnsafeEnabled { - mi := &file_plugin_codegen_proto_msgTypes[17] + mi := &file_plugin_codegen_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1460,7 +1523,7 @@ func (x *CodeGenRequest) String() string { func (*CodeGenRequest) ProtoMessage() {} func (x *CodeGenRequest) ProtoReflect() protoreflect.Message { - mi := &file_plugin_codegen_proto_msgTypes[17] + mi := &file_plugin_codegen_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1473,7 +1536,7 @@ func (x *CodeGenRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CodeGenRequest.ProtoReflect.Descriptor instead. func (*CodeGenRequest) Descriptor() ([]byte, []int) { - return file_plugin_codegen_proto_rawDescGZIP(), []int{17} + return file_plugin_codegen_proto_rawDescGZIP(), []int{18} } func (x *CodeGenRequest) GetSettings() *Settings { @@ -1515,7 +1578,7 @@ type CodeGenResponse struct { func (x *CodeGenResponse) Reset() { *x = CodeGenResponse{} if protoimpl.UnsafeEnabled { - mi := &file_plugin_codegen_proto_msgTypes[18] + mi := &file_plugin_codegen_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1528,7 +1591,7 @@ func (x *CodeGenResponse) String() string { func (*CodeGenResponse) ProtoMessage() {} func (x *CodeGenResponse) ProtoReflect() protoreflect.Message { - mi := &file_plugin_codegen_proto_msgTypes[18] + mi := &file_plugin_codegen_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1541,7 +1604,7 @@ func (x *CodeGenResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use CodeGenResponse.ProtoReflect.Descriptor instead. func (*CodeGenResponse) Descriptor() ([]byte, []int) { - return file_plugin_codegen_proto_rawDescGZIP(), []int{18} + return file_plugin_codegen_proto_rawDescGZIP(), []int{19} } func (x *CodeGenResponse) GetFiles() []*File { @@ -1590,7 +1653,7 @@ var file_plugin_codegen_proto_rawDesc = []byte{ 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x79, 0x70, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x61, 0x73, 0x69, 0x63, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x62, 0x61, 0x73, 0x69, 0x63, 0x54, 0x79, 0x70, - 0x65, 0x22, 0x87, 0x03, 0x0a, 0x08, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x18, + 0x65, 0x22, 0xad, 0x03, 0x0a, 0x08, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, @@ -1611,190 +1674,196 @@ var file_plugin_codegen_proto_rawDesc = []byte{ 0x74, 0x6c, 0x69, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x06, 0x6b, 0x6f, 0x74, 0x6c, 0x69, 0x6e, 0x12, 0x1e, 0x0a, 0x02, 0x67, 0x6f, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x47, 0x6f, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x02, 0x67, 0x6f, - 0x1a, 0x39, 0x0a, 0x0b, 0x52, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, - 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, - 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xf9, 0x01, 0x0a, 0x0a, - 0x50, 0x79, 0x74, 0x68, 0x6f, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x33, 0x0a, 0x16, 0x65, 0x6d, + 0x12, 0x24, 0x0a, 0x04, 0x6a, 0x73, 0x6f, 0x6e, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, + 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x4a, 0x53, 0x4f, 0x4e, 0x43, 0x6f, 0x64, 0x65, + 0x52, 0x04, 0x6a, 0x73, 0x6f, 0x6e, 0x1a, 0x39, 0x0a, 0x0b, 0x52, 0x65, 0x6e, 0x61, 0x6d, 0x65, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, + 0x01, 0x22, 0xf9, 0x01, 0x0a, 0x0a, 0x50, 0x79, 0x74, 0x68, 0x6f, 0x6e, 0x43, 0x6f, 0x64, 0x65, + 0x12, 0x33, 0x0a, 0x16, 0x65, 0x6d, 0x69, 0x74, 0x5f, 0x65, 0x78, 0x61, 0x63, 0x74, 0x5f, 0x74, + 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x13, 0x65, 0x6d, 0x69, 0x74, 0x45, 0x78, 0x61, 0x63, 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, + 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x2a, 0x0a, 0x11, 0x65, 0x6d, 0x69, 0x74, 0x5f, 0x73, 0x79, + 0x6e, 0x63, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x0f, 0x65, 0x6d, 0x69, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, + 0x72, 0x12, 0x2c, 0x0a, 0x12, 0x65, 0x6d, 0x69, 0x74, 0x5f, 0x61, 0x73, 0x79, 0x6e, 0x63, 0x5f, + 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x65, + 0x6d, 0x69, 0x74, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x12, + 0x18, 0x0a, 0x07, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6f, 0x75, 0x74, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6f, 0x75, 0x74, 0x12, 0x30, 0x0a, 0x14, 0x65, + 0x6d, 0x69, 0x74, 0x5f, 0x70, 0x79, 0x64, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x5f, 0x6d, 0x6f, 0x64, + 0x65, 0x6c, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x65, 0x6d, 0x69, 0x74, 0x50, + 0x79, 0x64, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x22, 0x6d, 0x0a, + 0x0a, 0x4b, 0x6f, 0x74, 0x6c, 0x69, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x33, 0x0a, 0x16, 0x65, + 0x6d, 0x69, 0x74, 0x5f, 0x65, 0x78, 0x61, 0x63, 0x74, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x65, 0x6d, 0x69, + 0x74, 0x45, 0x78, 0x61, 0x63, 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, + 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6f, 0x75, + 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6f, 0x75, 0x74, 0x22, 0xcd, 0x06, 0x0a, + 0x06, 0x47, 0x6f, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x65, 0x6d, 0x69, 0x74, 0x5f, + 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x0d, 0x65, 0x6d, 0x69, 0x74, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x12, 0x24, + 0x0a, 0x0e, 0x65, 0x6d, 0x69, 0x74, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x74, 0x61, 0x67, 0x73, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x65, 0x6d, 0x69, 0x74, 0x4a, 0x73, 0x6f, 0x6e, + 0x54, 0x61, 0x67, 0x73, 0x12, 0x20, 0x0a, 0x0c, 0x65, 0x6d, 0x69, 0x74, 0x5f, 0x64, 0x62, 0x5f, + 0x74, 0x61, 0x67, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x65, 0x6d, 0x69, 0x74, + 0x44, 0x62, 0x54, 0x61, 0x67, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x65, 0x6d, 0x69, 0x74, 0x5f, 0x70, + 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x64, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x65, 0x6d, 0x69, 0x74, 0x50, 0x72, 0x65, 0x70, 0x61, + 0x72, 0x65, 0x64, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x12, 0x33, 0x0a, 0x16, 0x65, 0x6d, 0x69, 0x74, 0x5f, 0x65, 0x78, 0x61, 0x63, 0x74, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x65, 0x6d, 0x69, 0x74, + 0x61, 0x6d, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x65, 0x6d, 0x69, 0x74, 0x45, 0x78, 0x61, 0x63, 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, - 0x2a, 0x0a, 0x11, 0x65, 0x6d, 0x69, 0x74, 0x5f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x71, 0x75, 0x65, - 0x72, 0x69, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x65, 0x6d, 0x69, 0x74, - 0x53, 0x79, 0x6e, 0x63, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x12, 0x2c, 0x0a, 0x12, 0x65, - 0x6d, 0x69, 0x74, 0x5f, 0x61, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, - 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x65, 0x6d, 0x69, 0x74, 0x41, 0x73, 0x79, - 0x6e, 0x63, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x63, - 0x6b, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x63, 0x6b, - 0x61, 0x67, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6f, 0x75, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x6f, 0x75, 0x74, 0x12, 0x30, 0x0a, 0x14, 0x65, 0x6d, 0x69, 0x74, 0x5f, 0x70, 0x79, - 0x64, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x12, 0x65, 0x6d, 0x69, 0x74, 0x50, 0x79, 0x64, 0x61, 0x6e, 0x74, 0x69, - 0x63, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x22, 0x6d, 0x0a, 0x0a, 0x4b, 0x6f, 0x74, 0x6c, 0x69, - 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x33, 0x0a, 0x16, 0x65, 0x6d, 0x69, 0x74, 0x5f, 0x65, 0x78, - 0x61, 0x63, 0x74, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x65, 0x6d, 0x69, 0x74, 0x45, 0x78, 0x61, 0x63, 0x74, - 0x54, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, - 0x63, 0x6b, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x63, - 0x6b, 0x61, 0x67, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6f, 0x75, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x6f, 0x75, 0x74, 0x22, 0xcd, 0x06, 0x0a, 0x06, 0x47, 0x6f, 0x43, 0x6f, 0x64, - 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x65, 0x6d, 0x69, 0x74, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, - 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x65, 0x6d, 0x69, 0x74, 0x49, - 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x65, 0x6d, 0x69, 0x74, - 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x0c, 0x65, 0x6d, 0x69, 0x74, 0x4a, 0x73, 0x6f, 0x6e, 0x54, 0x61, 0x67, 0x73, 0x12, 0x20, - 0x0a, 0x0c, 0x65, 0x6d, 0x69, 0x74, 0x5f, 0x64, 0x62, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x65, 0x6d, 0x69, 0x74, 0x44, 0x62, 0x54, 0x61, 0x67, 0x73, - 0x12, 0x32, 0x0a, 0x15, 0x65, 0x6d, 0x69, 0x74, 0x5f, 0x70, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, - 0x64, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x13, 0x65, 0x6d, 0x69, 0x74, 0x50, 0x72, 0x65, 0x70, 0x61, 0x72, 0x65, 0x64, 0x51, 0x75, 0x65, - 0x72, 0x69, 0x65, 0x73, 0x12, 0x33, 0x0a, 0x16, 0x65, 0x6d, 0x69, 0x74, 0x5f, 0x65, 0x78, 0x61, - 0x63, 0x74, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x65, 0x6d, 0x69, 0x74, 0x45, 0x78, 0x61, 0x63, 0x74, 0x54, - 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x2a, 0x0a, 0x11, 0x65, 0x6d, 0x69, - 0x74, 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x5f, 0x73, 0x6c, 0x69, 0x63, 0x65, 0x73, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x65, 0x6d, 0x69, 0x74, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x53, - 0x6c, 0x69, 0x63, 0x65, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x65, 0x6d, 0x69, 0x74, 0x5f, 0x65, 0x78, - 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x65, 0x6d, 0x69, 0x74, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, - 0x65, 0x64, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x12, 0x3d, 0x0a, 0x1b, 0x65, 0x6d, 0x69, - 0x74, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x5f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x5f, - 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x18, - 0x65, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, - 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x73, 0x12, 0x3d, 0x0a, 0x1b, 0x65, 0x6d, 0x69, 0x74, - 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x5f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x5f, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x18, 0x65, - 0x6d, 0x69, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x50, - 0x6f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x73, 0x12, 0x40, 0x0a, 0x1d, 0x65, 0x6d, 0x69, 0x74, 0x5f, - 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x64, 0x62, 0x5f, - 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x19, - 0x65, 0x6d, 0x69, 0x74, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x57, 0x69, 0x74, 0x68, 0x44, - 0x62, 0x41, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x2f, 0x0a, 0x14, 0x6a, 0x73, 0x6f, - 0x6e, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x5f, 0x63, 0x61, 0x73, 0x65, 0x5f, 0x73, 0x74, 0x79, 0x6c, - 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x6a, 0x73, 0x6f, 0x6e, 0x54, 0x61, 0x67, - 0x73, 0x43, 0x61, 0x73, 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, - 0x63, 0x6b, 0x61, 0x67, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x63, - 0x6b, 0x61, 0x67, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6f, 0x75, 0x74, 0x18, 0x0d, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x6f, 0x75, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x71, 0x6c, 0x5f, 0x70, 0x61, - 0x63, 0x6b, 0x61, 0x67, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x71, 0x6c, - 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x2d, 0x0a, 0x13, 0x6f, 0x75, 0x74, 0x70, 0x75, - 0x74, 0x5f, 0x64, 0x62, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0f, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x44, 0x62, 0x46, 0x69, - 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x17, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, - 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x4d, - 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x46, 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x37, 0x0a, - 0x18, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x5f, - 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x15, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x72, 0x46, 0x69, - 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x13, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, - 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x5f, 0x73, 0x75, 0x66, 0x66, 0x69, 0x78, 0x18, 0x12, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x11, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x73, - 0x53, 0x75, 0x66, 0x66, 0x69, 0x78, 0x22, 0x88, 0x01, 0x0a, 0x07, 0x43, 0x61, 0x74, 0x61, 0x6c, - 0x6f, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x25, 0x0a, 0x0e, - 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x53, 0x63, 0x68, - 0x65, 0x6d, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x28, 0x0a, 0x07, 0x73, 0x63, 0x68, 0x65, 0x6d, - 0x61, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, - 0x6e, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x07, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, - 0x73, 0x22, 0xc1, 0x01, 0x0a, 0x06, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x18, 0x0a, 0x07, - 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, - 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x25, 0x0a, 0x06, 0x74, 0x61, - 0x62, 0x6c, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x70, 0x6c, 0x75, - 0x67, 0x69, 0x6e, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, - 0x73, 0x12, 0x22, 0x0a, 0x05, 0x65, 0x6e, 0x75, 0x6d, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x0c, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x05, - 0x65, 0x6e, 0x75, 0x6d, 0x73, 0x12, 0x3e, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, - 0x74, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, - 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, - 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, - 0x54, 0x79, 0x70, 0x65, 0x73, 0x22, 0x3d, 0x0a, 0x0d, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, - 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, - 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, - 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x48, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x12, 0x0a, 0x04, + 0x2a, 0x0a, 0x11, 0x65, 0x6d, 0x69, 0x74, 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x5f, 0x73, 0x6c, + 0x69, 0x63, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x65, 0x6d, 0x69, 0x74, + 0x45, 0x6d, 0x70, 0x74, 0x79, 0x53, 0x6c, 0x69, 0x63, 0x65, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x65, + 0x6d, 0x69, 0x74, 0x5f, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x71, 0x75, 0x65, + 0x72, 0x69, 0x65, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x65, 0x6d, 0x69, 0x74, + 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x12, + 0x3d, 0x0a, 0x1b, 0x65, 0x6d, 0x69, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x5f, 0x73, + 0x74, 0x72, 0x75, 0x63, 0x74, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x73, 0x18, 0x08, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x18, 0x65, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, + 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x73, 0x12, 0x3d, + 0x0a, 0x1b, 0x65, 0x6d, 0x69, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x5f, 0x73, 0x74, + 0x72, 0x75, 0x63, 0x74, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x73, 0x18, 0x09, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x18, 0x65, 0x6d, 0x69, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x53, + 0x74, 0x72, 0x75, 0x63, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x73, 0x12, 0x40, 0x0a, + 0x1d, 0x65, 0x6d, 0x69, 0x74, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x5f, 0x77, 0x69, + 0x74, 0x68, 0x5f, 0x64, 0x62, 0x5f, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x0a, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x19, 0x65, 0x6d, 0x69, 0x74, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, + 0x73, 0x57, 0x69, 0x74, 0x68, 0x44, 0x62, 0x41, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, + 0x2f, 0x0a, 0x14, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x5f, 0x63, 0x61, 0x73, + 0x65, 0x5f, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x6a, + 0x73, 0x6f, 0x6e, 0x54, 0x61, 0x67, 0x73, 0x43, 0x61, 0x73, 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, + 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6f, 0x75, + 0x74, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6f, 0x75, 0x74, 0x12, 0x1f, 0x0a, 0x0b, + 0x73, 0x71, 0x6c, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0a, 0x73, 0x71, 0x6c, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x2d, 0x0a, + 0x13, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x64, 0x62, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x6f, 0x75, 0x74, 0x70, + 0x75, 0x74, 0x44, 0x62, 0x46, 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x17, + 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x5f, 0x66, 0x69, + 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x6f, + 0x75, 0x74, 0x70, 0x75, 0x74, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x46, 0x69, 0x6c, 0x65, 0x4e, + 0x61, 0x6d, 0x65, 0x12, 0x37, 0x0a, 0x18, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x71, 0x75, + 0x65, 0x72, 0x69, 0x65, 0x72, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x51, 0x75, 0x65, + 0x72, 0x69, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x13, + 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x5f, 0x73, 0x75, 0x66, + 0x66, 0x69, 0x78, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x6f, 0x75, 0x74, 0x70, 0x75, + 0x74, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x53, 0x75, 0x66, 0x66, 0x69, 0x78, 0x22, 0x34, 0x0a, 0x08, + 0x4a, 0x53, 0x4f, 0x4e, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6f, 0x75, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6f, 0x75, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x6e, + 0x64, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x69, 0x6e, 0x64, 0x65, + 0x6e, 0x74, 0x22, 0x88, 0x01, 0x0a, 0x07, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x12, 0x18, + 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x64, 0x65, 0x66, 0x61, + 0x75, 0x6c, 0x74, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, + 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x28, 0x0a, 0x07, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x18, 0x04, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x53, 0x63, + 0x68, 0x65, 0x6d, 0x61, 0x52, 0x07, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x22, 0xc1, 0x01, + 0x0a, 0x06, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, + 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, + 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x25, 0x0a, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, + 0x54, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x12, 0x22, 0x0a, + 0x05, 0x65, 0x6e, 0x75, 0x6d, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, + 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x05, 0x65, 0x6e, 0x75, 0x6d, + 0x73, 0x12, 0x3e, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x5f, 0x74, + 0x79, 0x70, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x6c, 0x75, + 0x67, 0x69, 0x6e, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x54, 0x79, 0x70, + 0x65, 0x52, 0x0e, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, + 0x73, 0x22, 0x3d, 0x0a, 0x0d, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x54, 0x79, + 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, + 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, + 0x22, 0x48, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, + 0x76, 0x61, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x76, 0x61, 0x6c, 0x73, + 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x71, 0x0a, 0x05, 0x54, 0x61, + 0x62, 0x6c, 0x65, 0x12, 0x24, 0x0a, 0x03, 0x72, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x12, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x66, 0x69, 0x65, 0x72, 0x52, 0x03, 0x72, 0x65, 0x6c, 0x12, 0x28, 0x0a, 0x07, 0x63, 0x6f, 0x6c, + 0x75, 0x6d, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x6c, 0x75, + 0x67, 0x69, 0x6e, 0x2e, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x52, 0x07, 0x63, 0x6f, 0x6c, 0x75, + 0x6d, 0x6e, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x52, 0x0a, + 0x0a, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x63, + 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x61, + 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x12, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x22, 0xd5, 0x02, 0x0a, 0x06, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x12, 0x12, 0x0a, 0x04, 0x76, 0x61, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, - 0x76, 0x61, 0x6c, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x71, - 0x0a, 0x05, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x24, 0x0a, 0x03, 0x72, 0x65, 0x6c, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x49, 0x64, - 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x03, 0x72, 0x65, 0x6c, 0x12, 0x28, 0x0a, - 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, + 0x12, 0x19, 0x0a, 0x08, 0x6e, 0x6f, 0x74, 0x5f, 0x6e, 0x75, 0x6c, 0x6c, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x07, 0x6e, 0x6f, 0x74, 0x4e, 0x75, 0x6c, 0x6c, 0x12, 0x19, 0x0a, 0x08, 0x69, + 0x73, 0x5f, 0x61, 0x72, 0x72, 0x61, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x69, + 0x73, 0x41, 0x72, 0x72, 0x61, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, + 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, + 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x24, 0x0a, 0x0e, 0x69, 0x73, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x64, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x0c, 0x69, 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x12, 0x20, + 0x0a, 0x0c, 0x69, 0x73, 0x5f, 0x66, 0x75, 0x6e, 0x63, 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x18, 0x08, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x46, 0x75, 0x6e, 0x63, 0x43, 0x61, 0x6c, 0x6c, + 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x28, 0x0a, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, + 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x49, + 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, + 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, + 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x41, 0x6c, 0x69, 0x61, + 0x73, 0x12, 0x26, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x12, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, + 0x69, 0x65, 0x72, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x94, 0x02, 0x0a, 0x05, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x74, 0x65, 0x78, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x63, + 0x6d, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x63, 0x6d, 0x64, 0x12, 0x28, 0x0a, + 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x52, 0x07, - 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, - 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, - 0x74, 0x22, 0x52, 0x0a, 0x0a, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, - 0x18, 0x0a, 0x07, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, 0x68, - 0x65, 0x6d, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, - 0x61, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xd5, 0x02, 0x0a, 0x06, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, - 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x6e, 0x6f, 0x74, 0x5f, 0x6e, 0x75, 0x6c, 0x6c, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x6e, 0x6f, 0x74, 0x4e, 0x75, 0x6c, 0x6c, 0x12, - 0x19, 0x0a, 0x08, 0x69, 0x73, 0x5f, 0x61, 0x72, 0x72, 0x61, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x07, 0x69, 0x73, 0x41, 0x72, 0x72, 0x61, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, - 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, - 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x24, 0x0a, 0x0e, - 0x69, 0x73, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x64, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x69, 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x12, 0x20, 0x0a, 0x0c, 0x69, 0x73, 0x5f, 0x66, 0x75, 0x6e, 0x63, 0x5f, 0x63, 0x61, - 0x6c, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x46, 0x75, 0x6e, 0x63, - 0x43, 0x61, 0x6c, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x18, 0x09, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x28, 0x0a, 0x05, 0x74, 0x61, - 0x62, 0x6c, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x6c, 0x75, 0x67, - 0x69, 0x6e, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x05, 0x74, - 0x61, 0x62, 0x6c, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x61, 0x6c, - 0x69, 0x61, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x74, 0x61, 0x62, 0x6c, 0x65, - 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x26, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0c, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x49, 0x64, 0x65, - 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x94, 0x02, - 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x65, 0x78, 0x74, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x65, 0x78, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, - 0x10, 0x0a, 0x03, 0x63, 0x6d, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x63, 0x6d, - 0x64, 0x12, 0x28, 0x0a, 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x43, 0x6f, 0x6c, 0x75, - 0x6d, 0x6e, 0x52, 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x12, 0x2d, 0x0a, 0x06, 0x70, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x6c, - 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, 0x0a, - 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, - 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6f, - 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, - 0x6d, 0x65, 0x12, 0x40, 0x0a, 0x11, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x5f, 0x69, 0x6e, 0x74, - 0x6f, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, - 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, - 0x72, 0x52, 0x11, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x5f, 0x69, 0x6e, 0x74, 0x6f, 0x5f, 0x74, - 0x61, 0x62, 0x6c, 0x65, 0x22, 0x4b, 0x0a, 0x09, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, - 0x72, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x26, 0x0a, 0x06, 0x63, 0x6f, 0x6c, - 0x75, 0x6d, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x6c, 0x75, 0x67, - 0x69, 0x6e, 0x2e, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x52, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, - 0x6e, 0x22, 0xb6, 0x01, 0x0a, 0x0e, 0x43, 0x6f, 0x64, 0x65, 0x47, 0x65, 0x6e, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x2c, 0x0a, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, - 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, - 0x67, 0x73, 0x12, 0x29, 0x0a, 0x07, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x43, 0x61, 0x74, - 0x61, 0x6c, 0x6f, 0x67, 0x52, 0x07, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x12, 0x27, 0x0a, - 0x07, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, - 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x07, 0x71, - 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x71, 0x6c, 0x63, 0x5f, 0x76, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x71, - 0x6c, 0x63, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x35, 0x0a, 0x0f, 0x43, 0x6f, - 0x64, 0x65, 0x47, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a, - 0x05, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, - 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x05, 0x66, 0x69, 0x6c, 0x65, - 0x73, 0x42, 0x2c, 0x5a, 0x2a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x6b, 0x79, 0x6c, 0x65, 0x63, 0x6f, 0x6e, 0x72, 0x6f, 0x79, 0x2f, 0x73, 0x71, 0x6c, 0x63, 0x2f, - 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x12, 0x2d, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, + 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, + 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, + 0x74, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, + 0x74, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x40, + 0x0a, 0x11, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x5f, 0x69, 0x6e, 0x74, 0x6f, 0x5f, 0x74, 0x61, + 0x62, 0x6c, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x6c, 0x75, 0x67, + 0x69, 0x6e, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x11, 0x69, + 0x6e, 0x73, 0x65, 0x72, 0x74, 0x5f, 0x69, 0x6e, 0x74, 0x6f, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, + 0x22, 0x4b, 0x0a, 0x09, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, 0x16, 0x0a, + 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6e, + 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x26, 0x0a, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x43, + 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x52, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x22, 0xb6, 0x01, + 0x0a, 0x0e, 0x43, 0x6f, 0x64, 0x65, 0x47, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x2c, 0x0a, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x53, 0x65, 0x74, 0x74, + 0x69, 0x6e, 0x67, 0x73, 0x52, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x29, + 0x0a, 0x07, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x0f, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, + 0x52, 0x07, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x12, 0x27, 0x0a, 0x07, 0x71, 0x75, 0x65, + 0x72, 0x69, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x70, 0x6c, 0x75, + 0x67, 0x69, 0x6e, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x07, 0x71, 0x75, 0x65, 0x72, 0x69, + 0x65, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x71, 0x6c, 0x63, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x71, 0x6c, 0x63, 0x5f, 0x76, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x35, 0x0a, 0x0f, 0x43, 0x6f, 0x64, 0x65, 0x47, 0x65, + 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a, 0x05, 0x66, 0x69, 0x6c, + 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, + 0x6e, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x05, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x42, 0x2c, 0x5a, + 0x2a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6b, 0x79, 0x6c, 0x65, + 0x63, 0x6f, 0x6e, 0x72, 0x6f, 0x79, 0x2f, 0x73, 0x71, 0x6c, 0x63, 0x2f, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( @@ -1809,7 +1878,7 @@ func file_plugin_codegen_proto_rawDescGZIP() []byte { return file_plugin_codegen_proto_rawDescData } -var file_plugin_codegen_proto_msgTypes = make([]protoimpl.MessageInfo, 20) +var file_plugin_codegen_proto_msgTypes = make([]protoimpl.MessageInfo, 21) var file_plugin_codegen_proto_goTypes = []interface{}{ (*File)(nil), // 0: plugin.File (*Override)(nil), // 1: plugin.Override @@ -1819,49 +1888,51 @@ var file_plugin_codegen_proto_goTypes = []interface{}{ (*PythonCode)(nil), // 5: plugin.PythonCode (*KotlinCode)(nil), // 6: plugin.KotlinCode (*GoCode)(nil), // 7: plugin.GoCode - (*Catalog)(nil), // 8: plugin.Catalog - (*Schema)(nil), // 9: plugin.Schema - (*CompositeType)(nil), // 10: plugin.CompositeType - (*Enum)(nil), // 11: plugin.Enum - (*Table)(nil), // 12: plugin.Table - (*Identifier)(nil), // 13: plugin.Identifier - (*Column)(nil), // 14: plugin.Column - (*Query)(nil), // 15: plugin.Query - (*Parameter)(nil), // 16: plugin.Parameter - (*CodeGenRequest)(nil), // 17: plugin.CodeGenRequest - (*CodeGenResponse)(nil), // 18: plugin.CodeGenResponse - nil, // 19: plugin.Settings.RenameEntry + (*JSONCode)(nil), // 8: plugin.JSONCode + (*Catalog)(nil), // 9: plugin.Catalog + (*Schema)(nil), // 10: plugin.Schema + (*CompositeType)(nil), // 11: plugin.CompositeType + (*Enum)(nil), // 12: plugin.Enum + (*Table)(nil), // 13: plugin.Table + (*Identifier)(nil), // 14: plugin.Identifier + (*Column)(nil), // 15: plugin.Column + (*Query)(nil), // 16: plugin.Query + (*Parameter)(nil), // 17: plugin.Parameter + (*CodeGenRequest)(nil), // 18: plugin.CodeGenRequest + (*CodeGenResponse)(nil), // 19: plugin.CodeGenResponse + nil, // 20: plugin.Settings.RenameEntry } var file_plugin_codegen_proto_depIdxs = []int32{ - 13, // 0: plugin.Override.table:type_name -> plugin.Identifier + 14, // 0: plugin.Override.table:type_name -> plugin.Identifier 2, // 1: plugin.Override.python_type:type_name -> plugin.PythonType 3, // 2: plugin.Override.go_type:type_name -> plugin.ParsedGoType - 19, // 3: plugin.Settings.rename:type_name -> plugin.Settings.RenameEntry + 20, // 3: plugin.Settings.rename:type_name -> plugin.Settings.RenameEntry 1, // 4: plugin.Settings.overrides:type_name -> plugin.Override 5, // 5: plugin.Settings.python:type_name -> plugin.PythonCode 6, // 6: plugin.Settings.kotlin:type_name -> plugin.KotlinCode 7, // 7: plugin.Settings.go:type_name -> plugin.GoCode - 9, // 8: plugin.Catalog.schemas:type_name -> plugin.Schema - 12, // 9: plugin.Schema.tables:type_name -> plugin.Table - 11, // 10: plugin.Schema.enums:type_name -> plugin.Enum - 10, // 11: plugin.Schema.composite_types:type_name -> plugin.CompositeType - 13, // 12: plugin.Table.rel:type_name -> plugin.Identifier - 14, // 13: plugin.Table.columns:type_name -> plugin.Column - 13, // 14: plugin.Column.table:type_name -> plugin.Identifier - 13, // 15: plugin.Column.type:type_name -> plugin.Identifier - 14, // 16: plugin.Query.columns:type_name -> plugin.Column - 16, // 17: plugin.Query.params:type_name -> plugin.Parameter - 13, // 18: plugin.Query.insert_into_table:type_name -> plugin.Identifier - 14, // 19: plugin.Parameter.column:type_name -> plugin.Column - 4, // 20: plugin.CodeGenRequest.settings:type_name -> plugin.Settings - 8, // 21: plugin.CodeGenRequest.catalog:type_name -> plugin.Catalog - 15, // 22: plugin.CodeGenRequest.queries:type_name -> plugin.Query - 0, // 23: plugin.CodeGenResponse.files:type_name -> plugin.File - 24, // [24:24] is the sub-list for method output_type - 24, // [24:24] is the sub-list for method input_type - 24, // [24:24] is the sub-list for extension type_name - 24, // [24:24] is the sub-list for extension extendee - 0, // [0:24] is the sub-list for field type_name + 8, // 8: plugin.Settings.json:type_name -> plugin.JSONCode + 10, // 9: plugin.Catalog.schemas:type_name -> plugin.Schema + 13, // 10: plugin.Schema.tables:type_name -> plugin.Table + 12, // 11: plugin.Schema.enums:type_name -> plugin.Enum + 11, // 12: plugin.Schema.composite_types:type_name -> plugin.CompositeType + 14, // 13: plugin.Table.rel:type_name -> plugin.Identifier + 15, // 14: plugin.Table.columns:type_name -> plugin.Column + 14, // 15: plugin.Column.table:type_name -> plugin.Identifier + 14, // 16: plugin.Column.type:type_name -> plugin.Identifier + 15, // 17: plugin.Query.columns:type_name -> plugin.Column + 17, // 18: plugin.Query.params:type_name -> plugin.Parameter + 14, // 19: plugin.Query.insert_into_table:type_name -> plugin.Identifier + 15, // 20: plugin.Parameter.column:type_name -> plugin.Column + 4, // 21: plugin.CodeGenRequest.settings:type_name -> plugin.Settings + 9, // 22: plugin.CodeGenRequest.catalog:type_name -> plugin.Catalog + 16, // 23: plugin.CodeGenRequest.queries:type_name -> plugin.Query + 0, // 24: plugin.CodeGenResponse.files:type_name -> plugin.File + 25, // [25:25] is the sub-list for method output_type + 25, // [25:25] is the sub-list for method input_type + 25, // [25:25] is the sub-list for extension type_name + 25, // [25:25] is the sub-list for extension extendee + 0, // [0:25] is the sub-list for field type_name } func init() { file_plugin_codegen_proto_init() } @@ -1967,7 +2038,7 @@ func file_plugin_codegen_proto_init() { } } file_plugin_codegen_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Catalog); i { + switch v := v.(*JSONCode); i { case 0: return &v.state case 1: @@ -1979,7 +2050,7 @@ func file_plugin_codegen_proto_init() { } } file_plugin_codegen_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Schema); i { + switch v := v.(*Catalog); i { case 0: return &v.state case 1: @@ -1991,7 +2062,7 @@ func file_plugin_codegen_proto_init() { } } file_plugin_codegen_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CompositeType); i { + switch v := v.(*Schema); i { case 0: return &v.state case 1: @@ -2003,7 +2074,7 @@ func file_plugin_codegen_proto_init() { } } file_plugin_codegen_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Enum); i { + switch v := v.(*CompositeType); i { case 0: return &v.state case 1: @@ -2015,7 +2086,7 @@ func file_plugin_codegen_proto_init() { } } file_plugin_codegen_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Table); i { + switch v := v.(*Enum); i { case 0: return &v.state case 1: @@ -2027,7 +2098,7 @@ func file_plugin_codegen_proto_init() { } } file_plugin_codegen_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Identifier); i { + switch v := v.(*Table); i { case 0: return &v.state case 1: @@ -2039,7 +2110,7 @@ func file_plugin_codegen_proto_init() { } } file_plugin_codegen_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Column); i { + switch v := v.(*Identifier); i { case 0: return &v.state case 1: @@ -2051,7 +2122,7 @@ func file_plugin_codegen_proto_init() { } } file_plugin_codegen_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Query); i { + switch v := v.(*Column); i { case 0: return &v.state case 1: @@ -2063,7 +2134,7 @@ func file_plugin_codegen_proto_init() { } } file_plugin_codegen_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Parameter); i { + switch v := v.(*Query); i { case 0: return &v.state case 1: @@ -2075,7 +2146,7 @@ func file_plugin_codegen_proto_init() { } } file_plugin_codegen_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CodeGenRequest); i { + switch v := v.(*Parameter); i { case 0: return &v.state case 1: @@ -2087,6 +2158,18 @@ func file_plugin_codegen_proto_init() { } } file_plugin_codegen_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CodeGenRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_plugin_codegen_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CodeGenResponse); i { case 0: return &v.state @@ -2105,7 +2188,7 @@ func file_plugin_codegen_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_plugin_codegen_proto_rawDesc, NumEnums: 0, - NumMessages: 20, + NumMessages: 21, NumExtensions: 0, NumServices: 0, }, diff --git a/internal/plugin/codegen_vtproto.pb.go b/internal/plugin/codegen_vtproto.pb.go index 9bd89db83a..88792da3e5 100644 --- a/internal/plugin/codegen_vtproto.pb.go +++ b/internal/plugin/codegen_vtproto.pb.go @@ -307,6 +307,16 @@ func (m *Settings) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } + if m.Json != nil { + size, err := m.Json.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x5a + } if m.Go != nil { size, err := m.Go.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { @@ -742,6 +752,53 @@ func (m *GoCode) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *JSONCode) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *JSONCode) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *JSONCode) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if len(m.Indent) > 0 { + i -= len(m.Indent) + copy(dAtA[i:], m.Indent) + i = encodeVarint(dAtA, i, uint64(len(m.Indent))) + i-- + dAtA[i] = 0x12 + } + if len(m.Out) > 0 { + i -= len(m.Out) + copy(dAtA[i:], m.Out) + i = encodeVarint(dAtA, i, uint64(len(m.Out))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func (m *Catalog) MarshalVT() (dAtA []byte, err error) { if m == nil { return nil, nil @@ -1678,6 +1735,10 @@ func (m *Settings) SizeVT() (n int) { l = m.Go.SizeVT() n += 1 + l + sov(uint64(l)) } + if m.Json != nil { + l = m.Json.SizeVT() + n += 1 + l + sov(uint64(l)) + } if m.unknownFields != nil { n += len(m.unknownFields) } @@ -1813,6 +1874,26 @@ func (m *GoCode) SizeVT() (n int) { return n } +func (m *JSONCode) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Out) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + l = len(m.Indent) + if l > 0 { + n += 1 + l + sov(uint64(l)) + } + if m.unknownFields != nil { + n += len(m.unknownFields) + } + return n +} + func (m *Catalog) SizeVT() (n int) { if m == nil { return 0 @@ -3283,6 +3364,42 @@ func (m *Settings) UnmarshalVT(dAtA []byte) error { return err } iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Json", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Json == nil { + m.Json = &JSONCode{} + } + if err := m.Json.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skip(dAtA[iNdEx:]) @@ -4142,6 +4259,121 @@ func (m *GoCode) UnmarshalVT(dAtA []byte) error { } return nil } +func (m *JSONCode) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: JSONCode: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: JSONCode: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Out", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Out = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Indent", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Indent = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *Catalog) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/protos/plugin/codegen.proto b/protos/plugin/codegen.proto index adfa5ffe98..ae82c839dd 100644 --- a/protos/plugin/codegen.proto +++ b/protos/plugin/codegen.proto @@ -59,6 +59,7 @@ message Settings PythonCode python = 8; KotlinCode kotlin = 9; GoCode go = 10; + JSONCode json = 11; } message PythonCode @@ -100,6 +101,12 @@ message GoCode string output_files_suffix = 18; } +message JSONCode +{ + string out = 1; + string indent = 2; +} + message Catalog { string comment = 1;