diff --git a/Makefile b/Makefile index 953b19b0..0493be17 100644 --- a/Makefile +++ b/Makefile @@ -25,10 +25,28 @@ scalacache_protos: mv build/stack/gazelle/scala/cache/build/stack/gazelle/scala/cache/*.go build/stack/gazelle/scala/cache/ rm -rf build/stack/gazelle/scala/cache/build +.PHONY: scalapb_protos +scalapb_protos: + bazel run //scalapb:scalapb_go_compiled_sources.update + mv scalapb/scalapb/scalapb.pb.go scalapb/scalapb.pb.go + rm -rf scalapb/scalapb + +.PHONY: semanticdb_protos +semanticdb_protos: + bazel run //scala/meta/semanticdb:semanticdb_go_compiled_sources.update + mv scala/meta/semanticdb/scala/meta/semanticdb/semanticdb.pb.go scala/meta/semanticdb/semanticdb.pb.go + rm -rf scala/meta/semanticdb/scala + .PHONY: protos -protos: jarindex_protos parser_protos scalacache_protos +protos: jarindex_protos parser_protos scalacache_protos scalapb_protos semanticdb_protos echo "Done." +.PHONY: docs +docs: + bazel build //docs/architecture:all + cp -f bazel-bin/docs/architecture/components.png docs/architecture + cp -f bazel-bin/docs/architecture/sequence.png docs/architecture + .PHONY: tidy gazelle: bazel run //:gazelle @@ -55,5 +73,9 @@ mocks: .PHONY: gen gen: mocks protos +.PHONY: goldens +goldens: + bazel run //pkg/semanticdb:semanticdb_test -- -update + update_provider_test_golden_files: bazel run pkg/provider:provider_test -- -update diff --git a/README.md b/README.md index 9293a39d..05f18d3c 100644 --- a/README.md +++ b/README.md @@ -472,8 +472,8 @@ func (p *bazelDepsProvider) loadFile(dir string, filename string, scope resolver } // CanProvide implements part of the resolver.SymbolProvider interface. -func (p *bazelDepsProvider) CanProvide(dep label.Label, knownRule func(from label.Label) (*rule.Rule, bool)) bool { - if dep.Repo == "bazel_deps" { +func (p *bazelDepsProvider) CanProvide(dep *resolver.ImportLabel, knownRule func(from label.Label) (*rule.Rule, bool)) bool { + if dep.Label.Repo == "bazel_deps" { return true } return false @@ -934,10 +934,10 @@ Generates: ```bazel scala_binary( name = "app", - # deps: ❌ AbstractServiceBase symbol not found (EXTENDS of foo.allocation.Main) - # deps: ✅ akka.NotUsed @maven//:com_typesafe_akka_akka_actor_2_12 (DIRECT of BusinessFlows.scala) - # deps: ✅ java.time.format.DateTimeFormatter NO-LABEL (DIRECT of RequestHandler.scala) - # deps: ✅ scala.concurrent.ExecutionContext @maven//:org_scala_lang_scala_library (DIRECT of RequestHandler.scala) + # import: ❌ AbstractServiceBase symbol not found (EXTENDS of foo.allocation.Main) + # import: ✅ akka.NotUsed @maven//:com_typesafe_akka_akka_actor_2_12 (DIRECT of BusinessFlows.scala) + # import: ✅ java.time.format.DateTimeFormatter NO-LABEL (DIRECT of RequestHandler.scala) + # import: ✅ scala.concurrent.ExecutionContext @maven//:org_scala_lang_scala_library (DIRECT of RequestHandler.scala) srcs = glob(["src/main/**/*.scala"]), main_class = "foo.allocation.Main", ) diff --git a/build/stack/gazelle/scala/parse/file.pb.go b/build/stack/gazelle/scala/parse/file.pb.go index 77ee7ad6..e50f3f3b 100644 --- a/build/stack/gazelle/scala/parse/file.pb.go +++ b/build/stack/gazelle/scala/parse/file.pb.go @@ -20,28 +20,76 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +type FileSet struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Files []*File `protobuf:"bytes,1,rep,name=files,proto3" json:"files,omitempty"` +} + +func (x *FileSet) Reset() { + *x = FileSet{} + if protoimpl.UnsafeEnabled { + mi := &file_build_stack_gazelle_scala_parse_file_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FileSet) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FileSet) ProtoMessage() {} + +func (x *FileSet) ProtoReflect() protoreflect.Message { + mi := &file_build_stack_gazelle_scala_parse_file_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 FileSet.ProtoReflect.Descriptor instead. +func (*FileSet) Descriptor() ([]byte, []int) { + return file_build_stack_gazelle_scala_parse_file_proto_rawDescGZIP(), []int{0} +} + +func (x *FileSet) GetFiles() []*File { + if x != nil { + return x.Files + } + return nil +} + type File struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Filename string `protobuf:"bytes,1,opt,name=filename,proto3" json:"filename,omitempty"` - Imports []string `protobuf:"bytes,3,rep,name=imports,proto3" json:"imports,omitempty"` - Packages []string `protobuf:"bytes,4,rep,name=packages,proto3" json:"packages,omitempty"` - Classes []string `protobuf:"bytes,5,rep,name=classes,proto3" json:"classes,omitempty"` - Objects []string `protobuf:"bytes,6,rep,name=objects,proto3" json:"objects,omitempty"` - Traits []string `protobuf:"bytes,7,rep,name=traits,proto3" json:"traits,omitempty"` - Types []string `protobuf:"bytes,8,rep,name=types,proto3" json:"types,omitempty"` - Vals []string `protobuf:"bytes,9,rep,name=vals,proto3" json:"vals,omitempty"` - Names []string `protobuf:"bytes,10,rep,name=names,proto3" json:"names,omitempty"` - Extends map[string]*ClassList `protobuf:"bytes,11,rep,name=extends,proto3" json:"extends,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - Error string `protobuf:"bytes,13,opt,name=error,proto3" json:"error,omitempty"` + Filename string `protobuf:"bytes,1,opt,name=filename,proto3" json:"filename,omitempty"` + SemanticImports []string `protobuf:"bytes,2,rep,name=semantic_imports,json=semanticImports,proto3" json:"semantic_imports,omitempty"` + Imports []string `protobuf:"bytes,3,rep,name=imports,proto3" json:"imports,omitempty"` + Packages []string `protobuf:"bytes,4,rep,name=packages,proto3" json:"packages,omitempty"` + Classes []string `protobuf:"bytes,5,rep,name=classes,proto3" json:"classes,omitempty"` + Objects []string `protobuf:"bytes,6,rep,name=objects,proto3" json:"objects,omitempty"` + Traits []string `protobuf:"bytes,7,rep,name=traits,proto3" json:"traits,omitempty"` + Types []string `protobuf:"bytes,8,rep,name=types,proto3" json:"types,omitempty"` + Vals []string `protobuf:"bytes,9,rep,name=vals,proto3" json:"vals,omitempty"` + Names []string `protobuf:"bytes,10,rep,name=names,proto3" json:"names,omitempty"` + Extends map[string]*ClassList `protobuf:"bytes,11,rep,name=extends,proto3" json:"extends,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Error string `protobuf:"bytes,13,opt,name=error,proto3" json:"error,omitempty"` } func (x *File) Reset() { *x = File{} if protoimpl.UnsafeEnabled { - mi := &file_build_stack_gazelle_scala_parse_file_proto_msgTypes[0] + mi := &file_build_stack_gazelle_scala_parse_file_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -54,7 +102,7 @@ func (x *File) String() string { func (*File) ProtoMessage() {} func (x *File) ProtoReflect() protoreflect.Message { - mi := &file_build_stack_gazelle_scala_parse_file_proto_msgTypes[0] + mi := &file_build_stack_gazelle_scala_parse_file_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -67,7 +115,7 @@ func (x *File) ProtoReflect() protoreflect.Message { // Deprecated: Use File.ProtoReflect.Descriptor instead. func (*File) Descriptor() ([]byte, []int) { - return file_build_stack_gazelle_scala_parse_file_proto_rawDescGZIP(), []int{0} + return file_build_stack_gazelle_scala_parse_file_proto_rawDescGZIP(), []int{1} } func (x *File) GetFilename() string { @@ -77,6 +125,13 @@ func (x *File) GetFilename() string { return "" } +func (x *File) GetSemanticImports() []string { + if x != nil { + return x.SemanticImports + } + return nil +} + func (x *File) GetImports() []string { if x != nil { return x.Imports @@ -158,7 +213,7 @@ type ClassList struct { func (x *ClassList) Reset() { *x = ClassList{} if protoimpl.UnsafeEnabled { - mi := &file_build_stack_gazelle_scala_parse_file_proto_msgTypes[1] + mi := &file_build_stack_gazelle_scala_parse_file_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -171,7 +226,7 @@ func (x *ClassList) String() string { func (*ClassList) ProtoMessage() {} func (x *ClassList) ProtoReflect() protoreflect.Message { - mi := &file_build_stack_gazelle_scala_parse_file_proto_msgTypes[1] + mi := &file_build_stack_gazelle_scala_parse_file_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -184,7 +239,7 @@ func (x *ClassList) ProtoReflect() protoreflect.Message { // Deprecated: Use ClassList.ProtoReflect.Descriptor instead. func (*ClassList) Descriptor() ([]byte, []int) { - return file_build_stack_gazelle_scala_parse_file_proto_rawDescGZIP(), []int{1} + return file_build_stack_gazelle_scala_parse_file_proto_rawDescGZIP(), []int{2} } func (x *ClassList) GetClasses() []string { @@ -204,44 +259,51 @@ var file_build_stack_gazelle_scala_parse_file_proto_rawDesc = []byte{ 0x65, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2e, 0x70, 0x61, 0x72, 0x73, 0x65, 0x1a, 0x2c, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2f, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2f, 0x67, 0x61, 0x7a, 0x65, 0x6c, 0x6c, 0x65, 0x2f, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2f, 0x70, 0x61, 0x72, 0x73, 0x65, 0x2f, 0x73, - 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb0, 0x03, 0x0a, 0x04, - 0x46, 0x69, 0x6c, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, - 0x12, 0x18, 0x0a, 0x07, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x07, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, - 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, - 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x65, - 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x65, 0x73, - 0x12, 0x18, 0x0a, 0x07, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x07, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x72, - 0x61, 0x69, 0x74, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x74, 0x72, 0x61, 0x69, - 0x74, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x05, 0x74, 0x79, 0x70, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x76, 0x61, 0x6c, 0x73, - 0x18, 0x09, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x76, 0x61, 0x6c, 0x73, 0x12, 0x14, 0x0a, 0x05, - 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x61, 0x6d, - 0x65, 0x73, 0x12, 0x4c, 0x0a, 0x07, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x73, 0x18, 0x0b, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2e, 0x73, 0x74, 0x61, 0x63, - 0x6b, 0x2e, 0x67, 0x61, 0x7a, 0x65, 0x6c, 0x6c, 0x65, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2e, - 0x70, 0x61, 0x72, 0x73, 0x65, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, - 0x64, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x73, - 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x1a, 0x66, 0x0a, 0x0c, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, - 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x40, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2e, - 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x61, 0x7a, 0x65, 0x6c, 0x6c, 0x65, 0x2e, 0x73, 0x63, - 0x61, 0x6c, 0x61, 0x2e, 0x70, 0x61, 0x72, 0x73, 0x65, 0x2e, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x4c, - 0x69, 0x73, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x25, - 0x0a, 0x09, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x63, - 0x6c, 0x61, 0x73, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6c, - 0x61, 0x73, 0x73, 0x65, 0x73, 0x42, 0x6a, 0x0a, 0x1f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2e, 0x73, + 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x46, 0x0a, 0x07, 0x46, + 0x69, 0x6c, 0x65, 0x53, 0x65, 0x74, 0x12, 0x3b, 0x0a, 0x05, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2e, 0x73, 0x74, + 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x61, 0x7a, 0x65, 0x6c, 0x6c, 0x65, 0x2e, 0x73, 0x63, 0x61, 0x6c, + 0x61, 0x2e, 0x70, 0x61, 0x72, 0x73, 0x65, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x05, 0x66, 0x69, + 0x6c, 0x65, 0x73, 0x22, 0xdb, 0x03, 0x0a, 0x04, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x1a, 0x0a, 0x08, + 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x73, 0x65, 0x6d, 0x61, + 0x6e, 0x74, 0x69, 0x63, 0x5f, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x0f, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x49, 0x6d, 0x70, 0x6f, + 0x72, 0x74, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x18, 0x03, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x12, 0x1a, 0x0a, + 0x08, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x08, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6c, 0x61, + 0x73, 0x73, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6c, 0x61, 0x73, + 0x73, 0x65, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x18, 0x06, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0x16, 0x0a, + 0x06, 0x74, 0x72, 0x61, 0x69, 0x74, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x74, + 0x72, 0x61, 0x69, 0x74, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x08, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x74, 0x79, 0x70, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x76, + 0x61, 0x6c, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x76, 0x61, 0x6c, 0x73, 0x12, + 0x14, 0x0a, 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, + 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x4c, 0x0a, 0x07, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x73, + 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2e, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x61, 0x7a, 0x65, 0x6c, 0x6c, 0x65, 0x2e, 0x73, 0x63, 0x61, - 0x6c, 0x61, 0x2e, 0x70, 0x61, 0x72, 0x73, 0x65, 0x50, 0x01, 0x5a, 0x45, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x62, 0x2f, 0x73, 0x63, - 0x61, 0x6c, 0x61, 0x2d, 0x67, 0x61, 0x7a, 0x65, 0x6c, 0x6c, 0x65, 0x2f, 0x62, 0x75, 0x69, 0x6c, - 0x64, 0x2f, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2f, 0x67, 0x61, 0x7a, 0x65, 0x6c, 0x6c, 0x65, 0x2f, - 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2f, 0x70, 0x61, 0x72, 0x73, 0x65, 0x3b, 0x70, 0x61, 0x72, 0x73, - 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6c, 0x61, 0x2e, 0x70, 0x61, 0x72, 0x73, 0x65, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x2e, 0x45, 0x78, + 0x74, 0x65, 0x6e, 0x64, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x64, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x0d, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x1a, 0x66, 0x0a, 0x0c, 0x45, 0x78, 0x74, + 0x65, 0x6e, 0x64, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x40, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x62, 0x75, 0x69, + 0x6c, 0x64, 0x2e, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x61, 0x7a, 0x65, 0x6c, 0x6c, 0x65, + 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2e, 0x70, 0x61, 0x72, 0x73, 0x65, 0x2e, 0x43, 0x6c, 0x61, + 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, + 0x01, 0x22, 0x25, 0x0a, 0x09, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x18, + 0x0a, 0x07, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x07, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x65, 0x73, 0x42, 0x6a, 0x0a, 0x1f, 0x62, 0x75, 0x69, 0x6c, + 0x64, 0x2e, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x61, 0x7a, 0x65, 0x6c, 0x6c, 0x65, 0x2e, + 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2e, 0x70, 0x61, 0x72, 0x73, 0x65, 0x50, 0x01, 0x5a, 0x45, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x62, + 0x2f, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2d, 0x67, 0x61, 0x7a, 0x65, 0x6c, 0x6c, 0x65, 0x2f, 0x62, + 0x75, 0x69, 0x6c, 0x64, 0x2f, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2f, 0x67, 0x61, 0x7a, 0x65, 0x6c, + 0x6c, 0x65, 0x2f, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2f, 0x70, 0x61, 0x72, 0x73, 0x65, 0x3b, 0x70, + 0x61, 0x72, 0x73, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -256,20 +318,22 @@ func file_build_stack_gazelle_scala_parse_file_proto_rawDescGZIP() []byte { return file_build_stack_gazelle_scala_parse_file_proto_rawDescData } -var file_build_stack_gazelle_scala_parse_file_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_build_stack_gazelle_scala_parse_file_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_build_stack_gazelle_scala_parse_file_proto_goTypes = []interface{}{ - (*File)(nil), // 0: build.stack.gazelle.scala.parse.File - (*ClassList)(nil), // 1: build.stack.gazelle.scala.parse.ClassList - nil, // 2: build.stack.gazelle.scala.parse.File.ExtendsEntry + (*FileSet)(nil), // 0: build.stack.gazelle.scala.parse.FileSet + (*File)(nil), // 1: build.stack.gazelle.scala.parse.File + (*ClassList)(nil), // 2: build.stack.gazelle.scala.parse.ClassList + nil, // 3: build.stack.gazelle.scala.parse.File.ExtendsEntry } var file_build_stack_gazelle_scala_parse_file_proto_depIdxs = []int32{ - 2, // 0: build.stack.gazelle.scala.parse.File.extends:type_name -> build.stack.gazelle.scala.parse.File.ExtendsEntry - 1, // 1: build.stack.gazelle.scala.parse.File.ExtendsEntry.value:type_name -> build.stack.gazelle.scala.parse.ClassList - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name + 1, // 0: build.stack.gazelle.scala.parse.FileSet.files:type_name -> build.stack.gazelle.scala.parse.File + 3, // 1: build.stack.gazelle.scala.parse.File.extends:type_name -> build.stack.gazelle.scala.parse.File.ExtendsEntry + 2, // 2: build.stack.gazelle.scala.parse.File.ExtendsEntry.value:type_name -> build.stack.gazelle.scala.parse.ClassList + 3, // [3:3] is the sub-list for method output_type + 3, // [3:3] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name } func init() { file_build_stack_gazelle_scala_parse_file_proto_init() } @@ -280,7 +344,7 @@ func file_build_stack_gazelle_scala_parse_file_proto_init() { file_build_stack_gazelle_scala_parse_symbol_proto_init() if !protoimpl.UnsafeEnabled { file_build_stack_gazelle_scala_parse_file_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*File); i { + switch v := v.(*FileSet); i { case 0: return &v.state case 1: @@ -292,6 +356,18 @@ func file_build_stack_gazelle_scala_parse_file_proto_init() { } } file_build_stack_gazelle_scala_parse_file_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*File); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_build_stack_gazelle_scala_parse_file_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ClassList); i { case 0: return &v.state @@ -310,7 +386,7 @@ func file_build_stack_gazelle_scala_parse_file_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_build_stack_gazelle_scala_parse_file_proto_rawDesc, NumEnums: 0, - NumMessages: 3, + NumMessages: 4, NumExtensions: 0, NumServices: 0, }, diff --git a/build/stack/gazelle/scala/parse/file.proto b/build/stack/gazelle/scala/parse/file.proto index c646764a..899e58da 100644 --- a/build/stack/gazelle/scala/parse/file.proto +++ b/build/stack/gazelle/scala/parse/file.proto @@ -8,11 +8,18 @@ option go_package = "github.com/stackb/scala-gazelle/build/stack/gazelle/scala/p option java_package = "build.stack.gazelle.scala.parse"; option java_multiple_files = true; +// FileSet represents a set of Files +message FileSet { + repeated File files = 1; +} + // File represents a parsed file named in a scala rule.srcs list. -// next: 2 (was sha256, can be re-used) message File { // filename is the (relative) source filename string filename = 1; + // semantic_imports is a list of types used by the file, typically + // discovered using semanticdb. + repeated string semantic_imports = 2; // imports is a list of required imports. repeated string imports = 3; // packages is a list of provided top-level classes. diff --git a/build/stack/gazelle/scala/parse/import.pb.go b/build/stack/gazelle/scala/parse/import.pb.go index 7d70bca1..bf748c3c 100644 --- a/build/stack/gazelle/scala/parse/import.pb.go +++ b/build/stack/gazelle/scala/parse/import.pb.go @@ -118,6 +118,7 @@ const ( ImportKind_EXTENDS ImportKind = 4 ImportKind_RESOLVED_NAME ImportKind = 5 ImportKind_TRANSITIVE ImportKind = 6 + ImportKind_SEMANTIC ImportKind = 7 ) // Enum value maps for ImportKind. @@ -130,6 +131,7 @@ var ( 4: "EXTENDS", 5: "RESOLVED_NAME", 6: "TRANSITIVE", + 7: "SEMANTIC", } ImportKind_value = map[string]int32{ "IMPORT_KIND_UNKNOWN": 0, @@ -139,6 +141,7 @@ var ( "EXTENDS": 4, "RESOLVED_NAME": 5, "TRANSITIVE": 6, + "SEMANTIC": 7, } ) @@ -193,22 +196,23 @@ var file_build_stack_gazelle_scala_parse_import_proto_rawDesc = []byte{ 0x11, 0x0a, 0x0d, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x10, 0x0e, 0x12, 0x11, 0x0a, 0x0d, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x5f, 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, 0x45, 0x10, 0x0f, 0x12, 0x11, 0x0a, 0x0d, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x5f, 0x50, - 0x41, 0x43, 0x4b, 0x41, 0x47, 0x45, 0x10, 0x10, 0x2a, 0x7f, 0x0a, 0x0a, 0x49, 0x6d, 0x70, 0x6f, - 0x72, 0x74, 0x4b, 0x69, 0x6e, 0x64, 0x12, 0x17, 0x0a, 0x13, 0x49, 0x4d, 0x50, 0x4f, 0x52, 0x54, - 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, - 0x0a, 0x0a, 0x06, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x4d, - 0x41, 0x49, 0x4e, 0x5f, 0x43, 0x4c, 0x41, 0x53, 0x53, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x49, - 0x4d, 0x50, 0x4c, 0x49, 0x43, 0x49, 0x54, 0x10, 0x03, 0x12, 0x0b, 0x0a, 0x07, 0x45, 0x58, 0x54, - 0x45, 0x4e, 0x44, 0x53, 0x10, 0x04, 0x12, 0x11, 0x0a, 0x0d, 0x52, 0x45, 0x53, 0x4f, 0x4c, 0x56, - 0x45, 0x44, 0x5f, 0x4e, 0x41, 0x4d, 0x45, 0x10, 0x05, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x52, 0x41, - 0x4e, 0x53, 0x49, 0x54, 0x49, 0x56, 0x45, 0x10, 0x06, 0x42, 0x6a, 0x0a, 0x1f, 0x62, 0x75, 0x69, - 0x6c, 0x64, 0x2e, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x61, 0x7a, 0x65, 0x6c, 0x6c, 0x65, - 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2e, 0x70, 0x61, 0x72, 0x73, 0x65, 0x50, 0x01, 0x5a, 0x45, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x74, 0x61, 0x63, 0x6b, - 0x62, 0x2f, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2d, 0x67, 0x61, 0x7a, 0x65, 0x6c, 0x6c, 0x65, 0x2f, - 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2f, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2f, 0x67, 0x61, 0x7a, 0x65, - 0x6c, 0x6c, 0x65, 0x2f, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2f, 0x70, 0x61, 0x72, 0x73, 0x65, 0x3b, - 0x70, 0x61, 0x72, 0x73, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x41, 0x43, 0x4b, 0x41, 0x47, 0x45, 0x10, 0x10, 0x2a, 0x8d, 0x01, 0x0a, 0x0a, 0x49, 0x6d, 0x70, + 0x6f, 0x72, 0x74, 0x4b, 0x69, 0x6e, 0x64, 0x12, 0x17, 0x0a, 0x13, 0x49, 0x4d, 0x50, 0x4f, 0x52, + 0x54, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, + 0x12, 0x0a, 0x0a, 0x06, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, + 0x4d, 0x41, 0x49, 0x4e, 0x5f, 0x43, 0x4c, 0x41, 0x53, 0x53, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, + 0x49, 0x4d, 0x50, 0x4c, 0x49, 0x43, 0x49, 0x54, 0x10, 0x03, 0x12, 0x0b, 0x0a, 0x07, 0x45, 0x58, + 0x54, 0x45, 0x4e, 0x44, 0x53, 0x10, 0x04, 0x12, 0x11, 0x0a, 0x0d, 0x52, 0x45, 0x53, 0x4f, 0x4c, + 0x56, 0x45, 0x44, 0x5f, 0x4e, 0x41, 0x4d, 0x45, 0x10, 0x05, 0x12, 0x0e, 0x0a, 0x0a, 0x54, 0x52, + 0x41, 0x4e, 0x53, 0x49, 0x54, 0x49, 0x56, 0x45, 0x10, 0x06, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x45, + 0x4d, 0x41, 0x4e, 0x54, 0x49, 0x43, 0x10, 0x07, 0x42, 0x6a, 0x0a, 0x1f, 0x62, 0x75, 0x69, 0x6c, + 0x64, 0x2e, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x61, 0x7a, 0x65, 0x6c, 0x6c, 0x65, 0x2e, + 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2e, 0x70, 0x61, 0x72, 0x73, 0x65, 0x50, 0x01, 0x5a, 0x45, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x62, + 0x2f, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2d, 0x67, 0x61, 0x7a, 0x65, 0x6c, 0x6c, 0x65, 0x2f, 0x62, + 0x75, 0x69, 0x6c, 0x64, 0x2f, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2f, 0x67, 0x61, 0x7a, 0x65, 0x6c, + 0x6c, 0x65, 0x2f, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2f, 0x70, 0x61, 0x72, 0x73, 0x65, 0x3b, 0x70, + 0x61, 0x72, 0x73, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/build/stack/gazelle/scala/parse/import.proto b/build/stack/gazelle/scala/parse/import.proto index fbaa5e7a..f133cfe2 100644 --- a/build/stack/gazelle/scala/parse/import.proto +++ b/build/stack/gazelle/scala/parse/import.proto @@ -66,4 +66,6 @@ enum ImportKind { // An import required as a transitive dependency of some direct/initial // dependency. TRANSITIVE = 6; + // An import that was derived from the semanticdb type list for the file.option + SEMANTIC = 7; } diff --git a/cmd/mergeindex/mergeindex.go b/cmd/mergeindex/mergeindex.go index 99b3d683..9d11b0ed 100644 --- a/cmd/mergeindex/mergeindex.go +++ b/cmd/mergeindex/mergeindex.go @@ -72,7 +72,7 @@ func readParamsFile(filename string) ([]string, error) { } func parseFlags(args []string) (files []string, err error) { - fs := flag.NewFlagSet("mergeindex", flag.ExitOnError) // flag.ContinueOnError + fs := flag.NewFlagSet("mergeindex", flag.ExitOnError) fs.StringVar(&predefinedLabels, "predefined", "", "a comma-separated list of labels to be considered predefined") fs.StringVar(&outputFile, "output_file", "", "the output file to write") fs.Usage = func() { diff --git a/cmd/semanticdbextract/BUILD.bazel b/cmd/semanticdbextract/BUILD.bazel new file mode 100644 index 00000000..14131960 --- /dev/null +++ b/cmd/semanticdbextract/BUILD.bazel @@ -0,0 +1,20 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library") + +go_library( + name = "semanticdbextract_lib", + srcs = ["semanticdbextract.go"], + importpath = "github.com/stackb/scala-gazelle/cmd/semanticdbextract", + visibility = ["//visibility:private"], + deps = [ + "//pkg/collections", + "//pkg/protobuf", + "//pkg/semanticdb", + "//scala/meta/semanticdb", + ], +) + +go_binary( + name = "semanticdbextract", + embed = [":semanticdbextract_lib"], + visibility = ["//visibility:public"], +) diff --git a/cmd/semanticdbextract/semanticdbextract.go b/cmd/semanticdbextract/semanticdbextract.go new file mode 100644 index 00000000..6913e6c3 --- /dev/null +++ b/cmd/semanticdbextract/semanticdbextract.go @@ -0,0 +1,110 @@ +package main + +import ( + "flag" + "fmt" + "log" + "os" + "sort" + + "github.com/stackb/scala-gazelle/pkg/collections" + "github.com/stackb/scala-gazelle/pkg/protobuf" + "github.com/stackb/scala-gazelle/pkg/semanticdb" + + spb "github.com/stackb/scala-gazelle/scala/meta/semanticdb" +) + +var ( + jarFile string + outputFile string +) + +func main() { + log.SetPrefix("semanticdbextract: ") + log.SetFlags(0) // don't print timestamps + + if err := run(os.Args[1:]); err != nil { + log.Fatal(err) + } +} + +func run(args []string) error { + args, err := collections.ReadArgsParamsFile(args) + if err != nil { + return fmt.Errorf("failed to read params file: %v", err) + } + + err = parseFlags(args) + if err != nil { + return fmt.Errorf("failed to parse args: %v", err) + } + + doc, err := extract(jarFile) + if err != nil { + return fmt.Errorf("failed to merge files: %v", err) + } + + if err := protobuf.WriteStableJSONFile(outputFile, doc); err != nil { + return fmt.Errorf("failed to write output file: %v", err) + } + + return nil +} + +func parseFlags(args []string) (err error) { + fs := flag.NewFlagSet("semanticdbextract", flag.ExitOnError) + fs.StringVar(&jarFile, "jar_file", "", "the jar file to read") + fs.StringVar(&outputFile, "output_file", "", "the output file to write") + fs.Usage = func() { + fmt.Fprintf(flag.CommandLine.Output(), "usage: semanticdbextract @PARAMS_FILE | semanticdbextract OPTIONS") + fs.PrintDefaults() + } + if err = fs.Parse(args); err != nil { + return err + } + + if jarFile == "" { + log.Fatal("-jar_file is required") + } + if outputFile == "" { + log.Fatal("-output_file is required") + } + + files := fs.Args() + if len(files) != 0 { + err = fmt.Errorf("semanticdbextract positional args should be empty") + } + + return +} + +func extract(filename string) (*spb.TextDocuments, error) { + docs := new(spb.TextDocuments) + seen := make(map[string]bool) + + addDocument := func(doc *spb.TextDocument) { + if seen[doc.Uri] { + return + } + seen[doc.Uri] = true + docs.Documents = append(docs.Documents, doc) + } + + group, err := semanticdb.ReadJarFile(filename) + if err != nil { + return nil, err + } + for _, docs := range group { + for _, doc := range docs.Documents { + addDocument(doc) + } + } + + sort.Slice(docs.Documents, func(i, j int) bool { + a := docs.Documents[i].Uri + b := docs.Documents[j].Uri + return a < b + }) + + return docs, nil +} diff --git a/cmd/semanticdbmerge/BUILD.bazel b/cmd/semanticdbmerge/BUILD.bazel new file mode 100644 index 00000000..d064e725 --- /dev/null +++ b/cmd/semanticdbmerge/BUILD.bazel @@ -0,0 +1,21 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library") + +go_library( + name = "semanticdbmerge_lib", + srcs = ["semanticdbmerge.go"], + importpath = "github.com/stackb/scala-gazelle/cmd/semanticdbmerge", + visibility = ["//visibility:private"], + deps = [ + "//build/stack/gazelle/scala/parse", + "//pkg/collections", + "//pkg/protobuf", + "//pkg/semanticdb", + "//scala/meta/semanticdb", + ], +) + +go_binary( + name = "semanticdbmerge", + embed = [":semanticdbmerge_lib"], + visibility = ["//visibility:public"], +) diff --git a/cmd/semanticdbmerge/semanticdbmerge.go b/cmd/semanticdbmerge/semanticdbmerge.go new file mode 100644 index 00000000..b6f33875 --- /dev/null +++ b/cmd/semanticdbmerge/semanticdbmerge.go @@ -0,0 +1,133 @@ +package main + +import ( + "flag" + "fmt" + "log" + "os" + "path/filepath" + "sort" + + "github.com/stackb/scala-gazelle/pkg/collections" + "github.com/stackb/scala-gazelle/pkg/protobuf" + "github.com/stackb/scala-gazelle/pkg/semanticdb" + + sppb "github.com/stackb/scala-gazelle/build/stack/gazelle/scala/parse" + spb "github.com/stackb/scala-gazelle/scala/meta/semanticdb" +) + +var outputFile string + +func main() { + log.SetPrefix("semanticdbmerge: ") + log.SetFlags(0) // don't print timestamps + + if err := run(os.Args[1:]); err != nil { + log.Fatal(err) + } +} + +func run(args []string) error { + args, err := collections.ReadArgsParamsFile(args) + if err != nil { + return fmt.Errorf("failed to read params file: %v", err) + } + + files, err := parseFlags(args) + if err != nil { + return fmt.Errorf("failed to parse args: %v", err) + } + + merged, err := merge(files...) + if err != nil { + return fmt.Errorf("failed to merge files: %v", err) + } + + if err := protobuf.WriteFile(outputFile, merged); err != nil { + return fmt.Errorf("failed to write output file: %v", err) + } + + return nil +} + +func parseFlags(args []string) (files []string, err error) { + fs := flag.NewFlagSet("semanticdbmerge", flag.ExitOnError) + fs.StringVar(&outputFile, "output_file", "", "the output file to write") + fs.Usage = func() { + fmt.Fprintf(flag.CommandLine.Output(), "usage: semanticdbmerge @PARAMS_FILE | semanticdbmerge OPTIONS FILES") + fs.PrintDefaults() + } + if err = fs.Parse(args); err != nil { + return nil, err + } + + if outputFile == "" { + log.Fatal("-output_file is required") + } + + files = fs.Args() + if len(files) == 0 { + err = fmt.Errorf("semanticdbmerge positional args should be a non-empty list of jars or semanticdb files to merge") + } + + return +} + +func merge(filenames ...string) (*sppb.FileSet, error) { + fileSet := new(sppb.FileSet) + seen := make(map[string]bool) + + addFile := func(file *sppb.File) { + if seen[file.Filename] { + return + } + seen[file.Filename] = true + fileSet.Files = append(fileSet.Files, file) + } + + addDocument := func(doc *spb.TextDocument) { + if seen[doc.Uri] { + return + } + addFile(newFile(doc)) + } + + for _, filename := range filenames { + switch filepath.Ext(filename) { + case ".pb": + var fileSet sppb.FileSet + err := protobuf.ReadFile(filename, &fileSet) + if err != nil { + return nil, err + } + for _, file := range fileSet.Files { + addFile(file) + } + case ".jar": + group, err := semanticdb.ReadJarFile(filename) + if err != nil { + return nil, err + } + for _, docs := range group { + for _, doc := range docs.Documents { + addDocument(doc) + } + } + } + } + + sort.Slice(fileSet.Files, func(i, j int) bool { + a := fileSet.Files[i].Filename + b := fileSet.Files[j].Filename + return a < b + }) + + return fileSet, nil +} + +func newFile(doc *spb.TextDocument) *sppb.File { + return &sppb.File{ + Filename: doc.Uri, + SemanticImports: semanticdb.SemanticImports(doc), + } +} diff --git a/docs/architecture/BUILD.bazel b/docs/architecture/BUILD.bazel new file mode 100644 index 00000000..ee746d42 --- /dev/null +++ b/docs/architecture/BUILD.bazel @@ -0,0 +1,13 @@ +load("//tools/plantuml:plantuml.bzl", "plantuml_diagram") + +plantuml_diagram( + name = "sequence", + src = "sequence.puml", + dst = "sequence.png", +) + +plantuml_diagram( + name = "components", + src = "components.puml", + dst = "components.png", +) diff --git a/docs/architecture/README.md b/docs/architecture/README.md new file mode 100644 index 00000000..b1db853b --- /dev/null +++ b/docs/architecture/README.md @@ -0,0 +1,9 @@ +# Architecture + +## Components + +![components](./components.png) + +## Sequence + +![sequence](./sequence.png) \ No newline at end of file diff --git a/docs/architecture/components.png b/docs/architecture/components.png new file mode 100755 index 00000000..92e2f4d5 Binary files /dev/null and b/docs/architecture/components.png differ diff --git a/docs/architecture/components.puml b/docs/architecture/components.puml new file mode 100644 index 00000000..d573f23d --- /dev/null +++ b/docs/architecture/components.puml @@ -0,0 +1,76 @@ + +@startuml components + +skinparam Shadowing false + +frame "gazelle" { + + frame "protobuf" as C { + [GlobalResolver] #f8c8a4 + } + + frame "scala" as S { + database Scope { + + } + [MavenProvider] #ff6f61 + [JavaProvider] #ff6f61 + component SourceProvider { + [ScalaMetaParser] #f4a6a6 + [Imports] #f4a6a6 + [SemanticDBProvider] #fa8072 + } + [ProtobufProvider] #f8c8a4 + [Resolver] + } + +} + +frame "WORKSPACE Rules" { + [maven_install] #ff6f61 + [maven_install.json] as MavenInstallJson #ff6f61 +} + +frame "BUILD Rules" { + [proto_scala_library] #f8c8a4 + [java_index] #ff6f61 + [scala_library] #f4a6a6 + + [jar_index.json] as JarIndexJson #ff6f61 + [scala.jar] as ScalaJar #fa8072 + [App.scala] as AppScala #f4a6a6 +} + +proto_scala_library --> GlobalResolver +java_index --> JarIndexJson: "@maven//:com_google_json" +JarIndexJson --> JavaProvider +maven_install --> MavenInstallJson +MavenInstallJson --> MavenProvider +scala_library --> AppScala: srcs +AppScala --> ScalaMetaParser +ScalaMetaParser --> Imports +SemanticDBProvider --> Imports +scala_library --> ScalaJar: scalac +ScalaJar --> SemanticDBProvider: META-INF/semanticdb + +MavenProvider --> Scope: com.google.gson +ProtobufProvider --> Scope: myapp.proto.UserMessage +JavaProvider --> Scope: java.lang.*, com.google.gson.GSON +Imports --> Scope: myapp.util.Helper + +GlobalResolver --> ProtobufProvider +Scope --> Resolver + +' Resolve --> Resolver +' Export --> CSVFile: write +' CSVFile ..> [Topic]: " notify file created" +' [Topic] -> [Subscription]: notify +' [Subscription] ..> EventGridHandler: " send file created event" +' EventGridHandler --> [ProcessCSV]: " start" +' [ProcessCSV] <.. CSVFile: "read" +' [ProcessCSV] --> JSONFile: "\n write" +' [FunctionApp] - [API] +' [HttpClient] <..> [API]: " request/response" +' [CostExportClient] ..> Export: " create" + +@enduml \ No newline at end of file diff --git a/docs/architecture/sequence.png b/docs/architecture/sequence.png new file mode 100755 index 00000000..9461c55c Binary files /dev/null and b/docs/architecture/sequence.png differ diff --git a/docs/architecture/sequence.puml b/docs/architecture/sequence.puml new file mode 100644 index 00000000..f8ad151d --- /dev/null +++ b/docs/architecture/sequence.puml @@ -0,0 +1,23 @@ +@startuml sequence + +title scala-gazelle run sequence + +skinparam Shadowing false + +hide footbox + +participant Gazelle as G +participant Scala as S +participant Protobuf as P + +== Configuration == + +== Generation == + +== Resolve == + +== Cleanup == + +== Emit == + +@enduml \ No newline at end of file diff --git a/language/scala/BUILD.bazel b/language/scala/BUILD.bazel index 8bdf8d94..85ad294b 100644 --- a/language/scala/BUILD.bazel +++ b/language/scala/BUILD.bazel @@ -3,7 +3,6 @@ load("@bazel_gazelle//:def.bzl", "gazelle_binary") # load("@build_stack_rules_proto//rules:example.bzl", "gazelle_testdata_example") # gazelle:exclude testdata -# gazelle:exclude oldtestdata go_library( name = "scala", @@ -93,6 +92,7 @@ go_test( embed = [":scala"], deps = [ "//build/stack/gazelle/scala/parse", + "//pkg/collections", "//pkg/resolver", "//pkg/resolver/mocks", "//pkg/scalaconfig", diff --git a/language/scala/existing_scala_rule.go b/language/scala/existing_scala_rule.go index b78e2252..278912c2 100644 --- a/language/scala/existing_scala_rule.go +++ b/language/scala/existing_scala_rule.go @@ -127,29 +127,29 @@ func (s *existingScalaRule) Resolve(rctx *scalarule.ResolveContext, importsRaw i } sc := scalaconfig.Get(rctx.Config) - sc.Imports(scalaRule.ResolveImports(rctx), rctx.Rule, "deps", rctx.From) - if s.isLibrary { - sc.Exports(scalaRule.ResolveExports(rctx), rctx.Rule, "exports", rctx.From) - } + imports := scalaRule.ResolveImports(rctx) + sc.Imports(imports, rctx.Rule, "deps", rctx.From) - srcs := rctx.Rule.Attr("srcs") + commentsSrcs := rctx.Rule.AttrComments("srcs") + commentsSrcs.Before = nil + if sc.ShouldAnnotateImports() { + scalaconfig.AnnotateImports(imports, commentsSrcs, "import: ") + } if sc.ShouldAnnotateRule() { - if comments, err := makeRuleComments(scalaRule.pb); err != nil { - log.Fatalln("annotating rule:", err) - } else { - srcs.Comment().Before = comments - } - } else { - srcs.Comment().Before = nil + ruleComments := makeRuleComments(scalaRule.pb) + commentsSrcs.Before = append(commentsSrcs.Before, ruleComments...) + } + + if s.isLibrary { + exports := scalaRule.ResolveExports(rctx) + sc.Exports(exports, rctx.Rule, "exports", rctx.From) } + } -func makeRuleComments(pb *sppb.Rule) (comments []build.Comment, err error) { +func makeRuleComments(pb *sppb.Rule) (comments []build.Comment) { pb.ParseTimeMillis = 0 - json, err := protobuf.StableJSON(pb) - if err != nil { - return nil, err - } + json, _ := protobuf.StableJSON(pb) // ignoring error, this isn't critical scanner := bufio.NewScanner(strings.NewReader(json)) for scanner.Scan() { @@ -158,9 +158,5 @@ func makeRuleComments(pb *sppb.Rule) (comments []build.Comment, err error) { Token: "# " + line, }) } - if err := scanner.Err(); err != nil { - return nil, err - } - return } diff --git a/language/scala/flags.go b/language/scala/flags.go index c6aa6498..ba1d2116 100644 --- a/language/scala/flags.go +++ b/language/scala/flags.go @@ -13,6 +13,7 @@ import ( "github.com/bazelbuild/bazel-gazelle/config" + "github.com/stackb/scala-gazelle/pkg/collections" "github.com/stackb/scala-gazelle/pkg/resolver" ) @@ -68,16 +69,13 @@ func (sl *scalaLang) registerConflictResolvers(flags *flag.FlagSet, cmd string, // CheckFlags implements part of the language.Language interface func (sl *scalaLang) CheckFlags(flags *flag.FlagSet, c *config.Config) error { + if sl.debugProcessFlagValue { + collections.PrintProcessIdForDelveAndWait() + } if sl.printCacheKey && sl.cacheKeyFlagValue != "" { fmt.Printf("scala-gazelle: cache v.%s\n", sl.cacheKeyFlagValue) } - if sl.debugProcessFlagValue { - fmt.Printf("Debugging session requested (Process ID: %d)\n", os.Getpid()) - fmt.Printf("NOTE: binary must be built with debug symbols for this to work (e.g 'bazel run -c dbg //:gazelle')\n") - fmt.Printf("dlv attach --headless --listen=:2345 %d\n", os.Getpid()) - fmt.Println("Press ENTER to continue.") - fmt.Scanln() - } + sl.symbolResolver = newUniverseResolver(sl, sl.globalPackages) if err := sl.setupSymbolProviders(flags, c, sl.symbolProviderNamesFlagValue); err != nil { diff --git a/language/scala/generate.go b/language/scala/generate.go index 0898c52f..39a56467 100644 --- a/language/scala/generate.go +++ b/language/scala/generate.go @@ -26,7 +26,7 @@ func (sl *scalaLang) GenerateRules(args language.GenerateArgs) language.Generate } sc := scalaconfig.Get(args.Config) - pkg := newScalaPackage(args.Rel, args.File, sc, sl.ruleProviderRegistry, sl.parser, sl) + pkg := newScalaPackage(args, sc, sl.ruleProviderRegistry, sl.parser, sl) sl.packages[args.Rel] = pkg sl.remainingPackages++ diff --git a/language/scala/golden_test.go b/language/scala/golden_test.go index 984b2f4a..2d1bf682 100644 --- a/language/scala/golden_test.go +++ b/language/scala/golden_test.go @@ -1,12 +1,17 @@ package scala import ( + "os" "testing" "github.com/stackb/rules_proto/pkg/goldentest" + "github.com/stackb/scala-gazelle/pkg/collections" ) func TestScala(t *testing.T) { + if val, ok := os.LookupEnv("SCALA_GAZELLE_DEBUG_PROCESS"); false && ok && (val == "1" || val == "true") { + collections.PrintProcessIdForDelveAndWait() + } goldentest.FromDir("language/scala", goldentest.WithOnlyTests( "java_provider", diff --git a/language/scala/language.go b/language/scala/language.go index 731baa75..9fd4ccac 100644 --- a/language/scala/language.go +++ b/language/scala/language.go @@ -105,8 +105,6 @@ func (*scalaLang) KnownDirectives() []string { // NewLanguage is called by Gazelle to install this language extension in a // binary. func NewLanguage() language.Language { - packages := make(map[string]*scalaPackage) - lang := &scalaLang{ wantProgress: wantProgress(), cache: scpb.Cache{}, @@ -115,19 +113,23 @@ func NewLanguage() language.Language { knownRules: make(map[label.Label]*rule.Rule), conflictResolvers: make(map[string]resolver.ConflictResolver), depsCleaners: make(map[string]resolver.DepsCleaner), - packages: packages, + packages: make(map[string]*scalaPackage), progress: mobyprogress.NewProgressOutput(mobyprogress.NewOut(os.Stderr)), ruleProviderRegistry: scalarule.GlobalProviderRegistry(), } - lang.sourceProvider = provider.NewSourceProvider(func(msg string) { + progress := func(msg string) { if lang.wantProgress { writeParseProgress(lang.progress, msg) } - }) - lang.parser = parser.NewMemoParser(lang.sourceProvider) + } + + lang.sourceProvider = provider.NewSourceProvider(progress) + semanticProvider := provider.NewSemanticdbProvider(lang.sourceProvider) + lang.parser = parser.NewMemoParser(semanticProvider) lang.AddSymbolProvider(lang.sourceProvider) + lang.AddSymbolProvider(semanticProvider) lang.AddSymbolProvider(provider.NewJavaProvider()) lang.AddSymbolProvider(provider.NewMavenProvider(scalaLangName)) lang.AddSymbolProvider(provider.NewProtobufProvider(scalaLangName, scalaLangName, protoc.GlobalResolver().Provided)) diff --git a/language/scala/loads_test.go b/language/scala/loads_test.go index 940fb91d..3073866c 100644 --- a/language/scala/loads_test.go +++ b/language/scala/loads_test.go @@ -8,5 +8,6 @@ func ExampleLanguage_Loads() { fmt.Printf("%+v\n", info) } // output: + // {Name:@build_stack_scala_gazelle//rules:semanticdb_index.bzl Symbols:[semanticdb_index] After:[]} // {Name:@io_bazel_rules_scala//scala:scala.bzl Symbols:[scala_binary scala_library scala_macro_library scala_test] After:[]} } diff --git a/language/scala/resolve.go b/language/scala/resolve.go index fd3d2f52..c4517eea 100644 --- a/language/scala/resolve.go +++ b/language/scala/resolve.go @@ -10,7 +10,7 @@ import ( // Imports implements part of the language.Language interface func (sl *scalaLang) Imports(c *config.Config, r *rule.Rule, f *rule.File) []resolve.ImportSpec { - from := label.Label{Pkg: f.Pkg, Name: r.Name()} + from := label.New("", f.Pkg, r.Name()) pkg, ok := sl.packages[from.Pkg] if !ok { diff --git a/language/scala/scala_package.go b/language/scala/scala_package.go index 016b964a..42adee62 100644 --- a/language/scala/scala_package.go +++ b/language/scala/scala_package.go @@ -7,6 +7,7 @@ import ( "github.com/bazelbuild/bazel-gazelle/config" "github.com/bazelbuild/bazel-gazelle/label" + "github.com/bazelbuild/bazel-gazelle/language" "github.com/bazelbuild/bazel-gazelle/repo" "github.com/bazelbuild/bazel-gazelle/resolve" "github.com/bazelbuild/bazel-gazelle/rule" @@ -26,16 +27,14 @@ var ErrRuleHasNoSrcs = fmt.Errorf("rule has no source files") // scalaPackage provides a set of proto_library derived rules for the package. type scalaPackage struct { - // rel is the package name (from args.Rel) - rel string + // args are the generateArgs + args language.GenerateArgs // parser is the file parser parser parser.Parser // universe is the parent universe universe resolver.Universe // the registry to use providerRegistry scalarule.ProviderRegistry - // the build file - file *rule.File // the config for this package cfg *scalaconfig.Config // the generated and empty rule providers @@ -51,18 +50,16 @@ type scalaPackage struct { // newScalaPackage constructs a Package given a list of scala files. func newScalaPackage( - rel string, - file *rule.File, + args language.GenerateArgs, cfg *scalaconfig.Config, providerRegistry scalarule.ProviderRegistry, parser parser.Parser, universe resolver.Universe) *scalaPackage { s := &scalaPackage{ - rel: rel, + args: args, parser: parser, universe: universe, providerRegistry: providerRegistry, - file: file, cfg: cfg, rules: make(map[string]*rule.Rule), resolveWork: make([]func(), 0), @@ -108,7 +105,7 @@ func (s *scalaPackage) Resolve( From: from, }, importsRaw) } - // the first resolve cycle populates the symbol scopes with + // the first resolve cycle populates the symbol scopes fn() s.resolveWork = append(s.resolveWork, fn) } @@ -126,9 +123,9 @@ func (s *scalaPackage) generateRules(enabled bool) []scalarule.RuleProvider { rules := make([]scalarule.RuleProvider, 0) existingRulesByFQN := make(map[string][]*rule.Rule) - if s.file != nil { - for _, r := range s.file.Rules { - fqn := fullyQualifiedLoadName(s.file.Loads, r.Kind()) + if s.args.File != nil { + for _, r := range s.args.File.Rules { + fqn := fullyQualifiedLoadName(s.args.File.Loads, r.Kind()) existingRulesByFQN[fqn] = append(existingRulesByFQN[fqn], r) if _, ok := s.providerRegistry.LookupProvider(fqn); ok { s.ruleCoverage.total += 1 @@ -139,9 +136,8 @@ func (s *scalaPackage) generateRules(enabled bool) []scalarule.RuleProvider { configuredRules := s.cfg.ConfiguredRules() for _, ruleConfig := range configuredRules { - // if enabled != rc.Enabled { if !ruleConfig.Enabled { - // log.Printf("%s: skipping rule config %s (not enabled)", s.rel, rc.Name) + // log.Printf("%s: skipping rule config %s (not enabled)", s.args.Rel, ruleConfig.Name) continue } rule := s.provideRule(ruleConfig) @@ -169,7 +165,7 @@ func (s *scalaPackage) provideRule(rc *scalarule.Config) scalarule.RuleProvider if !ok { log.Fatalf( "%s: rule provider not registered: %q (available: %v)", - s.rel, + s.args.Rel, rc.Implementation, s.providerRegistry.ProviderNames(), ) @@ -184,7 +180,7 @@ func (s *scalaPackage) resolveRule(rc *scalarule.Config, r *rule.Rule) scalarule if !ok { log.Fatalf( "%s: rule not registered: %q (available: %v)", - s.rel, + s.args.Rel, rc.Implementation, s.providerRegistry.ProviderNames(), ) @@ -198,11 +194,16 @@ func (s *scalaPackage) resolveRule(rc *scalarule.Config, r *rule.Rule) scalarule return nil } +// GenerateArgs implements part of the scalarule.Package interface. +func (s *scalaPackage) GenerateArgs() language.GenerateArgs { + return s.args +} + // ParseRule implements part of the scalarule.Package interface. func (s *scalaPackage) ParseRule(r *rule.Rule, attrName string) (scalarule.Rule, error) { - dir := filepath.Join(s.repoRootDir(), s.rel) - srcs, err := glob.CollectFilenames(s.file, dir, r.Attr(attrName)) + dir := filepath.Join(s.repoRootDir(), s.args.Rel) + srcs, err := glob.CollectFilenames(s.args.File, dir, r.Attr(attrName)) if err != nil { return nil, err } @@ -210,7 +211,7 @@ func (s *scalaPackage) ParseRule(r *rule.Rule, attrName string) (scalarule.Rule, return nil, ErrRuleHasNoSrcs } - from := s.cfg.MaybeRewrite(r.Kind(), label.Label{Pkg: s.rel, Name: r.Name()}) + from := s.cfg.MaybeRewrite(r.Kind(), label.Label{Pkg: s.args.Rel, Name: r.Name()}) rule, err := s.parser.ParseScalaRule(r.Kind(), from, dir, srcs...) if err != nil { diff --git a/language/scala/scala_rule.go b/language/scala/scala_rule.go index 62a7838d..046ea27b 100644 --- a/language/scala/scala_rule.go +++ b/language/scala/scala_rule.go @@ -13,16 +13,16 @@ import ( "github.com/bazelbuild/bazel-gazelle/resolve" "github.com/bazelbuild/bazel-gazelle/rule" - sppb "github.com/stackb/scala-gazelle/build/stack/gazelle/scala/parse" "github.com/stackb/scala-gazelle/pkg/collections" "github.com/stackb/scala-gazelle/pkg/resolver" "github.com/stackb/scala-gazelle/pkg/scalaconfig" "github.com/stackb/scala-gazelle/pkg/scalarule" "github.com/stackb/scala-gazelle/pkg/wildcardimport" + + sppb "github.com/stackb/scala-gazelle/build/stack/gazelle/scala/parse" ) const ( - debugSelfImports = false debugNameNotFound = false debugUnresolved = false debugExtendsNameNotFound = false @@ -88,7 +88,7 @@ func newScalaRule( // ResolveExports performs symbol resolution for exports of the rule. func (r *scalaRule) ResolveExports(rctx *scalarule.ResolveContext) resolver.ImportMap { - exports := r.Exports() + exports := r.Exports(rctx.From) // // part 1: resolve any unsettled imports and populate the transitive stack. @@ -112,52 +112,29 @@ func (r *scalaRule) ResolveExports(rctx *scalarule.ResolveContext) resolver.Impo // ResolveImports performs symbol resolution for imports of the rule. func (r *scalaRule) ResolveImports(rctx *scalarule.ResolveContext) resolver.ImportMap { - imports := r.Imports() + imports := r.Imports(rctx.From) sc := scalaconfig.Get(rctx.Config) - transitive := newImportSymbols() - - // - // part 1: resolve any unsettled imports and populate the transitive stack. - // for _, imp := range imports.Values() { if imp.Error != nil { continue } if symbol, ok := r.ResolveSymbol(rctx.Config, rctx.RuleIndex, rctx.From, scalaLangName, imp.Imp); ok { imp.Symbol = symbol + if len(imp.Symbol.Conflicts) > 0 { + if resolved, ok := sc.ResolveConflict(rctx.Rule, imports, imp, imp.Symbol); ok { + imp.Symbol = resolved + } else { + fmt.Println(resolver.SymbolConfictMessage(imp.Symbol, imp, rctx.From)) + } + } + } else { if debugUnresolved { log.Println("unresolved import:", imp) } imp.Error = resolver.ErrSymbolNotFound } - if imp.Symbol != nil { - transitive.Push(imp, imp.Symbol) - } - } - - // - // part 2: process each symbol and address conflicts, transitively. - // - for !transitive.IsEmpty() { - item, _ := transitive.Pop() - - if len(item.sym.Conflicts) > 0 { - if resolved, ok := sc.ResolveConflict(rctx.Rule, imports, item.imp, item.sym); ok { - item.imp.Symbol = resolved - } else { - fmt.Println(resolver.SymbolConfictMessage(item.sym, item.imp, rctx.From)) - } - } - - for _, req := range item.sym.Requires { - if _, ok := imports[req.Name]; ok { - continue - } - imports.Put(resolver.NewTransitiveImport(req.Name, item.sym.Name, req)) - transitive.Push(item.imp, req) - } } return imports @@ -169,7 +146,7 @@ func (r *scalaRule) ResolveSymbol(c *config.Config, ix *resolve.RuleIndex, from } // Imports implements part of the scalarule.Rule interface. -func (r *scalaRule) Imports() resolver.ImportMap { +func (r *scalaRule) Imports(from label.Label) resolver.ImportMap { imports := resolver.NewImportMap() impLang := scalaLangName @@ -180,7 +157,13 @@ func (r *scalaRule) Imports() resolver.ImportMap { // direct for _, file := range r.files { - r.fileImports(imports, file) + r.fileImports(imports, file, from) + } + + // semantic add in semantic imports after direct ones to minimize the delta + // between running gazelle with and without semanticdb info. + for _, file := range r.files { + r.fileSemanticImports(imports, file, from) } // Initialize a list of symbols to find implicits for from all known @@ -204,31 +187,24 @@ func (r *scalaRule) Imports() resolver.ImportMap { } // Exports implements part of the scalarule.Rule interface. -func (r *scalaRule) Exports() resolver.ImportMap { +func (r *scalaRule) Exports(from label.Label) resolver.ImportMap { exports := resolver.NewImportMap() for _, file := range r.files { - r.fileExports(file, exports) + r.fileExports(file, exports, from) } return exports } -// fileExports gathers needed imports for the given file. -func (r *scalaRule) fileExports(file *sppb.File, exports resolver.ImportMap) { +// fileExports gathers exports for the given file. +func (r *scalaRule) fileExports(file *sppb.File, exports resolver.ImportMap, from label.Label) { + + putExport := resolver.PutImportIfNotSelf(exports, from) + var scopes []resolver.Scope direct := resolver.NewTrieScope() - putExport := func(imp *resolver.Import) { - if resolver.IsSelfImport(imp, "", r.ctx.scalaConfig.Rel(), r.ctx.rule.Name()) { - if debugSelfImports { - log.Println("skipping export from current", imp.Imp) - } - return - } - exports.Put(imp) - } - // add in outer scope scopes = append(scopes, r.ctx.scope, direct) // build final scope used to resolve names in the file. @@ -278,20 +254,36 @@ func (r *scalaRule) fileExports(file *sppb.File, exports resolver.ImportMap) { } +func ImportsPutIfNotSelfImport(imports resolver.ImportMap, repo, rel, ruleName string) func(*resolver.Import) { + return func(imp *resolver.Import) { + if !resolver.IsSelfImport(imp.Symbol, repo, rel, ruleName) { + imports.Put(imp) + } + } +} + +// fileSemanticImports gathers needed semantic imports for the given file. +func (r *scalaRule) fileSemanticImports(imports resolver.ImportMap, file *sppb.File, from label.Label) { + + putImport := resolver.PutImportIfNotSelf(imports, from) + + for _, name := range file.SemanticImports { + imp := resolver.NewSemanticImport(name, file) + if sym, ok := r.ctx.scope.GetSymbol(imp.Imp); ok { + imp.Symbol = sym + } + putImport(imp) + } + +} + // fileImports gathers needed imports for the given file. -func (r *scalaRule) fileImports(imports resolver.ImportMap, file *sppb.File) { +func (r *scalaRule) fileImports(imports resolver.ImportMap, file *sppb.File, from label.Label) { + var scopes []resolver.Scope direct := resolver.NewTrieScope() - putImport := func(imp *resolver.Import) { - if resolver.IsSelfImport(imp, "", r.ctx.scalaConfig.Rel(), r.ctx.rule.Name()) { - if debugSelfImports { - log.Println("skipping import from current", imp.Imp) - } - return - } - imports.Put(imp) - } + putImport := resolver.PutImportIfNotSelf(imports, from) // gather direct imports and import scopes for _, name := range file.Imports { @@ -313,6 +305,7 @@ func (r *scalaRule) fileImports(imports resolver.ImportMap, file *sppb.File) { } } } + // collect the (package) symbol for import if sym, ok := r.ctx.scope.GetSymbol(name); ok { putImport(resolver.NewResolvedNameImport(sym.Name, file, name, sym)) @@ -392,17 +385,6 @@ func (r *scalaRule) fileImports(imports resolver.ImportMap, file *sppb.File) { } } - // resolve symbols named in the file. For each one we find, add an import. - for _, name := range file.Names { - if !r.ctx.scalaConfig.ShouldResolveFileSymbolName(file.Filename, name) { - continue - } - if sym, ok := scope.GetSymbol(name); ok { - putImport(resolver.NewResolvedNameImport(sym.Name, file, name, sym)) - } else { - putImport(resolver.NewErrorImport(name, file, "", fmt.Errorf("name not found"))) - } - } } // Provides implements part of the scalarule.Rule interface. @@ -470,44 +452,6 @@ func importBasename(imp string) string { return imp[index+1:] } -// importSymbol is a pair (import, symbol). If pair.imp.Symbol == pair.sym it -// represents a direct, otherwise pair.sym is a transitive requirement of -// pair.imp. -type importSymbol struct { - imp *resolver.Import - sym *resolver.Symbol -} - -// importSymbols is a stack of importSymbol pairs. -type importSymbols []*importSymbol - -func newImportSymbols() importSymbols { - return []*importSymbol{} -} - -// IsEmpty checks if the stack is empty -func (s *importSymbols) IsEmpty() bool { - return len(*s) == 0 -} - -// Push a new pair onto the stack -func (s *importSymbols) Push(imp *resolver.Import, sym *resolver.Symbol) { - *s = append(*s, &importSymbol{imp, sym}) -} - -// Pop: remove and return top element of stack, return false if stack is empty -func (s *importSymbols) Pop() (*importSymbol, bool) { - if s.IsEmpty() { - return nil, false - } - - i := len(*s) - 1 - x := (*s)[i] - *s = (*s)[:i] - - return x, true -} - func extendsKeysSorted(collection map[string]*sppb.ClassList) []string { keys := make([]string, 0, len(collection)) for token := range collection { diff --git a/language/scala/scala_rule_test.go b/language/scala/scala_rule_test.go index cf5db9aa..b292c994 100644 --- a/language/scala/scala_rule_test.go +++ b/language/scala/scala_rule_test.go @@ -137,8 +137,8 @@ func TestScalaRuleImports(t *testing.T) { }, }, want: []string{ + "✅ com.foo.Bar<> (DIRECT of A.scala)", `✅ akka.actor.Actor @maven//:akka_actor_akka_actor (EXTENDS of A.scala via "com.foo.ClassA")`, - `✅ com.foo.Bar<> (DIRECT of A.scala)`, }, }, "extends symbol completed by wildcard import": { @@ -163,8 +163,8 @@ func TestScalaRuleImports(t *testing.T) { }, }, want: []string{ - `✅ akka.actor.Actor @maven//:akka_actor_akka_actor (EXTENDS of A.scala via "com.foo.ClassA")`, "✅ akka.actor._<> (DIRECT of A.scala)", + `✅ akka.actor.Actor @maven//:akka_actor_akka_actor (EXTENDS of A.scala via "com.foo.ClassA")`, }, }, "resolve_with via extends": { @@ -249,8 +249,8 @@ func TestScalaRuleImports(t *testing.T) { }, }, want: []string{ - `✅ com.foo.proto.FooMessage //proto:foo_proto_scala_library (EXTENDS of A.scala via "com.foo.ClassA")`, "✅ com.foo.proto._<> (DIRECT of A.scala)", + `✅ com.foo.proto.FooMessage //proto:foo_proto_scala_library (EXTENDS of A.scala via "com.foo.ClassA")`, }, }, } { @@ -280,8 +280,8 @@ func TestScalaRuleImports(t *testing.T) { Files: tc.files, }) - imports := scalaRule.Imports() - got := make([]string, len(imports)) + imports := scalaRule.Imports(tc.from) + got := make([]string, len(imports.Keys())) for i, imp := range imports.Values() { got[i] = imp.String() } diff --git a/language/scala/testdata/java_provider/BUILD.out b/language/scala/testdata/java_provider/BUILD.out index f672e933..fd0ad490 100644 --- a/language/scala/testdata/java_provider/BUILD.out +++ b/language/scala/testdata/java_provider/BUILD.out @@ -5,6 +5,6 @@ load("@io_bazel_rules_scala//scala:scala.bzl", "scala_binary") scala_binary( name = "app", - # deps: ✅ java.util.Map NO-LABEL (DIRECT of Main.scala) + # import: ✅ java.util.Map NO-LABEL (DIRECT of Main.scala) srcs = ["Main.scala"], ) diff --git a/language/scala/testdata/maven_provider/BUILD.out b/language/scala/testdata/maven_provider/BUILD.out index c3e71269..381ea23f 100644 --- a/language/scala/testdata/maven_provider/BUILD.out +++ b/language/scala/testdata/maven_provider/BUILD.out @@ -6,16 +6,16 @@ load("@io_bazel_rules_scala//scala:scala.bzl", "scala_library") scala_library( name = "app", - # deps: ✅ javax.inject @maven//:javax_inject_javax_inject (IMPLICIT via "javax.xml._") - # deps: ✅ javax.xml._ @maven//:xml_apis_xml_apis (DIRECT of Main.scala) - # deps: ❌ org.junit.rules.TemporaryFolder symbol not found (DIRECT of Main.scala) + # import: ✅ javax.xml._ @maven//:xml_apis_xml_apis (DIRECT of Main.scala) + # import: ❌ org.junit.rules.TemporaryFolder symbol not found (DIRECT of Main.scala) + # import: ✅ javax.inject @maven//:javax_inject_javax_inject (IMPLICIT via "javax.xml._") srcs = ["Main.scala"], deps = [ # junit is required for compilation but we haven't specified # that @atlassian-public deps should be managed by the scala-gazelle # extension (so this is left alone despite no # keep directive) "@atlassian-public//:junit_junit", - "@maven//:javax_inject_javax_inject", - "@maven//:xml_apis_xml_apis", + "@maven//:javax_inject_javax_inject", # IMPLICIT (maven javax.inject) + "@maven//:xml_apis_xml_apis", # DIRECT (maven javax.xml) ], ) diff --git a/language/scala/testdata/override_provider/BUILD.out b/language/scala/testdata/override_provider/BUILD.out index 29cb913b..c1e04acc 100644 --- a/language/scala/testdata/override_provider/BUILD.out +++ b/language/scala/testdata/override_provider/BUILD.out @@ -8,11 +8,11 @@ load("@io_bazel_rules_scala//scala:scala.bzl", "scala_library") scala_library( name = "app", - # deps: ✅ com.typesafe.scalalogging.LazyLogging @maven//:com_typesafe_scala_logging_scala_logging_2_12 (DIRECT of Main.scala) - # deps: ✅ org.slf4j.Logger @maven//:org_slf4j_slf4j_api (IMPLICIT via "com.typesafe.scalalogging.LazyLogging") + # import: ✅ com.typesafe.scalalogging.LazyLogging @maven//:com_typesafe_scala_logging_scala_logging_2_12 (DIRECT of Main.scala) + # import: ✅ org.slf4j.Logger @maven//:org_slf4j_slf4j_api (IMPLICIT via "com.typesafe.scalalogging.LazyLogging") srcs = ["Main.scala"], deps = [ - "@maven//:com_typesafe_scala_logging_scala_logging_2_12", - "@maven//:org_slf4j_slf4j_api", + "@maven//:com_typesafe_scala_logging_scala_logging_2_12", # DIRECT (override com.typesafe.scalalogging.LazyLogging) + "@maven//:org_slf4j_slf4j_api", # IMPLICIT (override org.slf4j.Logger) ], ) diff --git a/language/scala/testdata/protobuf_provider/BUILD.out b/language/scala/testdata/protobuf_provider/BUILD.out index 1e543319..b1946c3b 100644 --- a/language/scala/testdata/protobuf_provider/BUILD.out +++ b/language/scala/testdata/protobuf_provider/BUILD.out @@ -14,8 +14,10 @@ load("@io_bazel_rules_scala//scala:scala.bzl", "scala_library") scala_library( name = "app", - # deps: ❌ not.Exists symbol not found (DIRECT of Main.scala) - # deps: ✅ proto.Customer //proto:proto_proto_scala_library (DIRECT of Main.scala) + # import: ❌ not.Exists symbol not found (DIRECT of Main.scala) + # import: ✅ proto.Customer //proto:proto_proto_scala_library (DIRECT of Main.scala) srcs = ["Main.scala"], - deps = ["//proto:proto_proto_scala_library"], + deps = [ + "//proto:proto_proto_scala_library", # DIRECT (protobuf proto.Customer) + ], ) diff --git a/language/scala/testdata/resolve_kind_rewrite_name/app/BUILD.out b/language/scala/testdata/resolve_kind_rewrite_name/app/BUILD.out index 99fe9438..ad0cd361 100644 --- a/language/scala/testdata/resolve_kind_rewrite_name/app/BUILD.out +++ b/language/scala/testdata/resolve_kind_rewrite_name/app/BUILD.out @@ -4,5 +4,7 @@ scala_binary( name = "app", srcs = ["App.scala"], main_class = "app.App", - deps = ["//lib:lib_helper"], + deps = [ + "//lib:lib_helper", # DIRECT (scala_helper_library lib.Helper) + ], ) diff --git a/language/scala/testdata/source_provider/src/BUILD.out b/language/scala/testdata/source_provider/src/BUILD.out index b4ba90c7..fb78a356 100644 --- a/language/scala/testdata/source_provider/src/BUILD.out +++ b/language/scala/testdata/source_provider/src/BUILD.out @@ -2,17 +2,22 @@ load("@io_bazel_rules_scala//scala:scala.bzl", "scala_binary", "scala_library", scala_library( name = "lib", - # exports: ✅ java.util.LinkedList @java//util (EXTENDS of Lib.scala via "a.b.c.Lib") srcs = ["a/b/c/Lib.scala"], - exports = ["@java//util"], - deps = ["@java//util"], + exports = [ + "@java//util", # EXTENDS (override java.util.LinkedList) + ], + deps = [ + "@java//util", # DIRECT (override java.util.LinkedList) + ], ) scala_binary( name = "app", srcs = ["a/b/c/Main.scala"], main_class = "a.b.c.Main", - deps = [":lib"], + deps = [ + ":lib", # DIRECT (scala_library a.b.c.Lib) + ], ) scala_test( diff --git a/pkg/collections/BUILD.bazel b/pkg/collections/BUILD.bazel index c3a8588f..02f76e62 100644 --- a/pkg/collections/BUILD.bazel +++ b/pkg/collections/BUILD.bazel @@ -4,6 +4,7 @@ go_library( name = "collections", srcs = [ "box_type.go", + "debugging.go", "fs.go", "intent.go", "net.go", diff --git a/pkg/collections/debugging.go b/pkg/collections/debugging.go new file mode 100644 index 00000000..39528a05 --- /dev/null +++ b/pkg/collections/debugging.go @@ -0,0 +1,13 @@ +package collections + +import ( + "fmt" + "os" +) + +func PrintProcessIdForDelveAndWait() { + fmt.Printf("Debugging session requested (Process ID: %d)\n", os.Getpid()) + fmt.Printf("dlv attach --headless --listen=:2345 %d\n", os.Getpid()) + fmt.Println("Press ENTER to continue.") + fmt.Scanln() +} diff --git a/pkg/collections/fs.go b/pkg/collections/fs.go index 904dd0b1..d6f823b6 100644 --- a/pkg/collections/fs.go +++ b/pkg/collections/fs.go @@ -1,9 +1,12 @@ package collections import ( + "bufio" + "fmt" "log" "os" "path/filepath" + "strings" ) // ListFiles is a convenience debugging function to log the files under a given dir. @@ -36,3 +39,43 @@ func CollectFiles(dir string) (files []string, err error) { } return } + +// ReadArgsParamsFile reads the and maybe loads from the params file if the sole +// argument starts with '@'; if so args are loaded from that file. +func ReadArgsParamsFile(args []string) ([]string, error) { + if len(args) != 1 { + return args, nil + } + if !strings.HasPrefix(args[0], "@") { + return args, nil + } + + paramsFile := args[0][1:] + var err error + args, err = readParamsFile(paramsFile) + if err != nil { + return nil, fmt.Errorf("failed to read params file %s: %v", paramsFile, err) + } + return args, nil +} + +func readParamsFile(filename string) ([]string, error) { + params := []string{} + f, err := os.Open(filename) + if err != nil { + return nil, err + } + defer f.Close() + scanner := bufio.NewScanner(f) + for scanner.Scan() { + line := strings.TrimSpace(scanner.Text()) + if line == "" { + continue + } + params = append(params, line) + } + if err := scanner.Err(); err != nil { + return nil, err + } + return params, nil +} diff --git a/pkg/collections/net.go b/pkg/collections/net.go index a5f718f9..d581e71b 100644 --- a/pkg/collections/net.go +++ b/pkg/collections/net.go @@ -2,6 +2,7 @@ package collections import ( "fmt" + "log" "net" "sync" "time" @@ -12,7 +13,7 @@ const connectionAvailableDuration = 250 * time.Millisecond // WaitForConnectionAvailable pings a tcp connection every 250 milliseconds // until it connects and returns true. If it fails to connect by the timeout // deadline, returns false. -func WaitForConnectionAvailable(host string, port int, timeout time.Duration) bool { +func WaitForConnectionAvailable(host string, port int, timeout time.Duration, progress bool) bool { target := fmt.Sprintf("%s:%d", host, port) var wg sync.WaitGroup wg.Add(1) @@ -27,6 +28,9 @@ func WaitForConnectionAvailable(host string, port int, timeout time.Duration) bo if err == nil { break } + if progress { + log.Println(err) + } time.Sleep(connectionAvailableDuration) } }() diff --git a/pkg/parser/scalameta_parser.go b/pkg/parser/scalameta_parser.go index 9921a1b8..9ed8c845 100644 --- a/pkg/parser/scalameta_parser.go +++ b/pkg/parser/scalameta_parser.go @@ -108,9 +108,12 @@ func (s *ScalametaParser) Start() error { s.HttpPort = port } s.httpUrl = fmt.Sprintf("http://127.0.0.1:%d", s.HttpPort) + if debugParse { + log.Println("httpUrl:", s.httpUrl) + } // - // Setup the bun process + // Setup the node process // exe, err := memexec.New(nodeExe) if err != nil { @@ -119,7 +122,7 @@ func (s *ScalametaParser) Start() error { s.process = exe // - // Start the bun process + // Start the node process // cmd := exe.Command("scalameta_parser.mjs") cmd.Dir = processDir @@ -132,6 +135,10 @@ func (s *ScalametaParser) Start() error { cmd.Stderr = os.Stderr s.cmd = cmd + if debugParse { + log.Println("cmd:", s.cmd) + } + if err := cmd.Start(); err != nil { return fmt.Errorf("starting process %s: %w", scalametaParsersIndexJs, err) } @@ -145,11 +152,19 @@ func (s *ScalametaParser) Start() error { } }() + if debugParse { + log.Println("parse connection created!") + } + host := "localhost" port := s.HttpPort - timeout := 3 * time.Second - if !collections.WaitForConnectionAvailable(host, port, timeout) { - return fmt.Errorf("waiting to connect to scala parse server %s:%d within %s", host, port, timeout) + timeout := 10 * time.Second + if !collections.WaitForConnectionAvailable(host, port, timeout, debugParse) { + return fmt.Errorf("timeout waiting to connect to scala parse server %s:%d within %s", host, port, timeout) + } + + if debugParse { + log.Println("parse connection available!") } // diff --git a/pkg/parser/scalameta_parser_test.go b/pkg/parser/scalameta_parser_test.go index 956f3b4f..bb85d077 100644 --- a/pkg/parser/scalameta_parser_test.go +++ b/pkg/parser/scalameta_parser_test.go @@ -545,47 +545,45 @@ case class TradingAccountUser( }, }, } { - // if name != "option-parameter-type-name" { + // if name != "degenerate" { // continue // } - t.Run(name, - func(t *testing.T) { - tmpDir, err := bazel.NewTmpDir("") - if err != nil { - t.Fatal(err) - } - defer os.RemoveAll(tmpDir) - - files := mustWriteTestFiles(t, tmpDir, tc.files) - tc.in.Filenames = files + t.Run(name, func(t *testing.T) { + tmpDir, err := bazel.NewTmpDir("") + if err != nil { + t.Fatal(err) + } + defer os.RemoveAll(tmpDir) - server := NewScalametaParser() - if err := server.Start(); err != nil { - t.Fatal("server start:", err) - } - defer server.Stop() + files := mustWriteTestFiles(t, tmpDir, tc.files) + tc.in.Filenames = files + server := NewScalametaParser() + if err := server.Start(); err != nil { + t.Fatal("server start:", err) + } + defer server.Stop() - got, err := server.Parse(context.Background(), &tc.in) - if err != nil { - t.Fatal(err) - } - got.ElapsedMillis = 0 + got, err := server.Parse(context.Background(), &tc.in) + if err != nil { + t.Fatal(err) + } + got.ElapsedMillis = 0 - // remove tmpdir prefix and zero the time delta for diff comparison - for i := range got.Files { - if strings.HasPrefix(got.Files[i].Filename, tmpDir) { - got.Files[i].Filename = got.Files[i].Filename[len(tmpDir)+1:] - } + // remove tmpdir prefix and zero the time delta for diff comparison + for i := range got.Files { + if strings.HasPrefix(got.Files[i].Filename, tmpDir) { + got.Files[i].Filename = got.Files[i].Filename[len(tmpDir)+1:] } + } - if diff := cmp.Diff(&tc.want, got, cmpopts.IgnoreUnexported( - sppb.ParseResponse{}, - sppb.File{}, - sppb.ClassList{}, - )); diff != "" { - t.Errorf(".Parse (-want +got):\n%s", diff) - } - }) + if diff := cmp.Diff(&tc.want, got, cmpopts.IgnoreUnexported( + sppb.ParseResponse{}, + sppb.File{}, + sppb.ClassList{}, + )); diff != "" { + t.Errorf(".Parse (-want +got):\n%s", diff) + } + }) } } diff --git a/pkg/protobuf/io.go b/pkg/protobuf/io.go index 1f9e7231..0c55e76b 100644 --- a/pkg/protobuf/io.go +++ b/pkg/protobuf/io.go @@ -76,6 +76,17 @@ func WritePrettyJSONFile(filename string, message protoreflect.ProtoMessage) err return nil } +func WriteStableJSONFile(filename string, message protoreflect.ProtoMessage) error { + data, err := StableJSON(message) + if err != nil { + return fmt.Errorf("marshal: %w", err) + } + if err := os.WriteFile(filename, []byte(data), 0644); err != nil { + return fmt.Errorf("write: %w", err) + } + return nil +} + func StableJSON(message protoreflect.ProtoMessage) (string, error) { marshaler := protojson.MarshalOptions{ Multiline: false, diff --git a/pkg/provider/BUILD.bazel b/pkg/provider/BUILD.bazel index 58d69454..cf2cc71d 100644 --- a/pkg/provider/BUILD.bazel +++ b/pkg/provider/BUILD.bazel @@ -8,6 +8,7 @@ go_library( "java_provider.go", "maven_provider.go", "protobuf_provider.go", + "semanticdb_provider.go", "source_provider.go", ], importpath = "github.com/stackb/scala-gazelle/pkg/provider", @@ -20,9 +21,12 @@ go_library( "//pkg/parser", "//pkg/protobuf", "//pkg/resolver", + "//pkg/semanticdb", + "//scala/meta/semanticdb", "@bazel_gazelle//config:go_default_library", "@bazel_gazelle//label:go_default_library", "@bazel_gazelle//rule:go_default_library", + "@com_github_bazelbuild_buildtools//build:go_default_library", ], ) @@ -32,6 +36,7 @@ go_test( "java_provider_test.go", "maven_provider_test.go", "protobuf_provider_test.go", + "semanticdb_provider_test.go", "source_provider_test.go", ], data = glob(["testdata/**/*"]), @@ -47,6 +52,7 @@ go_test( "@bazel_gazelle//label:go_default_library", "@bazel_gazelle//rule:go_default_library", "@bazel_gazelle//testtools:go_default_library", + "@com_github_bazelbuild_buildtools//build:go_default_library", "@com_github_google_go_cmp//cmp", "@com_github_google_go_cmp//cmp/cmpopts", "@com_github_stretchr_testify//mock", diff --git a/pkg/provider/java_provider.go b/pkg/provider/java_provider.go index abadebcc..1266ac87 100644 --- a/pkg/provider/java_provider.go +++ b/pkg/provider/java_provider.go @@ -10,6 +10,7 @@ import ( "github.com/bazelbuild/bazel-gazelle/config" "github.com/bazelbuild/bazel-gazelle/label" "github.com/bazelbuild/bazel-gazelle/rule" + "github.com/bazelbuild/buildtools/build" jipb "github.com/stackb/scala-gazelle/build/stack/gazelle/scala/jarindex" sppb "github.com/stackb/scala-gazelle/build/stack/gazelle/scala/parse" @@ -87,8 +88,8 @@ func (p *JavaProvider) OnEnd() error { } // CanProvide implements part of the resolver.SymbolProvider interface. -func (p *JavaProvider) CanProvide(dep label.Label, knownRule func(from label.Label) (*rule.Rule, bool)) bool { - if _, ok := p.byLabel[dep]; ok { +func (p *JavaProvider) CanProvide(dep *resolver.ImportLabel, expr build.Expr, knownRule func(from label.Label) (*rule.Rule, bool)) bool { + if _, ok := p.byLabel[dep.Label]; ok { return true } return false diff --git a/pkg/provider/java_provider_test.go b/pkg/provider/java_provider_test.go index 84ab47a9..1e0e4e4e 100644 --- a/pkg/provider/java_provider_test.go +++ b/pkg/provider/java_provider_test.go @@ -9,6 +9,7 @@ import ( "github.com/bazelbuild/bazel-gazelle/label" "github.com/bazelbuild/bazel-gazelle/rule" "github.com/bazelbuild/bazel-gazelle/testtools" + "github.com/bazelbuild/buildtools/build" "github.com/google/go-cmp/cmp" sppb "github.com/stackb/scala-gazelle/build/stack/gazelle/scala/parse" @@ -114,6 +115,7 @@ func TestJavaProviderOnResolve(t *testing.T) { func TestJavaProviderCanProvide(t *testing.T) { for name, tc := range map[string]struct { from label.Label + expr build.Expr want bool }{ "no label": { @@ -154,7 +156,7 @@ func TestJavaProviderCanProvide(t *testing.T) { } p.OnResolve() - got := p.CanProvide(tc.from, func(from label.Label) (*rule.Rule, bool) { + got := p.CanProvide(&resolver.ImportLabel{Label: tc.from}, tc.expr, func(from label.Label) (*rule.Rule, bool) { return nil, false }) diff --git a/pkg/provider/maven_provider.go b/pkg/provider/maven_provider.go index 8651d1b5..09e50215 100644 --- a/pkg/provider/maven_provider.go +++ b/pkg/provider/maven_provider.go @@ -10,6 +10,7 @@ import ( "github.com/bazelbuild/bazel-gazelle/config" "github.com/bazelbuild/bazel-gazelle/label" "github.com/bazelbuild/bazel-gazelle/rule" + "github.com/bazelbuild/buildtools/build" "github.com/stackb/scala-gazelle/pkg/collections" "github.com/stackb/scala-gazelle/pkg/maven" @@ -78,7 +79,7 @@ func (p *MavenProvider) loadFile(dir string, filename string, scope resolver.Sco } // CanProvide implements part of the provider.SymbolProvider interface. -func (p *MavenProvider) CanProvide(dep label.Label, knownRule func(from label.Label) (*rule.Rule, bool)) bool { +func (p *MavenProvider) CanProvide(dep *resolver.ImportLabel, expr build.Expr, knownRule func(from label.Label) (*rule.Rule, bool)) bool { // if the resolver is nil, checkflags was never called and we can infer that // this resolver is not enabled if len(p.resolvers) == 0 { @@ -87,7 +88,7 @@ func (p *MavenProvider) CanProvide(dep label.Label, knownRule func(from label.La // find the first resolver that manages the given workspace for _, resolver := range p.resolvers { - if dep.Repo == resolver.Name() { + if dep.Label.Repo == resolver.Name() { return true } } diff --git a/pkg/provider/maven_provider_test.go b/pkg/provider/maven_provider_test.go index f1535562..82f4555b 100644 --- a/pkg/provider/maven_provider_test.go +++ b/pkg/provider/maven_provider_test.go @@ -9,6 +9,7 @@ import ( "github.com/bazelbuild/bazel-gazelle/label" "github.com/bazelbuild/bazel-gazelle/rule" "github.com/bazelbuild/bazel-gazelle/testtools" + "github.com/bazelbuild/buildtools/build" "github.com/google/go-cmp/cmp" "github.com/stretchr/testify/mock" @@ -135,6 +136,7 @@ func TestMavenProviderCanProvide(t *testing.T) { for name, tc := range map[string]struct { lang string from label.Label + expr build.Expr want bool }{ "degenerate case": { @@ -182,7 +184,7 @@ func TestMavenProviderCanProvide(t *testing.T) { t.Fatal(err) } - got := p.CanProvide(tc.from, func(from label.Label) (*rule.Rule, bool) { + got := p.CanProvide(&resolver.ImportLabel{Label: tc.from}, tc.expr, func(from label.Label) (*rule.Rule, bool) { return nil, false }) diff --git a/pkg/provider/protobuf_provider.go b/pkg/provider/protobuf_provider.go index 840315a5..6b12baee 100644 --- a/pkg/provider/protobuf_provider.go +++ b/pkg/provider/protobuf_provider.go @@ -7,6 +7,7 @@ import ( "github.com/bazelbuild/bazel-gazelle/config" "github.com/bazelbuild/bazel-gazelle/label" "github.com/bazelbuild/bazel-gazelle/rule" + "github.com/bazelbuild/buildtools/build" sppb "github.com/stackb/scala-gazelle/build/stack/gazelle/scala/parse" "github.com/stackb/scala-gazelle/pkg/resolver" @@ -43,7 +44,6 @@ func (p *ProtobufProvider) Name() string { // RegisterFlags implements part of the resolver.SymbolProvider interface. func (p *ProtobufProvider) RegisterFlags(fs *flag.FlagSet, cmd string, c *config.Config) { - // fs.StringVar(&p.indexFile, "protobuf_index_file", "", "path to javaindex.pb or javaindex.json file") } // CheckFlags implements part of the resolver.SymbolProvider interface. @@ -55,8 +55,6 @@ func (p *ProtobufProvider) CheckFlags(fs *flag.FlagSet, c *config.Config, scope // OnResolve implements part of the resolver.SymbolProvider interface. func (p *ProtobufProvider) OnResolve() error { - // messageRequires := p.resolveScalapbMessageRequires() - for from, symbols := range p.importProvider(p.lang, "package") { for _, symbol := range symbols { p.putSymbol(sppb.ImportType_PROTO_PACKAGE, symbol, from) @@ -75,7 +73,6 @@ func (p *ProtobufProvider) OnResolve() error { for from, symbols := range p.importProvider(p.lang, "message") { for _, symbol := range symbols { p.putSymbol(sppb.ImportType_PROTO_MESSAGE, symbol, from) - // sym.Requires = messageRequires } } for from, symbols := range p.importProvider(p.lang, "service") { @@ -97,9 +94,9 @@ func (p *ProtobufProvider) OnEnd() error { } // CanProvide implements part of the resolver.SymbolProvider interface. -func (p *ProtobufProvider) CanProvide(dep label.Label, knownRule func(from label.Label) (*rule.Rule, bool)) bool { - return strings.HasSuffix(dep.Name, "proto_scala_library") || - strings.HasSuffix(dep.Name, "grpc_scala_library") +func (p *ProtobufProvider) CanProvide(dep *resolver.ImportLabel, expr build.Expr, knownRule func(from label.Label) (*rule.Rule, bool)) bool { + return strings.HasSuffix(dep.Label.Name, "proto_scala_library") || + strings.HasSuffix(dep.Label.Name, "grpc_scala_library") } func (p *ProtobufProvider) putSymbol(impType sppb.ImportType, imp string, from label.Label) *resolver.Symbol { diff --git a/pkg/provider/protobuf_provider_test.go b/pkg/provider/protobuf_provider_test.go index ed2fc706..30de958e 100644 --- a/pkg/provider/protobuf_provider_test.go +++ b/pkg/provider/protobuf_provider_test.go @@ -7,6 +7,7 @@ import ( "github.com/bazelbuild/bazel-gazelle/config" "github.com/bazelbuild/bazel-gazelle/label" "github.com/bazelbuild/bazel-gazelle/rule" + "github.com/bazelbuild/buildtools/build" "github.com/google/go-cmp/cmp" sppb "github.com/stackb/scala-gazelle/build/stack/gazelle/scala/parse" @@ -76,6 +77,7 @@ func TestProtoSymbolProviderCanProvide(t *testing.T) { lang string imports map[string]map[label.Label][]string from label.Label + expr build.Expr indexFunc func(from label.Label) (*rule.Rule, bool) want bool }{ @@ -107,7 +109,7 @@ func TestProtoSymbolProviderCanProvide(t *testing.T) { p.CheckFlags(flags, c, scope) p.OnResolve() - got := p.CanProvide(tc.from, tc.indexFunc) + got := p.CanProvide(&resolver.ImportLabel{Label: tc.from}, tc.expr, tc.indexFunc) if diff := cmp.Diff(tc.want, got); diff != "" { t.Errorf(".CanProvide (-want +got):\n%s", diff) diff --git a/pkg/provider/semanticdb_provider.go b/pkg/provider/semanticdb_provider.go new file mode 100644 index 00000000..06f66f87 --- /dev/null +++ b/pkg/provider/semanticdb_provider.go @@ -0,0 +1,205 @@ +package provider + +import ( + "flag" + "fmt" + "path" + "strings" + + "github.com/bazelbuild/bazel-gazelle/config" + "github.com/bazelbuild/bazel-gazelle/label" + "github.com/bazelbuild/bazel-gazelle/rule" + "github.com/bazelbuild/buildtools/build" + + "github.com/stackb/scala-gazelle/pkg/collections" + "github.com/stackb/scala-gazelle/pkg/parser" + "github.com/stackb/scala-gazelle/pkg/protobuf" + "github.com/stackb/scala-gazelle/pkg/resolver" + "github.com/stackb/scala-gazelle/pkg/semanticdb" + + sppb "github.com/stackb/scala-gazelle/build/stack/gazelle/scala/parse" + spb "github.com/stackb/scala-gazelle/scala/meta/semanticdb" +) + +const semanticDbName = "semanticdb" + +// NewSemanticdbProvider constructs a new NewSemanticdbProvider. +func NewSemanticdbProvider(delegate parser.Parser) *SemanticdbProvider { + return &SemanticdbProvider{ + delegate: delegate, + jarFiles: make(collections.StringSlice, 0), + docs: make(map[string]*spb.TextDocument), + files: make(map[string]*sppb.File), + } +} + +// SemanticdbProvider is provider for scala source files. If -scala_source_index_in +// is configured, the given source index will be used to bootstrap the internal +// cache. At runtime the .ParseScalaRule function can be used to parse scala +// files. If the cache already has an entry for the filename with matching +// sha256, the cache hit will be used. +type SemanticdbProvider struct { + // delegate is an instance of the inner parent parser + delegate parser.Parser + // indexFile is the name of the file that should be parsed as a InfoMap + indexFile string + // fileSetFile is the name of the file that should be parsed as a FileSet proto + fileSetFile string + // jarFiles is a repeatable list of jars to include in the index + jarFiles collections.StringSlice + // docs is a map of known text documents + docs map[string]*spb.TextDocument + // docs is a map of known file Instances that have semanticdb info + files map[string]*sppb.File +} + +// Name implements part of the resolver.SymbolProvider interface. +func (r *SemanticdbProvider) Name() string { + return semanticDbName +} + +// RegisterFlags implements part of the resolver.SymbolProvider interface. +func (r *SemanticdbProvider) RegisterFlags(flags *flag.FlagSet, cmd string, c *config.Config) { + flags.StringVar(&r.indexFile, + "semanticdb_index_file", + "", + "path to the semanticdb index file") + flags.StringVar(&r.fileSetFile, + "semanticdb_fileset", + "", + "path to the semanticdb fileset") + flags.Var(&r.jarFiles, + "semanticdb_jar_file", + "path to a scala jar that contains semanticdb meta-inf") +} + +// CheckFlags implements part of the resolver.SymbolProvider interface. +func (r *SemanticdbProvider) CheckFlags(flags *flag.FlagSet, c *config.Config, scope resolver.Scope) error { + + semanticdb.SetGlobalScope(scope) + + if r.fileSetFile != "" { + if err := r.parseFileSet(r.fileSetFile); err != nil { + return err + } + } + if r.indexFile != "" { + if err := r.parseIndex(r.indexFile); err != nil { + return err + } + } + for _, jarFile := range r.jarFiles { + if err := r.parseJarFile(jarFile); err != nil { + return err + } + } + return nil +} + +// OnResolve implements part of the resolver.SymbolProvider interface. +func (r *SemanticdbProvider) OnResolve() error { + return nil +} + +// OnEnd implements part of the resolver.SymbolProvider interface. +func (r *SemanticdbProvider) OnEnd() error { + return nil +} + +// CanProvide implements the resolver.SymbolProvider interface. +func (cr *SemanticdbProvider) CanProvide(dep *resolver.ImportLabel, expr build.Expr, ruleIndex func(from label.Label) (*rule.Rule, bool)) bool { + hasSemanticDbSuffixComment := false + for _, c := range append(expr.Comment().Before, expr.Comment().Suffix...) { + text := strings.TrimSpace(strings.TrimPrefix(c.Token, "#")) + if text == semanticDbName || strings.HasPrefix(text, "SEMANTIC") { + hasSemanticDbSuffixComment = true + break + } + } + if !hasSemanticDbSuffixComment { + return false + } + + // at this point in the function, we know the dep was labeled as a semanticdb-managed dep. + if dep.Import.Source == nil { + return false + } + + // if the source file for the import has semanticdb info, we expect it to + // successfully resolve again, so return true. If the Source file was not + // augmented with semanticdb info, we assume that the '# semanticdb' comment + // originated from a previous gazelle run. + return len(dep.Import.Source.SemanticImports) > 0 +} + +// ParseScalaRule implements scalarule.Parser +func (r *SemanticdbProvider) ParseScalaRule(kind string, from label.Label, dir string, srcs ...string) (*sppb.Rule, error) { + rule, err := r.delegate.ParseScalaRule(kind, from, dir, srcs...) + if err != nil { + return nil, err + } + for _, file := range rule.Files { + r.visitFile(from.Pkg, file) + } + return rule, nil +} + +// LoadScalaRule loads the given state. +func (r *SemanticdbProvider) LoadScalaRule(from label.Label, rule *sppb.Rule) error { + return r.delegate.LoadScalaRule(from, rule) +} + +func (r *SemanticdbProvider) visitFile(pkg string, file *sppb.File) error { + uri := path.Join(pkg, file.Filename) + if f, ok := r.files[uri]; ok { + file.SemanticImports = f.SemanticImports + } + return nil +} + +func (r *SemanticdbProvider) parseIndex(filename string) error { + var docs spb.TextDocuments + if err := protobuf.ReadFile(filename, &docs); err != nil { + return err + } + for _, doc := range docs.Documents { + r.docs[doc.Uri] = doc + } + return nil +} + +func (r *SemanticdbProvider) parseFileSet(filename string) error { + var fileSet sppb.FileSet + if err := protobuf.ReadFile(filename, &fileSet); err != nil { + return err + } + for _, file := range fileSet.Files { + r.files[file.Filename] = file + } + return nil +} + +func (r *SemanticdbProvider) parseJarFile(filename string) error { + collections.ListFiles("..") + + list, err := semanticdb.ReadJarFile(filename) + if err != nil { + return err + } + for _, docs := range list { + for _, doc := range docs.Documents { + if err := r.addTextDocument(doc); err != nil { + return err + } + } + } + return nil +} + +func (r *SemanticdbProvider) addTextDocument(doc *spb.TextDocument) error { + if _, exists := r.docs[doc.Uri]; exists { + return fmt.Errorf("text doc already registered: %s", doc.Uri) + } + r.docs[doc.Uri] = doc + return nil +} diff --git a/pkg/provider/semanticdb_provider_test.go b/pkg/provider/semanticdb_provider_test.go new file mode 100644 index 00000000..7f590310 --- /dev/null +++ b/pkg/provider/semanticdb_provider_test.go @@ -0,0 +1 @@ +package provider_test diff --git a/pkg/provider/source_provider.go b/pkg/provider/source_provider.go index 2e9744db..1eea0cb4 100644 --- a/pkg/provider/source_provider.go +++ b/pkg/provider/source_provider.go @@ -13,6 +13,7 @@ import ( "github.com/bazelbuild/bazel-gazelle/config" "github.com/bazelbuild/bazel-gazelle/label" "github.com/bazelbuild/bazel-gazelle/rule" + "github.com/bazelbuild/buildtools/build" sppb "github.com/stackb/scala-gazelle/build/stack/gazelle/scala/parse" "github.com/stackb/scala-gazelle/pkg/parser" @@ -69,9 +70,9 @@ func (r *SourceProvider) OnEnd() error { } // CanProvide implements the resolver.SymbolProvider interface. -func (cr *SourceProvider) CanProvide(from label.Label, ruleIndex func(from label.Label) (*rule.Rule, bool)) bool { +func (cr *SourceProvider) CanProvide(dep *resolver.ImportLabel, expr build.Expr, ruleIndex func(from label.Label) (*rule.Rule, bool)) bool { // if the label points to a rule that was generated by this extension - if _, ok := ruleIndex(from); ok { + if _, ok := ruleIndex(dep.Label); ok { return true } return false diff --git a/pkg/resolver/import.go b/pkg/resolver/import.go index 61b07b6d..df1b08ae 100644 --- a/pkg/resolver/import.go +++ b/pkg/resolver/import.go @@ -5,6 +5,7 @@ import ( "path/filepath" "strings" + "github.com/bazelbuild/bazel-gazelle/label" "github.com/bazelbuild/buildtools/build" sppb "github.com/stackb/scala-gazelle/build/stack/gazelle/scala/parse" @@ -38,6 +39,15 @@ func NewDirectImport(imp string, source *sppb.File) *Import { } } +// NewSemanticImport creates a new semantic import from the given file. +func NewSemanticImport(imp string, source *sppb.File) *Import { + return &Import{ + Kind: sppb.ImportKind_SEMANTIC, + Imp: imp, + Source: source, + } +} + // NewResolvedNameImport creates a new resolved import from the given file, // name, and symbol. The 'name' is the token that resolved in the file scope. func NewResolvedNameImport(imp string, source *sppb.File, name string, symbol *Symbol) *Import { @@ -146,17 +156,17 @@ func (imp *Import) String() string { return strings.Join(parts, " ") } -func IsSelfImport(imp *Import, repo, pkg, name string) bool { - if imp.Symbol == nil { +func IsSelfImport(symbol *Symbol, repo, pkg, name string) bool { + if symbol == nil { return false } if repo != "" { return false } - if pkg != imp.Symbol.Label.Pkg { + if pkg != symbol.Label.Pkg { return false } - if name != imp.Symbol.Label.Name { + if name != symbol.Label.Name { return false } return true @@ -168,3 +178,12 @@ func IsWildcardImport(imp string) (string, bool) { } return imp[:len(imp)-len("._")], true } + +func PutImportIfNotSelf(imports ImportMap, from label.Label) func(*Import) { + return func(imp *Import) { + if IsSelfImport(imp.Symbol, from.Repo, from.Pkg, from.Name) { + return + } + imports.Put(imp) + } +} diff --git a/pkg/resolver/import_map.go b/pkg/resolver/import_map.go index 5ab5be4d..13b9dc53 100644 --- a/pkg/resolver/import_map.go +++ b/pkg/resolver/import_map.go @@ -1,92 +1,116 @@ package resolver import ( - "sort" - "github.com/bazelbuild/bazel-gazelle/label" "github.com/bazelbuild/buildtools/build" ) -// ImportMap is a map if imports keyed by the import string. -type ImportMap map[string]*Import - // ImportLabel is a pair of (Import,Label) type ImportLabel struct { Import *Import Label label.Label } +type ImportMap interface { + Keys() []string + Values() []*Import + Deps(from label.Label) map[label.Label]*ImportLabel + Put(imp *Import) + Get(name string) (*Import, bool) + Annotate(comments *build.Comments, accept func(imp *Import) bool) +} + +// OrderedImportMap is a map if imports keyed by the import string. +type OrderedImportMap struct { + values []*Import + has map[string]bool +} + // NewImportMap initializes a new ImportMap with an optional list of Imports. func NewImportMap(imports ...*Import) ImportMap { - m := make(ImportMap) + m := &OrderedImportMap{ + has: make(map[string]bool), + values: make([]*Import, 0), + } + for _, imp := range imports { m.Put(imp) } + return m } // Keys returns a sorted list of imports. -func (imports ImportMap) Keys() []string { - keys := make([]string, len(imports)) - i := 0 - for k := range imports { - keys[i] = k - i++ +func (imports *OrderedImportMap) Keys() []string { + keys := make([]string, len(imports.values)) + for i, imp := range imports.values { + keys[i] = imp.Imp } - sort.Strings(keys) return keys } -// Values returns a sorted list of *Import. -func (imports ImportMap) Values() []*Import { - vals := make([]*Import, len(imports)) - for i, k := range imports.Keys() { - vals[i] = imports[k] - } - return vals +// Values returns an ordered list of *Import reflecting the order in which it +// was added. +func (imports *OrderedImportMap) Values() []*Import { + return imports.values } // Deps returns a de-duplicated list of labels that represent the from-relative // final deps. The list is not sorted under the expectation that sorting will be // done elsewhere. -func (imports ImportMap) Deps(from label.Label) (deps []*ImportLabel) { +func (imports *OrderedImportMap) Deps(from label.Label) map[label.Label]*ImportLabel { + deps := make(map[label.Label]*ImportLabel) + seen := map[label.Label]bool{ label.NoLabel: true, from: true, } - for _, k := range imports.Keys() { - imp := imports[k] + for _, imp := range imports.values { if imp.Symbol == nil || imp.Error != nil { continue } - dep := imp.Symbol.Label + dep := imp.Symbol.Label.Rel(from.Repo, from.Pkg) if seen[dep] { continue } seen[dep] = true - relDep := dep.Rel(from.Repo, from.Pkg) + if dep == label.NoLabel || (dep.Relative && dep.Repo == "" && dep.Pkg == "" && dep.Name == "") { + continue + } // remove relative self imports (TODO: should these have been removed // earlier?) - if relDep.Relative && relDep.Name == from.Name { + if dep.Relative && dep.Name == from.Name { continue } - deps = append(deps, &ImportLabel{Import: imp, Label: relDep}) + deps[dep] = &ImportLabel{Import: imp, Label: dep} + } + + return deps +} + +// Get the given import in the map, but only if it does not already exist in the map. +func (imports *OrderedImportMap) Get(key string) (*Import, bool) { + for _, imp := range imports.values { + if imp.Imp == key { + return imp, true + } } - return + return nil, false } -// Put the given import in the map. -func (imports ImportMap) Put(imp *Import) { +// Put the given import in the map, but only if it does not already exist in the map. +func (imports *OrderedImportMap) Put(imp *Import) { // TODO: should we record *all* imports for a given key? Does priority matter? - if _, ok := imports[imp.Imp]; !ok { - imports[imp.Imp] = imp + if imports.has[imp.Imp] { + return } + imports.has[imp.Imp] = true + imports.values = append(imports.values, imp) } -func (imports ImportMap) Annotate(comments *build.Comments, accept func(imp *Import) bool) { - for _, key := range imports.Keys() { - imp := imports[key] +func (imports *OrderedImportMap) Annotate(comments *build.Comments, accept func(imp *Import) bool) { + for _, imp := range imports.values { if !accept(imp) { continue } diff --git a/pkg/resolver/import_map_test.go b/pkg/resolver/import_map_test.go index ff83b985..c27dd1e0 100644 --- a/pkg/resolver/import_map_test.go +++ b/pkg/resolver/import_map_test.go @@ -1,6 +1,7 @@ package resolver_test import ( + "sort" "testing" "github.com/bazelbuild/bazel-gazelle/label" @@ -10,6 +11,41 @@ import ( "github.com/stackb/scala-gazelle/pkg/resolver" ) +func TestImportMapKeys(t *testing.T) { + for name, tc := range map[string]struct { + imports []*resolver.Import + want []string + }{ + "degenerate": { + want: []string{}, + }, + "maintains insert order properly": { + imports: []*resolver.Import{ + {Imp: "c", Kind: parse.ImportKind_DIRECT}, + {Imp: "a", Kind: parse.ImportKind_EXTENDS}, + {Imp: "b", Kind: parse.ImportKind_IMPLICIT}, + }, + want: []string{"c", "a", "b"}, + }, + } { + t.Run(name, func(t *testing.T) { + importMap := resolver.NewImportMap(tc.imports...) + keys := importMap.Keys() + if diff := cmp.Diff(tc.want, keys); diff != "" { + t.Errorf("(-want +got):\n%s", diff) + } + keys = []string{} + for _, imp := range importMap.Values() { + keys = append(keys, imp.Imp) + } + if diff := cmp.Diff(tc.want, keys); diff != "" { + t.Errorf("(-want +got):\n%s", diff) + } + + }) + } +} + func TestImportMapDeps(t *testing.T) { for name, tc := range map[string]struct { from label.Label @@ -106,9 +142,16 @@ func TestImportMapDeps(t *testing.T) { } labels := importMap.Deps(tc.from) got := make([]label.Label, len(labels)) - for i, v := range labels { - got[i] = v.Label + var i int + for lbl := range labels { + got[i] = lbl + i++ } + sort.Slice(got, func(i, j int) bool { + a := got[i] + b := got[j] + return a.String() < b.String() + }) if diff := cmp.Diff(tc.want, got); diff != "" { t.Errorf("(-want +got):\n%s", diff) } diff --git a/pkg/resolver/scala_grpc_zio_conflict_resolver_test.go b/pkg/resolver/scala_grpc_zio_conflict_resolver_test.go index e88b1694..ea0f240b 100644 --- a/pkg/resolver/scala_grpc_zio_conflict_resolver_test.go +++ b/pkg/resolver/scala_grpc_zio_conflict_resolver_test.go @@ -103,8 +103,12 @@ func TestScalaGrpcZioConflictResolver(t *testing.T) { } { t.Run(name, func(t *testing.T) { universe := mocks.NewUniverse(t) - resolver := resolver.ScalaGrpcZioConflictResolver{} - got, gotOk := resolver.ResolveConflict(universe, &tc.rule, tc.imports, &tc.imp, &tc.symbol) + rslv := resolver.ScalaGrpcZioConflictResolver{} + imports := tc.imports + if imports == nil { + imports = resolver.NewImportMap() + } + got, gotOk := rslv.ResolveConflict(universe, &tc.rule, imports, &tc.imp, &tc.symbol) if diff := cmp.Diff(tc.wantOk, gotOk); diff != "" { t.Errorf("ok (-want +got):\n%s", diff) } diff --git a/pkg/resolver/scala_proto_package_conflict_resolver_test.go b/pkg/resolver/scala_proto_package_conflict_resolver_test.go index 59ce7d49..123bb856 100644 --- a/pkg/resolver/scala_proto_package_conflict_resolver_test.go +++ b/pkg/resolver/scala_proto_package_conflict_resolver_test.go @@ -103,8 +103,12 @@ func TestScalaProtoPackageConflictResolver(t *testing.T) { } { t.Run(name, func(t *testing.T) { universe := mocks.NewUniverse(t) - resolver := resolver.ScalaProtoPackageConflictResolver{} - got, gotOk := resolver.ResolveConflict(universe, &tc.rule, tc.imports, &tc.imp, &tc.symbol) + rslv := resolver.ScalaProtoPackageConflictResolver{} + imports := tc.imports + if imports == nil { + imports = resolver.NewImportMap() + } + got, gotOk := rslv.ResolveConflict(universe, &tc.rule, imports, &tc.imp, &tc.symbol) if diff := cmp.Diff(tc.wantOk, gotOk); diff != "" { t.Errorf("ok (-want +got):\n%s", diff) } diff --git a/pkg/resolver/symbol.go b/pkg/resolver/symbol.go index 5bc96be1..065740a8 100644 --- a/pkg/resolver/symbol.go +++ b/pkg/resolver/symbol.go @@ -67,7 +67,7 @@ func SymbolConfictMessage(symbol *Symbol, imp *Import, from label.Label) string return "" } lines := make([]string, 0, len(symbol.Conflicts)+3) - lines = append(lines, fmt.Sprintf("Ambiguous resolve of %v %q (symbol is provided by %d labels) [%s]", symbol.Type, symbol.Name, len(symbol.Conflicts)+1, imp)) + lines = append(lines, fmt.Sprintf("[%v]: Ambiguous resolve of %v %q (symbol is provided by %d labels) [%s]", from, symbol.Type, symbol.Name, len(symbol.Conflicts)+1, imp)) if symbol.Type == sppb.ImportType_PACKAGE || symbol.Type == sppb.ImportType_PROTO_PACKAGE { lines = append(lines, " - Possible action: remove wildcard or package import") } diff --git a/pkg/resolver/symbol_provider.go b/pkg/resolver/symbol_provider.go index be272b9b..cbf3b748 100644 --- a/pkg/resolver/symbol_provider.go +++ b/pkg/resolver/symbol_provider.go @@ -6,6 +6,7 @@ import ( "github.com/bazelbuild/bazel-gazelle/config" "github.com/bazelbuild/bazel-gazelle/label" "github.com/bazelbuild/bazel-gazelle/rule" + "github.com/bazelbuild/buildtools/build" ) // SymbolProvider is a flag-configurable entity that supplies symbols @@ -30,5 +31,5 @@ type SymbolProvider interface { // example, the maven resolver may return true for labels like // "@maven//:junit_junit". The rule Index can be used to consult what type // of label from is, based on the rule characteristics. - CanProvide(dep label.Label, knownRule func(from label.Label) (*rule.Rule, bool)) bool + CanProvide(dep *ImportLabel, expr build.Expr, knownRule func(from label.Label) (*rule.Rule, bool)) bool } diff --git a/pkg/scalaconfig/config.go b/pkg/scalaconfig/config.go index 2f72ef3c..ce94879f 100644 --- a/pkg/scalaconfig/config.go +++ b/pkg/scalaconfig/config.go @@ -148,9 +148,9 @@ func (c *Config) Rel() string { return c.rel } -func (c *Config) hasSymbolProvider(from label.Label) bool { +func (c *Config) shouldKeep(expr build.Expr, dep *resolver.ImportLabel) bool { for _, provider := range c.universe.SymbolProviders() { - if provider.CanProvide(from, c.universe.GetKnownRule) { + if provider.CanProvide(dep, expr, c.universe.GetKnownRule) { return true } } @@ -418,7 +418,7 @@ func (c *Config) ConfiguredRules() []*scalarule.Config { return rules } -func (c *Config) shouldAnnotateImports() bool { +func (c *Config) ShouldAnnotateImports() bool { _, ok := c.annotations[DebugImports] return ok } @@ -438,6 +438,11 @@ func (c *Config) ShouldAnnotateRule() bool { return ok } +func (c *Config) depSuffixComment(imp *resolver.Import) *build.Comment { + return &build.Comment{Token: fmt.Sprintf("# %v (%s %s)", imp.Kind, imp.Symbol.Provider, imp.Symbol.Name)} + // return &build.Comment{Token: fmt.Sprintf("# %v", imp.Kind)} +} + // ShouldFixWildcardImport tests whether the given symbol name pattern // should be resolved within the scope of the given filename pattern. // resolveFileSymbolNameSpecs represent a whitelist; if no patterns match, false @@ -505,17 +510,16 @@ func (c *Config) MaybeRewrite(kind string, from label.Label) label.Label { } func (c *Config) Imports(imports resolver.ImportMap, r *rule.Rule, attrName string, from label.Label) { - c.ruleAttrMergeDeps(imports, r, c.shouldAnnotateImports(), attrName, from) + c.ruleAttrMergeDeps(imports, r, attrName, from) } func (c *Config) Exports(exports resolver.ImportMap, r *rule.Rule, attrName string, from label.Label) { - c.ruleAttrMergeDeps(exports, r, c.shouldAnnotateExports(), attrName, from) + c.ruleAttrMergeDeps(exports, r, attrName, from) } func (c *Config) ruleAttrMergeDeps( imports resolver.ImportMap, r *rule.Rule, - shouldAnnotateSrcs bool, attrName string, from label.Label, ) { @@ -540,22 +544,13 @@ func (c *Config) ruleAttrMergeDeps( } else { r.DelAttr(attrName) } - - // Apply annotations if requested - if shouldAnnotateSrcs { - comments := r.AttrComments("srcs") - if comments != nil { - prefix := attrName + ": " - annotateImports(imports, comments, prefix) - } - } } // mergeDeps filters out a `deps` list. Extries are removed from the // list if they can be parsed as dependency labels that have a provider. Others // types of expressions are left as-is. Dependency labels that have no known // provider are also left as-is. -func (c *Config) mergeDeps(attrValue build.Expr, deps map[label.Label]bool, importLabels []*resolver.ImportLabel, attrName string, from label.Label) *build.ListExpr { +func (c *Config) mergeDeps(attrValue build.Expr, deps map[label.Label]bool, importLabels map[label.Label]*resolver.ImportLabel, attrName string, from label.Label) *build.ListExpr { var src *build.ListExpr if attrValue != nil { if current, ok := attrValue.(*build.ListExpr); ok { @@ -594,9 +589,15 @@ func (c *Config) mergeDeps(attrValue build.Expr, deps map[label.Label]bool, impo continue } + imp, ok := importLabels[dep] + if !ok { + dst.List = append(dst.List, expr) + continue + } + // do we have a known provider for the dependency? If not, this // dependency is not "managed", so leave it alone. - if !c.hasSymbolProvider(dep) { + if !c.shouldKeep(expr, imp) { dst.List = append(dst.List, expr) continue } @@ -609,23 +610,19 @@ func (c *Config) mergeDeps(attrValue build.Expr, deps map[label.Label]bool, impo if !want { continue } + imp := importLabels[dep] depExpr := &build.StringExpr{Value: dep.String()} if c.shouldAnnotateDeps() { - depExpr.Suffix = append(depExpr.Suffix, depComment(dep, importLabels)) + depExpr.Suffix = append(depExpr.Suffix, depCommentFor(imp.Import)) + } + comment := c.depSuffixComment(imp.Import) + if comment != nil { + depExpr.Suffix = append(depExpr.Suffix, *comment) } + dst.List = append(dst.List, depExpr) } - // Sort the list - sort.SliceStable(dst.List, func(i, j int) bool { - a, aIsString := dst.List[i].(*build.StringExpr) - b, bIsString := dst.List[j].(*build.StringExpr) - if aIsString && bIsString { - return a.Token < b.Token - } - return false - }) - return dst } @@ -708,25 +705,15 @@ func removeDepsCleaner(slice []resolver.DepsCleaner, index int) []resolver.DepsC return append(slice[:index], slice[index+1:]...) } -func annotateImports(imports resolver.ImportMap, comments *build.Comments, prefix string) { - comments.Before = nil +func AnnotateImports(imports resolver.ImportMap, comments *build.Comments, prefix string) { for _, key := range imports.Keys() { - imp := imports[key] + imp, _ := imports.Get(key) comment := setCommentPrefix(imp.Comment(), prefix) + // log.Printf("%d: %v", i, comment.Token) comments.Before = append(comments.Before, comment) } } -func depComment(dep label.Label, importLabels []*resolver.ImportLabel) build.Comment { - for _, imp := range importLabels { - if dep != imp.Label { - continue - } - return depCommentFor(imp.Import) - } - panic(fmt.Sprintf("dependency %v was not found in the import label list", dep)) -} - func depCommentFor(imp *resolver.Import) build.Comment { source := "" if imp.Source != nil { diff --git a/pkg/scalaconfig/config_test.go b/pkg/scalaconfig/config_test.go index be7dbe33..07be64b5 100644 --- a/pkg/scalaconfig/config_test.go +++ b/pkg/scalaconfig/config_test.go @@ -87,6 +87,18 @@ func TestScalaConfigParseDirectives(t *testing.T) { }, }, }, + "debug imports": { + directives: []rule.Directive{ + {Key: "scala_debug", Value: "imports"}, + }, + want: &Config{ + rules: map[string]*scalarule.Config{}, + labelNameRewrites: map[string]resolver.LabelNameRewriteSpec{}, + annotations: map[debugAnnotation]any{ + DebugImports: nil, + }, + }, + }, } { t.Run(name, func(t *testing.T) { sc, err := NewTestScalaConfig(t, mocks.NewUniverse(t), "", tc.directives...) @@ -105,6 +117,40 @@ func TestScalaConfigParseDirectives(t *testing.T) { } } +func TestScalaConfigShouldAnnotateImports(t *testing.T) { + for name, tc := range map[string]struct { + directives []rule.Directive + want bool + }{ + "degenerate": { + want: false, + }, + "false": { + directives: []rule.Directive{ + {Key: "scala_debug", Value: "-imports"}, + }, + want: false, + }, + "true": { + directives: []rule.Directive{ + {Key: "scala_debug", Value: "imports"}, + }, + want: true, + }, + } { + t.Run(name, func(t *testing.T) { + sc, err := NewTestScalaConfig(t, mocks.NewUniverse(t), "", tc.directives...) + if err != nil { + t.Fatal(err) + } + got := sc.ShouldAnnotateImports() + if diff := cmp.Diff(tc.want, got); diff != "" { + t.Errorf("(-want +got):\n%s", diff) + } + }) + } +} + func TestScalaConfigParseRuleDirective(t *testing.T) { for name, tc := range map[string]struct { directives []rule.Directive diff --git a/pkg/scalarule/BUILD.bazel b/pkg/scalarule/BUILD.bazel index eb26ffd3..ab7d9297 100644 --- a/pkg/scalarule/BUILD.bazel +++ b/pkg/scalarule/BUILD.bazel @@ -19,6 +19,7 @@ go_library( "//pkg/resolver", "@bazel_gazelle//config:go_default_library", "@bazel_gazelle//label:go_default_library", + "@bazel_gazelle//language:go_default_library", "@bazel_gazelle//resolve:go_default_library", "@bazel_gazelle//rule:go_default_library", ], diff --git a/pkg/scalarule/package.go b/pkg/scalarule/package.go index 79558e8e..f1f914ac 100644 --- a/pkg/scalarule/package.go +++ b/pkg/scalarule/package.go @@ -1,12 +1,16 @@ package scalarule import ( + "github.com/bazelbuild/bazel-gazelle/language" grule "github.com/bazelbuild/bazel-gazelle/rule" ) // Package is responsible for instantiating a Rule interface for the given // gazelle.Rule, parsing the attribute name given (typically 'srcs'). type Package interface { - // ParseRule parses the given rule from the named attr (typically 'srcs'). + // ParseRule parses the sources from the named attr (typically 'srcs') and + // created a new Rule. ParseRule(r *grule.Rule, attrName string) (Rule, error) + // GenerateArgs returns the GenerateArgs for the package + GenerateArgs() language.GenerateArgs } diff --git a/pkg/scalarule/rule.go b/pkg/scalarule/rule.go index 56ed3dbf..b94e24e7 100644 --- a/pkg/scalarule/rule.go +++ b/pkg/scalarule/rule.go @@ -1,6 +1,7 @@ package scalarule import ( + "github.com/bazelbuild/bazel-gazelle/label" "github.com/bazelbuild/bazel-gazelle/resolve" "github.com/stackb/scala-gazelle/pkg/resolver" @@ -12,7 +13,7 @@ type Rule interface { // rules. Provides() []resolve.ImportSpec // Import returns the list of required imports for the rule. - Imports() resolver.ImportMap + Imports(from label.Label) resolver.ImportMap // Import returns the list of required exports for the rule. - Exports() resolver.ImportMap + Exports(from label.Label) resolver.ImportMap } diff --git a/pkg/semanticdb/BUILD.bazel b/pkg/semanticdb/BUILD.bazel new file mode 100644 index 00000000..4304ba43 --- /dev/null +++ b/pkg/semanticdb/BUILD.bazel @@ -0,0 +1,43 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") + +# gazelle:exclude testdata + +go_library( + name = "semanticdb", + srcs = [ + "globalscope.go", + "io.go", + "semanticdb.go", + "semanticdb_index.go", + "visitor.go", + ], + importpath = "github.com/stackb/scala-gazelle/pkg/semanticdb", + visibility = ["//visibility:public"], + deps = [ + "//pkg/resolver", + "//pkg/scalarule", + "//scala/meta/semanticdb", + "@bazel_gazelle//config:go_default_library", + "@bazel_gazelle//label:go_default_library", + "@bazel_gazelle//resolve:go_default_library", + "@bazel_gazelle//rule:go_default_library", + "@org_golang_google_protobuf//proto", + ], +) + +go_test( + name = "semanticdb_test", + srcs = [ + "semanticdb_test.go", + "visitor_test.go", + ], + data = glob(["testdata/**/*"]), + embed = [":semanticdb"], + deps = [ + "//build/stack/gazelle/scala/parse", + "//pkg/protobuf", + "//scala/meta/semanticdb", + "@com_github_google_go_cmp//cmp", + "@com_github_google_go_cmp//cmp/cmpopts", + ], +) diff --git a/pkg/semanticdb/README.md b/pkg/semanticdb/README.md new file mode 100644 index 00000000..5a2d2e3e --- /dev/null +++ b/pkg/semanticdb/README.md @@ -0,0 +1,9 @@ +# pkg/semanticdb + +Support for reading semanticdb files + +To regenerate the golden files: + +``` +bazel run //pkg/semanicdb:semanicdb_test -- -update +``` diff --git a/pkg/semanticdb/globalscope.go b/pkg/semanticdb/globalscope.go new file mode 100644 index 00000000..86b0b07a --- /dev/null +++ b/pkg/semanticdb/globalscope.go @@ -0,0 +1,15 @@ +package semanticdb + +import ( + "github.com/stackb/scala-gazelle/pkg/resolver" +) + +var globalScope resolver.Scope + +func SetGlobalScope(scope resolver.Scope) { + globalScope = scope +} + +func GetGlobalScope() resolver.Scope { + return globalScope +} diff --git a/pkg/semanticdb/io.go b/pkg/semanticdb/io.go new file mode 100644 index 00000000..db5455e8 --- /dev/null +++ b/pkg/semanticdb/io.go @@ -0,0 +1,91 @@ +package semanticdb + +import ( + "archive/zip" + "fmt" + "io" + "os" + "strings" + + "google.golang.org/protobuf/proto" + + spb "github.com/stackb/scala-gazelle/scala/meta/semanticdb" +) + +func ReadJarFile(filename string) ([]*spb.TextDocuments, error) { + jar, err := zip.OpenReader(filename) + if err != nil { + return nil, fmt.Errorf("opening jar file: %v", err) + } + defer jar.Close() + + return ReadJar(jar) +} + +func ReadJar(jar *zip.ReadCloser) ([]*spb.TextDocuments, error) { + docs := make([]*spb.TextDocuments, 0) + + for _, file := range jar.File { + + if !strings.HasPrefix(file.Name, "META-INF/semanticdb/") { + continue + } + if !strings.HasSuffix(file.Name, ".semanticdb") { + continue + } + + if doc, err := ReadJarZipFile(file); err != nil { + return nil, fmt.Errorf("reading file within jar: %v", err) + } else { + docs = append(docs, doc) + } + } + + return docs, nil +} + +func ReadJarZipFile(file *zip.File) (*spb.TextDocuments, error) { + fileReader, err := file.Open() + if err != nil { + return nil, fmt.Errorf("opening file within jar: %v", err) + } + defer fileReader.Close() + + return ReadTextDocumentsIn(fileReader) +} + +func ReadTextDocumentsFile(filename string) (*spb.TextDocuments, error) { + data, err := os.ReadFile(filename) + if err != nil { + return nil, fmt.Errorf("opening file: %v", err) + } + var doc spb.TextDocuments + if err := proto.Unmarshal(data, &doc); err != nil { + return nil, err + } + return &doc, nil +} + +func ReadTextDocumentsIn(in io.ReadCloser) (*spb.TextDocuments, error) { + data, err := io.ReadAll(in) + if err != nil { + return nil, err + } + var doc spb.TextDocuments + if err := proto.Unmarshal(data, &doc); err != nil { + return nil, err + } + return &doc, nil +} + +func ReadTextDocumentFile(filename string) (*spb.TextDocument, error) { + data, err := os.ReadFile(filename) + if err != nil { + return nil, err + } + var doc spb.TextDocument + if err := proto.Unmarshal(data, &doc); err != nil { + return nil, err + } + return &doc, nil +} diff --git a/pkg/semanticdb/semanticdb.go b/pkg/semanticdb/semanticdb.go new file mode 100644 index 00000000..f0f14384 --- /dev/null +++ b/pkg/semanticdb/semanticdb.go @@ -0,0 +1,11 @@ +package semanticdb + +import ( + spb "github.com/stackb/scala-gazelle/scala/meta/semanticdb" +) + +func SemanticImports(in *spb.TextDocument) []string { + visitor := NewTextDocumentVisitor() + visitor.VisitTextDocument(in) + return visitor.SemanticImports() +} diff --git a/pkg/semanticdb/semanticdb_index.go b/pkg/semanticdb/semanticdb_index.go new file mode 100644 index 00000000..aed003f0 --- /dev/null +++ b/pkg/semanticdb/semanticdb_index.go @@ -0,0 +1,136 @@ +package semanticdb + +import ( + "log" + "sort" + + "github.com/bazelbuild/bazel-gazelle/config" + "github.com/bazelbuild/bazel-gazelle/label" + "github.com/bazelbuild/bazel-gazelle/resolve" + "github.com/bazelbuild/bazel-gazelle/rule" + + "github.com/stackb/scala-gazelle/pkg/resolver" + "github.com/stackb/scala-gazelle/pkg/scalarule" +) + +const ( + SemanticdbIndexRuleKind = "semanticdb_index" + SemanticdbIndexRuleLoad = "@build_stack_scala_gazelle//rules:semanticdb_index.bzl" +) + +func init() { + mustRegister := func(load, kind string) { + fqn := load + "%" + kind + provider := NewSemanticdbIndexRuleProvider(load, kind) + if err := scalarule.GlobalProviderRegistry().RegisterProvider(fqn, provider); err != nil { + log.Fatalf("registering %s rule provider: %v", SemanticdbIndexRuleKind, err) + } + } + mustRegister(SemanticdbIndexRuleLoad, SemanticdbIndexRuleKind) +} + +func NewSemanticdbIndexRuleProvider(load, kind string) *SemanticdbIndexRuleProvider { + return &SemanticdbIndexRuleProvider{load, kind} +} + +// SemanticdbIndexRuleProvider implements a scalarule.Provider for the semanticdb_index. +type SemanticdbIndexRuleProvider struct { + load, name string +} + +// Name implements part of the scalarule.Provider interface. +func (s *SemanticdbIndexRuleProvider) Name() string { + return s.name +} + +// KindInfo implements part of the scalarule.Provider interface. +func (s *SemanticdbIndexRuleProvider) KindInfo() rule.KindInfo { + return rule.KindInfo{ + ResolveAttrs: map[string]bool{ + "deps": true, + "jars": true, + }, + } +} + +// LoadInfo implements part of the scalarule.Provider interface. +func (s *SemanticdbIndexRuleProvider) LoadInfo() rule.LoadInfo { + return rule.LoadInfo{ + Name: s.load, + Symbols: []string{s.name}, + } +} + +// ProvideRule implements part of the scalarule.Provider interface. It always +// returns nil. The ResolveRule interface is the intended use case. +func (s *SemanticdbIndexRuleProvider) ProvideRule(cfg *scalarule.Config, pkg scalarule.Package) scalarule.RuleProvider { + return nil +} + +// ResolveRule implements the RuleResolver interface. +func (s *SemanticdbIndexRuleProvider) ResolveRule(cfg *scalarule.Config, pkg scalarule.Package, r *rule.Rule) scalarule.RuleProvider { + + r.SetPrivateAttr(config.GazelleImportsKey, nil) + + return &semanticdbIndexRule{cfg, pkg, r} +} + +// semanticdbIndexRule implements scalarule.RuleProvider for existing scala rules. +type semanticdbIndexRule struct { + cfg *scalarule.Config + pkg scalarule.Package + rule *rule.Rule +} + +// Kind implements part of the ruleProvider interface. +func (s *semanticdbIndexRule) Kind() string { + return s.rule.Kind() +} + +// Name implements part of the ruleProvider interface. +func (s *semanticdbIndexRule) Name() string { + return s.rule.Name() +} + +// Rule implements part of the ruleProvider interface. +func (s *semanticdbIndexRule) Rule() *rule.Rule { + return s.rule +} + +// Imports implements part of the scalarule.RuleProvider interface. It always +// returns nil as semanticdb_index is not an importable rule. +func (s *semanticdbIndexRule) Imports(c *config.Config, r *rule.Rule, file *rule.File) []resolve.ImportSpec { + return nil +} + +// Resolve implements part of the scalarule.RuleProvider interface. +func (s *semanticdbIndexRule) Resolve(rctx *scalarule.ResolveContext, importsRaw interface{}) { + + kinds := make(map[string]bool) + for _, kind := range rctx.Rule.AttrStrings("kinds") { + kinds[kind] = true + } + + symbols := make(map[label.Label]*resolver.Symbol) + for _, sym := range GetGlobalScope().GetSymbols("") { + symbols[sym.Label] = sym + } + + deps := make([]string, 0, len(symbols)) + for lbl, sym := range symbols { + if lbl == label.NoLabel { + continue + } + if lbl.Repo != "" { + continue + } + if _, ok := kinds[sym.Provider]; !ok { + continue + } + dep := label.New(lbl.Repo, lbl.Pkg, lbl.Name+"_semanticdb") + deps = append(deps, dep.String()) + } + sort.Strings(deps) + + rctx.Rule.SetAttr("deps", deps) +} diff --git a/pkg/semanticdb/semanticdb_test.go b/pkg/semanticdb/semanticdb_test.go new file mode 100644 index 00000000..73ff4db0 --- /dev/null +++ b/pkg/semanticdb/semanticdb_test.go @@ -0,0 +1,79 @@ +package semanticdb + +import ( + "flag" + "log" + "os" + "path/filepath" + "testing" + + "github.com/google/go-cmp/cmp" + "github.com/google/go-cmp/cmp/cmpopts" + sppb "github.com/stackb/scala-gazelle/build/stack/gazelle/scala/parse" + "github.com/stackb/scala-gazelle/pkg/protobuf" + spb "github.com/stackb/scala-gazelle/scala/meta/semanticdb" +) + +var update = flag.Bool("update", false, "update golden files") + +func TestSemanticImports(t *testing.T) { + for name, tc := range map[string]struct { + filename string + wantErr string + }{ + "stringlib": { + filename: "testdata/stringlib.jar.textdocuments.json", + }, + } { + t.Run(name, func(t *testing.T) { + dir, err := os.Getwd() + if err != nil { + t.Fatal(err) + } + if bwd, ok := os.LookupEnv("BUILD_WORKSPACE_DIRECTORY"); ok { + dir = filepath.Join(bwd, "pkg/semanticdb") + } + + var docs spb.TextDocuments + err = protobuf.ReadFile(tc.filename, &docs) + var gotErr string + if err != nil { + gotErr = err.Error() + } + if diff := cmp.Diff(tc.wantErr, gotErr); diff != "" { + t.Errorf("error (-want +got):\n%s", diff) + } + if err != nil { + return + } + + for _, doc := range docs.Documents { + got := sppb.File{SemanticImports: SemanticImports(doc)} + + goldenFile := filepath.Join(dir, "testdata", tc.filename+".golden", doc.Uri+".file.json") + + if *update { + if err := os.MkdirAll(filepath.Dir(goldenFile), os.ModePerm); err != nil { + t.Fatal(err) + } + if err := protobuf.WriteStableJSONFile(goldenFile, &got); err != nil { + t.Fatal(err) + } + log.Println("Wrote golden file:", goldenFile) + continue + } + + var want sppb.File + if err := protobuf.ReadFile(goldenFile, &want); err != nil { + t.Fatal(err) + } + + if diff := cmp.Diff(&want, &got, cmpopts.IgnoreUnexported( + sppb.File{}, + )); diff != "" { + t.Errorf("%s (-want +got):\n%s", doc.Uri, diff) + } + } + }) + } +} diff --git a/pkg/semanticdb/testdata/stringlib.jar.textdocuments.json b/pkg/semanticdb/testdata/stringlib.jar.textdocuments.json new file mode 100755 index 00000000..292d7637 --- /dev/null +++ b/pkg/semanticdb/testdata/stringlib.jar.textdocuments.json @@ -0,0 +1,193 @@ +{ + "documents": [ + { + "schema": "SEMANTICDB4", + "uri": "trumid/common/utils/string/src/package.scala", + "md5": "7D344E91C034B608A9E95F2370F7B678", + "language": "SCALA", + "symbols": [ + { + "symbol": "trumid/common/utils/string/package.", + "language": "SCALA", + "kind": "PACKAGE_OBJECT", + "properties": 8, + "displayName": "string", + "signature": { + "classSignature": { + "typeParameters": {}, + "parents": [ + { + "typeRef": { + "symbol": "scala/AnyRef#" + } + } + ], + "declarations": { + "symlinks": [ + "trumid/common/utils/string/package.snakify()." + ] + } + } + } + }, + { + "symbol": "trumid/common/utils/string/package.snakify().", + "language": "SCALA", + "kind": "METHOD", + "displayName": "snakify", + "signature": { + "methodSignature": { + "typeParameters": {}, + "parameterLists": [ + { + "symlinks": [ + "trumid/common/utils/string/package.snakify().(name)" + ] + } + ], + "returnType": { + "typeRef": { + "symbol": "scala/Predef.String#" + } + } + } + }, + "access": { + "publicAccess": {} + } + }, + { + "symbol": "trumid/common/utils/string/package.snakify().(name)", + "language": "SCALA", + "kind": "PARAMETER", + "displayName": "name", + "signature": { + "valueSignature": { + "tpe": { + "typeRef": { + "symbol": "scala/Predef.String#" + } + } + } + } + } + ], + "occurrences": [ + { + "range": { + "startLine": 2, + "startCharacter": 15, + "endLine": 2, + "endCharacter": 21 + }, + "symbol": "trumid/common/utils/string/package.", + "role": "DEFINITION" + }, + { + "range": { + "startLine": 12, + "startCharacter": 6, + "endLine": 12, + "endCharacter": 13 + }, + "symbol": "trumid/common/utils/string/package.snakify().", + "role": "DEFINITION" + }, + { + "range": { + "startCharacter": 8, + "endCharacter": 14 + }, + "symbol": "trumid/", + "role": "REFERENCE" + }, + { + "range": { + "startCharacter": 15, + "endCharacter": 21 + }, + "symbol": "trumid/common/", + "role": "REFERENCE" + }, + { + "range": { + "startLine": 13, + "startCharacter": 4, + "endLine": 13, + "endCharacter": 8 + }, + "symbol": "trumid/common/utils/string/package.snakify().(name)", + "role": "REFERENCE" + }, + { + "range": { + "startLine": 12, + "startCharacter": 14, + "endLine": 12, + "endCharacter": 18 + }, + "symbol": "trumid/common/utils/string/package.snakify().(name)", + "role": "DEFINITION" + }, + { + "range": { + "startCharacter": 22, + "endCharacter": 27 + }, + "symbol": "trumid/common/utils/", + "role": "REFERENCE" + }, + { + "range": { + "startLine": 13, + "startCharacter": 9, + "endLine": 13, + "endCharacter": 19 + }, + "symbol": "java/lang/String#replaceAll().", + "role": "REFERENCE" + }, + { + "range": { + "startLine": 12, + "startCharacter": 29, + "endLine": 12, + "endCharacter": 35 + }, + "symbol": "scala/Predef.String#", + "role": "REFERENCE" + }, + { + "range": { + "startLine": 13, + "startCharacter": 53, + "endLine": 13, + "endCharacter": 63 + }, + "symbol": "java/lang/String#replaceAll().", + "role": "REFERENCE" + }, + { + "range": { + "startLine": 12, + "startCharacter": 20, + "endLine": 12, + "endCharacter": 26 + }, + "symbol": "scala/Predef.String#", + "role": "REFERENCE" + }, + { + "range": { + "startLine": 13, + "startCharacter": 94, + "endLine": 13, + "endCharacter": 105 + }, + "symbol": "java/lang/String#toLowerCase(+1).", + "role": "REFERENCE" + } + ] + } + ] +} \ No newline at end of file diff --git a/pkg/semanticdb/testdata/testdata/stringlib.jar.textdocuments.json.golden/common/utils/string/src/package.scala.file.json b/pkg/semanticdb/testdata/testdata/stringlib.jar.textdocuments.json.golden/common/utils/string/src/package.scala.file.json new file mode 100644 index 00000000..4b888756 --- /dev/null +++ b/pkg/semanticdb/testdata/testdata/stringlib.jar.textdocuments.json.golden/common/utils/string/src/package.scala.file.json @@ -0,0 +1,8 @@ +{ + "semanticImports": [ + "common.utils.string.package", + "java.lang.String", + "scala.AnyRef", + "scala.Predef" + ] +} \ No newline at end of file diff --git a/pkg/semanticdb/testdata/testdata/stringlib.jar.textdocuments.json.golden/trumid/common/utils/string/src/package.scala.file.json b/pkg/semanticdb/testdata/testdata/stringlib.jar.textdocuments.json.golden/trumid/common/utils/string/src/package.scala.file.json new file mode 100644 index 00000000..17920522 --- /dev/null +++ b/pkg/semanticdb/testdata/testdata/stringlib.jar.textdocuments.json.golden/trumid/common/utils/string/src/package.scala.file.json @@ -0,0 +1,8 @@ +{ + "semanticImports": [ + "java.lang.String", + "scala.AnyRef", + "scala.Predef", + "trumid.common.utils.string.package" + ] +} \ No newline at end of file diff --git a/pkg/semanticdb/visitor.go b/pkg/semanticdb/visitor.go new file mode 100644 index 00000000..b9b01033 --- /dev/null +++ b/pkg/semanticdb/visitor.go @@ -0,0 +1,358 @@ +package semanticdb + +import ( + "log" + "sort" + "strings" + + spb "github.com/stackb/scala-gazelle/scala/meta/semanticdb" +) + +func NewTextDocumentVisitor() *TextDocumentVisitor { + return &TextDocumentVisitor{ + symbols: make(map[string]*spb.SymbolInformation), + types: make(map[string]*spb.Type), + } +} + +type TextDocumentVisitor struct { + types map[string]*spb.Type + symbols map[string]*spb.SymbolInformation + debug bool +} + +func toImport(symbol string) string { + if strings.HasPrefix(symbol, "local") { + return "" + } + // skip package symbols (e.g. 'trumid/ats/limitsng/') + if strings.HasSuffix(symbol, "/") { + return "" + } + if idx := strings.Index(symbol, "#"); idx != -1 { + symbol = symbol[:idx] + } + if idx := strings.Index(symbol, "."); idx != -1 { + symbol = symbol[:idx] + } + symbol = strings.ReplaceAll(symbol, "/", ".") + return symbol +} + +func (v *TextDocumentVisitor) SemanticImports() []string { + imports := make([]string, 0, len(v.types)) + seen := make(map[string]bool) + for name := range v.types { + imp := toImport(name) + if imp == "" { + continue + } + if _, exists := seen[imp]; exists { + continue + } + seen[imp] = true + imports = append(imports, imp) + } + sort.Strings(imports) + return imports +} + +func (v *TextDocumentVisitor) addType(symbol string, node *spb.Type) { + if _, ok := v.types[symbol]; ok { + if v.debug { + log.Printf("duplicate type registration: %s", symbol) + } + return + } + v.types[symbol] = node +} + +func (v *TextDocumentVisitor) VisitTextDocument(node *spb.TextDocument) { + for _, child := range node.Symbols { + v.VisitSymbolInformation(child) + } + for _, child := range node.Occurrences { + v.VisitOccurence(child) + } + // TODO: occurrences? diagnostics? synthetics? +} + +func (v *TextDocumentVisitor) VisitSymbolInformation(node *spb.SymbolInformation) { + if _, ok := v.symbols[node.Symbol]; ok { + return // already processed + } + v.symbols[node.Symbol] = node + + for _, child := range node.Annotations { + v.VisitAnnotation(child) + } + + v.VisitSignature(node.Signature) + + // TODO: what are overridden symbols + // + // for _, child := range node.OverriddenSymbols { + // v.VisitOverridden(child) + // } +} + +func (v *TextDocumentVisitor) VisitScope(node *spb.Scope) { + if node == nil { + return + } + for _, child := range node.Hardlinks { + v.VisitSymbolInformation(child) + } + for _, child := range node.Symlinks { + v.VisitSymlink(child) + } + // DONE +} + +func (v *TextDocumentVisitor) VisitAnnotation(node *spb.Annotation) { + v.VisitType(node.Tpe) + // DONE +} + +func (v *TextDocumentVisitor) VisitSymlink(name string) { + node, ok := v.symbols[name] + if !ok { + if v.debug { + log.Println("unknown symlink:", name) + } + v.addType(name, nil) + return + } + v.VisitSymbolInformation(node) + // DONE +} + +func (v *TextDocumentVisitor) VisitSignature(node *spb.Signature) { + if node == nil { + return + } + switch t := node.SealedValue.(type) { + case *spb.Signature_ClassSignature: + v.VisitClassSignature(t.ClassSignature) + case *spb.Signature_MethodSignature: + v.VisitMethodSignature(t.MethodSignature) + case *spb.Signature_TypeSignature: + v.VisitTypeSignature(t.TypeSignature) + case *spb.Signature_ValueSignature: + v.VisitValueSignature(t.ValueSignature) + default: + log.Panicf("unexpected signature type: %T", t) + } + // DONE +} + +func (v *TextDocumentVisitor) VisitClassSignature(node *spb.ClassSignature) { + v.VisitScope(node.TypeParameters) + for _, child := range node.Parents { + v.VisitType(child) + } + v.VisitType(node.Self) + v.VisitScope(node.Declarations) + // DONE +} + +func (v *TextDocumentVisitor) VisitMethodSignature(node *spb.MethodSignature) { + v.VisitScope(node.TypeParameters) + for _, child := range node.ParameterLists { + v.VisitScope(child) + } + v.VisitType(node.ReturnType) + // DONE +} + +func (v *TextDocumentVisitor) VisitTypeSignature(node *spb.TypeSignature) { + v.VisitScope(node.TypeParameters) + v.VisitType(node.LowerBound) + v.VisitType(node.UpperBound) + // DONE +} + +func (v *TextDocumentVisitor) VisitValueSignature(node *spb.ValueSignature) { + v.VisitType(node.Tpe) + // DONE +} + +func (v *TextDocumentVisitor) VisitType(node *spb.Type) { + if node == nil { + return + } + + switch t := node.SealedValue.(type) { + case *spb.Type_TypeRef: + v.VisitTypeRef(t.TypeRef) + case *spb.Type_SingleType: + v.VisitSingleType(node, t.SingleType) + case *spb.Type_ThisType: + v.VisitThisType(node, t.ThisType) + case *spb.Type_SuperType: + v.VisitSuperType(node, t.SuperType) + case *spb.Type_ConstantType: + v.VisitConstantType(t.ConstantType) + case *spb.Type_IntersectionType: + v.VisitIntersectionType(t.IntersectionType) + case *spb.Type_UnionType: + v.VisitUnionType(t.UnionType) + case *spb.Type_WithType: + v.VisitWithType(t.WithType) + case *spb.Type_StructuralType: + v.VisitStructuralType(t.StructuralType) + case *spb.Type_AnnotatedType: + v.VisitAnnotatedType(t.AnnotatedType) + case *spb.Type_ExistentialType: + v.VisitExistentialType(t.ExistentialType) + case *spb.Type_UniversalType: + v.VisitUniversalType(t.UniversalType) + case *spb.Type_ByNameType: + v.VisitByNameType(t.ByNameType) + case *spb.Type_RepeatedType: + v.VisitRepeatedType(t.RepeatedType) + case *spb.Type_MatchType: + v.VisitMatchType(t.MatchType) + case *spb.Type_LambdaType: + v.VisitLambdaType(t.LambdaType) + default: + log.Panicf("unexpected type: %T", t) + } + // DONE +} + +func (v *TextDocumentVisitor) VisitTypeRef(node *spb.TypeRef) { + if node == nil { + return + } + + v.VisitType(node.Prefix) + for _, child := range node.TypeArguments { + v.VisitType(child) + } + if _, ok := v.types[node.Symbol]; !ok { + if v.debug { + log.Printf("unknown typeref target: %s", node.Symbol) + } + v.addType(node.Symbol, nil) + } + // DONE +} + +func (v *TextDocumentVisitor) VisitSingleType(parent *spb.Type, node *spb.SingleType) { + v.addType(node.Symbol, parent) + v.VisitType(node.Prefix) + // DONE +} + +func (v *TextDocumentVisitor) VisitThisType(parent *spb.Type, node *spb.ThisType) { + v.addType(node.Symbol, parent) + // DONE +} + +func (v *TextDocumentVisitor) VisitSuperType(parent *spb.Type, node *spb.SuperType) { + v.addType(node.Symbol, parent) + v.VisitType(node.Prefix) + // DONE +} + +func (v *TextDocumentVisitor) VisitConstantType(node *spb.ConstantType) { + v.VisitConstant(node.Constant) + // DONE +} + +func (v *TextDocumentVisitor) VisitIntersectionType(node *spb.IntersectionType) { + for _, child := range node.Types { + v.VisitType(child) + } + // DONE +} + +func (v *TextDocumentVisitor) VisitUnionType(node *spb.UnionType) { + for _, child := range node.Types { + v.VisitType(child) + } + // DONE +} + +func (v *TextDocumentVisitor) VisitWithType(node *spb.WithType) { + for _, child := range node.Types { + v.VisitType(child) + } + // DONE +} + +func (v *TextDocumentVisitor) VisitStructuralType(node *spb.StructuralType) { + v.VisitType(node.Tpe) + v.VisitScope(node.Declarations) + // DONE +} + +func (v *TextDocumentVisitor) VisitAnnotatedType(node *spb.AnnotatedType) { + for _, child := range node.Annotations { + v.VisitAnnotation(child) + } + v.VisitType(node.Tpe) + // DONE +} + +func (v *TextDocumentVisitor) VisitExistentialType(node *spb.ExistentialType) { + v.VisitType(node.Tpe) + v.VisitScope(node.Declarations) + // DONE +} + +func (v *TextDocumentVisitor) VisitUniversalType(node *spb.UniversalType) { + v.VisitScope(node.TypeParameters) + v.VisitType(node.Tpe) + // DONE +} + +func (v *TextDocumentVisitor) VisitByNameType(node *spb.ByNameType) { + v.VisitType(node.Tpe) + // DONE +} + +func (v *TextDocumentVisitor) VisitRepeatedType(node *spb.RepeatedType) { + v.VisitType(node.Tpe) + // DONE +} + +func (v *TextDocumentVisitor) VisitMatchType(node *spb.MatchType) { + v.VisitType(node.Scrutinee) + for _, child := range node.Cases { + v.VisitMatchCase(child) + } + // DONE +} + +func (v *TextDocumentVisitor) VisitLambdaType(node *spb.LambdaType) { + v.VisitScope(node.Parameters) + v.VisitType(node.ReturnType) + // DONE +} + +func (v *TextDocumentVisitor) VisitMatchCase(node *spb.MatchType_CaseType) { + v.VisitType(node.Key) + v.VisitType(node.Body) + // DONE +} + +func (v *TextDocumentVisitor) VisitConstant(node *spb.Constant) { + // DONE - no need to visit constants, right? +} + +func (v *TextDocumentVisitor) VisitOccurence(node *spb.SymbolOccurrence) { + if _, ok := v.symbols[node.Symbol]; ok { + return // already processed + } + // only process REFERENCE as it seems we would not want to import anything + // defined in the file. + if node.Role != spb.SymbolOccurrence_REFERENCE { + return + } + + // can't save (wrong map value type) + // v.symbols[node.Symbol] = nil + v.addType(node.Symbol, nil) +} diff --git a/pkg/semanticdb/visitor_test.go b/pkg/semanticdb/visitor_test.go new file mode 100644 index 00000000..dadeee7c --- /dev/null +++ b/pkg/semanticdb/visitor_test.go @@ -0,0 +1,35 @@ +package semanticdb + +import ( + "testing" + + "github.com/google/go-cmp/cmp" +) + +func TestToImport(t *testing.T) { + for name, tc := range map[string]struct { + symbol string + want string + }{ + "degenerate": {}, + "class": { + symbol: "scala/Unit#", + want: "scala.Unit", + }, + "package function": { + symbol: "omnistac/euds/package.isFinraTraceEvent().(r)", + want: "omnistac.euds.package", + }, + "package": { + symbol: "trumid/ats/limitsng/", + want: "", + }, + } { + t.Run(name, func(t *testing.T) { + got := toImport(tc.symbol) + if diff := cmp.Diff(tc.want, got); diff != "" { + t.Errorf("(-want +got):\n%s", diff) + } + }) + } +} diff --git a/rules/semanticdb_index.bzl b/rules/semanticdb_index.bzl new file mode 100644 index 00000000..28fbc7e3 --- /dev/null +++ b/rules/semanticdb_index.bzl @@ -0,0 +1,97 @@ +"""semanticdb_index.bzl provides the semanticdb_index rule. +""" + +SemanticDbIndexInfo = provider("provider that carries the index file", fields = { + "index": "the index file", +}) + +def _merge(ctx, output_file): + indexes = [dep[SemanticDbIndexInfo].index for dep in ctx.attr.deps] + + args = ctx.actions.args() + args.use_param_file("@%s", use_always = True) + args.add("--output_file", output_file) + args.add_all(ctx.files.jars) + args.add_all(indexes) + + ctx.actions.run( + mnemonic = "SemanticDbIndex", + progress_message = "Building semanticdb index: " + str(ctx.label), + executable = ctx.executable._mergetool, + arguments = [args], + inputs = ctx.files.jars + indexes, + outputs = [output_file], + ) + +def _extract(ctx, jar_file): + output_file = ctx.actions.declare_file(jar_file.basename + ".textdocuments.json", sibling = jar_file) + args = ctx.actions.args() + args.use_param_file("@%s", use_always = False) + args.add("--jar_file", jar_file) + args.add("--output_file", output_file) + + ctx.actions.run( + mnemonic = "SemanticDbExtract", + progress_message = "Extracting semanticdb textdocuments from jar: " + jar_file.short_path, + executable = ctx.executable._extracttool, + arguments = [args], + inputs = [jar_file], + outputs = [output_file], + ) + + return output_file + +def _semanticdb_index_impl(ctx): + _merge(ctx, ctx.outputs.index) + _merge(ctx, ctx.outputs.json) + textdocuments = [ + _extract(ctx, jar_file) + for jar_file in ctx.files.jars + ] + + return [ + DefaultInfo( + files = depset([ctx.outputs.index]), + ), + OutputGroupInfo( + json = depset([ctx.outputs.json]), + textdocuments = depset(textdocuments), + ), + SemanticDbIndexInfo( + index = ctx.outputs.index, + ), + ] + +semanticdb_index = rule( + implementation = _semanticdb_index_impl, + attrs = { + "jars": attr.label_list( + doc = "list of scala jars to be indexed", + allow_files = True, + ), + "deps": attr.label_list( + doc = "list of child semanticdb_index rules to be merged", + providers = [SemanticDbIndexInfo], + ), + "kinds": attr.string_list( + doc = "list of scala rule kinds to collect", + mandatory = False, + ), + "_mergetool": attr.label( + default = Label("@build_stack_scala_gazelle//cmd/semanticdbmerge"), + cfg = "exec", + executable = True, + doc = "the semanticdb merge tool", + ), + "_extracttool": attr.label( + default = Label("@build_stack_scala_gazelle//cmd/semanticdbextract"), + cfg = "exec", + executable = True, + doc = "the semanticdb extract tool", + ), + }, + outputs = { + "index": "%{name}.pb", + "json": "%{name}.json", + }, +) diff --git a/scala/meta/semanticdb/BUILD.bazel b/scala/meta/semanticdb/BUILD.bazel new file mode 100644 index 00000000..8769b79d --- /dev/null +++ b/scala/meta/semanticdb/BUILD.bazel @@ -0,0 +1,32 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") +load("@rules_proto//proto:defs.bzl", "proto_library") +load("@build_stack_rules_proto//rules:proto_compiled_sources.bzl", "proto_compiled_sources") + +proto_library( + name = "semanticdb_proto", + srcs = ["semanticdb.proto"], + visibility = ["//scala/meta:__subpackages__"], + deps = ["//scalapb:scalapb_proto"], +) + +proto_compiled_sources( + name = "semanticdb_go_compiled_sources", + srcs = ["semanticdb.pb.go"], + output_mappings = [ + "semanticdb.pb.go=github.com/stackb/scala-gazelle/scala/meta/semanticdb/semanticdb.pb.go", + ], + plugins = ["@build_stack_rules_proto//plugin/golang/protobuf:protoc-gen-go"], + proto = "semanticdb_proto", +) + +go_library( + name = "semanticdb", + srcs = ["semanticdb.pb.go"], + importpath = "github.com/stackb/scala-gazelle/scala/meta/semanticdb", + visibility = ["//visibility:public"], + deps = [ + "//scalapb", + "@org_golang_google_protobuf//reflect/protoreflect", + "@org_golang_google_protobuf//runtime/protoimpl", + ], +) diff --git a/scala/meta/semanticdb/semanticdb.pb.go b/scala/meta/semanticdb/semanticdb.pb.go new file mode 100644 index 00000000..f6628b46 --- /dev/null +++ b/scala/meta/semanticdb/semanticdb.pb.go @@ -0,0 +1,6180 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc v3.14.0 +// source: scala/meta/semanticdb/semanticdb.proto + +package semanticdb + +import ( + _ "github.com/stackb/scala-gazelle/scalapb" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + 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 Schema int32 + +const ( + Schema_LEGACY Schema = 0 + Schema_SEMANTICDB3 Schema = 3 + Schema_SEMANTICDB4 Schema = 4 +) + +// Enum value maps for Schema. +var ( + Schema_name = map[int32]string{ + 0: "LEGACY", + 3: "SEMANTICDB3", + 4: "SEMANTICDB4", + } + Schema_value = map[string]int32{ + "LEGACY": 0, + "SEMANTICDB3": 3, + "SEMANTICDB4": 4, + } +) + +func (x Schema) Enum() *Schema { + p := new(Schema) + *p = x + return p +} + +func (x Schema) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Schema) Descriptor() protoreflect.EnumDescriptor { + return file_scala_meta_semanticdb_semanticdb_proto_enumTypes[0].Descriptor() +} + +func (Schema) Type() protoreflect.EnumType { + return &file_scala_meta_semanticdb_semanticdb_proto_enumTypes[0] +} + +func (x Schema) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Schema.Descriptor instead. +func (Schema) EnumDescriptor() ([]byte, []int) { + return file_scala_meta_semanticdb_semanticdb_proto_rawDescGZIP(), []int{0} +} + +type Language int32 + +const ( + Language_UNKNOWN_LANGUAGE Language = 0 + Language_SCALA Language = 1 + Language_JAVA Language = 2 +) + +// Enum value maps for Language. +var ( + Language_name = map[int32]string{ + 0: "UNKNOWN_LANGUAGE", + 1: "SCALA", + 2: "JAVA", + } + Language_value = map[string]int32{ + "UNKNOWN_LANGUAGE": 0, + "SCALA": 1, + "JAVA": 2, + } +) + +func (x Language) Enum() *Language { + p := new(Language) + *p = x + return p +} + +func (x Language) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Language) Descriptor() protoreflect.EnumDescriptor { + return file_scala_meta_semanticdb_semanticdb_proto_enumTypes[1].Descriptor() +} + +func (Language) Type() protoreflect.EnumType { + return &file_scala_meta_semanticdb_semanticdb_proto_enumTypes[1] +} + +func (x Language) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Language.Descriptor instead. +func (Language) EnumDescriptor() ([]byte, []int) { + return file_scala_meta_semanticdb_semanticdb_proto_rawDescGZIP(), []int{1} +} + +type SymbolInformation_Kind int32 + +const ( + SymbolInformation_UNKNOWN_KIND SymbolInformation_Kind = 0 + SymbolInformation_LOCAL SymbolInformation_Kind = 19 + SymbolInformation_FIELD SymbolInformation_Kind = 20 + SymbolInformation_METHOD SymbolInformation_Kind = 3 + SymbolInformation_CONSTRUCTOR SymbolInformation_Kind = 21 + SymbolInformation_MACRO SymbolInformation_Kind = 6 + SymbolInformation_TYPE SymbolInformation_Kind = 7 + SymbolInformation_PARAMETER SymbolInformation_Kind = 8 + SymbolInformation_SELF_PARAMETER SymbolInformation_Kind = 17 + SymbolInformation_TYPE_PARAMETER SymbolInformation_Kind = 9 + SymbolInformation_OBJECT SymbolInformation_Kind = 10 + SymbolInformation_PACKAGE SymbolInformation_Kind = 11 + SymbolInformation_PACKAGE_OBJECT SymbolInformation_Kind = 12 + SymbolInformation_CLASS SymbolInformation_Kind = 13 + SymbolInformation_TRAIT SymbolInformation_Kind = 14 + SymbolInformation_INTERFACE SymbolInformation_Kind = 18 +) + +// Enum value maps for SymbolInformation_Kind. +var ( + SymbolInformation_Kind_name = map[int32]string{ + 0: "UNKNOWN_KIND", + 19: "LOCAL", + 20: "FIELD", + 3: "METHOD", + 21: "CONSTRUCTOR", + 6: "MACRO", + 7: "TYPE", + 8: "PARAMETER", + 17: "SELF_PARAMETER", + 9: "TYPE_PARAMETER", + 10: "OBJECT", + 11: "PACKAGE", + 12: "PACKAGE_OBJECT", + 13: "CLASS", + 14: "TRAIT", + 18: "INTERFACE", + } + SymbolInformation_Kind_value = map[string]int32{ + "UNKNOWN_KIND": 0, + "LOCAL": 19, + "FIELD": 20, + "METHOD": 3, + "CONSTRUCTOR": 21, + "MACRO": 6, + "TYPE": 7, + "PARAMETER": 8, + "SELF_PARAMETER": 17, + "TYPE_PARAMETER": 9, + "OBJECT": 10, + "PACKAGE": 11, + "PACKAGE_OBJECT": 12, + "CLASS": 13, + "TRAIT": 14, + "INTERFACE": 18, + } +) + +func (x SymbolInformation_Kind) Enum() *SymbolInformation_Kind { + p := new(SymbolInformation_Kind) + *p = x + return p +} + +func (x SymbolInformation_Kind) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SymbolInformation_Kind) Descriptor() protoreflect.EnumDescriptor { + return file_scala_meta_semanticdb_semanticdb_proto_enumTypes[2].Descriptor() +} + +func (SymbolInformation_Kind) Type() protoreflect.EnumType { + return &file_scala_meta_semanticdb_semanticdb_proto_enumTypes[2] +} + +func (x SymbolInformation_Kind) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SymbolInformation_Kind.Descriptor instead. +func (SymbolInformation_Kind) EnumDescriptor() ([]byte, []int) { + return file_scala_meta_semanticdb_semanticdb_proto_rawDescGZIP(), []int{39, 0} +} + +type SymbolInformation_Property int32 + +const ( + SymbolInformation_UNKNOWN_PROPERTY SymbolInformation_Property = 0 + SymbolInformation_ABSTRACT SymbolInformation_Property = 4 + SymbolInformation_FINAL SymbolInformation_Property = 8 + SymbolInformation_SEALED SymbolInformation_Property = 16 + SymbolInformation_IMPLICIT SymbolInformation_Property = 32 + SymbolInformation_LAZY SymbolInformation_Property = 64 + SymbolInformation_CASE SymbolInformation_Property = 128 + SymbolInformation_COVARIANT SymbolInformation_Property = 256 + SymbolInformation_CONTRAVARIANT SymbolInformation_Property = 512 + SymbolInformation_VAL SymbolInformation_Property = 1024 + SymbolInformation_VAR SymbolInformation_Property = 2048 + SymbolInformation_STATIC SymbolInformation_Property = 4096 + SymbolInformation_PRIMARY SymbolInformation_Property = 8192 + SymbolInformation_ENUM SymbolInformation_Property = 16384 + SymbolInformation_DEFAULT SymbolInformation_Property = 32768 + SymbolInformation_GIVEN SymbolInformation_Property = 65536 + SymbolInformation_INLINE SymbolInformation_Property = 131072 + SymbolInformation_OPEN SymbolInformation_Property = 262144 + SymbolInformation_TRANSPARENT SymbolInformation_Property = 524288 + SymbolInformation_INFIX SymbolInformation_Property = 1048576 + SymbolInformation_OPAQUE SymbolInformation_Property = 2097152 +) + +// Enum value maps for SymbolInformation_Property. +var ( + SymbolInformation_Property_name = map[int32]string{ + 0: "UNKNOWN_PROPERTY", + 4: "ABSTRACT", + 8: "FINAL", + 16: "SEALED", + 32: "IMPLICIT", + 64: "LAZY", + 128: "CASE", + 256: "COVARIANT", + 512: "CONTRAVARIANT", + 1024: "VAL", + 2048: "VAR", + 4096: "STATIC", + 8192: "PRIMARY", + 16384: "ENUM", + 32768: "DEFAULT", + 65536: "GIVEN", + 131072: "INLINE", + 262144: "OPEN", + 524288: "TRANSPARENT", + 1048576: "INFIX", + 2097152: "OPAQUE", + } + SymbolInformation_Property_value = map[string]int32{ + "UNKNOWN_PROPERTY": 0, + "ABSTRACT": 4, + "FINAL": 8, + "SEALED": 16, + "IMPLICIT": 32, + "LAZY": 64, + "CASE": 128, + "COVARIANT": 256, + "CONTRAVARIANT": 512, + "VAL": 1024, + "VAR": 2048, + "STATIC": 4096, + "PRIMARY": 8192, + "ENUM": 16384, + "DEFAULT": 32768, + "GIVEN": 65536, + "INLINE": 131072, + "OPEN": 262144, + "TRANSPARENT": 524288, + "INFIX": 1048576, + "OPAQUE": 2097152, + } +) + +func (x SymbolInformation_Property) Enum() *SymbolInformation_Property { + p := new(SymbolInformation_Property) + *p = x + return p +} + +func (x SymbolInformation_Property) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SymbolInformation_Property) Descriptor() protoreflect.EnumDescriptor { + return file_scala_meta_semanticdb_semanticdb_proto_enumTypes[3].Descriptor() +} + +func (SymbolInformation_Property) Type() protoreflect.EnumType { + return &file_scala_meta_semanticdb_semanticdb_proto_enumTypes[3] +} + +func (x SymbolInformation_Property) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SymbolInformation_Property.Descriptor instead. +func (SymbolInformation_Property) EnumDescriptor() ([]byte, []int) { + return file_scala_meta_semanticdb_semanticdb_proto_rawDescGZIP(), []int{39, 1} +} + +type Documentation_Format int32 + +const ( + Documentation_HTML Documentation_Format = 0 + Documentation_MARKDOWN Documentation_Format = 1 + Documentation_JAVADOC Documentation_Format = 2 + Documentation_SCALADOC Documentation_Format = 3 + Documentation_KDOC Documentation_Format = 4 +) + +// Enum value maps for Documentation_Format. +var ( + Documentation_Format_name = map[int32]string{ + 0: "HTML", + 1: "MARKDOWN", + 2: "JAVADOC", + 3: "SCALADOC", + 4: "KDOC", + } + Documentation_Format_value = map[string]int32{ + "HTML": 0, + "MARKDOWN": 1, + "JAVADOC": 2, + "SCALADOC": 3, + "KDOC": 4, + } +) + +func (x Documentation_Format) Enum() *Documentation_Format { + p := new(Documentation_Format) + *p = x + return p +} + +func (x Documentation_Format) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Documentation_Format) Descriptor() protoreflect.EnumDescriptor { + return file_scala_meta_semanticdb_semanticdb_proto_enumTypes[4].Descriptor() +} + +func (Documentation_Format) Type() protoreflect.EnumType { + return &file_scala_meta_semanticdb_semanticdb_proto_enumTypes[4] +} + +func (x Documentation_Format) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Documentation_Format.Descriptor instead. +func (Documentation_Format) EnumDescriptor() ([]byte, []int) { + return file_scala_meta_semanticdb_semanticdb_proto_rawDescGZIP(), []int{40, 0} +} + +type SymbolOccurrence_Role int32 + +const ( + SymbolOccurrence_UNKNOWN_ROLE SymbolOccurrence_Role = 0 + SymbolOccurrence_REFERENCE SymbolOccurrence_Role = 1 + SymbolOccurrence_DEFINITION SymbolOccurrence_Role = 2 +) + +// Enum value maps for SymbolOccurrence_Role. +var ( + SymbolOccurrence_Role_name = map[int32]string{ + 0: "UNKNOWN_ROLE", + 1: "REFERENCE", + 2: "DEFINITION", + } + SymbolOccurrence_Role_value = map[string]int32{ + "UNKNOWN_ROLE": 0, + "REFERENCE": 1, + "DEFINITION": 2, + } +) + +func (x SymbolOccurrence_Role) Enum() *SymbolOccurrence_Role { + p := new(SymbolOccurrence_Role) + *p = x + return p +} + +func (x SymbolOccurrence_Role) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SymbolOccurrence_Role) Descriptor() protoreflect.EnumDescriptor { + return file_scala_meta_semanticdb_semanticdb_proto_enumTypes[5].Descriptor() +} + +func (SymbolOccurrence_Role) Type() protoreflect.EnumType { + return &file_scala_meta_semanticdb_semanticdb_proto_enumTypes[5] +} + +func (x SymbolOccurrence_Role) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SymbolOccurrence_Role.Descriptor instead. +func (SymbolOccurrence_Role) EnumDescriptor() ([]byte, []int) { + return file_scala_meta_semanticdb_semanticdb_proto_rawDescGZIP(), []int{50, 0} +} + +type Diagnostic_Severity int32 + +const ( + Diagnostic_UNKNOWN_SEVERITY Diagnostic_Severity = 0 + Diagnostic_ERROR Diagnostic_Severity = 1 + Diagnostic_WARNING Diagnostic_Severity = 2 + Diagnostic_INFORMATION Diagnostic_Severity = 3 + Diagnostic_HINT Diagnostic_Severity = 4 +) + +// Enum value maps for Diagnostic_Severity. +var ( + Diagnostic_Severity_name = map[int32]string{ + 0: "UNKNOWN_SEVERITY", + 1: "ERROR", + 2: "WARNING", + 3: "INFORMATION", + 4: "HINT", + } + Diagnostic_Severity_value = map[string]int32{ + "UNKNOWN_SEVERITY": 0, + "ERROR": 1, + "WARNING": 2, + "INFORMATION": 3, + "HINT": 4, + } +) + +func (x Diagnostic_Severity) Enum() *Diagnostic_Severity { + p := new(Diagnostic_Severity) + *p = x + return p +} + +func (x Diagnostic_Severity) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Diagnostic_Severity) Descriptor() protoreflect.EnumDescriptor { + return file_scala_meta_semanticdb_semanticdb_proto_enumTypes[6].Descriptor() +} + +func (Diagnostic_Severity) Type() protoreflect.EnumType { + return &file_scala_meta_semanticdb_semanticdb_proto_enumTypes[6] +} + +func (x Diagnostic_Severity) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Diagnostic_Severity.Descriptor instead. +func (Diagnostic_Severity) EnumDescriptor() ([]byte, []int) { + return file_scala_meta_semanticdb_semanticdb_proto_rawDescGZIP(), []int{51, 0} +} + +type TextDocuments struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Documents []*TextDocument `protobuf:"bytes,1,rep,name=documents,proto3" json:"documents,omitempty"` +} + +func (x *TextDocuments) Reset() { + *x = TextDocuments{} + if protoimpl.UnsafeEnabled { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TextDocuments) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TextDocuments) ProtoMessage() {} + +func (x *TextDocuments) ProtoReflect() protoreflect.Message { + mi := &file_scala_meta_semanticdb_semanticdb_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 TextDocuments.ProtoReflect.Descriptor instead. +func (*TextDocuments) Descriptor() ([]byte, []int) { + return file_scala_meta_semanticdb_semanticdb_proto_rawDescGZIP(), []int{0} +} + +func (x *TextDocuments) GetDocuments() []*TextDocument { + if x != nil { + return x.Documents + } + return nil +} + +type TextDocument struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Schema Schema `protobuf:"varint,1,opt,name=schema,proto3,enum=scala.meta.semanticdb.Schema" json:"schema,omitempty"` + Uri string `protobuf:"bytes,2,opt,name=uri,proto3" json:"uri,omitempty"` + Text string `protobuf:"bytes,3,opt,name=text,proto3" json:"text,omitempty"` + Md5 string `protobuf:"bytes,11,opt,name=md5,proto3" json:"md5,omitempty"` + Language Language `protobuf:"varint,10,opt,name=language,proto3,enum=scala.meta.semanticdb.Language" json:"language,omitempty"` + Symbols []*SymbolInformation `protobuf:"bytes,5,rep,name=symbols,proto3" json:"symbols,omitempty"` + Occurrences []*SymbolOccurrence `protobuf:"bytes,6,rep,name=occurrences,proto3" json:"occurrences,omitempty"` + Diagnostics []*Diagnostic `protobuf:"bytes,7,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"` + Synthetics []*Synthetic `protobuf:"bytes,12,rep,name=synthetics,proto3" json:"synthetics,omitempty"` +} + +func (x *TextDocument) Reset() { + *x = TextDocument{} + if protoimpl.UnsafeEnabled { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TextDocument) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TextDocument) ProtoMessage() {} + +func (x *TextDocument) ProtoReflect() protoreflect.Message { + mi := &file_scala_meta_semanticdb_semanticdb_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 TextDocument.ProtoReflect.Descriptor instead. +func (*TextDocument) Descriptor() ([]byte, []int) { + return file_scala_meta_semanticdb_semanticdb_proto_rawDescGZIP(), []int{1} +} + +func (x *TextDocument) GetSchema() Schema { + if x != nil { + return x.Schema + } + return Schema_LEGACY +} + +func (x *TextDocument) GetUri() string { + if x != nil { + return x.Uri + } + return "" +} + +func (x *TextDocument) GetText() string { + if x != nil { + return x.Text + } + return "" +} + +func (x *TextDocument) GetMd5() string { + if x != nil { + return x.Md5 + } + return "" +} + +func (x *TextDocument) GetLanguage() Language { + if x != nil { + return x.Language + } + return Language_UNKNOWN_LANGUAGE +} + +func (x *TextDocument) GetSymbols() []*SymbolInformation { + if x != nil { + return x.Symbols + } + return nil +} + +func (x *TextDocument) GetOccurrences() []*SymbolOccurrence { + if x != nil { + return x.Occurrences + } + return nil +} + +func (x *TextDocument) GetDiagnostics() []*Diagnostic { + if x != nil { + return x.Diagnostics + } + return nil +} + +func (x *TextDocument) GetSynthetics() []*Synthetic { + if x != nil { + return x.Synthetics + } + return nil +} + +type Range struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + StartLine int32 `protobuf:"varint,1,opt,name=start_line,json=startLine,proto3" json:"start_line,omitempty"` + StartCharacter int32 `protobuf:"varint,2,opt,name=start_character,json=startCharacter,proto3" json:"start_character,omitempty"` + EndLine int32 `protobuf:"varint,3,opt,name=end_line,json=endLine,proto3" json:"end_line,omitempty"` + EndCharacter int32 `protobuf:"varint,4,opt,name=end_character,json=endCharacter,proto3" json:"end_character,omitempty"` +} + +func (x *Range) Reset() { + *x = Range{} + if protoimpl.UnsafeEnabled { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Range) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Range) ProtoMessage() {} + +func (x *Range) ProtoReflect() protoreflect.Message { + mi := &file_scala_meta_semanticdb_semanticdb_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 Range.ProtoReflect.Descriptor instead. +func (*Range) Descriptor() ([]byte, []int) { + return file_scala_meta_semanticdb_semanticdb_proto_rawDescGZIP(), []int{2} +} + +func (x *Range) GetStartLine() int32 { + if x != nil { + return x.StartLine + } + return 0 +} + +func (x *Range) GetStartCharacter() int32 { + if x != nil { + return x.StartCharacter + } + return 0 +} + +func (x *Range) GetEndLine() int32 { + if x != nil { + return x.EndLine + } + return 0 +} + +func (x *Range) GetEndCharacter() int32 { + if x != nil { + return x.EndCharacter + } + return 0 +} + +type Location struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Uri string `protobuf:"bytes,1,opt,name=uri,proto3" json:"uri,omitempty"` + Range *Range `protobuf:"bytes,2,opt,name=range,proto3" json:"range,omitempty"` +} + +func (x *Location) Reset() { + *x = Location{} + if protoimpl.UnsafeEnabled { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Location) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Location) ProtoMessage() {} + +func (x *Location) ProtoReflect() protoreflect.Message { + mi := &file_scala_meta_semanticdb_semanticdb_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 Location.ProtoReflect.Descriptor instead. +func (*Location) Descriptor() ([]byte, []int) { + return file_scala_meta_semanticdb_semanticdb_proto_rawDescGZIP(), []int{3} +} + +func (x *Location) GetUri() string { + if x != nil { + return x.Uri + } + return "" +} + +func (x *Location) GetRange() *Range { + if x != nil { + return x.Range + } + return nil +} + +type Scope struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Symlinks []string `protobuf:"bytes,1,rep,name=symlinks,proto3" json:"symlinks,omitempty"` + Hardlinks []*SymbolInformation `protobuf:"bytes,2,rep,name=hardlinks,proto3" json:"hardlinks,omitempty"` +} + +func (x *Scope) Reset() { + *x = Scope{} + if protoimpl.UnsafeEnabled { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Scope) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Scope) ProtoMessage() {} + +func (x *Scope) ProtoReflect() protoreflect.Message { + mi := &file_scala_meta_semanticdb_semanticdb_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 Scope.ProtoReflect.Descriptor instead. +func (*Scope) Descriptor() ([]byte, []int) { + return file_scala_meta_semanticdb_semanticdb_proto_rawDescGZIP(), []int{4} +} + +func (x *Scope) GetSymlinks() []string { + if x != nil { + return x.Symlinks + } + return nil +} + +func (x *Scope) GetHardlinks() []*SymbolInformation { + if x != nil { + return x.Hardlinks + } + return nil +} + +type Type struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to SealedValue: + // *Type_TypeRef + // *Type_SingleType + // *Type_ThisType + // *Type_SuperType + // *Type_ConstantType + // *Type_IntersectionType + // *Type_UnionType + // *Type_WithType + // *Type_StructuralType + // *Type_AnnotatedType + // *Type_ExistentialType + // *Type_UniversalType + // *Type_ByNameType + // *Type_RepeatedType + // *Type_MatchType + // *Type_LambdaType + SealedValue isType_SealedValue `protobuf_oneof:"sealed_value"` +} + +func (x *Type) Reset() { + *x = Type{} + if protoimpl.UnsafeEnabled { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Type) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Type) ProtoMessage() {} + +func (x *Type) ProtoReflect() protoreflect.Message { + mi := &file_scala_meta_semanticdb_semanticdb_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 Type.ProtoReflect.Descriptor instead. +func (*Type) Descriptor() ([]byte, []int) { + return file_scala_meta_semanticdb_semanticdb_proto_rawDescGZIP(), []int{5} +} + +func (m *Type) GetSealedValue() isType_SealedValue { + if m != nil { + return m.SealedValue + } + return nil +} + +func (x *Type) GetTypeRef() *TypeRef { + if x, ok := x.GetSealedValue().(*Type_TypeRef); ok { + return x.TypeRef + } + return nil +} + +func (x *Type) GetSingleType() *SingleType { + if x, ok := x.GetSealedValue().(*Type_SingleType); ok { + return x.SingleType + } + return nil +} + +func (x *Type) GetThisType() *ThisType { + if x, ok := x.GetSealedValue().(*Type_ThisType); ok { + return x.ThisType + } + return nil +} + +func (x *Type) GetSuperType() *SuperType { + if x, ok := x.GetSealedValue().(*Type_SuperType); ok { + return x.SuperType + } + return nil +} + +func (x *Type) GetConstantType() *ConstantType { + if x, ok := x.GetSealedValue().(*Type_ConstantType); ok { + return x.ConstantType + } + return nil +} + +func (x *Type) GetIntersectionType() *IntersectionType { + if x, ok := x.GetSealedValue().(*Type_IntersectionType); ok { + return x.IntersectionType + } + return nil +} + +func (x *Type) GetUnionType() *UnionType { + if x, ok := x.GetSealedValue().(*Type_UnionType); ok { + return x.UnionType + } + return nil +} + +func (x *Type) GetWithType() *WithType { + if x, ok := x.GetSealedValue().(*Type_WithType); ok { + return x.WithType + } + return nil +} + +func (x *Type) GetStructuralType() *StructuralType { + if x, ok := x.GetSealedValue().(*Type_StructuralType); ok { + return x.StructuralType + } + return nil +} + +func (x *Type) GetAnnotatedType() *AnnotatedType { + if x, ok := x.GetSealedValue().(*Type_AnnotatedType); ok { + return x.AnnotatedType + } + return nil +} + +func (x *Type) GetExistentialType() *ExistentialType { + if x, ok := x.GetSealedValue().(*Type_ExistentialType); ok { + return x.ExistentialType + } + return nil +} + +func (x *Type) GetUniversalType() *UniversalType { + if x, ok := x.GetSealedValue().(*Type_UniversalType); ok { + return x.UniversalType + } + return nil +} + +func (x *Type) GetByNameType() *ByNameType { + if x, ok := x.GetSealedValue().(*Type_ByNameType); ok { + return x.ByNameType + } + return nil +} + +func (x *Type) GetRepeatedType() *RepeatedType { + if x, ok := x.GetSealedValue().(*Type_RepeatedType); ok { + return x.RepeatedType + } + return nil +} + +func (x *Type) GetMatchType() *MatchType { + if x, ok := x.GetSealedValue().(*Type_MatchType); ok { + return x.MatchType + } + return nil +} + +func (x *Type) GetLambdaType() *LambdaType { + if x, ok := x.GetSealedValue().(*Type_LambdaType); ok { + return x.LambdaType + } + return nil +} + +type isType_SealedValue interface { + isType_SealedValue() +} + +type Type_TypeRef struct { + TypeRef *TypeRef `protobuf:"bytes,2,opt,name=type_ref,json=typeRef,proto3,oneof"` +} + +type Type_SingleType struct { + SingleType *SingleType `protobuf:"bytes,20,opt,name=single_type,json=singleType,proto3,oneof"` +} + +type Type_ThisType struct { + ThisType *ThisType `protobuf:"bytes,21,opt,name=this_type,json=thisType,proto3,oneof"` +} + +type Type_SuperType struct { + SuperType *SuperType `protobuf:"bytes,22,opt,name=super_type,json=superType,proto3,oneof"` +} + +type Type_ConstantType struct { + ConstantType *ConstantType `protobuf:"bytes,23,opt,name=constant_type,json=constantType,proto3,oneof"` +} + +type Type_IntersectionType struct { + IntersectionType *IntersectionType `protobuf:"bytes,17,opt,name=intersection_type,json=intersectionType,proto3,oneof"` +} + +type Type_UnionType struct { + UnionType *UnionType `protobuf:"bytes,18,opt,name=union_type,json=unionType,proto3,oneof"` +} + +type Type_WithType struct { + WithType *WithType `protobuf:"bytes,19,opt,name=with_type,json=withType,proto3,oneof"` +} + +type Type_StructuralType struct { + StructuralType *StructuralType `protobuf:"bytes,7,opt,name=structural_type,json=structuralType,proto3,oneof"` +} + +type Type_AnnotatedType struct { + AnnotatedType *AnnotatedType `protobuf:"bytes,8,opt,name=annotated_type,json=annotatedType,proto3,oneof"` +} + +type Type_ExistentialType struct { + ExistentialType *ExistentialType `protobuf:"bytes,9,opt,name=existential_type,json=existentialType,proto3,oneof"` +} + +type Type_UniversalType struct { + UniversalType *UniversalType `protobuf:"bytes,10,opt,name=universal_type,json=universalType,proto3,oneof"` +} + +type Type_ByNameType struct { + ByNameType *ByNameType `protobuf:"bytes,13,opt,name=by_name_type,json=byNameType,proto3,oneof"` +} + +type Type_RepeatedType struct { + RepeatedType *RepeatedType `protobuf:"bytes,14,opt,name=repeated_type,json=repeatedType,proto3,oneof"` +} + +type Type_MatchType struct { + MatchType *MatchType `protobuf:"bytes,25,opt,name=match_type,json=matchType,proto3,oneof"` +} + +type Type_LambdaType struct { + LambdaType *LambdaType `protobuf:"bytes,26,opt,name=lambda_type,json=lambdaType,proto3,oneof"` +} + +func (*Type_TypeRef) isType_SealedValue() {} + +func (*Type_SingleType) isType_SealedValue() {} + +func (*Type_ThisType) isType_SealedValue() {} + +func (*Type_SuperType) isType_SealedValue() {} + +func (*Type_ConstantType) isType_SealedValue() {} + +func (*Type_IntersectionType) isType_SealedValue() {} + +func (*Type_UnionType) isType_SealedValue() {} + +func (*Type_WithType) isType_SealedValue() {} + +func (*Type_StructuralType) isType_SealedValue() {} + +func (*Type_AnnotatedType) isType_SealedValue() {} + +func (*Type_ExistentialType) isType_SealedValue() {} + +func (*Type_UniversalType) isType_SealedValue() {} + +func (*Type_ByNameType) isType_SealedValue() {} + +func (*Type_RepeatedType) isType_SealedValue() {} + +func (*Type_MatchType) isType_SealedValue() {} + +func (*Type_LambdaType) isType_SealedValue() {} + +type LambdaType struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Parameters *Scope `protobuf:"bytes,1,opt,name=parameters,proto3" json:"parameters,omitempty"` + ReturnType *Type `protobuf:"bytes,2,opt,name=return_type,json=returnType,proto3" json:"return_type,omitempty"` +} + +func (x *LambdaType) Reset() { + *x = LambdaType{} + if protoimpl.UnsafeEnabled { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LambdaType) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LambdaType) ProtoMessage() {} + +func (x *LambdaType) ProtoReflect() protoreflect.Message { + mi := &file_scala_meta_semanticdb_semanticdb_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 LambdaType.ProtoReflect.Descriptor instead. +func (*LambdaType) Descriptor() ([]byte, []int) { + return file_scala_meta_semanticdb_semanticdb_proto_rawDescGZIP(), []int{6} +} + +func (x *LambdaType) GetParameters() *Scope { + if x != nil { + return x.Parameters + } + return nil +} + +func (x *LambdaType) GetReturnType() *Type { + if x != nil { + return x.ReturnType + } + return nil +} + +type TypeRef struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Prefix *Type `protobuf:"bytes,1,opt,name=prefix,proto3" json:"prefix,omitempty"` + Symbol string `protobuf:"bytes,2,opt,name=symbol,proto3" json:"symbol,omitempty"` + TypeArguments []*Type `protobuf:"bytes,3,rep,name=type_arguments,json=typeArguments,proto3" json:"type_arguments,omitempty"` +} + +func (x *TypeRef) Reset() { + *x = TypeRef{} + if protoimpl.UnsafeEnabled { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TypeRef) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TypeRef) ProtoMessage() {} + +func (x *TypeRef) ProtoReflect() protoreflect.Message { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[7] + 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 TypeRef.ProtoReflect.Descriptor instead. +func (*TypeRef) Descriptor() ([]byte, []int) { + return file_scala_meta_semanticdb_semanticdb_proto_rawDescGZIP(), []int{7} +} + +func (x *TypeRef) GetPrefix() *Type { + if x != nil { + return x.Prefix + } + return nil +} + +func (x *TypeRef) GetSymbol() string { + if x != nil { + return x.Symbol + } + return "" +} + +func (x *TypeRef) GetTypeArguments() []*Type { + if x != nil { + return x.TypeArguments + } + return nil +} + +type SingleType struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Prefix *Type `protobuf:"bytes,1,opt,name=prefix,proto3" json:"prefix,omitempty"` + Symbol string `protobuf:"bytes,2,opt,name=symbol,proto3" json:"symbol,omitempty"` +} + +func (x *SingleType) Reset() { + *x = SingleType{} + if protoimpl.UnsafeEnabled { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SingleType) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SingleType) ProtoMessage() {} + +func (x *SingleType) ProtoReflect() protoreflect.Message { + mi := &file_scala_meta_semanticdb_semanticdb_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 SingleType.ProtoReflect.Descriptor instead. +func (*SingleType) Descriptor() ([]byte, []int) { + return file_scala_meta_semanticdb_semanticdb_proto_rawDescGZIP(), []int{8} +} + +func (x *SingleType) GetPrefix() *Type { + if x != nil { + return x.Prefix + } + return nil +} + +func (x *SingleType) GetSymbol() string { + if x != nil { + return x.Symbol + } + return "" +} + +type ThisType struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Symbol string `protobuf:"bytes,1,opt,name=symbol,proto3" json:"symbol,omitempty"` +} + +func (x *ThisType) Reset() { + *x = ThisType{} + if protoimpl.UnsafeEnabled { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ThisType) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ThisType) ProtoMessage() {} + +func (x *ThisType) ProtoReflect() protoreflect.Message { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[9] + 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 ThisType.ProtoReflect.Descriptor instead. +func (*ThisType) Descriptor() ([]byte, []int) { + return file_scala_meta_semanticdb_semanticdb_proto_rawDescGZIP(), []int{9} +} + +func (x *ThisType) GetSymbol() string { + if x != nil { + return x.Symbol + } + return "" +} + +type SuperType struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Prefix *Type `protobuf:"bytes,1,opt,name=prefix,proto3" json:"prefix,omitempty"` + Symbol string `protobuf:"bytes,2,opt,name=symbol,proto3" json:"symbol,omitempty"` +} + +func (x *SuperType) Reset() { + *x = SuperType{} + if protoimpl.UnsafeEnabled { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SuperType) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SuperType) ProtoMessage() {} + +func (x *SuperType) ProtoReflect() protoreflect.Message { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[10] + 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 SuperType.ProtoReflect.Descriptor instead. +func (*SuperType) Descriptor() ([]byte, []int) { + return file_scala_meta_semanticdb_semanticdb_proto_rawDescGZIP(), []int{10} +} + +func (x *SuperType) GetPrefix() *Type { + if x != nil { + return x.Prefix + } + return nil +} + +func (x *SuperType) GetSymbol() string { + if x != nil { + return x.Symbol + } + return "" +} + +type ConstantType struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Constant *Constant `protobuf:"bytes,1,opt,name=constant,proto3" json:"constant,omitempty"` +} + +func (x *ConstantType) Reset() { + *x = ConstantType{} + if protoimpl.UnsafeEnabled { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ConstantType) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ConstantType) ProtoMessage() {} + +func (x *ConstantType) ProtoReflect() protoreflect.Message { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[11] + 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 ConstantType.ProtoReflect.Descriptor instead. +func (*ConstantType) Descriptor() ([]byte, []int) { + return file_scala_meta_semanticdb_semanticdb_proto_rawDescGZIP(), []int{11} +} + +func (x *ConstantType) GetConstant() *Constant { + if x != nil { + return x.Constant + } + return nil +} + +type IntersectionType struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Types []*Type `protobuf:"bytes,1,rep,name=types,proto3" json:"types,omitempty"` +} + +func (x *IntersectionType) Reset() { + *x = IntersectionType{} + if protoimpl.UnsafeEnabled { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *IntersectionType) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IntersectionType) ProtoMessage() {} + +func (x *IntersectionType) ProtoReflect() protoreflect.Message { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[12] + 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 IntersectionType.ProtoReflect.Descriptor instead. +func (*IntersectionType) Descriptor() ([]byte, []int) { + return file_scala_meta_semanticdb_semanticdb_proto_rawDescGZIP(), []int{12} +} + +func (x *IntersectionType) GetTypes() []*Type { + if x != nil { + return x.Types + } + return nil +} + +type UnionType struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Types []*Type `protobuf:"bytes,1,rep,name=types,proto3" json:"types,omitempty"` +} + +func (x *UnionType) Reset() { + *x = UnionType{} + if protoimpl.UnsafeEnabled { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UnionType) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UnionType) ProtoMessage() {} + +func (x *UnionType) ProtoReflect() protoreflect.Message { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[13] + 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 UnionType.ProtoReflect.Descriptor instead. +func (*UnionType) Descriptor() ([]byte, []int) { + return file_scala_meta_semanticdb_semanticdb_proto_rawDescGZIP(), []int{13} +} + +func (x *UnionType) GetTypes() []*Type { + if x != nil { + return x.Types + } + return nil +} + +type WithType struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Types []*Type `protobuf:"bytes,1,rep,name=types,proto3" json:"types,omitempty"` +} + +func (x *WithType) Reset() { + *x = WithType{} + if protoimpl.UnsafeEnabled { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WithType) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WithType) ProtoMessage() {} + +func (x *WithType) ProtoReflect() protoreflect.Message { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[14] + 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 WithType.ProtoReflect.Descriptor instead. +func (*WithType) Descriptor() ([]byte, []int) { + return file_scala_meta_semanticdb_semanticdb_proto_rawDescGZIP(), []int{14} +} + +func (x *WithType) GetTypes() []*Type { + if x != nil { + return x.Types + } + return nil +} + +type StructuralType struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Tpe *Type `protobuf:"bytes,4,opt,name=tpe,proto3" json:"tpe,omitempty"` + Declarations *Scope `protobuf:"bytes,5,opt,name=declarations,proto3" json:"declarations,omitempty"` +} + +func (x *StructuralType) Reset() { + *x = StructuralType{} + if protoimpl.UnsafeEnabled { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StructuralType) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StructuralType) ProtoMessage() {} + +func (x *StructuralType) ProtoReflect() protoreflect.Message { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[15] + 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 StructuralType.ProtoReflect.Descriptor instead. +func (*StructuralType) Descriptor() ([]byte, []int) { + return file_scala_meta_semanticdb_semanticdb_proto_rawDescGZIP(), []int{15} +} + +func (x *StructuralType) GetTpe() *Type { + if x != nil { + return x.Tpe + } + return nil +} + +func (x *StructuralType) GetDeclarations() *Scope { + if x != nil { + return x.Declarations + } + return nil +} + +type AnnotatedType struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Annotations []*Annotation `protobuf:"bytes,3,rep,name=annotations,proto3" json:"annotations,omitempty"` + Tpe *Type `protobuf:"bytes,1,opt,name=tpe,proto3" json:"tpe,omitempty"` +} + +func (x *AnnotatedType) Reset() { + *x = AnnotatedType{} + if protoimpl.UnsafeEnabled { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AnnotatedType) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AnnotatedType) ProtoMessage() {} + +func (x *AnnotatedType) ProtoReflect() protoreflect.Message { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[16] + 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 AnnotatedType.ProtoReflect.Descriptor instead. +func (*AnnotatedType) Descriptor() ([]byte, []int) { + return file_scala_meta_semanticdb_semanticdb_proto_rawDescGZIP(), []int{16} +} + +func (x *AnnotatedType) GetAnnotations() []*Annotation { + if x != nil { + return x.Annotations + } + return nil +} + +func (x *AnnotatedType) GetTpe() *Type { + if x != nil { + return x.Tpe + } + return nil +} + +type ExistentialType struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Tpe *Type `protobuf:"bytes,1,opt,name=tpe,proto3" json:"tpe,omitempty"` + Declarations *Scope `protobuf:"bytes,3,opt,name=declarations,proto3" json:"declarations,omitempty"` +} + +func (x *ExistentialType) Reset() { + *x = ExistentialType{} + if protoimpl.UnsafeEnabled { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExistentialType) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExistentialType) ProtoMessage() {} + +func (x *ExistentialType) ProtoReflect() protoreflect.Message { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[17] + 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 ExistentialType.ProtoReflect.Descriptor instead. +func (*ExistentialType) Descriptor() ([]byte, []int) { + return file_scala_meta_semanticdb_semanticdb_proto_rawDescGZIP(), []int{17} +} + +func (x *ExistentialType) GetTpe() *Type { + if x != nil { + return x.Tpe + } + return nil +} + +func (x *ExistentialType) GetDeclarations() *Scope { + if x != nil { + return x.Declarations + } + return nil +} + +type UniversalType struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TypeParameters *Scope `protobuf:"bytes,3,opt,name=type_parameters,json=typeParameters,proto3" json:"type_parameters,omitempty"` + Tpe *Type `protobuf:"bytes,2,opt,name=tpe,proto3" json:"tpe,omitempty"` +} + +func (x *UniversalType) Reset() { + *x = UniversalType{} + if protoimpl.UnsafeEnabled { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UniversalType) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UniversalType) ProtoMessage() {} + +func (x *UniversalType) ProtoReflect() protoreflect.Message { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[18] + 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 UniversalType.ProtoReflect.Descriptor instead. +func (*UniversalType) Descriptor() ([]byte, []int) { + return file_scala_meta_semanticdb_semanticdb_proto_rawDescGZIP(), []int{18} +} + +func (x *UniversalType) GetTypeParameters() *Scope { + if x != nil { + return x.TypeParameters + } + return nil +} + +func (x *UniversalType) GetTpe() *Type { + if x != nil { + return x.Tpe + } + return nil +} + +type ByNameType struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Tpe *Type `protobuf:"bytes,1,opt,name=tpe,proto3" json:"tpe,omitempty"` +} + +func (x *ByNameType) Reset() { + *x = ByNameType{} + if protoimpl.UnsafeEnabled { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ByNameType) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ByNameType) ProtoMessage() {} + +func (x *ByNameType) ProtoReflect() protoreflect.Message { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[19] + 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 ByNameType.ProtoReflect.Descriptor instead. +func (*ByNameType) Descriptor() ([]byte, []int) { + return file_scala_meta_semanticdb_semanticdb_proto_rawDescGZIP(), []int{19} +} + +func (x *ByNameType) GetTpe() *Type { + if x != nil { + return x.Tpe + } + return nil +} + +type RepeatedType struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Tpe *Type `protobuf:"bytes,1,opt,name=tpe,proto3" json:"tpe,omitempty"` +} + +func (x *RepeatedType) Reset() { + *x = RepeatedType{} + if protoimpl.UnsafeEnabled { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RepeatedType) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RepeatedType) ProtoMessage() {} + +func (x *RepeatedType) ProtoReflect() protoreflect.Message { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[20] + 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 RepeatedType.ProtoReflect.Descriptor instead. +func (*RepeatedType) Descriptor() ([]byte, []int) { + return file_scala_meta_semanticdb_semanticdb_proto_rawDescGZIP(), []int{20} +} + +func (x *RepeatedType) GetTpe() *Type { + if x != nil { + return x.Tpe + } + return nil +} + +type MatchType struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Scrutinee *Type `protobuf:"bytes,1,opt,name=scrutinee,proto3" json:"scrutinee,omitempty"` + Cases []*MatchType_CaseType `protobuf:"bytes,2,rep,name=cases,proto3" json:"cases,omitempty"` +} + +func (x *MatchType) Reset() { + *x = MatchType{} + if protoimpl.UnsafeEnabled { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MatchType) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MatchType) ProtoMessage() {} + +func (x *MatchType) ProtoReflect() protoreflect.Message { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[21] + 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 MatchType.ProtoReflect.Descriptor instead. +func (*MatchType) Descriptor() ([]byte, []int) { + return file_scala_meta_semanticdb_semanticdb_proto_rawDescGZIP(), []int{21} +} + +func (x *MatchType) GetScrutinee() *Type { + if x != nil { + return x.Scrutinee + } + return nil +} + +func (x *MatchType) GetCases() []*MatchType_CaseType { + if x != nil { + return x.Cases + } + return nil +} + +type Constant struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to SealedValue: + // *Constant_UnitConstant + // *Constant_BooleanConstant + // *Constant_ByteConstant + // *Constant_ShortConstant + // *Constant_CharConstant + // *Constant_IntConstant + // *Constant_LongConstant + // *Constant_FloatConstant + // *Constant_DoubleConstant + // *Constant_StringConstant + // *Constant_NullConstant + SealedValue isConstant_SealedValue `protobuf_oneof:"sealed_value"` +} + +func (x *Constant) Reset() { + *x = Constant{} + if protoimpl.UnsafeEnabled { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Constant) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Constant) ProtoMessage() {} + +func (x *Constant) ProtoReflect() protoreflect.Message { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[22] + 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 Constant.ProtoReflect.Descriptor instead. +func (*Constant) Descriptor() ([]byte, []int) { + return file_scala_meta_semanticdb_semanticdb_proto_rawDescGZIP(), []int{22} +} + +func (m *Constant) GetSealedValue() isConstant_SealedValue { + if m != nil { + return m.SealedValue + } + return nil +} + +func (x *Constant) GetUnitConstant() *UnitConstant { + if x, ok := x.GetSealedValue().(*Constant_UnitConstant); ok { + return x.UnitConstant + } + return nil +} + +func (x *Constant) GetBooleanConstant() *BooleanConstant { + if x, ok := x.GetSealedValue().(*Constant_BooleanConstant); ok { + return x.BooleanConstant + } + return nil +} + +func (x *Constant) GetByteConstant() *ByteConstant { + if x, ok := x.GetSealedValue().(*Constant_ByteConstant); ok { + return x.ByteConstant + } + return nil +} + +func (x *Constant) GetShortConstant() *ShortConstant { + if x, ok := x.GetSealedValue().(*Constant_ShortConstant); ok { + return x.ShortConstant + } + return nil +} + +func (x *Constant) GetCharConstant() *CharConstant { + if x, ok := x.GetSealedValue().(*Constant_CharConstant); ok { + return x.CharConstant + } + return nil +} + +func (x *Constant) GetIntConstant() *IntConstant { + if x, ok := x.GetSealedValue().(*Constant_IntConstant); ok { + return x.IntConstant + } + return nil +} + +func (x *Constant) GetLongConstant() *LongConstant { + if x, ok := x.GetSealedValue().(*Constant_LongConstant); ok { + return x.LongConstant + } + return nil +} + +func (x *Constant) GetFloatConstant() *FloatConstant { + if x, ok := x.GetSealedValue().(*Constant_FloatConstant); ok { + return x.FloatConstant + } + return nil +} + +func (x *Constant) GetDoubleConstant() *DoubleConstant { + if x, ok := x.GetSealedValue().(*Constant_DoubleConstant); ok { + return x.DoubleConstant + } + return nil +} + +func (x *Constant) GetStringConstant() *StringConstant { + if x, ok := x.GetSealedValue().(*Constant_StringConstant); ok { + return x.StringConstant + } + return nil +} + +func (x *Constant) GetNullConstant() *NullConstant { + if x, ok := x.GetSealedValue().(*Constant_NullConstant); ok { + return x.NullConstant + } + return nil +} + +type isConstant_SealedValue interface { + isConstant_SealedValue() +} + +type Constant_UnitConstant struct { + UnitConstant *UnitConstant `protobuf:"bytes,1,opt,name=unit_constant,json=unitConstant,proto3,oneof"` +} + +type Constant_BooleanConstant struct { + BooleanConstant *BooleanConstant `protobuf:"bytes,2,opt,name=boolean_constant,json=booleanConstant,proto3,oneof"` +} + +type Constant_ByteConstant struct { + ByteConstant *ByteConstant `protobuf:"bytes,3,opt,name=byte_constant,json=byteConstant,proto3,oneof"` +} + +type Constant_ShortConstant struct { + ShortConstant *ShortConstant `protobuf:"bytes,4,opt,name=short_constant,json=shortConstant,proto3,oneof"` +} + +type Constant_CharConstant struct { + CharConstant *CharConstant `protobuf:"bytes,5,opt,name=char_constant,json=charConstant,proto3,oneof"` +} + +type Constant_IntConstant struct { + IntConstant *IntConstant `protobuf:"bytes,6,opt,name=int_constant,json=intConstant,proto3,oneof"` +} + +type Constant_LongConstant struct { + LongConstant *LongConstant `protobuf:"bytes,7,opt,name=long_constant,json=longConstant,proto3,oneof"` +} + +type Constant_FloatConstant struct { + FloatConstant *FloatConstant `protobuf:"bytes,8,opt,name=float_constant,json=floatConstant,proto3,oneof"` +} + +type Constant_DoubleConstant struct { + DoubleConstant *DoubleConstant `protobuf:"bytes,9,opt,name=double_constant,json=doubleConstant,proto3,oneof"` +} + +type Constant_StringConstant struct { + StringConstant *StringConstant `protobuf:"bytes,10,opt,name=string_constant,json=stringConstant,proto3,oneof"` +} + +type Constant_NullConstant struct { + NullConstant *NullConstant `protobuf:"bytes,11,opt,name=null_constant,json=nullConstant,proto3,oneof"` +} + +func (*Constant_UnitConstant) isConstant_SealedValue() {} + +func (*Constant_BooleanConstant) isConstant_SealedValue() {} + +func (*Constant_ByteConstant) isConstant_SealedValue() {} + +func (*Constant_ShortConstant) isConstant_SealedValue() {} + +func (*Constant_CharConstant) isConstant_SealedValue() {} + +func (*Constant_IntConstant) isConstant_SealedValue() {} + +func (*Constant_LongConstant) isConstant_SealedValue() {} + +func (*Constant_FloatConstant) isConstant_SealedValue() {} + +func (*Constant_DoubleConstant) isConstant_SealedValue() {} + +func (*Constant_StringConstant) isConstant_SealedValue() {} + +func (*Constant_NullConstant) isConstant_SealedValue() {} + +type UnitConstant struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *UnitConstant) Reset() { + *x = UnitConstant{} + if protoimpl.UnsafeEnabled { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UnitConstant) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UnitConstant) ProtoMessage() {} + +func (x *UnitConstant) ProtoReflect() protoreflect.Message { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[23] + 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 UnitConstant.ProtoReflect.Descriptor instead. +func (*UnitConstant) Descriptor() ([]byte, []int) { + return file_scala_meta_semanticdb_semanticdb_proto_rawDescGZIP(), []int{23} +} + +type BooleanConstant struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Value bool `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` +} + +func (x *BooleanConstant) Reset() { + *x = BooleanConstant{} + if protoimpl.UnsafeEnabled { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BooleanConstant) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BooleanConstant) ProtoMessage() {} + +func (x *BooleanConstant) ProtoReflect() protoreflect.Message { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[24] + 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 BooleanConstant.ProtoReflect.Descriptor instead. +func (*BooleanConstant) Descriptor() ([]byte, []int) { + return file_scala_meta_semanticdb_semanticdb_proto_rawDescGZIP(), []int{24} +} + +func (x *BooleanConstant) GetValue() bool { + if x != nil { + return x.Value + } + return false +} + +type ByteConstant struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Value int32 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` +} + +func (x *ByteConstant) Reset() { + *x = ByteConstant{} + if protoimpl.UnsafeEnabled { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ByteConstant) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ByteConstant) ProtoMessage() {} + +func (x *ByteConstant) ProtoReflect() protoreflect.Message { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[25] + 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 ByteConstant.ProtoReflect.Descriptor instead. +func (*ByteConstant) Descriptor() ([]byte, []int) { + return file_scala_meta_semanticdb_semanticdb_proto_rawDescGZIP(), []int{25} +} + +func (x *ByteConstant) GetValue() int32 { + if x != nil { + return x.Value + } + return 0 +} + +type ShortConstant struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Value int32 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` +} + +func (x *ShortConstant) Reset() { + *x = ShortConstant{} + if protoimpl.UnsafeEnabled { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ShortConstant) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ShortConstant) ProtoMessage() {} + +func (x *ShortConstant) ProtoReflect() protoreflect.Message { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[26] + 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 ShortConstant.ProtoReflect.Descriptor instead. +func (*ShortConstant) Descriptor() ([]byte, []int) { + return file_scala_meta_semanticdb_semanticdb_proto_rawDescGZIP(), []int{26} +} + +func (x *ShortConstant) GetValue() int32 { + if x != nil { + return x.Value + } + return 0 +} + +type CharConstant struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Value int32 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` +} + +func (x *CharConstant) Reset() { + *x = CharConstant{} + if protoimpl.UnsafeEnabled { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CharConstant) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CharConstant) ProtoMessage() {} + +func (x *CharConstant) ProtoReflect() protoreflect.Message { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[27] + 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 CharConstant.ProtoReflect.Descriptor instead. +func (*CharConstant) Descriptor() ([]byte, []int) { + return file_scala_meta_semanticdb_semanticdb_proto_rawDescGZIP(), []int{27} +} + +func (x *CharConstant) GetValue() int32 { + if x != nil { + return x.Value + } + return 0 +} + +type IntConstant struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Value int32 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` +} + +func (x *IntConstant) Reset() { + *x = IntConstant{} + if protoimpl.UnsafeEnabled { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *IntConstant) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IntConstant) ProtoMessage() {} + +func (x *IntConstant) ProtoReflect() protoreflect.Message { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[28] + 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 IntConstant.ProtoReflect.Descriptor instead. +func (*IntConstant) Descriptor() ([]byte, []int) { + return file_scala_meta_semanticdb_semanticdb_proto_rawDescGZIP(), []int{28} +} + +func (x *IntConstant) GetValue() int32 { + if x != nil { + return x.Value + } + return 0 +} + +type LongConstant struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Value int64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` +} + +func (x *LongConstant) Reset() { + *x = LongConstant{} + if protoimpl.UnsafeEnabled { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LongConstant) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LongConstant) ProtoMessage() {} + +func (x *LongConstant) ProtoReflect() protoreflect.Message { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[29] + 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 LongConstant.ProtoReflect.Descriptor instead. +func (*LongConstant) Descriptor() ([]byte, []int) { + return file_scala_meta_semanticdb_semanticdb_proto_rawDescGZIP(), []int{29} +} + +func (x *LongConstant) GetValue() int64 { + if x != nil { + return x.Value + } + return 0 +} + +type FloatConstant struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Value float32 `protobuf:"fixed32,1,opt,name=value,proto3" json:"value,omitempty"` +} + +func (x *FloatConstant) Reset() { + *x = FloatConstant{} + if protoimpl.UnsafeEnabled { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FloatConstant) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FloatConstant) ProtoMessage() {} + +func (x *FloatConstant) ProtoReflect() protoreflect.Message { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[30] + 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 FloatConstant.ProtoReflect.Descriptor instead. +func (*FloatConstant) Descriptor() ([]byte, []int) { + return file_scala_meta_semanticdb_semanticdb_proto_rawDescGZIP(), []int{30} +} + +func (x *FloatConstant) GetValue() float32 { + if x != nil { + return x.Value + } + return 0 +} + +type DoubleConstant struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Value float64 `protobuf:"fixed64,1,opt,name=value,proto3" json:"value,omitempty"` +} + +func (x *DoubleConstant) Reset() { + *x = DoubleConstant{} + if protoimpl.UnsafeEnabled { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DoubleConstant) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DoubleConstant) ProtoMessage() {} + +func (x *DoubleConstant) ProtoReflect() protoreflect.Message { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[31] + 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 DoubleConstant.ProtoReflect.Descriptor instead. +func (*DoubleConstant) Descriptor() ([]byte, []int) { + return file_scala_meta_semanticdb_semanticdb_proto_rawDescGZIP(), []int{31} +} + +func (x *DoubleConstant) GetValue() float64 { + if x != nil { + return x.Value + } + return 0 +} + +type StringConstant struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` +} + +func (x *StringConstant) Reset() { + *x = StringConstant{} + if protoimpl.UnsafeEnabled { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StringConstant) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StringConstant) ProtoMessage() {} + +func (x *StringConstant) ProtoReflect() protoreflect.Message { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[32] + 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 StringConstant.ProtoReflect.Descriptor instead. +func (*StringConstant) Descriptor() ([]byte, []int) { + return file_scala_meta_semanticdb_semanticdb_proto_rawDescGZIP(), []int{32} +} + +func (x *StringConstant) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + +type NullConstant struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *NullConstant) Reset() { + *x = NullConstant{} + if protoimpl.UnsafeEnabled { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NullConstant) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NullConstant) ProtoMessage() {} + +func (x *NullConstant) ProtoReflect() protoreflect.Message { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[33] + 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 NullConstant.ProtoReflect.Descriptor instead. +func (*NullConstant) Descriptor() ([]byte, []int) { + return file_scala_meta_semanticdb_semanticdb_proto_rawDescGZIP(), []int{33} +} + +type Signature struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to SealedValue: + // *Signature_ClassSignature + // *Signature_MethodSignature + // *Signature_TypeSignature + // *Signature_ValueSignature + SealedValue isSignature_SealedValue `protobuf_oneof:"sealed_value"` +} + +func (x *Signature) Reset() { + *x = Signature{} + if protoimpl.UnsafeEnabled { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Signature) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Signature) ProtoMessage() {} + +func (x *Signature) ProtoReflect() protoreflect.Message { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[34] + 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 Signature.ProtoReflect.Descriptor instead. +func (*Signature) Descriptor() ([]byte, []int) { + return file_scala_meta_semanticdb_semanticdb_proto_rawDescGZIP(), []int{34} +} + +func (m *Signature) GetSealedValue() isSignature_SealedValue { + if m != nil { + return m.SealedValue + } + return nil +} + +func (x *Signature) GetClassSignature() *ClassSignature { + if x, ok := x.GetSealedValue().(*Signature_ClassSignature); ok { + return x.ClassSignature + } + return nil +} + +func (x *Signature) GetMethodSignature() *MethodSignature { + if x, ok := x.GetSealedValue().(*Signature_MethodSignature); ok { + return x.MethodSignature + } + return nil +} + +func (x *Signature) GetTypeSignature() *TypeSignature { + if x, ok := x.GetSealedValue().(*Signature_TypeSignature); ok { + return x.TypeSignature + } + return nil +} + +func (x *Signature) GetValueSignature() *ValueSignature { + if x, ok := x.GetSealedValue().(*Signature_ValueSignature); ok { + return x.ValueSignature + } + return nil +} + +type isSignature_SealedValue interface { + isSignature_SealedValue() +} + +type Signature_ClassSignature struct { + ClassSignature *ClassSignature `protobuf:"bytes,1,opt,name=class_signature,json=classSignature,proto3,oneof"` +} + +type Signature_MethodSignature struct { + MethodSignature *MethodSignature `protobuf:"bytes,2,opt,name=method_signature,json=methodSignature,proto3,oneof"` +} + +type Signature_TypeSignature struct { + TypeSignature *TypeSignature `protobuf:"bytes,3,opt,name=type_signature,json=typeSignature,proto3,oneof"` +} + +type Signature_ValueSignature struct { + ValueSignature *ValueSignature `protobuf:"bytes,4,opt,name=value_signature,json=valueSignature,proto3,oneof"` +} + +func (*Signature_ClassSignature) isSignature_SealedValue() {} + +func (*Signature_MethodSignature) isSignature_SealedValue() {} + +func (*Signature_TypeSignature) isSignature_SealedValue() {} + +func (*Signature_ValueSignature) isSignature_SealedValue() {} + +type ClassSignature struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TypeParameters *Scope `protobuf:"bytes,1,opt,name=type_parameters,json=typeParameters,proto3" json:"type_parameters,omitempty"` + Parents []*Type `protobuf:"bytes,2,rep,name=parents,proto3" json:"parents,omitempty"` + Self *Type `protobuf:"bytes,3,opt,name=self,proto3" json:"self,omitempty"` + Declarations *Scope `protobuf:"bytes,4,opt,name=declarations,proto3" json:"declarations,omitempty"` +} + +func (x *ClassSignature) Reset() { + *x = ClassSignature{} + if protoimpl.UnsafeEnabled { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ClassSignature) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClassSignature) ProtoMessage() {} + +func (x *ClassSignature) ProtoReflect() protoreflect.Message { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[35] + 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 ClassSignature.ProtoReflect.Descriptor instead. +func (*ClassSignature) Descriptor() ([]byte, []int) { + return file_scala_meta_semanticdb_semanticdb_proto_rawDescGZIP(), []int{35} +} + +func (x *ClassSignature) GetTypeParameters() *Scope { + if x != nil { + return x.TypeParameters + } + return nil +} + +func (x *ClassSignature) GetParents() []*Type { + if x != nil { + return x.Parents + } + return nil +} + +func (x *ClassSignature) GetSelf() *Type { + if x != nil { + return x.Self + } + return nil +} + +func (x *ClassSignature) GetDeclarations() *Scope { + if x != nil { + return x.Declarations + } + return nil +} + +type MethodSignature struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TypeParameters *Scope `protobuf:"bytes,1,opt,name=type_parameters,json=typeParameters,proto3" json:"type_parameters,omitempty"` + ParameterLists []*Scope `protobuf:"bytes,2,rep,name=parameter_lists,json=parameterLists,proto3" json:"parameter_lists,omitempty"` + ReturnType *Type `protobuf:"bytes,3,opt,name=return_type,json=returnType,proto3" json:"return_type,omitempty"` +} + +func (x *MethodSignature) Reset() { + *x = MethodSignature{} + if protoimpl.UnsafeEnabled { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MethodSignature) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MethodSignature) ProtoMessage() {} + +func (x *MethodSignature) ProtoReflect() protoreflect.Message { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[36] + 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 MethodSignature.ProtoReflect.Descriptor instead. +func (*MethodSignature) Descriptor() ([]byte, []int) { + return file_scala_meta_semanticdb_semanticdb_proto_rawDescGZIP(), []int{36} +} + +func (x *MethodSignature) GetTypeParameters() *Scope { + if x != nil { + return x.TypeParameters + } + return nil +} + +func (x *MethodSignature) GetParameterLists() []*Scope { + if x != nil { + return x.ParameterLists + } + return nil +} + +func (x *MethodSignature) GetReturnType() *Type { + if x != nil { + return x.ReturnType + } + return nil +} + +type TypeSignature struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TypeParameters *Scope `protobuf:"bytes,1,opt,name=type_parameters,json=typeParameters,proto3" json:"type_parameters,omitempty"` + LowerBound *Type `protobuf:"bytes,2,opt,name=lower_bound,json=lowerBound,proto3" json:"lower_bound,omitempty"` + UpperBound *Type `protobuf:"bytes,3,opt,name=upper_bound,json=upperBound,proto3" json:"upper_bound,omitempty"` +} + +func (x *TypeSignature) Reset() { + *x = TypeSignature{} + if protoimpl.UnsafeEnabled { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TypeSignature) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TypeSignature) ProtoMessage() {} + +func (x *TypeSignature) ProtoReflect() protoreflect.Message { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[37] + 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 TypeSignature.ProtoReflect.Descriptor instead. +func (*TypeSignature) Descriptor() ([]byte, []int) { + return file_scala_meta_semanticdb_semanticdb_proto_rawDescGZIP(), []int{37} +} + +func (x *TypeSignature) GetTypeParameters() *Scope { + if x != nil { + return x.TypeParameters + } + return nil +} + +func (x *TypeSignature) GetLowerBound() *Type { + if x != nil { + return x.LowerBound + } + return nil +} + +func (x *TypeSignature) GetUpperBound() *Type { + if x != nil { + return x.UpperBound + } + return nil +} + +type ValueSignature struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Tpe *Type `protobuf:"bytes,1,opt,name=tpe,proto3" json:"tpe,omitempty"` +} + +func (x *ValueSignature) Reset() { + *x = ValueSignature{} + if protoimpl.UnsafeEnabled { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ValueSignature) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ValueSignature) ProtoMessage() {} + +func (x *ValueSignature) ProtoReflect() protoreflect.Message { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[38] + 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 ValueSignature.ProtoReflect.Descriptor instead. +func (*ValueSignature) Descriptor() ([]byte, []int) { + return file_scala_meta_semanticdb_semanticdb_proto_rawDescGZIP(), []int{38} +} + +func (x *ValueSignature) GetTpe() *Type { + if x != nil { + return x.Tpe + } + return nil +} + +type SymbolInformation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Symbol string `protobuf:"bytes,1,opt,name=symbol,proto3" json:"symbol,omitempty"` + Language Language `protobuf:"varint,16,opt,name=language,proto3,enum=scala.meta.semanticdb.Language" json:"language,omitempty"` + Kind SymbolInformation_Kind `protobuf:"varint,3,opt,name=kind,proto3,enum=scala.meta.semanticdb.SymbolInformation_Kind" json:"kind,omitempty"` + Properties int32 `protobuf:"varint,4,opt,name=properties,proto3" json:"properties,omitempty"` + DisplayName string `protobuf:"bytes,5,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + Signature *Signature `protobuf:"bytes,17,opt,name=signature,proto3" json:"signature,omitempty"` + Annotations []*Annotation `protobuf:"bytes,13,rep,name=annotations,proto3" json:"annotations,omitempty"` + Access *Access `protobuf:"bytes,18,opt,name=access,proto3" json:"access,omitempty"` + OverriddenSymbols []string `protobuf:"bytes,19,rep,name=overridden_symbols,json=overriddenSymbols,proto3" json:"overridden_symbols,omitempty"` + Documentation *Documentation `protobuf:"bytes,20,opt,name=documentation,proto3" json:"documentation,omitempty"` +} + +func (x *SymbolInformation) Reset() { + *x = SymbolInformation{} + if protoimpl.UnsafeEnabled { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SymbolInformation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SymbolInformation) ProtoMessage() {} + +func (x *SymbolInformation) ProtoReflect() protoreflect.Message { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[39] + 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 SymbolInformation.ProtoReflect.Descriptor instead. +func (*SymbolInformation) Descriptor() ([]byte, []int) { + return file_scala_meta_semanticdb_semanticdb_proto_rawDescGZIP(), []int{39} +} + +func (x *SymbolInformation) GetSymbol() string { + if x != nil { + return x.Symbol + } + return "" +} + +func (x *SymbolInformation) GetLanguage() Language { + if x != nil { + return x.Language + } + return Language_UNKNOWN_LANGUAGE +} + +func (x *SymbolInformation) GetKind() SymbolInformation_Kind { + if x != nil { + return x.Kind + } + return SymbolInformation_UNKNOWN_KIND +} + +func (x *SymbolInformation) GetProperties() int32 { + if x != nil { + return x.Properties + } + return 0 +} + +func (x *SymbolInformation) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +func (x *SymbolInformation) GetSignature() *Signature { + if x != nil { + return x.Signature + } + return nil +} + +func (x *SymbolInformation) GetAnnotations() []*Annotation { + if x != nil { + return x.Annotations + } + return nil +} + +func (x *SymbolInformation) GetAccess() *Access { + if x != nil { + return x.Access + } + return nil +} + +func (x *SymbolInformation) GetOverriddenSymbols() []string { + if x != nil { + return x.OverriddenSymbols + } + return nil +} + +func (x *SymbolInformation) GetDocumentation() *Documentation { + if x != nil { + return x.Documentation + } + return nil +} + +type Documentation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` + Format Documentation_Format `protobuf:"varint,2,opt,name=format,proto3,enum=scala.meta.semanticdb.Documentation_Format" json:"format,omitempty"` +} + +func (x *Documentation) Reset() { + *x = Documentation{} + if protoimpl.UnsafeEnabled { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Documentation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Documentation) ProtoMessage() {} + +func (x *Documentation) ProtoReflect() protoreflect.Message { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[40] + 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 Documentation.ProtoReflect.Descriptor instead. +func (*Documentation) Descriptor() ([]byte, []int) { + return file_scala_meta_semanticdb_semanticdb_proto_rawDescGZIP(), []int{40} +} + +func (x *Documentation) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +func (x *Documentation) GetFormat() Documentation_Format { + if x != nil { + return x.Format + } + return Documentation_HTML +} + +type Annotation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Tpe *Type `protobuf:"bytes,1,opt,name=tpe,proto3" json:"tpe,omitempty"` +} + +func (x *Annotation) Reset() { + *x = Annotation{} + if protoimpl.UnsafeEnabled { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Annotation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Annotation) ProtoMessage() {} + +func (x *Annotation) ProtoReflect() protoreflect.Message { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[41] + 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 Annotation.ProtoReflect.Descriptor instead. +func (*Annotation) Descriptor() ([]byte, []int) { + return file_scala_meta_semanticdb_semanticdb_proto_rawDescGZIP(), []int{41} +} + +func (x *Annotation) GetTpe() *Type { + if x != nil { + return x.Tpe + } + return nil +} + +type Access struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to SealedValue: + // *Access_PrivateAccess + // *Access_PrivateThisAccess + // *Access_PrivateWithinAccess + // *Access_ProtectedAccess + // *Access_ProtectedThisAccess + // *Access_ProtectedWithinAccess + // *Access_PublicAccess + SealedValue isAccess_SealedValue `protobuf_oneof:"sealed_value"` +} + +func (x *Access) Reset() { + *x = Access{} + if protoimpl.UnsafeEnabled { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Access) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Access) ProtoMessage() {} + +func (x *Access) ProtoReflect() protoreflect.Message { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[42] + 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 Access.ProtoReflect.Descriptor instead. +func (*Access) Descriptor() ([]byte, []int) { + return file_scala_meta_semanticdb_semanticdb_proto_rawDescGZIP(), []int{42} +} + +func (m *Access) GetSealedValue() isAccess_SealedValue { + if m != nil { + return m.SealedValue + } + return nil +} + +func (x *Access) GetPrivateAccess() *PrivateAccess { + if x, ok := x.GetSealedValue().(*Access_PrivateAccess); ok { + return x.PrivateAccess + } + return nil +} + +func (x *Access) GetPrivateThisAccess() *PrivateThisAccess { + if x, ok := x.GetSealedValue().(*Access_PrivateThisAccess); ok { + return x.PrivateThisAccess + } + return nil +} + +func (x *Access) GetPrivateWithinAccess() *PrivateWithinAccess { + if x, ok := x.GetSealedValue().(*Access_PrivateWithinAccess); ok { + return x.PrivateWithinAccess + } + return nil +} + +func (x *Access) GetProtectedAccess() *ProtectedAccess { + if x, ok := x.GetSealedValue().(*Access_ProtectedAccess); ok { + return x.ProtectedAccess + } + return nil +} + +func (x *Access) GetProtectedThisAccess() *ProtectedThisAccess { + if x, ok := x.GetSealedValue().(*Access_ProtectedThisAccess); ok { + return x.ProtectedThisAccess + } + return nil +} + +func (x *Access) GetProtectedWithinAccess() *ProtectedWithinAccess { + if x, ok := x.GetSealedValue().(*Access_ProtectedWithinAccess); ok { + return x.ProtectedWithinAccess + } + return nil +} + +func (x *Access) GetPublicAccess() *PublicAccess { + if x, ok := x.GetSealedValue().(*Access_PublicAccess); ok { + return x.PublicAccess + } + return nil +} + +type isAccess_SealedValue interface { + isAccess_SealedValue() +} + +type Access_PrivateAccess struct { + PrivateAccess *PrivateAccess `protobuf:"bytes,1,opt,name=private_access,json=privateAccess,proto3,oneof"` +} + +type Access_PrivateThisAccess struct { + PrivateThisAccess *PrivateThisAccess `protobuf:"bytes,2,opt,name=private_this_access,json=privateThisAccess,proto3,oneof"` +} + +type Access_PrivateWithinAccess struct { + PrivateWithinAccess *PrivateWithinAccess `protobuf:"bytes,3,opt,name=private_within_access,json=privateWithinAccess,proto3,oneof"` +} + +type Access_ProtectedAccess struct { + ProtectedAccess *ProtectedAccess `protobuf:"bytes,4,opt,name=protected_access,json=protectedAccess,proto3,oneof"` +} + +type Access_ProtectedThisAccess struct { + ProtectedThisAccess *ProtectedThisAccess `protobuf:"bytes,5,opt,name=protected_this_access,json=protectedThisAccess,proto3,oneof"` +} + +type Access_ProtectedWithinAccess struct { + ProtectedWithinAccess *ProtectedWithinAccess `protobuf:"bytes,6,opt,name=protected_within_access,json=protectedWithinAccess,proto3,oneof"` +} + +type Access_PublicAccess struct { + PublicAccess *PublicAccess `protobuf:"bytes,7,opt,name=public_access,json=publicAccess,proto3,oneof"` +} + +func (*Access_PrivateAccess) isAccess_SealedValue() {} + +func (*Access_PrivateThisAccess) isAccess_SealedValue() {} + +func (*Access_PrivateWithinAccess) isAccess_SealedValue() {} + +func (*Access_ProtectedAccess) isAccess_SealedValue() {} + +func (*Access_ProtectedThisAccess) isAccess_SealedValue() {} + +func (*Access_ProtectedWithinAccess) isAccess_SealedValue() {} + +func (*Access_PublicAccess) isAccess_SealedValue() {} + +type PrivateAccess struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PrivateAccess) Reset() { + *x = PrivateAccess{} + if protoimpl.UnsafeEnabled { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PrivateAccess) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PrivateAccess) ProtoMessage() {} + +func (x *PrivateAccess) ProtoReflect() protoreflect.Message { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[43] + 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 PrivateAccess.ProtoReflect.Descriptor instead. +func (*PrivateAccess) Descriptor() ([]byte, []int) { + return file_scala_meta_semanticdb_semanticdb_proto_rawDescGZIP(), []int{43} +} + +type PrivateThisAccess struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PrivateThisAccess) Reset() { + *x = PrivateThisAccess{} + if protoimpl.UnsafeEnabled { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PrivateThisAccess) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PrivateThisAccess) ProtoMessage() {} + +func (x *PrivateThisAccess) ProtoReflect() protoreflect.Message { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[44] + 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 PrivateThisAccess.ProtoReflect.Descriptor instead. +func (*PrivateThisAccess) Descriptor() ([]byte, []int) { + return file_scala_meta_semanticdb_semanticdb_proto_rawDescGZIP(), []int{44} +} + +type PrivateWithinAccess struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Symbol string `protobuf:"bytes,1,opt,name=symbol,proto3" json:"symbol,omitempty"` +} + +func (x *PrivateWithinAccess) Reset() { + *x = PrivateWithinAccess{} + if protoimpl.UnsafeEnabled { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PrivateWithinAccess) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PrivateWithinAccess) ProtoMessage() {} + +func (x *PrivateWithinAccess) ProtoReflect() protoreflect.Message { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[45] + 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 PrivateWithinAccess.ProtoReflect.Descriptor instead. +func (*PrivateWithinAccess) Descriptor() ([]byte, []int) { + return file_scala_meta_semanticdb_semanticdb_proto_rawDescGZIP(), []int{45} +} + +func (x *PrivateWithinAccess) GetSymbol() string { + if x != nil { + return x.Symbol + } + return "" +} + +type ProtectedAccess struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *ProtectedAccess) Reset() { + *x = ProtectedAccess{} + if protoimpl.UnsafeEnabled { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ProtectedAccess) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ProtectedAccess) ProtoMessage() {} + +func (x *ProtectedAccess) ProtoReflect() protoreflect.Message { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[46] + 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 ProtectedAccess.ProtoReflect.Descriptor instead. +func (*ProtectedAccess) Descriptor() ([]byte, []int) { + return file_scala_meta_semanticdb_semanticdb_proto_rawDescGZIP(), []int{46} +} + +type ProtectedThisAccess struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *ProtectedThisAccess) Reset() { + *x = ProtectedThisAccess{} + if protoimpl.UnsafeEnabled { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ProtectedThisAccess) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ProtectedThisAccess) ProtoMessage() {} + +func (x *ProtectedThisAccess) ProtoReflect() protoreflect.Message { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[47] + 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 ProtectedThisAccess.ProtoReflect.Descriptor instead. +func (*ProtectedThisAccess) Descriptor() ([]byte, []int) { + return file_scala_meta_semanticdb_semanticdb_proto_rawDescGZIP(), []int{47} +} + +type ProtectedWithinAccess struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Symbol string `protobuf:"bytes,1,opt,name=symbol,proto3" json:"symbol,omitempty"` +} + +func (x *ProtectedWithinAccess) Reset() { + *x = ProtectedWithinAccess{} + if protoimpl.UnsafeEnabled { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ProtectedWithinAccess) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ProtectedWithinAccess) ProtoMessage() {} + +func (x *ProtectedWithinAccess) ProtoReflect() protoreflect.Message { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[48] + 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 ProtectedWithinAccess.ProtoReflect.Descriptor instead. +func (*ProtectedWithinAccess) Descriptor() ([]byte, []int) { + return file_scala_meta_semanticdb_semanticdb_proto_rawDescGZIP(), []int{48} +} + +func (x *ProtectedWithinAccess) GetSymbol() string { + if x != nil { + return x.Symbol + } + return "" +} + +type PublicAccess struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PublicAccess) Reset() { + *x = PublicAccess{} + if protoimpl.UnsafeEnabled { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PublicAccess) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PublicAccess) ProtoMessage() {} + +func (x *PublicAccess) ProtoReflect() protoreflect.Message { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[49] + 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 PublicAccess.ProtoReflect.Descriptor instead. +func (*PublicAccess) Descriptor() ([]byte, []int) { + return file_scala_meta_semanticdb_semanticdb_proto_rawDescGZIP(), []int{49} +} + +type SymbolOccurrence struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Range *Range `protobuf:"bytes,1,opt,name=range,proto3" json:"range,omitempty"` + Symbol string `protobuf:"bytes,2,opt,name=symbol,proto3" json:"symbol,omitempty"` + Role SymbolOccurrence_Role `protobuf:"varint,3,opt,name=role,proto3,enum=scala.meta.semanticdb.SymbolOccurrence_Role" json:"role,omitempty"` +} + +func (x *SymbolOccurrence) Reset() { + *x = SymbolOccurrence{} + if protoimpl.UnsafeEnabled { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[50] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SymbolOccurrence) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SymbolOccurrence) ProtoMessage() {} + +func (x *SymbolOccurrence) ProtoReflect() protoreflect.Message { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[50] + 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 SymbolOccurrence.ProtoReflect.Descriptor instead. +func (*SymbolOccurrence) Descriptor() ([]byte, []int) { + return file_scala_meta_semanticdb_semanticdb_proto_rawDescGZIP(), []int{50} +} + +func (x *SymbolOccurrence) GetRange() *Range { + if x != nil { + return x.Range + } + return nil +} + +func (x *SymbolOccurrence) GetSymbol() string { + if x != nil { + return x.Symbol + } + return "" +} + +func (x *SymbolOccurrence) GetRole() SymbolOccurrence_Role { + if x != nil { + return x.Role + } + return SymbolOccurrence_UNKNOWN_ROLE +} + +type Diagnostic struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Range *Range `protobuf:"bytes,1,opt,name=range,proto3" json:"range,omitempty"` + Severity Diagnostic_Severity `protobuf:"varint,2,opt,name=severity,proto3,enum=scala.meta.semanticdb.Diagnostic_Severity" json:"severity,omitempty"` + Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` +} + +func (x *Diagnostic) Reset() { + *x = Diagnostic{} + if protoimpl.UnsafeEnabled { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[51] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Diagnostic) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Diagnostic) ProtoMessage() {} + +func (x *Diagnostic) ProtoReflect() protoreflect.Message { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[51] + 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 Diagnostic.ProtoReflect.Descriptor instead. +func (*Diagnostic) Descriptor() ([]byte, []int) { + return file_scala_meta_semanticdb_semanticdb_proto_rawDescGZIP(), []int{51} +} + +func (x *Diagnostic) GetRange() *Range { + if x != nil { + return x.Range + } + return nil +} + +func (x *Diagnostic) GetSeverity() Diagnostic_Severity { + if x != nil { + return x.Severity + } + return Diagnostic_UNKNOWN_SEVERITY +} + +func (x *Diagnostic) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +type Synthetic struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Range *Range `protobuf:"bytes,1,opt,name=range,proto3" json:"range,omitempty"` + Tree *Tree `protobuf:"bytes,2,opt,name=tree,proto3" json:"tree,omitempty"` +} + +func (x *Synthetic) Reset() { + *x = Synthetic{} + if protoimpl.UnsafeEnabled { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[52] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Synthetic) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Synthetic) ProtoMessage() {} + +func (x *Synthetic) ProtoReflect() protoreflect.Message { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[52] + 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 Synthetic.ProtoReflect.Descriptor instead. +func (*Synthetic) Descriptor() ([]byte, []int) { + return file_scala_meta_semanticdb_semanticdb_proto_rawDescGZIP(), []int{52} +} + +func (x *Synthetic) GetRange() *Range { + if x != nil { + return x.Range + } + return nil +} + +func (x *Synthetic) GetTree() *Tree { + if x != nil { + return x.Tree + } + return nil +} + +type Tree struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to SealedValue: + // *Tree_ApplyTree + // *Tree_FunctionTree + // *Tree_IdTree + // *Tree_LiteralTree + // *Tree_MacroExpansionTree + // *Tree_OriginalTree + // *Tree_SelectTree + // *Tree_TypeApplyTree + SealedValue isTree_SealedValue `protobuf_oneof:"sealed_value"` +} + +func (x *Tree) Reset() { + *x = Tree{} + if protoimpl.UnsafeEnabled { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[53] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Tree) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Tree) ProtoMessage() {} + +func (x *Tree) ProtoReflect() protoreflect.Message { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[53] + 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 Tree.ProtoReflect.Descriptor instead. +func (*Tree) Descriptor() ([]byte, []int) { + return file_scala_meta_semanticdb_semanticdb_proto_rawDescGZIP(), []int{53} +} + +func (m *Tree) GetSealedValue() isTree_SealedValue { + if m != nil { + return m.SealedValue + } + return nil +} + +func (x *Tree) GetApplyTree() *ApplyTree { + if x, ok := x.GetSealedValue().(*Tree_ApplyTree); ok { + return x.ApplyTree + } + return nil +} + +func (x *Tree) GetFunctionTree() *FunctionTree { + if x, ok := x.GetSealedValue().(*Tree_FunctionTree); ok { + return x.FunctionTree + } + return nil +} + +func (x *Tree) GetIdTree() *IdTree { + if x, ok := x.GetSealedValue().(*Tree_IdTree); ok { + return x.IdTree + } + return nil +} + +func (x *Tree) GetLiteralTree() *LiteralTree { + if x, ok := x.GetSealedValue().(*Tree_LiteralTree); ok { + return x.LiteralTree + } + return nil +} + +func (x *Tree) GetMacroExpansionTree() *MacroExpansionTree { + if x, ok := x.GetSealedValue().(*Tree_MacroExpansionTree); ok { + return x.MacroExpansionTree + } + return nil +} + +func (x *Tree) GetOriginalTree() *OriginalTree { + if x, ok := x.GetSealedValue().(*Tree_OriginalTree); ok { + return x.OriginalTree + } + return nil +} + +func (x *Tree) GetSelectTree() *SelectTree { + if x, ok := x.GetSealedValue().(*Tree_SelectTree); ok { + return x.SelectTree + } + return nil +} + +func (x *Tree) GetTypeApplyTree() *TypeApplyTree { + if x, ok := x.GetSealedValue().(*Tree_TypeApplyTree); ok { + return x.TypeApplyTree + } + return nil +} + +type isTree_SealedValue interface { + isTree_SealedValue() +} + +type Tree_ApplyTree struct { + ApplyTree *ApplyTree `protobuf:"bytes,1,opt,name=apply_tree,json=applyTree,proto3,oneof"` +} + +type Tree_FunctionTree struct { + FunctionTree *FunctionTree `protobuf:"bytes,2,opt,name=function_tree,json=functionTree,proto3,oneof"` +} + +type Tree_IdTree struct { + IdTree *IdTree `protobuf:"bytes,3,opt,name=id_tree,json=idTree,proto3,oneof"` +} + +type Tree_LiteralTree struct { + LiteralTree *LiteralTree `protobuf:"bytes,4,opt,name=literal_tree,json=literalTree,proto3,oneof"` +} + +type Tree_MacroExpansionTree struct { + MacroExpansionTree *MacroExpansionTree `protobuf:"bytes,5,opt,name=macro_expansion_tree,json=macroExpansionTree,proto3,oneof"` +} + +type Tree_OriginalTree struct { + OriginalTree *OriginalTree `protobuf:"bytes,6,opt,name=original_tree,json=originalTree,proto3,oneof"` +} + +type Tree_SelectTree struct { + SelectTree *SelectTree `protobuf:"bytes,7,opt,name=select_tree,json=selectTree,proto3,oneof"` +} + +type Tree_TypeApplyTree struct { + TypeApplyTree *TypeApplyTree `protobuf:"bytes,8,opt,name=type_apply_tree,json=typeApplyTree,proto3,oneof"` +} + +func (*Tree_ApplyTree) isTree_SealedValue() {} + +func (*Tree_FunctionTree) isTree_SealedValue() {} + +func (*Tree_IdTree) isTree_SealedValue() {} + +func (*Tree_LiteralTree) isTree_SealedValue() {} + +func (*Tree_MacroExpansionTree) isTree_SealedValue() {} + +func (*Tree_OriginalTree) isTree_SealedValue() {} + +func (*Tree_SelectTree) isTree_SealedValue() {} + +func (*Tree_TypeApplyTree) isTree_SealedValue() {} + +type ApplyTree struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Function *Tree `protobuf:"bytes,1,opt,name=function,proto3" json:"function,omitempty"` + Arguments []*Tree `protobuf:"bytes,2,rep,name=arguments,proto3" json:"arguments,omitempty"` +} + +func (x *ApplyTree) Reset() { + *x = ApplyTree{} + if protoimpl.UnsafeEnabled { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[54] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ApplyTree) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ApplyTree) ProtoMessage() {} + +func (x *ApplyTree) ProtoReflect() protoreflect.Message { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[54] + 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 ApplyTree.ProtoReflect.Descriptor instead. +func (*ApplyTree) Descriptor() ([]byte, []int) { + return file_scala_meta_semanticdb_semanticdb_proto_rawDescGZIP(), []int{54} +} + +func (x *ApplyTree) GetFunction() *Tree { + if x != nil { + return x.Function + } + return nil +} + +func (x *ApplyTree) GetArguments() []*Tree { + if x != nil { + return x.Arguments + } + return nil +} + +type FunctionTree struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Parameters []*IdTree `protobuf:"bytes,1,rep,name=parameters,proto3" json:"parameters,omitempty"` + Body *Tree `protobuf:"bytes,2,opt,name=body,proto3" json:"body,omitempty"` +} + +func (x *FunctionTree) Reset() { + *x = FunctionTree{} + if protoimpl.UnsafeEnabled { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[55] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FunctionTree) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FunctionTree) ProtoMessage() {} + +func (x *FunctionTree) ProtoReflect() protoreflect.Message { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[55] + 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 FunctionTree.ProtoReflect.Descriptor instead. +func (*FunctionTree) Descriptor() ([]byte, []int) { + return file_scala_meta_semanticdb_semanticdb_proto_rawDescGZIP(), []int{55} +} + +func (x *FunctionTree) GetParameters() []*IdTree { + if x != nil { + return x.Parameters + } + return nil +} + +func (x *FunctionTree) GetBody() *Tree { + if x != nil { + return x.Body + } + return nil +} + +type IdTree struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Symbol string `protobuf:"bytes,1,opt,name=symbol,proto3" json:"symbol,omitempty"` +} + +func (x *IdTree) Reset() { + *x = IdTree{} + if protoimpl.UnsafeEnabled { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[56] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *IdTree) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IdTree) ProtoMessage() {} + +func (x *IdTree) ProtoReflect() protoreflect.Message { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[56] + 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 IdTree.ProtoReflect.Descriptor instead. +func (*IdTree) Descriptor() ([]byte, []int) { + return file_scala_meta_semanticdb_semanticdb_proto_rawDescGZIP(), []int{56} +} + +func (x *IdTree) GetSymbol() string { + if x != nil { + return x.Symbol + } + return "" +} + +type LiteralTree struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Constant *Constant `protobuf:"bytes,1,opt,name=constant,proto3" json:"constant,omitempty"` +} + +func (x *LiteralTree) Reset() { + *x = LiteralTree{} + if protoimpl.UnsafeEnabled { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[57] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LiteralTree) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LiteralTree) ProtoMessage() {} + +func (x *LiteralTree) ProtoReflect() protoreflect.Message { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[57] + 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 LiteralTree.ProtoReflect.Descriptor instead. +func (*LiteralTree) Descriptor() ([]byte, []int) { + return file_scala_meta_semanticdb_semanticdb_proto_rawDescGZIP(), []int{57} +} + +func (x *LiteralTree) GetConstant() *Constant { + if x != nil { + return x.Constant + } + return nil +} + +type MacroExpansionTree struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BeforeExpansion *Tree `protobuf:"bytes,1,opt,name=before_expansion,json=beforeExpansion,proto3" json:"before_expansion,omitempty"` + Tpe *Type `protobuf:"bytes,2,opt,name=tpe,proto3" json:"tpe,omitempty"` +} + +func (x *MacroExpansionTree) Reset() { + *x = MacroExpansionTree{} + if protoimpl.UnsafeEnabled { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[58] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MacroExpansionTree) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MacroExpansionTree) ProtoMessage() {} + +func (x *MacroExpansionTree) ProtoReflect() protoreflect.Message { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[58] + 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 MacroExpansionTree.ProtoReflect.Descriptor instead. +func (*MacroExpansionTree) Descriptor() ([]byte, []int) { + return file_scala_meta_semanticdb_semanticdb_proto_rawDescGZIP(), []int{58} +} + +func (x *MacroExpansionTree) GetBeforeExpansion() *Tree { + if x != nil { + return x.BeforeExpansion + } + return nil +} + +func (x *MacroExpansionTree) GetTpe() *Type { + if x != nil { + return x.Tpe + } + return nil +} + +type OriginalTree struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Range *Range `protobuf:"bytes,1,opt,name=range,proto3" json:"range,omitempty"` +} + +func (x *OriginalTree) Reset() { + *x = OriginalTree{} + if protoimpl.UnsafeEnabled { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[59] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OriginalTree) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OriginalTree) ProtoMessage() {} + +func (x *OriginalTree) ProtoReflect() protoreflect.Message { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[59] + 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 OriginalTree.ProtoReflect.Descriptor instead. +func (*OriginalTree) Descriptor() ([]byte, []int) { + return file_scala_meta_semanticdb_semanticdb_proto_rawDescGZIP(), []int{59} +} + +func (x *OriginalTree) GetRange() *Range { + if x != nil { + return x.Range + } + return nil +} + +type SelectTree struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Qualifier *Tree `protobuf:"bytes,1,opt,name=qualifier,proto3" json:"qualifier,omitempty"` + Id *IdTree `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *SelectTree) Reset() { + *x = SelectTree{} + if protoimpl.UnsafeEnabled { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[60] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SelectTree) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SelectTree) ProtoMessage() {} + +func (x *SelectTree) ProtoReflect() protoreflect.Message { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[60] + 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 SelectTree.ProtoReflect.Descriptor instead. +func (*SelectTree) Descriptor() ([]byte, []int) { + return file_scala_meta_semanticdb_semanticdb_proto_rawDescGZIP(), []int{60} +} + +func (x *SelectTree) GetQualifier() *Tree { + if x != nil { + return x.Qualifier + } + return nil +} + +func (x *SelectTree) GetId() *IdTree { + if x != nil { + return x.Id + } + return nil +} + +type TypeApplyTree struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Function *Tree `protobuf:"bytes,1,opt,name=function,proto3" json:"function,omitempty"` + TypeArguments []*Type `protobuf:"bytes,2,rep,name=type_arguments,json=typeArguments,proto3" json:"type_arguments,omitempty"` +} + +func (x *TypeApplyTree) Reset() { + *x = TypeApplyTree{} + if protoimpl.UnsafeEnabled { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[61] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TypeApplyTree) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TypeApplyTree) ProtoMessage() {} + +func (x *TypeApplyTree) ProtoReflect() protoreflect.Message { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[61] + 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 TypeApplyTree.ProtoReflect.Descriptor instead. +func (*TypeApplyTree) Descriptor() ([]byte, []int) { + return file_scala_meta_semanticdb_semanticdb_proto_rawDescGZIP(), []int{61} +} + +func (x *TypeApplyTree) GetFunction() *Tree { + if x != nil { + return x.Function + } + return nil +} + +func (x *TypeApplyTree) GetTypeArguments() []*Type { + if x != nil { + return x.TypeArguments + } + return nil +} + +type MatchType_CaseType struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Key *Type `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + Body *Type `protobuf:"bytes,2,opt,name=body,proto3" json:"body,omitempty"` +} + +func (x *MatchType_CaseType) Reset() { + *x = MatchType_CaseType{} + if protoimpl.UnsafeEnabled { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[62] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MatchType_CaseType) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MatchType_CaseType) ProtoMessage() {} + +func (x *MatchType_CaseType) ProtoReflect() protoreflect.Message { + mi := &file_scala_meta_semanticdb_semanticdb_proto_msgTypes[62] + 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 MatchType_CaseType.ProtoReflect.Descriptor instead. +func (*MatchType_CaseType) Descriptor() ([]byte, []int) { + return file_scala_meta_semanticdb_semanticdb_proto_rawDescGZIP(), []int{21, 0} +} + +func (x *MatchType_CaseType) GetKey() *Type { + if x != nil { + return x.Key + } + return nil +} + +func (x *MatchType_CaseType) GetBody() *Type { + if x != nil { + return x.Body + } + return nil +} + +var File_scala_meta_semanticdb_semanticdb_proto protoreflect.FileDescriptor + +var file_scala_meta_semanticdb_semanticdb_proto_rawDesc = []byte{ + 0x0a, 0x26, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x2f, 0x73, 0x65, 0x6d, + 0x61, 0x6e, 0x74, 0x69, 0x63, 0x64, 0x62, 0x2f, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, + 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2e, + 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x64, 0x62, 0x1a, + 0x15, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x70, 0x62, 0x2f, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x70, 0x62, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x52, 0x0a, 0x0d, 0x54, 0x65, 0x78, 0x74, 0x44, 0x6f, + 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x41, 0x0a, 0x09, 0x64, 0x6f, 0x63, 0x75, 0x6d, + 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x73, 0x63, 0x61, + 0x6c, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, + 0x64, 0x62, 0x2e, 0x54, 0x65, 0x78, 0x74, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, + 0x09, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x22, 0xe2, 0x03, 0x0a, 0x0c, 0x54, + 0x65, 0x78, 0x74, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x35, 0x0a, 0x06, 0x73, + 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x73, 0x63, + 0x61, 0x6c, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, + 0x63, 0x64, 0x62, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, + 0x6d, 0x61, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x69, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x75, 0x72, 0x69, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x65, 0x78, 0x74, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x74, 0x65, 0x78, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x64, 0x35, 0x18, + 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x64, 0x35, 0x12, 0x3b, 0x0a, 0x08, 0x6c, 0x61, + 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x73, + 0x63, 0x61, 0x6c, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, + 0x69, 0x63, 0x64, 0x62, 0x2e, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x52, 0x08, 0x6c, + 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x12, 0x42, 0x0a, 0x07, 0x73, 0x79, 0x6d, 0x62, 0x6f, + 0x6c, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x61, + 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x64, 0x62, + 0x2e, 0x53, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x07, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x73, 0x12, 0x49, 0x0a, 0x0b, 0x6f, + 0x63, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x27, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x73, 0x65, + 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x64, 0x62, 0x2e, 0x53, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x4f, + 0x63, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x0b, 0x6f, 0x63, 0x63, 0x75, 0x72, + 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x43, 0x0a, 0x0b, 0x64, 0x69, 0x61, 0x67, 0x6e, 0x6f, + 0x73, 0x74, 0x69, 0x63, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x73, 0x63, + 0x61, 0x6c, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, + 0x63, 0x64, 0x62, 0x2e, 0x44, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x52, 0x0b, + 0x64, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x73, 0x12, 0x40, 0x0a, 0x0a, 0x73, + 0x79, 0x6e, 0x74, 0x68, 0x65, 0x74, 0x69, 0x63, 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x20, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x73, 0x65, 0x6d, + 0x61, 0x6e, 0x74, 0x69, 0x63, 0x64, 0x62, 0x2e, 0x53, 0x79, 0x6e, 0x74, 0x68, 0x65, 0x74, 0x69, + 0x63, 0x52, 0x0a, 0x73, 0x79, 0x6e, 0x74, 0x68, 0x65, 0x74, 0x69, 0x63, 0x73, 0x4a, 0x04, 0x08, + 0x04, 0x10, 0x05, 0x4a, 0x04, 0x08, 0x08, 0x10, 0x09, 0x4a, 0x04, 0x08, 0x09, 0x10, 0x0a, 0x22, + 0x8f, 0x01, 0x0a, 0x05, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x5f, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x73, + 0x74, 0x61, 0x72, 0x74, 0x4c, 0x69, 0x6e, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x73, 0x74, 0x61, 0x72, + 0x74, 0x5f, 0x63, 0x68, 0x61, 0x72, 0x61, 0x63, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x0e, 0x73, 0x74, 0x61, 0x72, 0x74, 0x43, 0x68, 0x61, 0x72, 0x61, 0x63, 0x74, 0x65, + 0x72, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x4c, 0x69, 0x6e, 0x65, 0x12, 0x23, 0x0a, 0x0d, + 0x65, 0x6e, 0x64, 0x5f, 0x63, 0x68, 0x61, 0x72, 0x61, 0x63, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x0c, 0x65, 0x6e, 0x64, 0x43, 0x68, 0x61, 0x72, 0x61, 0x63, 0x74, 0x65, + 0x72, 0x22, 0x50, 0x0a, 0x08, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x10, 0x0a, + 0x03, 0x75, 0x72, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x69, 0x12, + 0x32, 0x0a, 0x05, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, + 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x73, 0x65, 0x6d, 0x61, + 0x6e, 0x74, 0x69, 0x63, 0x64, 0x62, 0x2e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x05, 0x72, 0x61, + 0x6e, 0x67, 0x65, 0x22, 0x6b, 0x0a, 0x05, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, + 0x73, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, + 0x73, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x73, 0x12, 0x46, 0x0a, 0x09, 0x68, 0x61, 0x72, 0x64, + 0x6c, 0x69, 0x6e, 0x6b, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x73, 0x63, + 0x61, 0x6c, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, + 0x63, 0x64, 0x62, 0x2e, 0x53, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x68, 0x61, 0x72, 0x64, 0x6c, 0x69, 0x6e, 0x6b, 0x73, + 0x22, 0xda, 0x09, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x3b, 0x0a, 0x08, 0x74, 0x79, 0x70, + 0x65, 0x5f, 0x72, 0x65, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x63, + 0x61, 0x6c, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, + 0x63, 0x64, 0x62, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x66, 0x48, 0x00, 0x52, 0x07, 0x74, + 0x79, 0x70, 0x65, 0x52, 0x65, 0x66, 0x12, 0x44, 0x0a, 0x0b, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, + 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x73, 0x63, + 0x61, 0x6c, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, + 0x63, 0x64, 0x62, 0x2e, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x48, 0x00, + 0x52, 0x0a, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x3e, 0x0a, 0x09, + 0x74, 0x68, 0x69, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1f, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x73, 0x65, 0x6d, + 0x61, 0x6e, 0x74, 0x69, 0x63, 0x64, 0x62, 0x2e, 0x54, 0x68, 0x69, 0x73, 0x54, 0x79, 0x70, 0x65, + 0x48, 0x00, 0x52, 0x08, 0x74, 0x68, 0x69, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x41, 0x0a, 0x0a, + 0x73, 0x75, 0x70, 0x65, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x16, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x20, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x73, 0x65, + 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x64, 0x62, 0x2e, 0x53, 0x75, 0x70, 0x65, 0x72, 0x54, 0x79, + 0x70, 0x65, 0x48, 0x00, 0x52, 0x09, 0x73, 0x75, 0x70, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x4a, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, + 0x18, 0x17, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2e, 0x6d, + 0x65, 0x74, 0x61, 0x2e, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x64, 0x62, 0x2e, 0x43, + 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x48, 0x00, 0x52, 0x0c, 0x63, + 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x56, 0x0a, 0x11, 0x69, + 0x6e, 0x74, 0x65, 0x72, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, + 0x18, 0x11, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2e, 0x6d, + 0x65, 0x74, 0x61, 0x2e, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x64, 0x62, 0x2e, 0x49, + 0x6e, 0x74, 0x65, 0x72, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x48, + 0x00, 0x52, 0x10, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x41, 0x0a, 0x0a, 0x75, 0x6e, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, + 0x65, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2e, + 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x64, 0x62, 0x2e, + 0x55, 0x6e, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x48, 0x00, 0x52, 0x09, 0x75, 0x6e, 0x69, + 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x3e, 0x0a, 0x09, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x13, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x73, 0x63, 0x61, 0x6c, + 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x64, + 0x62, 0x2e, 0x57, 0x69, 0x74, 0x68, 0x54, 0x79, 0x70, 0x65, 0x48, 0x00, 0x52, 0x08, 0x77, 0x69, + 0x74, 0x68, 0x54, 0x79, 0x70, 0x65, 0x12, 0x50, 0x0a, 0x0f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, + 0x75, 0x72, 0x61, 0x6c, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x25, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x73, 0x65, 0x6d, + 0x61, 0x6e, 0x74, 0x69, 0x63, 0x64, 0x62, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, + 0x61, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x48, 0x00, 0x52, 0x0e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, + 0x75, 0x72, 0x61, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x12, 0x4d, 0x0a, 0x0e, 0x61, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x24, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x73, 0x65, + 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x64, 0x62, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x65, 0x64, 0x54, 0x79, 0x70, 0x65, 0x48, 0x00, 0x52, 0x0d, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x65, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x53, 0x0a, 0x10, 0x65, 0x78, 0x69, 0x73, 0x74, + 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x26, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x73, + 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x64, 0x62, 0x2e, 0x45, 0x78, 0x69, 0x73, 0x74, 0x65, + 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x48, 0x00, 0x52, 0x0f, 0x65, 0x78, 0x69, + 0x73, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x12, 0x4d, 0x0a, 0x0e, + 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0a, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2e, 0x6d, 0x65, 0x74, + 0x61, 0x2e, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x64, 0x62, 0x2e, 0x55, 0x6e, 0x69, + 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x48, 0x00, 0x52, 0x0d, 0x75, 0x6e, + 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x12, 0x45, 0x0a, 0x0c, 0x62, + 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x21, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x73, + 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x64, 0x62, 0x2e, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, + 0x54, 0x79, 0x70, 0x65, 0x48, 0x00, 0x52, 0x0a, 0x62, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x54, 0x79, + 0x70, 0x65, 0x12, 0x4a, 0x0a, 0x0d, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x73, 0x63, 0x61, 0x6c, + 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x64, + 0x62, 0x2e, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x54, 0x79, 0x70, 0x65, 0x48, 0x00, + 0x52, 0x0c, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x41, + 0x0a, 0x0a, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x19, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, + 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x64, 0x62, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, + 0x54, 0x79, 0x70, 0x65, 0x48, 0x00, 0x52, 0x09, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x44, 0x0a, 0x0b, 0x6c, 0x61, 0x6d, 0x62, 0x64, 0x61, 0x5f, 0x74, 0x79, 0x70, 0x65, + 0x18, 0x1a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2e, 0x6d, + 0x65, 0x74, 0x61, 0x2e, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x64, 0x62, 0x2e, 0x4c, + 0x61, 0x6d, 0x62, 0x64, 0x61, 0x54, 0x79, 0x70, 0x65, 0x48, 0x00, 0x52, 0x0a, 0x6c, 0x61, 0x6d, + 0x62, 0x64, 0x61, 0x54, 0x79, 0x70, 0x65, 0x42, 0x0e, 0x0a, 0x0c, 0x73, 0x65, 0x61, 0x6c, 0x65, + 0x64, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x4a, 0x04, 0x08, + 0x03, 0x10, 0x04, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x4a, + 0x04, 0x08, 0x06, 0x10, 0x07, 0x4a, 0x04, 0x08, 0x0b, 0x10, 0x0c, 0x4a, 0x04, 0x08, 0x0c, 0x10, + 0x0d, 0x4a, 0x04, 0x08, 0x0f, 0x10, 0x10, 0x4a, 0x04, 0x08, 0x10, 0x10, 0x11, 0x22, 0x88, 0x01, + 0x0a, 0x0a, 0x4c, 0x61, 0x6d, 0x62, 0x64, 0x61, 0x54, 0x79, 0x70, 0x65, 0x12, 0x3c, 0x0a, 0x0a, + 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1c, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x73, 0x65, + 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x64, 0x62, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x52, 0x0a, + 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x3c, 0x0a, 0x0b, 0x72, 0x65, + 0x74, 0x75, 0x72, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1b, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x73, 0x65, 0x6d, + 0x61, 0x6e, 0x74, 0x69, 0x63, 0x64, 0x62, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, 0x72, 0x65, + 0x74, 0x75, 0x72, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x22, 0x9a, 0x01, 0x0a, 0x07, 0x54, 0x79, 0x70, + 0x65, 0x52, 0x65, 0x66, 0x12, 0x33, 0x0a, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2e, 0x6d, 0x65, 0x74, + 0x61, 0x2e, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x64, 0x62, 0x2e, 0x54, 0x79, 0x70, + 0x65, 0x52, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x79, 0x6d, + 0x62, 0x6f, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, + 0x6c, 0x12, 0x42, 0x0a, 0x0e, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, + 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x73, 0x63, 0x61, 0x6c, + 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x64, + 0x62, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0d, 0x74, 0x79, 0x70, 0x65, 0x41, 0x72, 0x67, 0x75, + 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x59, 0x0a, 0x0a, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x33, 0x0a, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, + 0x2e, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x64, 0x62, 0x2e, 0x54, 0x79, 0x70, 0x65, + 0x52, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x79, 0x6d, 0x62, + 0x6f, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, + 0x22, 0x22, 0x0a, 0x08, 0x54, 0x68, 0x69, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, + 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x79, + 0x6d, 0x62, 0x6f, 0x6c, 0x22, 0x58, 0x0a, 0x09, 0x53, 0x75, 0x70, 0x65, 0x72, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x33, 0x0a, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1b, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x73, + 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x64, 0x62, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x06, + 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x22, 0x4b, + 0x0a, 0x0c, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x3b, + 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1f, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x73, 0x65, + 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x64, 0x62, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, + 0x74, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x22, 0x45, 0x0a, 0x10, 0x49, + 0x6e, 0x74, 0x65, 0x72, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x31, 0x0a, 0x05, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, + 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x73, 0x65, 0x6d, 0x61, + 0x6e, 0x74, 0x69, 0x63, 0x64, 0x62, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x74, 0x79, 0x70, + 0x65, 0x73, 0x22, 0x3e, 0x0a, 0x09, 0x55, 0x6e, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x31, 0x0a, 0x05, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, + 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x73, 0x65, 0x6d, 0x61, + 0x6e, 0x74, 0x69, 0x63, 0x64, 0x62, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x74, 0x79, 0x70, + 0x65, 0x73, 0x22, 0x3d, 0x0a, 0x08, 0x57, 0x69, 0x74, 0x68, 0x54, 0x79, 0x70, 0x65, 0x12, 0x31, + 0x0a, 0x05, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, + 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x73, 0x65, 0x6d, 0x61, 0x6e, + 0x74, 0x69, 0x63, 0x64, 0x62, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x74, 0x79, 0x70, 0x65, + 0x73, 0x22, 0x93, 0x01, 0x0a, 0x0e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x61, 0x6c, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x2d, 0x0a, 0x03, 0x74, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1b, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x73, + 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x64, 0x62, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x03, + 0x74, 0x70, 0x65, 0x12, 0x40, 0x0a, 0x0c, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x73, 0x63, 0x61, 0x6c, + 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x64, + 0x62, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x52, 0x0c, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x4a, 0x04, 0x08, 0x02, 0x10, + 0x03, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x22, 0x89, 0x01, 0x0a, 0x0d, 0x41, 0x6e, 0x6e, 0x6f, + 0x74, 0x61, 0x74, 0x65, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x43, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, + 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x73, 0x65, 0x6d, 0x61, + 0x6e, 0x74, 0x69, 0x63, 0x64, 0x62, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2d, + 0x0a, 0x03, 0x74, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x73, 0x63, + 0x61, 0x6c, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, + 0x63, 0x64, 0x62, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x03, 0x74, 0x70, 0x65, 0x4a, 0x04, 0x08, + 0x02, 0x10, 0x03, 0x22, 0x88, 0x01, 0x0a, 0x0f, 0x45, 0x78, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x74, + 0x69, 0x61, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2d, 0x0a, 0x03, 0x74, 0x70, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2e, 0x6d, 0x65, 0x74, + 0x61, 0x2e, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x64, 0x62, 0x2e, 0x54, 0x79, 0x70, + 0x65, 0x52, 0x03, 0x74, 0x70, 0x65, 0x12, 0x40, 0x0a, 0x0c, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x73, + 0x63, 0x61, 0x6c, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, + 0x69, 0x63, 0x64, 0x62, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x52, 0x0c, 0x64, 0x65, 0x63, 0x6c, + 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x22, 0x8b, + 0x01, 0x0a, 0x0d, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x45, 0x0a, 0x0f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, + 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x73, 0x63, 0x61, 0x6c, + 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x64, + 0x62, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x52, 0x0e, 0x74, 0x79, 0x70, 0x65, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x2d, 0x0a, 0x03, 0x74, 0x70, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2e, 0x6d, 0x65, 0x74, + 0x61, 0x2e, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x64, 0x62, 0x2e, 0x54, 0x79, 0x70, + 0x65, 0x52, 0x03, 0x74, 0x70, 0x65, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x22, 0x3b, 0x0a, 0x0a, + 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2d, 0x0a, 0x03, 0x74, 0x70, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2e, + 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x64, 0x62, 0x2e, + 0x54, 0x79, 0x70, 0x65, 0x52, 0x03, 0x74, 0x70, 0x65, 0x22, 0x3d, 0x0a, 0x0c, 0x52, 0x65, 0x70, + 0x65, 0x61, 0x74, 0x65, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2d, 0x0a, 0x03, 0x74, 0x70, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2e, 0x6d, + 0x65, 0x74, 0x61, 0x2e, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x64, 0x62, 0x2e, 0x54, + 0x79, 0x70, 0x65, 0x52, 0x03, 0x74, 0x70, 0x65, 0x22, 0xf3, 0x01, 0x0a, 0x09, 0x4d, 0x61, 0x74, + 0x63, 0x68, 0x54, 0x79, 0x70, 0x65, 0x12, 0x39, 0x0a, 0x09, 0x73, 0x63, 0x72, 0x75, 0x74, 0x69, + 0x6e, 0x65, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x73, 0x63, 0x61, 0x6c, + 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x64, + 0x62, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x09, 0x73, 0x63, 0x72, 0x75, 0x74, 0x69, 0x6e, 0x65, + 0x65, 0x12, 0x3f, 0x0a, 0x05, 0x63, 0x61, 0x73, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x29, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x73, 0x65, + 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x64, 0x62, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x54, 0x79, + 0x70, 0x65, 0x2e, 0x43, 0x61, 0x73, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x63, 0x61, 0x73, + 0x65, 0x73, 0x1a, 0x6a, 0x0a, 0x08, 0x43, 0x61, 0x73, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2d, + 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x73, 0x63, + 0x61, 0x6c, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, + 0x63, 0x64, 0x62, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2f, 0x0a, + 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x73, 0x63, + 0x61, 0x6c, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, + 0x63, 0x64, 0x62, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x22, 0xf6, + 0x06, 0x0a, 0x08, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x12, 0x4a, 0x0a, 0x0d, 0x75, + 0x6e, 0x69, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, + 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x64, 0x62, 0x2e, 0x55, 0x6e, 0x69, 0x74, 0x43, + 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0c, 0x75, 0x6e, 0x69, 0x74, 0x43, + 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x12, 0x53, 0x0a, 0x10, 0x62, 0x6f, 0x6f, 0x6c, 0x65, + 0x61, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x26, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x73, + 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x64, 0x62, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x65, 0x61, + 0x6e, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0f, 0x62, 0x6f, 0x6f, + 0x6c, 0x65, 0x61, 0x6e, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x12, 0x4a, 0x0a, 0x0d, + 0x62, 0x79, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, + 0x2e, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x64, 0x62, 0x2e, 0x42, 0x79, 0x74, 0x65, + 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0c, 0x62, 0x79, 0x74, 0x65, + 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x12, 0x4d, 0x0a, 0x0e, 0x73, 0x68, 0x6f, 0x72, + 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x24, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x73, 0x65, + 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x64, 0x62, 0x2e, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x43, 0x6f, + 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0d, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x43, + 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x12, 0x4a, 0x0a, 0x0d, 0x63, 0x68, 0x61, 0x72, 0x5f, + 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, + 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x73, 0x65, 0x6d, 0x61, + 0x6e, 0x74, 0x69, 0x63, 0x64, 0x62, 0x2e, 0x43, 0x68, 0x61, 0x72, 0x43, 0x6f, 0x6e, 0x73, 0x74, + 0x61, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0c, 0x63, 0x68, 0x61, 0x72, 0x43, 0x6f, 0x6e, 0x73, 0x74, + 0x61, 0x6e, 0x74, 0x12, 0x47, 0x0a, 0x0c, 0x69, 0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x74, + 0x61, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x73, 0x63, 0x61, 0x6c, + 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x64, + 0x62, 0x2e, 0x49, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x48, 0x00, 0x52, + 0x0b, 0x69, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x12, 0x4a, 0x0a, 0x0d, + 0x6c, 0x6f, 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, + 0x2e, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x64, 0x62, 0x2e, 0x4c, 0x6f, 0x6e, 0x67, + 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0c, 0x6c, 0x6f, 0x6e, 0x67, + 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x12, 0x4d, 0x0a, 0x0e, 0x66, 0x6c, 0x6f, 0x61, + 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x24, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x73, 0x65, + 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x64, 0x62, 0x2e, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x43, 0x6f, + 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0d, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x43, + 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x12, 0x50, 0x0a, 0x0f, 0x64, 0x6f, 0x75, 0x62, 0x6c, + 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x25, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x73, 0x65, + 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x64, 0x62, 0x2e, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x43, + 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0e, 0x64, 0x6f, 0x75, 0x62, 0x6c, + 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x12, 0x50, 0x0a, 0x0f, 0x73, 0x74, 0x72, + 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x18, 0x0a, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, + 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x64, 0x62, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0e, 0x73, 0x74, 0x72, + 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x12, 0x4a, 0x0a, 0x0d, 0x6e, + 0x75, 0x6c, 0x6c, 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x18, 0x0b, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, + 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x64, 0x62, 0x2e, 0x4e, 0x75, 0x6c, 0x6c, 0x43, + 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0c, 0x6e, 0x75, 0x6c, 0x6c, 0x43, + 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x42, 0x0e, 0x0a, 0x0c, 0x73, 0x65, 0x61, 0x6c, 0x65, + 0x64, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x0e, 0x0a, 0x0c, 0x55, 0x6e, 0x69, 0x74, 0x43, + 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x22, 0x27, 0x0a, 0x0f, 0x42, 0x6f, 0x6f, 0x6c, 0x65, + 0x61, 0x6e, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x22, 0x24, 0x0a, 0x0c, 0x42, 0x79, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, + 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x25, 0x0a, 0x0d, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x43, + 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x24, 0x0a, + 0x0c, 0x43, 0x68, 0x61, 0x72, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x12, 0x14, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x22, 0x23, 0x0a, 0x0b, 0x49, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x61, + 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x24, 0x0a, 0x0c, 0x4c, 0x6f, 0x6e, 0x67, + 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x25, + 0x0a, 0x0d, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x12, + 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x02, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x26, 0x0a, 0x0e, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x43, + 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x26, 0x0a, + 0x0e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x12, + 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x0e, 0x0a, 0x0c, 0x4e, 0x75, 0x6c, 0x6c, 0x43, 0x6f, 0x6e, + 0x73, 0x74, 0x61, 0x6e, 0x74, 0x22, 0xe3, 0x02, 0x0a, 0x09, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x12, 0x50, 0x0a, 0x0f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x73, 0x69, 0x67, + 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x73, + 0x63, 0x61, 0x6c, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, + 0x69, 0x63, 0x64, 0x62, 0x2e, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x48, 0x00, 0x52, 0x0e, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x53, 0x69, 0x67, 0x6e, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x53, 0x0a, 0x10, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x5f, + 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x26, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x73, 0x65, 0x6d, + 0x61, 0x6e, 0x74, 0x69, 0x63, 0x64, 0x62, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x53, 0x69, + 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x48, 0x00, 0x52, 0x0f, 0x6d, 0x65, 0x74, 0x68, 0x6f, + 0x64, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x4d, 0x0a, 0x0e, 0x74, 0x79, + 0x70, 0x65, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, + 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x64, 0x62, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x53, + 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x48, 0x00, 0x52, 0x0d, 0x74, 0x79, 0x70, 0x65, + 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x50, 0x0a, 0x0f, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, + 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x64, 0x62, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x48, 0x00, 0x52, 0x0e, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x42, 0x0e, 0x0a, 0x0c, 0x73, + 0x65, 0x61, 0x6c, 0x65, 0x64, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x81, 0x02, 0x0a, 0x0e, + 0x43, 0x6c, 0x61, 0x73, 0x73, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x45, + 0x0a, 0x0f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, + 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2e, + 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x64, 0x62, 0x2e, + 0x53, 0x63, 0x6f, 0x70, 0x65, 0x52, 0x0e, 0x74, 0x79, 0x70, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x35, 0x0a, 0x07, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x73, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2e, 0x6d, + 0x65, 0x74, 0x61, 0x2e, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x64, 0x62, 0x2e, 0x54, + 0x79, 0x70, 0x65, 0x52, 0x07, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x2f, 0x0a, 0x04, + 0x73, 0x65, 0x6c, 0x66, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x73, 0x63, 0x61, + 0x6c, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, + 0x64, 0x62, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x73, 0x65, 0x6c, 0x66, 0x12, 0x40, 0x0a, + 0x0c, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, + 0x2e, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x64, 0x62, 0x2e, 0x53, 0x63, 0x6f, 0x70, + 0x65, 0x52, 0x0c, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, + 0xdd, 0x01, 0x0a, 0x0f, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x12, 0x45, 0x0a, 0x0f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x61, + 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x73, + 0x63, 0x61, 0x6c, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, + 0x69, 0x63, 0x64, 0x62, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x52, 0x0e, 0x74, 0x79, 0x70, 0x65, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x45, 0x0a, 0x0f, 0x70, 0x61, + 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, + 0x2e, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x64, 0x62, 0x2e, 0x53, 0x63, 0x6f, 0x70, + 0x65, 0x52, 0x0e, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, + 0x73, 0x12, 0x3c, 0x0a, 0x0b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2e, 0x6d, + 0x65, 0x74, 0x61, 0x2e, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x64, 0x62, 0x2e, 0x54, + 0x79, 0x70, 0x65, 0x52, 0x0a, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x22, + 0xd2, 0x01, 0x0a, 0x0d, 0x54, 0x79, 0x70, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x12, 0x45, 0x0a, 0x0f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, + 0x74, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x73, 0x63, 0x61, + 0x6c, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, + 0x64, 0x62, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x52, 0x0e, 0x74, 0x79, 0x70, 0x65, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x3c, 0x0a, 0x0b, 0x6c, 0x6f, 0x77, 0x65, + 0x72, 0x5f, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, + 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x73, 0x65, 0x6d, 0x61, 0x6e, + 0x74, 0x69, 0x63, 0x64, 0x62, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, 0x6c, 0x6f, 0x77, 0x65, + 0x72, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x3c, 0x0a, 0x0b, 0x75, 0x70, 0x70, 0x65, 0x72, 0x5f, + 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x73, 0x63, + 0x61, 0x6c, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, + 0x63, 0x64, 0x62, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, 0x75, 0x70, 0x70, 0x65, 0x72, 0x42, + 0x6f, 0x75, 0x6e, 0x64, 0x22, 0x3f, 0x0a, 0x0e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x53, 0x69, 0x67, + 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x2d, 0x0a, 0x03, 0x74, 0x70, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, + 0x2e, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x64, 0x62, 0x2e, 0x54, 0x79, 0x70, 0x65, + 0x52, 0x03, 0x74, 0x70, 0x65, 0x22, 0xa0, 0x09, 0x0a, 0x11, 0x53, 0x79, 0x6d, 0x62, 0x6f, 0x6c, + 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x73, + 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x79, 0x6d, + 0x62, 0x6f, 0x6c, 0x12, 0x3b, 0x0a, 0x08, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x18, + 0x10, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2e, 0x6d, 0x65, + 0x74, 0x61, 0x2e, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x64, 0x62, 0x2e, 0x4c, 0x61, + 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x52, 0x08, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, + 0x12, 0x41, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, + 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x73, 0x65, 0x6d, 0x61, + 0x6e, 0x74, 0x69, 0x63, 0x64, 0x62, 0x2e, 0x53, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x49, 0x6e, 0x66, + 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4b, 0x69, 0x6e, 0x64, 0x52, 0x04, 0x6b, + 0x69, 0x6e, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, + 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, + 0x69, 0x65, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, + 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x3e, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x73, 0x63, 0x61, 0x6c, + 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x64, + 0x62, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x09, 0x73, 0x69, 0x67, + 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x43, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x73, 0x63, + 0x61, 0x6c, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, + 0x63, 0x64, 0x62, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, + 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x35, 0x0a, 0x06, 0x61, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x73, 0x63, + 0x61, 0x6c, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, + 0x63, 0x64, 0x62, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x06, 0x61, 0x63, 0x63, 0x65, + 0x73, 0x73, 0x12, 0x2d, 0x0a, 0x12, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x64, 0x65, 0x6e, + 0x5f, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x73, 0x18, 0x13, 0x20, 0x03, 0x28, 0x09, 0x52, 0x11, + 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x53, 0x79, 0x6d, 0x62, 0x6f, 0x6c, + 0x73, 0x12, 0x4a, 0x0a, 0x0d, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x61, + 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x64, 0x62, + 0x2e, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, + 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x8d, 0x02, + 0x0a, 0x04, 0x4b, 0x69, 0x6e, 0x64, 0x12, 0x10, 0x0a, 0x0c, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, + 0x4e, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x4c, 0x4f, 0x43, 0x41, + 0x4c, 0x10, 0x13, 0x12, 0x09, 0x0a, 0x05, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x10, 0x14, 0x12, 0x0a, + 0x0a, 0x06, 0x4d, 0x45, 0x54, 0x48, 0x4f, 0x44, 0x10, 0x03, 0x12, 0x0f, 0x0a, 0x0b, 0x43, 0x4f, + 0x4e, 0x53, 0x54, 0x52, 0x55, 0x43, 0x54, 0x4f, 0x52, 0x10, 0x15, 0x12, 0x09, 0x0a, 0x05, 0x4d, + 0x41, 0x43, 0x52, 0x4f, 0x10, 0x06, 0x12, 0x08, 0x0a, 0x04, 0x54, 0x59, 0x50, 0x45, 0x10, 0x07, + 0x12, 0x0d, 0x0a, 0x09, 0x50, 0x41, 0x52, 0x41, 0x4d, 0x45, 0x54, 0x45, 0x52, 0x10, 0x08, 0x12, + 0x12, 0x0a, 0x0e, 0x53, 0x45, 0x4c, 0x46, 0x5f, 0x50, 0x41, 0x52, 0x41, 0x4d, 0x45, 0x54, 0x45, + 0x52, 0x10, 0x11, 0x12, 0x12, 0x0a, 0x0e, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x50, 0x41, 0x52, 0x41, + 0x4d, 0x45, 0x54, 0x45, 0x52, 0x10, 0x09, 0x12, 0x0a, 0x0a, 0x06, 0x4f, 0x42, 0x4a, 0x45, 0x43, + 0x54, 0x10, 0x0a, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x41, 0x43, 0x4b, 0x41, 0x47, 0x45, 0x10, 0x0b, + 0x12, 0x12, 0x0a, 0x0e, 0x50, 0x41, 0x43, 0x4b, 0x41, 0x47, 0x45, 0x5f, 0x4f, 0x42, 0x4a, 0x45, + 0x43, 0x54, 0x10, 0x0c, 0x12, 0x09, 0x0a, 0x05, 0x43, 0x4c, 0x41, 0x53, 0x53, 0x10, 0x0d, 0x12, + 0x09, 0x0a, 0x05, 0x54, 0x52, 0x41, 0x49, 0x54, 0x10, 0x0e, 0x12, 0x0d, 0x0a, 0x09, 0x49, 0x4e, + 0x54, 0x45, 0x52, 0x46, 0x41, 0x43, 0x45, 0x10, 0x12, 0x22, 0x04, 0x08, 0x01, 0x10, 0x01, 0x22, + 0x04, 0x08, 0x02, 0x10, 0x02, 0x22, 0x04, 0x08, 0x04, 0x10, 0x04, 0x22, 0x04, 0x08, 0x05, 0x10, + 0x05, 0x22, 0x04, 0x08, 0x0f, 0x10, 0x0f, 0x22, 0x04, 0x08, 0x10, 0x10, 0x10, 0x22, 0xac, 0x02, + 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x12, 0x14, 0x0a, 0x10, 0x55, 0x4e, + 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x50, 0x45, 0x52, 0x54, 0x59, 0x10, 0x00, + 0x12, 0x0c, 0x0a, 0x08, 0x41, 0x42, 0x53, 0x54, 0x52, 0x41, 0x43, 0x54, 0x10, 0x04, 0x12, 0x09, + 0x0a, 0x05, 0x46, 0x49, 0x4e, 0x41, 0x4c, 0x10, 0x08, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x45, 0x41, + 0x4c, 0x45, 0x44, 0x10, 0x10, 0x12, 0x0c, 0x0a, 0x08, 0x49, 0x4d, 0x50, 0x4c, 0x49, 0x43, 0x49, + 0x54, 0x10, 0x20, 0x12, 0x08, 0x0a, 0x04, 0x4c, 0x41, 0x5a, 0x59, 0x10, 0x40, 0x12, 0x09, 0x0a, + 0x04, 0x43, 0x41, 0x53, 0x45, 0x10, 0x80, 0x01, 0x12, 0x0e, 0x0a, 0x09, 0x43, 0x4f, 0x56, 0x41, + 0x52, 0x49, 0x41, 0x4e, 0x54, 0x10, 0x80, 0x02, 0x12, 0x12, 0x0a, 0x0d, 0x43, 0x4f, 0x4e, 0x54, + 0x52, 0x41, 0x56, 0x41, 0x52, 0x49, 0x41, 0x4e, 0x54, 0x10, 0x80, 0x04, 0x12, 0x08, 0x0a, 0x03, + 0x56, 0x41, 0x4c, 0x10, 0x80, 0x08, 0x12, 0x08, 0x0a, 0x03, 0x56, 0x41, 0x52, 0x10, 0x80, 0x10, + 0x12, 0x0b, 0x0a, 0x06, 0x53, 0x54, 0x41, 0x54, 0x49, 0x43, 0x10, 0x80, 0x20, 0x12, 0x0c, 0x0a, + 0x07, 0x50, 0x52, 0x49, 0x4d, 0x41, 0x52, 0x59, 0x10, 0x80, 0x40, 0x12, 0x0a, 0x0a, 0x04, 0x45, + 0x4e, 0x55, 0x4d, 0x10, 0x80, 0x80, 0x01, 0x12, 0x0d, 0x0a, 0x07, 0x44, 0x45, 0x46, 0x41, 0x55, + 0x4c, 0x54, 0x10, 0x80, 0x80, 0x02, 0x12, 0x0b, 0x0a, 0x05, 0x47, 0x49, 0x56, 0x45, 0x4e, 0x10, + 0x80, 0x80, 0x04, 0x12, 0x0c, 0x0a, 0x06, 0x49, 0x4e, 0x4c, 0x49, 0x4e, 0x45, 0x10, 0x80, 0x80, + 0x08, 0x12, 0x0a, 0x0a, 0x04, 0x4f, 0x50, 0x45, 0x4e, 0x10, 0x80, 0x80, 0x10, 0x12, 0x11, 0x0a, + 0x0b, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x50, 0x41, 0x52, 0x45, 0x4e, 0x54, 0x10, 0x80, 0x80, 0x20, + 0x12, 0x0b, 0x0a, 0x05, 0x49, 0x4e, 0x46, 0x49, 0x58, 0x10, 0x80, 0x80, 0x40, 0x12, 0x0d, 0x0a, + 0x06, 0x4f, 0x50, 0x41, 0x51, 0x55, 0x45, 0x10, 0x80, 0x80, 0x80, 0x01, 0x4a, 0x04, 0x08, 0x02, + 0x10, 0x03, 0x4a, 0x04, 0x08, 0x06, 0x10, 0x07, 0x4a, 0x04, 0x08, 0x07, 0x10, 0x08, 0x4a, 0x04, + 0x08, 0x08, 0x10, 0x09, 0x4a, 0x04, 0x08, 0x09, 0x10, 0x0a, 0x4a, 0x04, 0x08, 0x0a, 0x10, 0x0b, + 0x4a, 0x04, 0x08, 0x0b, 0x10, 0x0c, 0x4a, 0x04, 0x08, 0x0c, 0x10, 0x0d, 0x4a, 0x04, 0x08, 0x0e, + 0x10, 0x0f, 0x4a, 0x04, 0x08, 0x0f, 0x10, 0x10, 0x22, 0xb5, 0x01, 0x0a, 0x0d, 0x44, 0x6f, 0x63, + 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x12, 0x43, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2e, 0x6d, 0x65, 0x74, + 0x61, 0x2e, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x64, 0x62, 0x2e, 0x44, 0x6f, 0x63, + 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x46, 0x6f, 0x72, 0x6d, 0x61, + 0x74, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x22, 0x45, 0x0a, 0x06, 0x46, 0x6f, 0x72, + 0x6d, 0x61, 0x74, 0x12, 0x08, 0x0a, 0x04, 0x48, 0x54, 0x4d, 0x4c, 0x10, 0x00, 0x12, 0x0c, 0x0a, + 0x08, 0x4d, 0x41, 0x52, 0x4b, 0x44, 0x4f, 0x57, 0x4e, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x4a, + 0x41, 0x56, 0x41, 0x44, 0x4f, 0x43, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x43, 0x41, 0x4c, + 0x41, 0x44, 0x4f, 0x43, 0x10, 0x03, 0x12, 0x08, 0x0a, 0x04, 0x4b, 0x44, 0x4f, 0x43, 0x10, 0x04, + 0x22, 0x3b, 0x0a, 0x0a, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2d, + 0x0a, 0x03, 0x74, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x73, 0x63, + 0x61, 0x6c, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, + 0x63, 0x64, 0x62, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x03, 0x74, 0x70, 0x65, 0x22, 0x90, 0x05, + 0x0a, 0x06, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x4d, 0x0a, 0x0e, 0x70, 0x72, 0x69, 0x76, + 0x61, 0x74, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x24, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x73, 0x65, + 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x64, 0x62, 0x2e, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, + 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x48, 0x00, 0x52, 0x0d, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, + 0x65, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x5a, 0x0a, 0x13, 0x70, 0x72, 0x69, 0x76, 0x61, + 0x74, 0x65, 0x5f, 0x74, 0x68, 0x69, 0x73, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2e, 0x6d, 0x65, 0x74, + 0x61, 0x2e, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x64, 0x62, 0x2e, 0x50, 0x72, 0x69, + 0x76, 0x61, 0x74, 0x65, 0x54, 0x68, 0x69, 0x73, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x48, 0x00, + 0x52, 0x11, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x54, 0x68, 0x69, 0x73, 0x41, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x12, 0x60, 0x0a, 0x15, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x5f, 0x77, + 0x69, 0x74, 0x68, 0x69, 0x6e, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, + 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x64, 0x62, 0x2e, 0x50, 0x72, 0x69, 0x76, 0x61, + 0x74, 0x65, 0x57, 0x69, 0x74, 0x68, 0x69, 0x6e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x48, 0x00, + 0x52, 0x13, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x57, 0x69, 0x74, 0x68, 0x69, 0x6e, 0x41, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x53, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, + 0x65, 0x64, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x26, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x73, 0x65, 0x6d, + 0x61, 0x6e, 0x74, 0x69, 0x63, 0x64, 0x62, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x65, + 0x64, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x48, 0x00, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x74, 0x65, + 0x63, 0x74, 0x65, 0x64, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x60, 0x0a, 0x15, 0x70, 0x72, + 0x6f, 0x74, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x74, 0x68, 0x69, 0x73, 0x5f, 0x61, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x73, 0x63, 0x61, 0x6c, + 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x64, + 0x62, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x65, 0x64, 0x54, 0x68, 0x69, 0x73, 0x41, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x48, 0x00, 0x52, 0x13, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, + 0x65, 0x64, 0x54, 0x68, 0x69, 0x73, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x66, 0x0a, 0x17, + 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x69, 0x6e, + 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, + 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x73, 0x65, 0x6d, 0x61, 0x6e, + 0x74, 0x69, 0x63, 0x64, 0x62, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x65, 0x64, 0x57, + 0x69, 0x74, 0x68, 0x69, 0x6e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x48, 0x00, 0x52, 0x15, 0x70, + 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x65, 0x64, 0x57, 0x69, 0x74, 0x68, 0x69, 0x6e, 0x41, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x12, 0x4a, 0x0a, 0x0d, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x61, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x73, 0x63, + 0x61, 0x6c, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, + 0x63, 0x64, 0x62, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x48, 0x00, 0x52, 0x0c, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x42, 0x0e, 0x0a, 0x0c, 0x73, 0x65, 0x61, 0x6c, 0x65, 0x64, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x22, 0x0f, 0x0a, 0x0d, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x65, 0x73, + 0x73, 0x22, 0x13, 0x0a, 0x11, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x54, 0x68, 0x69, 0x73, + 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x22, 0x2d, 0x0a, 0x13, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, + 0x65, 0x57, 0x69, 0x74, 0x68, 0x69, 0x6e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, + 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, + 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x22, 0x11, 0x0a, 0x0f, 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, + 0x65, 0x64, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x22, 0x15, 0x0a, 0x13, 0x50, 0x72, 0x6f, 0x74, + 0x65, 0x63, 0x74, 0x65, 0x64, 0x54, 0x68, 0x69, 0x73, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x22, + 0x2f, 0x0a, 0x15, 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x65, 0x64, 0x57, 0x69, 0x74, 0x68, + 0x69, 0x6e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x79, 0x6d, 0x62, + 0x6f, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, + 0x22, 0x0e, 0x0a, 0x0c, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x22, 0xd9, 0x01, 0x0a, 0x10, 0x53, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x4f, 0x63, 0x63, 0x75, 0x72, + 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x32, 0x0a, 0x05, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2e, 0x6d, 0x65, 0x74, + 0x61, 0x2e, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x64, 0x62, 0x2e, 0x52, 0x61, 0x6e, + 0x67, 0x65, 0x52, 0x05, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x79, 0x6d, + 0x62, 0x6f, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, + 0x6c, 0x12, 0x40, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x2c, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x73, 0x65, 0x6d, + 0x61, 0x6e, 0x74, 0x69, 0x63, 0x64, 0x62, 0x2e, 0x53, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x4f, 0x63, + 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x04, 0x72, + 0x6f, 0x6c, 0x65, 0x22, 0x37, 0x0a, 0x04, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x10, 0x0a, 0x0c, 0x55, + 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x52, 0x4f, 0x4c, 0x45, 0x10, 0x00, 0x12, 0x0d, 0x0a, + 0x09, 0x52, 0x45, 0x46, 0x45, 0x52, 0x45, 0x4e, 0x43, 0x45, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, + 0x44, 0x45, 0x46, 0x49, 0x4e, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x02, 0x22, 0xf7, 0x01, 0x0a, + 0x0a, 0x44, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x12, 0x32, 0x0a, 0x05, 0x72, + 0x61, 0x6e, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x73, 0x63, 0x61, + 0x6c, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, + 0x64, 0x62, 0x2e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x05, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x12, + 0x46, 0x0a, 0x08, 0x73, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x2a, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x73, + 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x64, 0x62, 0x2e, 0x44, 0x69, 0x61, 0x67, 0x6e, 0x6f, + 0x73, 0x74, 0x69, 0x63, 0x2e, 0x53, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x52, 0x08, 0x73, + 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x22, 0x53, 0x0a, 0x08, 0x53, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x12, 0x14, 0x0a, + 0x10, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x53, 0x45, 0x56, 0x45, 0x52, 0x49, 0x54, + 0x59, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x01, 0x12, 0x0b, + 0x0a, 0x07, 0x57, 0x41, 0x52, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x0f, 0x0a, 0x0b, 0x49, + 0x4e, 0x46, 0x4f, 0x52, 0x4d, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x03, 0x12, 0x08, 0x0a, 0x04, + 0x48, 0x49, 0x4e, 0x54, 0x10, 0x04, 0x22, 0x70, 0x0a, 0x09, 0x53, 0x79, 0x6e, 0x74, 0x68, 0x65, + 0x74, 0x69, 0x63, 0x12, 0x32, 0x0a, 0x05, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, + 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x64, 0x62, 0x2e, 0x52, 0x61, 0x6e, 0x67, 0x65, + 0x52, 0x05, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x2f, 0x0a, 0x04, 0x74, 0x72, 0x65, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2e, 0x6d, 0x65, + 0x74, 0x61, 0x2e, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x64, 0x62, 0x2e, 0x54, 0x72, + 0x65, 0x65, 0x52, 0x04, 0x74, 0x72, 0x65, 0x65, 0x22, 0xe9, 0x04, 0x0a, 0x04, 0x54, 0x72, 0x65, + 0x65, 0x12, 0x41, 0x0a, 0x0a, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x5f, 0x74, 0x72, 0x65, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2e, 0x6d, 0x65, + 0x74, 0x61, 0x2e, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x64, 0x62, 0x2e, 0x41, 0x70, + 0x70, 0x6c, 0x79, 0x54, 0x72, 0x65, 0x65, 0x48, 0x00, 0x52, 0x09, 0x61, 0x70, 0x70, 0x6c, 0x79, + 0x54, 0x72, 0x65, 0x65, 0x12, 0x4a, 0x0a, 0x0d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x74, 0x72, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x73, 0x63, + 0x61, 0x6c, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, + 0x63, 0x64, 0x62, 0x2e, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x72, 0x65, 0x65, + 0x48, 0x00, 0x52, 0x0c, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x72, 0x65, 0x65, + 0x12, 0x38, 0x0a, 0x07, 0x69, 0x64, 0x5f, 0x74, 0x72, 0x65, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1d, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x73, + 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x64, 0x62, 0x2e, 0x49, 0x64, 0x54, 0x72, 0x65, 0x65, + 0x48, 0x00, 0x52, 0x06, 0x69, 0x64, 0x54, 0x72, 0x65, 0x65, 0x12, 0x47, 0x0a, 0x0c, 0x6c, 0x69, + 0x74, 0x65, 0x72, 0x61, 0x6c, 0x5f, 0x74, 0x72, 0x65, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x22, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x73, 0x65, + 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x64, 0x62, 0x2e, 0x4c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, + 0x54, 0x72, 0x65, 0x65, 0x48, 0x00, 0x52, 0x0b, 0x6c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x54, + 0x72, 0x65, 0x65, 0x12, 0x5d, 0x0a, 0x14, 0x6d, 0x61, 0x63, 0x72, 0x6f, 0x5f, 0x65, 0x78, 0x70, + 0x61, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x72, 0x65, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x29, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x73, + 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x64, 0x62, 0x2e, 0x4d, 0x61, 0x63, 0x72, 0x6f, 0x45, + 0x78, 0x70, 0x61, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x72, 0x65, 0x65, 0x48, 0x00, 0x52, 0x12, + 0x6d, 0x61, 0x63, 0x72, 0x6f, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x72, + 0x65, 0x65, 0x12, 0x4a, 0x0a, 0x0d, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x74, + 0x72, 0x65, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x73, 0x63, 0x61, 0x6c, + 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x64, + 0x62, 0x2e, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x54, 0x72, 0x65, 0x65, 0x48, 0x00, + 0x52, 0x0c, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x54, 0x72, 0x65, 0x65, 0x12, 0x44, + 0x0a, 0x0b, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x5f, 0x74, 0x72, 0x65, 0x65, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, + 0x2e, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x64, 0x62, 0x2e, 0x53, 0x65, 0x6c, 0x65, + 0x63, 0x74, 0x54, 0x72, 0x65, 0x65, 0x48, 0x00, 0x52, 0x0a, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, + 0x54, 0x72, 0x65, 0x65, 0x12, 0x4e, 0x0a, 0x0f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x61, 0x70, 0x70, + 0x6c, 0x79, 0x5f, 0x74, 0x72, 0x65, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, + 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x73, 0x65, 0x6d, 0x61, 0x6e, + 0x74, 0x69, 0x63, 0x64, 0x62, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x54, + 0x72, 0x65, 0x65, 0x48, 0x00, 0x52, 0x0d, 0x74, 0x79, 0x70, 0x65, 0x41, 0x70, 0x70, 0x6c, 0x79, + 0x54, 0x72, 0x65, 0x65, 0x42, 0x0e, 0x0a, 0x0c, 0x73, 0x65, 0x61, 0x6c, 0x65, 0x64, 0x5f, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x22, 0x7f, 0x0a, 0x09, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x54, 0x72, 0x65, + 0x65, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, + 0x2e, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x64, 0x62, 0x2e, 0x54, 0x72, 0x65, 0x65, + 0x52, 0x08, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x39, 0x0a, 0x09, 0x61, 0x72, + 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, + 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x73, 0x65, 0x6d, 0x61, 0x6e, + 0x74, 0x69, 0x63, 0x64, 0x62, 0x2e, 0x54, 0x72, 0x65, 0x65, 0x52, 0x09, 0x61, 0x72, 0x67, 0x75, + 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x7e, 0x0a, 0x0c, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x54, 0x72, 0x65, 0x65, 0x12, 0x3d, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, + 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x73, 0x63, 0x61, 0x6c, + 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x64, + 0x62, 0x2e, 0x49, 0x64, 0x54, 0x72, 0x65, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, + 0x74, 0x65, 0x72, 0x73, 0x12, 0x2f, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, + 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x64, 0x62, 0x2e, 0x54, 0x72, 0x65, 0x65, 0x52, + 0x04, 0x62, 0x6f, 0x64, 0x79, 0x22, 0x20, 0x0a, 0x06, 0x49, 0x64, 0x54, 0x72, 0x65, 0x65, 0x12, + 0x16, 0x0a, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x22, 0x4a, 0x0a, 0x0b, 0x4c, 0x69, 0x74, 0x65, 0x72, + 0x61, 0x6c, 0x54, 0x72, 0x65, 0x65, 0x12, 0x3b, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, + 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x61, + 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x64, 0x62, + 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x73, 0x74, + 0x61, 0x6e, 0x74, 0x22, 0x8b, 0x01, 0x0a, 0x12, 0x4d, 0x61, 0x63, 0x72, 0x6f, 0x45, 0x78, 0x70, + 0x61, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x72, 0x65, 0x65, 0x12, 0x46, 0x0a, 0x10, 0x62, 0x65, + 0x66, 0x6f, 0x72, 0x65, 0x5f, 0x65, 0x78, 0x70, 0x61, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2e, 0x6d, 0x65, 0x74, + 0x61, 0x2e, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x64, 0x62, 0x2e, 0x54, 0x72, 0x65, + 0x65, 0x52, 0x0f, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x45, 0x78, 0x70, 0x61, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x12, 0x2d, 0x0a, 0x03, 0x74, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1b, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x73, 0x65, 0x6d, + 0x61, 0x6e, 0x74, 0x69, 0x63, 0x64, 0x62, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x03, 0x74, 0x70, + 0x65, 0x22, 0x42, 0x0a, 0x0c, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x54, 0x72, 0x65, + 0x65, 0x12, 0x32, 0x0a, 0x05, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1c, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x73, 0x65, + 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x64, 0x62, 0x2e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x05, + 0x72, 0x61, 0x6e, 0x67, 0x65, 0x22, 0x76, 0x0a, 0x0a, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x54, + 0x72, 0x65, 0x65, 0x12, 0x39, 0x0a, 0x09, 0x71, 0x75, 0x61, 0x6c, 0x69, 0x66, 0x69, 0x65, 0x72, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2e, 0x6d, + 0x65, 0x74, 0x61, 0x2e, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x64, 0x62, 0x2e, 0x54, + 0x72, 0x65, 0x65, 0x52, 0x09, 0x71, 0x75, 0x61, 0x6c, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x2d, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x73, 0x63, 0x61, + 0x6c, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, + 0x64, 0x62, 0x2e, 0x49, 0x64, 0x54, 0x72, 0x65, 0x65, 0x52, 0x02, 0x69, 0x64, 0x22, 0x8c, 0x01, + 0x0a, 0x0d, 0x54, 0x79, 0x70, 0x65, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x54, 0x72, 0x65, 0x65, 0x12, + 0x37, 0x0a, 0x08, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1b, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x73, + 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x64, 0x62, 0x2e, 0x54, 0x72, 0x65, 0x65, 0x52, 0x08, + 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x42, 0x0a, 0x0e, 0x74, 0x79, 0x70, 0x65, + 0x5f, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x1b, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x73, 0x65, + 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x64, 0x62, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0d, 0x74, + 0x79, 0x70, 0x65, 0x41, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2a, 0x36, 0x0a, 0x06, + 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x0a, 0x0a, 0x06, 0x4c, 0x45, 0x47, 0x41, 0x43, 0x59, + 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x53, 0x45, 0x4d, 0x41, 0x4e, 0x54, 0x49, 0x43, 0x44, 0x42, + 0x33, 0x10, 0x03, 0x12, 0x0f, 0x0a, 0x0b, 0x53, 0x45, 0x4d, 0x41, 0x4e, 0x54, 0x49, 0x43, 0x44, + 0x42, 0x34, 0x10, 0x04, 0x2a, 0x35, 0x0a, 0x08, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, + 0x12, 0x14, 0x0a, 0x10, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x4c, 0x41, 0x4e, 0x47, + 0x55, 0x41, 0x47, 0x45, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x53, 0x43, 0x41, 0x4c, 0x41, 0x10, + 0x01, 0x12, 0x08, 0x0a, 0x04, 0x4a, 0x41, 0x56, 0x41, 0x10, 0x02, 0x42, 0x47, 0x5a, 0x40, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x62, + 0x2f, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2d, 0x67, 0x61, 0x7a, 0x65, 0x6c, 0x6c, 0x65, 0x2f, 0x73, + 0x63, 0x61, 0x6c, 0x61, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x2f, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, + 0x69, 0x63, 0x64, 0x62, 0x3b, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x64, 0x62, 0xe2, + 0x3f, 0x02, 0x48, 0x00, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_scala_meta_semanticdb_semanticdb_proto_rawDescOnce sync.Once + file_scala_meta_semanticdb_semanticdb_proto_rawDescData = file_scala_meta_semanticdb_semanticdb_proto_rawDesc +) + +func file_scala_meta_semanticdb_semanticdb_proto_rawDescGZIP() []byte { + file_scala_meta_semanticdb_semanticdb_proto_rawDescOnce.Do(func() { + file_scala_meta_semanticdb_semanticdb_proto_rawDescData = protoimpl.X.CompressGZIP(file_scala_meta_semanticdb_semanticdb_proto_rawDescData) + }) + return file_scala_meta_semanticdb_semanticdb_proto_rawDescData +} + +var file_scala_meta_semanticdb_semanticdb_proto_enumTypes = make([]protoimpl.EnumInfo, 7) +var file_scala_meta_semanticdb_semanticdb_proto_msgTypes = make([]protoimpl.MessageInfo, 63) +var file_scala_meta_semanticdb_semanticdb_proto_goTypes = []interface{}{ + (Schema)(0), // 0: scala.meta.semanticdb.Schema + (Language)(0), // 1: scala.meta.semanticdb.Language + (SymbolInformation_Kind)(0), // 2: scala.meta.semanticdb.SymbolInformation.Kind + (SymbolInformation_Property)(0), // 3: scala.meta.semanticdb.SymbolInformation.Property + (Documentation_Format)(0), // 4: scala.meta.semanticdb.Documentation.Format + (SymbolOccurrence_Role)(0), // 5: scala.meta.semanticdb.SymbolOccurrence.Role + (Diagnostic_Severity)(0), // 6: scala.meta.semanticdb.Diagnostic.Severity + (*TextDocuments)(nil), // 7: scala.meta.semanticdb.TextDocuments + (*TextDocument)(nil), // 8: scala.meta.semanticdb.TextDocument + (*Range)(nil), // 9: scala.meta.semanticdb.Range + (*Location)(nil), // 10: scala.meta.semanticdb.Location + (*Scope)(nil), // 11: scala.meta.semanticdb.Scope + (*Type)(nil), // 12: scala.meta.semanticdb.Type + (*LambdaType)(nil), // 13: scala.meta.semanticdb.LambdaType + (*TypeRef)(nil), // 14: scala.meta.semanticdb.TypeRef + (*SingleType)(nil), // 15: scala.meta.semanticdb.SingleType + (*ThisType)(nil), // 16: scala.meta.semanticdb.ThisType + (*SuperType)(nil), // 17: scala.meta.semanticdb.SuperType + (*ConstantType)(nil), // 18: scala.meta.semanticdb.ConstantType + (*IntersectionType)(nil), // 19: scala.meta.semanticdb.IntersectionType + (*UnionType)(nil), // 20: scala.meta.semanticdb.UnionType + (*WithType)(nil), // 21: scala.meta.semanticdb.WithType + (*StructuralType)(nil), // 22: scala.meta.semanticdb.StructuralType + (*AnnotatedType)(nil), // 23: scala.meta.semanticdb.AnnotatedType + (*ExistentialType)(nil), // 24: scala.meta.semanticdb.ExistentialType + (*UniversalType)(nil), // 25: scala.meta.semanticdb.UniversalType + (*ByNameType)(nil), // 26: scala.meta.semanticdb.ByNameType + (*RepeatedType)(nil), // 27: scala.meta.semanticdb.RepeatedType + (*MatchType)(nil), // 28: scala.meta.semanticdb.MatchType + (*Constant)(nil), // 29: scala.meta.semanticdb.Constant + (*UnitConstant)(nil), // 30: scala.meta.semanticdb.UnitConstant + (*BooleanConstant)(nil), // 31: scala.meta.semanticdb.BooleanConstant + (*ByteConstant)(nil), // 32: scala.meta.semanticdb.ByteConstant + (*ShortConstant)(nil), // 33: scala.meta.semanticdb.ShortConstant + (*CharConstant)(nil), // 34: scala.meta.semanticdb.CharConstant + (*IntConstant)(nil), // 35: scala.meta.semanticdb.IntConstant + (*LongConstant)(nil), // 36: scala.meta.semanticdb.LongConstant + (*FloatConstant)(nil), // 37: scala.meta.semanticdb.FloatConstant + (*DoubleConstant)(nil), // 38: scala.meta.semanticdb.DoubleConstant + (*StringConstant)(nil), // 39: scala.meta.semanticdb.StringConstant + (*NullConstant)(nil), // 40: scala.meta.semanticdb.NullConstant + (*Signature)(nil), // 41: scala.meta.semanticdb.Signature + (*ClassSignature)(nil), // 42: scala.meta.semanticdb.ClassSignature + (*MethodSignature)(nil), // 43: scala.meta.semanticdb.MethodSignature + (*TypeSignature)(nil), // 44: scala.meta.semanticdb.TypeSignature + (*ValueSignature)(nil), // 45: scala.meta.semanticdb.ValueSignature + (*SymbolInformation)(nil), // 46: scala.meta.semanticdb.SymbolInformation + (*Documentation)(nil), // 47: scala.meta.semanticdb.Documentation + (*Annotation)(nil), // 48: scala.meta.semanticdb.Annotation + (*Access)(nil), // 49: scala.meta.semanticdb.Access + (*PrivateAccess)(nil), // 50: scala.meta.semanticdb.PrivateAccess + (*PrivateThisAccess)(nil), // 51: scala.meta.semanticdb.PrivateThisAccess + (*PrivateWithinAccess)(nil), // 52: scala.meta.semanticdb.PrivateWithinAccess + (*ProtectedAccess)(nil), // 53: scala.meta.semanticdb.ProtectedAccess + (*ProtectedThisAccess)(nil), // 54: scala.meta.semanticdb.ProtectedThisAccess + (*ProtectedWithinAccess)(nil), // 55: scala.meta.semanticdb.ProtectedWithinAccess + (*PublicAccess)(nil), // 56: scala.meta.semanticdb.PublicAccess + (*SymbolOccurrence)(nil), // 57: scala.meta.semanticdb.SymbolOccurrence + (*Diagnostic)(nil), // 58: scala.meta.semanticdb.Diagnostic + (*Synthetic)(nil), // 59: scala.meta.semanticdb.Synthetic + (*Tree)(nil), // 60: scala.meta.semanticdb.Tree + (*ApplyTree)(nil), // 61: scala.meta.semanticdb.ApplyTree + (*FunctionTree)(nil), // 62: scala.meta.semanticdb.FunctionTree + (*IdTree)(nil), // 63: scala.meta.semanticdb.IdTree + (*LiteralTree)(nil), // 64: scala.meta.semanticdb.LiteralTree + (*MacroExpansionTree)(nil), // 65: scala.meta.semanticdb.MacroExpansionTree + (*OriginalTree)(nil), // 66: scala.meta.semanticdb.OriginalTree + (*SelectTree)(nil), // 67: scala.meta.semanticdb.SelectTree + (*TypeApplyTree)(nil), // 68: scala.meta.semanticdb.TypeApplyTree + (*MatchType_CaseType)(nil), // 69: scala.meta.semanticdb.MatchType.CaseType +} +var file_scala_meta_semanticdb_semanticdb_proto_depIdxs = []int32{ + 8, // 0: scala.meta.semanticdb.TextDocuments.documents:type_name -> scala.meta.semanticdb.TextDocument + 0, // 1: scala.meta.semanticdb.TextDocument.schema:type_name -> scala.meta.semanticdb.Schema + 1, // 2: scala.meta.semanticdb.TextDocument.language:type_name -> scala.meta.semanticdb.Language + 46, // 3: scala.meta.semanticdb.TextDocument.symbols:type_name -> scala.meta.semanticdb.SymbolInformation + 57, // 4: scala.meta.semanticdb.TextDocument.occurrences:type_name -> scala.meta.semanticdb.SymbolOccurrence + 58, // 5: scala.meta.semanticdb.TextDocument.diagnostics:type_name -> scala.meta.semanticdb.Diagnostic + 59, // 6: scala.meta.semanticdb.TextDocument.synthetics:type_name -> scala.meta.semanticdb.Synthetic + 9, // 7: scala.meta.semanticdb.Location.range:type_name -> scala.meta.semanticdb.Range + 46, // 8: scala.meta.semanticdb.Scope.hardlinks:type_name -> scala.meta.semanticdb.SymbolInformation + 14, // 9: scala.meta.semanticdb.Type.type_ref:type_name -> scala.meta.semanticdb.TypeRef + 15, // 10: scala.meta.semanticdb.Type.single_type:type_name -> scala.meta.semanticdb.SingleType + 16, // 11: scala.meta.semanticdb.Type.this_type:type_name -> scala.meta.semanticdb.ThisType + 17, // 12: scala.meta.semanticdb.Type.super_type:type_name -> scala.meta.semanticdb.SuperType + 18, // 13: scala.meta.semanticdb.Type.constant_type:type_name -> scala.meta.semanticdb.ConstantType + 19, // 14: scala.meta.semanticdb.Type.intersection_type:type_name -> scala.meta.semanticdb.IntersectionType + 20, // 15: scala.meta.semanticdb.Type.union_type:type_name -> scala.meta.semanticdb.UnionType + 21, // 16: scala.meta.semanticdb.Type.with_type:type_name -> scala.meta.semanticdb.WithType + 22, // 17: scala.meta.semanticdb.Type.structural_type:type_name -> scala.meta.semanticdb.StructuralType + 23, // 18: scala.meta.semanticdb.Type.annotated_type:type_name -> scala.meta.semanticdb.AnnotatedType + 24, // 19: scala.meta.semanticdb.Type.existential_type:type_name -> scala.meta.semanticdb.ExistentialType + 25, // 20: scala.meta.semanticdb.Type.universal_type:type_name -> scala.meta.semanticdb.UniversalType + 26, // 21: scala.meta.semanticdb.Type.by_name_type:type_name -> scala.meta.semanticdb.ByNameType + 27, // 22: scala.meta.semanticdb.Type.repeated_type:type_name -> scala.meta.semanticdb.RepeatedType + 28, // 23: scala.meta.semanticdb.Type.match_type:type_name -> scala.meta.semanticdb.MatchType + 13, // 24: scala.meta.semanticdb.Type.lambda_type:type_name -> scala.meta.semanticdb.LambdaType + 11, // 25: scala.meta.semanticdb.LambdaType.parameters:type_name -> scala.meta.semanticdb.Scope + 12, // 26: scala.meta.semanticdb.LambdaType.return_type:type_name -> scala.meta.semanticdb.Type + 12, // 27: scala.meta.semanticdb.TypeRef.prefix:type_name -> scala.meta.semanticdb.Type + 12, // 28: scala.meta.semanticdb.TypeRef.type_arguments:type_name -> scala.meta.semanticdb.Type + 12, // 29: scala.meta.semanticdb.SingleType.prefix:type_name -> scala.meta.semanticdb.Type + 12, // 30: scala.meta.semanticdb.SuperType.prefix:type_name -> scala.meta.semanticdb.Type + 29, // 31: scala.meta.semanticdb.ConstantType.constant:type_name -> scala.meta.semanticdb.Constant + 12, // 32: scala.meta.semanticdb.IntersectionType.types:type_name -> scala.meta.semanticdb.Type + 12, // 33: scala.meta.semanticdb.UnionType.types:type_name -> scala.meta.semanticdb.Type + 12, // 34: scala.meta.semanticdb.WithType.types:type_name -> scala.meta.semanticdb.Type + 12, // 35: scala.meta.semanticdb.StructuralType.tpe:type_name -> scala.meta.semanticdb.Type + 11, // 36: scala.meta.semanticdb.StructuralType.declarations:type_name -> scala.meta.semanticdb.Scope + 48, // 37: scala.meta.semanticdb.AnnotatedType.annotations:type_name -> scala.meta.semanticdb.Annotation + 12, // 38: scala.meta.semanticdb.AnnotatedType.tpe:type_name -> scala.meta.semanticdb.Type + 12, // 39: scala.meta.semanticdb.ExistentialType.tpe:type_name -> scala.meta.semanticdb.Type + 11, // 40: scala.meta.semanticdb.ExistentialType.declarations:type_name -> scala.meta.semanticdb.Scope + 11, // 41: scala.meta.semanticdb.UniversalType.type_parameters:type_name -> scala.meta.semanticdb.Scope + 12, // 42: scala.meta.semanticdb.UniversalType.tpe:type_name -> scala.meta.semanticdb.Type + 12, // 43: scala.meta.semanticdb.ByNameType.tpe:type_name -> scala.meta.semanticdb.Type + 12, // 44: scala.meta.semanticdb.RepeatedType.tpe:type_name -> scala.meta.semanticdb.Type + 12, // 45: scala.meta.semanticdb.MatchType.scrutinee:type_name -> scala.meta.semanticdb.Type + 69, // 46: scala.meta.semanticdb.MatchType.cases:type_name -> scala.meta.semanticdb.MatchType.CaseType + 30, // 47: scala.meta.semanticdb.Constant.unit_constant:type_name -> scala.meta.semanticdb.UnitConstant + 31, // 48: scala.meta.semanticdb.Constant.boolean_constant:type_name -> scala.meta.semanticdb.BooleanConstant + 32, // 49: scala.meta.semanticdb.Constant.byte_constant:type_name -> scala.meta.semanticdb.ByteConstant + 33, // 50: scala.meta.semanticdb.Constant.short_constant:type_name -> scala.meta.semanticdb.ShortConstant + 34, // 51: scala.meta.semanticdb.Constant.char_constant:type_name -> scala.meta.semanticdb.CharConstant + 35, // 52: scala.meta.semanticdb.Constant.int_constant:type_name -> scala.meta.semanticdb.IntConstant + 36, // 53: scala.meta.semanticdb.Constant.long_constant:type_name -> scala.meta.semanticdb.LongConstant + 37, // 54: scala.meta.semanticdb.Constant.float_constant:type_name -> scala.meta.semanticdb.FloatConstant + 38, // 55: scala.meta.semanticdb.Constant.double_constant:type_name -> scala.meta.semanticdb.DoubleConstant + 39, // 56: scala.meta.semanticdb.Constant.string_constant:type_name -> scala.meta.semanticdb.StringConstant + 40, // 57: scala.meta.semanticdb.Constant.null_constant:type_name -> scala.meta.semanticdb.NullConstant + 42, // 58: scala.meta.semanticdb.Signature.class_signature:type_name -> scala.meta.semanticdb.ClassSignature + 43, // 59: scala.meta.semanticdb.Signature.method_signature:type_name -> scala.meta.semanticdb.MethodSignature + 44, // 60: scala.meta.semanticdb.Signature.type_signature:type_name -> scala.meta.semanticdb.TypeSignature + 45, // 61: scala.meta.semanticdb.Signature.value_signature:type_name -> scala.meta.semanticdb.ValueSignature + 11, // 62: scala.meta.semanticdb.ClassSignature.type_parameters:type_name -> scala.meta.semanticdb.Scope + 12, // 63: scala.meta.semanticdb.ClassSignature.parents:type_name -> scala.meta.semanticdb.Type + 12, // 64: scala.meta.semanticdb.ClassSignature.self:type_name -> scala.meta.semanticdb.Type + 11, // 65: scala.meta.semanticdb.ClassSignature.declarations:type_name -> scala.meta.semanticdb.Scope + 11, // 66: scala.meta.semanticdb.MethodSignature.type_parameters:type_name -> scala.meta.semanticdb.Scope + 11, // 67: scala.meta.semanticdb.MethodSignature.parameter_lists:type_name -> scala.meta.semanticdb.Scope + 12, // 68: scala.meta.semanticdb.MethodSignature.return_type:type_name -> scala.meta.semanticdb.Type + 11, // 69: scala.meta.semanticdb.TypeSignature.type_parameters:type_name -> scala.meta.semanticdb.Scope + 12, // 70: scala.meta.semanticdb.TypeSignature.lower_bound:type_name -> scala.meta.semanticdb.Type + 12, // 71: scala.meta.semanticdb.TypeSignature.upper_bound:type_name -> scala.meta.semanticdb.Type + 12, // 72: scala.meta.semanticdb.ValueSignature.tpe:type_name -> scala.meta.semanticdb.Type + 1, // 73: scala.meta.semanticdb.SymbolInformation.language:type_name -> scala.meta.semanticdb.Language + 2, // 74: scala.meta.semanticdb.SymbolInformation.kind:type_name -> scala.meta.semanticdb.SymbolInformation.Kind + 41, // 75: scala.meta.semanticdb.SymbolInformation.signature:type_name -> scala.meta.semanticdb.Signature + 48, // 76: scala.meta.semanticdb.SymbolInformation.annotations:type_name -> scala.meta.semanticdb.Annotation + 49, // 77: scala.meta.semanticdb.SymbolInformation.access:type_name -> scala.meta.semanticdb.Access + 47, // 78: scala.meta.semanticdb.SymbolInformation.documentation:type_name -> scala.meta.semanticdb.Documentation + 4, // 79: scala.meta.semanticdb.Documentation.format:type_name -> scala.meta.semanticdb.Documentation.Format + 12, // 80: scala.meta.semanticdb.Annotation.tpe:type_name -> scala.meta.semanticdb.Type + 50, // 81: scala.meta.semanticdb.Access.private_access:type_name -> scala.meta.semanticdb.PrivateAccess + 51, // 82: scala.meta.semanticdb.Access.private_this_access:type_name -> scala.meta.semanticdb.PrivateThisAccess + 52, // 83: scala.meta.semanticdb.Access.private_within_access:type_name -> scala.meta.semanticdb.PrivateWithinAccess + 53, // 84: scala.meta.semanticdb.Access.protected_access:type_name -> scala.meta.semanticdb.ProtectedAccess + 54, // 85: scala.meta.semanticdb.Access.protected_this_access:type_name -> scala.meta.semanticdb.ProtectedThisAccess + 55, // 86: scala.meta.semanticdb.Access.protected_within_access:type_name -> scala.meta.semanticdb.ProtectedWithinAccess + 56, // 87: scala.meta.semanticdb.Access.public_access:type_name -> scala.meta.semanticdb.PublicAccess + 9, // 88: scala.meta.semanticdb.SymbolOccurrence.range:type_name -> scala.meta.semanticdb.Range + 5, // 89: scala.meta.semanticdb.SymbolOccurrence.role:type_name -> scala.meta.semanticdb.SymbolOccurrence.Role + 9, // 90: scala.meta.semanticdb.Diagnostic.range:type_name -> scala.meta.semanticdb.Range + 6, // 91: scala.meta.semanticdb.Diagnostic.severity:type_name -> scala.meta.semanticdb.Diagnostic.Severity + 9, // 92: scala.meta.semanticdb.Synthetic.range:type_name -> scala.meta.semanticdb.Range + 60, // 93: scala.meta.semanticdb.Synthetic.tree:type_name -> scala.meta.semanticdb.Tree + 61, // 94: scala.meta.semanticdb.Tree.apply_tree:type_name -> scala.meta.semanticdb.ApplyTree + 62, // 95: scala.meta.semanticdb.Tree.function_tree:type_name -> scala.meta.semanticdb.FunctionTree + 63, // 96: scala.meta.semanticdb.Tree.id_tree:type_name -> scala.meta.semanticdb.IdTree + 64, // 97: scala.meta.semanticdb.Tree.literal_tree:type_name -> scala.meta.semanticdb.LiteralTree + 65, // 98: scala.meta.semanticdb.Tree.macro_expansion_tree:type_name -> scala.meta.semanticdb.MacroExpansionTree + 66, // 99: scala.meta.semanticdb.Tree.original_tree:type_name -> scala.meta.semanticdb.OriginalTree + 67, // 100: scala.meta.semanticdb.Tree.select_tree:type_name -> scala.meta.semanticdb.SelectTree + 68, // 101: scala.meta.semanticdb.Tree.type_apply_tree:type_name -> scala.meta.semanticdb.TypeApplyTree + 60, // 102: scala.meta.semanticdb.ApplyTree.function:type_name -> scala.meta.semanticdb.Tree + 60, // 103: scala.meta.semanticdb.ApplyTree.arguments:type_name -> scala.meta.semanticdb.Tree + 63, // 104: scala.meta.semanticdb.FunctionTree.parameters:type_name -> scala.meta.semanticdb.IdTree + 60, // 105: scala.meta.semanticdb.FunctionTree.body:type_name -> scala.meta.semanticdb.Tree + 29, // 106: scala.meta.semanticdb.LiteralTree.constant:type_name -> scala.meta.semanticdb.Constant + 60, // 107: scala.meta.semanticdb.MacroExpansionTree.before_expansion:type_name -> scala.meta.semanticdb.Tree + 12, // 108: scala.meta.semanticdb.MacroExpansionTree.tpe:type_name -> scala.meta.semanticdb.Type + 9, // 109: scala.meta.semanticdb.OriginalTree.range:type_name -> scala.meta.semanticdb.Range + 60, // 110: scala.meta.semanticdb.SelectTree.qualifier:type_name -> scala.meta.semanticdb.Tree + 63, // 111: scala.meta.semanticdb.SelectTree.id:type_name -> scala.meta.semanticdb.IdTree + 60, // 112: scala.meta.semanticdb.TypeApplyTree.function:type_name -> scala.meta.semanticdb.Tree + 12, // 113: scala.meta.semanticdb.TypeApplyTree.type_arguments:type_name -> scala.meta.semanticdb.Type + 12, // 114: scala.meta.semanticdb.MatchType.CaseType.key:type_name -> scala.meta.semanticdb.Type + 12, // 115: scala.meta.semanticdb.MatchType.CaseType.body:type_name -> scala.meta.semanticdb.Type + 116, // [116:116] is the sub-list for method output_type + 116, // [116:116] is the sub-list for method input_type + 116, // [116:116] is the sub-list for extension type_name + 116, // [116:116] is the sub-list for extension extendee + 0, // [0:116] is the sub-list for field type_name +} + +func init() { file_scala_meta_semanticdb_semanticdb_proto_init() } +func file_scala_meta_semanticdb_semanticdb_proto_init() { + if File_scala_meta_semanticdb_semanticdb_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_scala_meta_semanticdb_semanticdb_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TextDocuments); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_scala_meta_semanticdb_semanticdb_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TextDocument); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_scala_meta_semanticdb_semanticdb_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Range); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_scala_meta_semanticdb_semanticdb_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Location); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_scala_meta_semanticdb_semanticdb_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Scope); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_scala_meta_semanticdb_semanticdb_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Type); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_scala_meta_semanticdb_semanticdb_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LambdaType); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_scala_meta_semanticdb_semanticdb_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TypeRef); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_scala_meta_semanticdb_semanticdb_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SingleType); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_scala_meta_semanticdb_semanticdb_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ThisType); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_scala_meta_semanticdb_semanticdb_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SuperType); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_scala_meta_semanticdb_semanticdb_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ConstantType); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_scala_meta_semanticdb_semanticdb_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IntersectionType); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_scala_meta_semanticdb_semanticdb_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UnionType); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_scala_meta_semanticdb_semanticdb_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WithType); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_scala_meta_semanticdb_semanticdb_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StructuralType); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_scala_meta_semanticdb_semanticdb_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AnnotatedType); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_scala_meta_semanticdb_semanticdb_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExistentialType); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_scala_meta_semanticdb_semanticdb_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UniversalType); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_scala_meta_semanticdb_semanticdb_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ByNameType); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_scala_meta_semanticdb_semanticdb_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RepeatedType); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_scala_meta_semanticdb_semanticdb_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MatchType); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_scala_meta_semanticdb_semanticdb_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Constant); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_scala_meta_semanticdb_semanticdb_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UnitConstant); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_scala_meta_semanticdb_semanticdb_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BooleanConstant); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_scala_meta_semanticdb_semanticdb_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ByteConstant); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_scala_meta_semanticdb_semanticdb_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ShortConstant); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_scala_meta_semanticdb_semanticdb_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CharConstant); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_scala_meta_semanticdb_semanticdb_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IntConstant); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_scala_meta_semanticdb_semanticdb_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LongConstant); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_scala_meta_semanticdb_semanticdb_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FloatConstant); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_scala_meta_semanticdb_semanticdb_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DoubleConstant); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_scala_meta_semanticdb_semanticdb_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StringConstant); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_scala_meta_semanticdb_semanticdb_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NullConstant); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_scala_meta_semanticdb_semanticdb_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Signature); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_scala_meta_semanticdb_semanticdb_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ClassSignature); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_scala_meta_semanticdb_semanticdb_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MethodSignature); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_scala_meta_semanticdb_semanticdb_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TypeSignature); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_scala_meta_semanticdb_semanticdb_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ValueSignature); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_scala_meta_semanticdb_semanticdb_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SymbolInformation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_scala_meta_semanticdb_semanticdb_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Documentation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_scala_meta_semanticdb_semanticdb_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Annotation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_scala_meta_semanticdb_semanticdb_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Access); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_scala_meta_semanticdb_semanticdb_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PrivateAccess); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_scala_meta_semanticdb_semanticdb_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PrivateThisAccess); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_scala_meta_semanticdb_semanticdb_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PrivateWithinAccess); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_scala_meta_semanticdb_semanticdb_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ProtectedAccess); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_scala_meta_semanticdb_semanticdb_proto_msgTypes[47].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ProtectedThisAccess); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_scala_meta_semanticdb_semanticdb_proto_msgTypes[48].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ProtectedWithinAccess); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_scala_meta_semanticdb_semanticdb_proto_msgTypes[49].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PublicAccess); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_scala_meta_semanticdb_semanticdb_proto_msgTypes[50].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SymbolOccurrence); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_scala_meta_semanticdb_semanticdb_proto_msgTypes[51].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Diagnostic); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_scala_meta_semanticdb_semanticdb_proto_msgTypes[52].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Synthetic); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_scala_meta_semanticdb_semanticdb_proto_msgTypes[53].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Tree); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_scala_meta_semanticdb_semanticdb_proto_msgTypes[54].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ApplyTree); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_scala_meta_semanticdb_semanticdb_proto_msgTypes[55].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FunctionTree); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_scala_meta_semanticdb_semanticdb_proto_msgTypes[56].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IdTree); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_scala_meta_semanticdb_semanticdb_proto_msgTypes[57].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LiteralTree); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_scala_meta_semanticdb_semanticdb_proto_msgTypes[58].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MacroExpansionTree); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_scala_meta_semanticdb_semanticdb_proto_msgTypes[59].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OriginalTree); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_scala_meta_semanticdb_semanticdb_proto_msgTypes[60].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SelectTree); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_scala_meta_semanticdb_semanticdb_proto_msgTypes[61].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TypeApplyTree); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_scala_meta_semanticdb_semanticdb_proto_msgTypes[62].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MatchType_CaseType); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_scala_meta_semanticdb_semanticdb_proto_msgTypes[5].OneofWrappers = []interface{}{ + (*Type_TypeRef)(nil), + (*Type_SingleType)(nil), + (*Type_ThisType)(nil), + (*Type_SuperType)(nil), + (*Type_ConstantType)(nil), + (*Type_IntersectionType)(nil), + (*Type_UnionType)(nil), + (*Type_WithType)(nil), + (*Type_StructuralType)(nil), + (*Type_AnnotatedType)(nil), + (*Type_ExistentialType)(nil), + (*Type_UniversalType)(nil), + (*Type_ByNameType)(nil), + (*Type_RepeatedType)(nil), + (*Type_MatchType)(nil), + (*Type_LambdaType)(nil), + } + file_scala_meta_semanticdb_semanticdb_proto_msgTypes[22].OneofWrappers = []interface{}{ + (*Constant_UnitConstant)(nil), + (*Constant_BooleanConstant)(nil), + (*Constant_ByteConstant)(nil), + (*Constant_ShortConstant)(nil), + (*Constant_CharConstant)(nil), + (*Constant_IntConstant)(nil), + (*Constant_LongConstant)(nil), + (*Constant_FloatConstant)(nil), + (*Constant_DoubleConstant)(nil), + (*Constant_StringConstant)(nil), + (*Constant_NullConstant)(nil), + } + file_scala_meta_semanticdb_semanticdb_proto_msgTypes[34].OneofWrappers = []interface{}{ + (*Signature_ClassSignature)(nil), + (*Signature_MethodSignature)(nil), + (*Signature_TypeSignature)(nil), + (*Signature_ValueSignature)(nil), + } + file_scala_meta_semanticdb_semanticdb_proto_msgTypes[42].OneofWrappers = []interface{}{ + (*Access_PrivateAccess)(nil), + (*Access_PrivateThisAccess)(nil), + (*Access_PrivateWithinAccess)(nil), + (*Access_ProtectedAccess)(nil), + (*Access_ProtectedThisAccess)(nil), + (*Access_ProtectedWithinAccess)(nil), + (*Access_PublicAccess)(nil), + } + file_scala_meta_semanticdb_semanticdb_proto_msgTypes[53].OneofWrappers = []interface{}{ + (*Tree_ApplyTree)(nil), + (*Tree_FunctionTree)(nil), + (*Tree_IdTree)(nil), + (*Tree_LiteralTree)(nil), + (*Tree_MacroExpansionTree)(nil), + (*Tree_OriginalTree)(nil), + (*Tree_SelectTree)(nil), + (*Tree_TypeApplyTree)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_scala_meta_semanticdb_semanticdb_proto_rawDesc, + NumEnums: 7, + NumMessages: 63, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_scala_meta_semanticdb_semanticdb_proto_goTypes, + DependencyIndexes: file_scala_meta_semanticdb_semanticdb_proto_depIdxs, + EnumInfos: file_scala_meta_semanticdb_semanticdb_proto_enumTypes, + MessageInfos: file_scala_meta_semanticdb_semanticdb_proto_msgTypes, + }.Build() + File_scala_meta_semanticdb_semanticdb_proto = out.File + file_scala_meta_semanticdb_semanticdb_proto_rawDesc = nil + file_scala_meta_semanticdb_semanticdb_proto_goTypes = nil + file_scala_meta_semanticdb_semanticdb_proto_depIdxs = nil +} diff --git a/scala/meta/semanticdb/semanticdb.proto b/scala/meta/semanticdb/semanticdb.proto new file mode 100644 index 00000000..bd748f4f --- /dev/null +++ b/scala/meta/semanticdb/semanticdb.proto @@ -0,0 +1,439 @@ +syntax = "proto3"; + +package scala.meta.semanticdb; + +option go_package = "github.com/stackb/scala-gazelle/scala/meta/semanticdb;semanticdb"; + +import "scalapb/scalapb.proto"; + +option (scalapb.options) = { + preserve_unknown_fields: false +}; + +enum Schema { + LEGACY = 0; + SEMANTICDB3 = 3; + SEMANTICDB4 = 4; +} + +message TextDocuments { + repeated TextDocument documents = 1; +} + +message TextDocument { + reserved 4, 8, 9; + Schema schema = 1; + string uri = 2; + string text = 3; + string md5 = 11; + Language language = 10; + repeated SymbolInformation symbols = 5; + repeated SymbolOccurrence occurrences = 6; + repeated Diagnostic diagnostics = 7; + repeated Synthetic synthetics = 12; +} + +enum Language { + UNKNOWN_LANGUAGE = 0; + SCALA = 1; + JAVA = 2; +} + +message Range { + int32 start_line = 1; + int32 start_character = 2; + int32 end_line = 3; + int32 end_character = 4; +} + +message Location { + string uri = 1; + Range range = 2; +} + +message Scope { + repeated string symlinks = 1; + repeated SymbolInformation hardlinks = 2; +} + +message Type { + reserved 1, 3, 4, 5, 6, 11, 12, 15, 16; + oneof sealed_value { + TypeRef type_ref = 2; + SingleType single_type = 20; + ThisType this_type = 21; + SuperType super_type = 22; + ConstantType constant_type = 23; + IntersectionType intersection_type = 17; + UnionType union_type = 18; + WithType with_type = 19; + StructuralType structural_type = 7; + AnnotatedType annotated_type = 8; + ExistentialType existential_type = 9; + UniversalType universal_type = 10; + ByNameType by_name_type = 13; + RepeatedType repeated_type = 14; + MatchType match_type = 25; + LambdaType lambda_type = 26; + } +} + +message LambdaType { + Scope parameters = 1; + Type return_type = 2; +} + +message TypeRef { + Type prefix = 1; + string symbol = 2; + repeated Type type_arguments = 3; +} + +message SingleType { + Type prefix = 1; + string symbol = 2; +} + +message ThisType { + string symbol = 1; +} + +message SuperType { + Type prefix = 1; + string symbol = 2; +} + +message ConstantType { + Constant constant = 1; +} + +message IntersectionType { + repeated Type types = 1; +} + +message UnionType { + repeated Type types = 1; +} + +message WithType { + repeated Type types = 1; +} + +message StructuralType { + reserved 1, 2, 3; + Type tpe = 4; + Scope declarations = 5; +} + +message AnnotatedType { + reserved 2; + repeated Annotation annotations = 3; + Type tpe = 1; +} + +message ExistentialType { + reserved 2; + Type tpe = 1; + Scope declarations = 3; +} + +message UniversalType { + reserved 1; + Scope type_parameters = 3; + Type tpe = 2; +} + +message ByNameType { + Type tpe = 1; +} + +message RepeatedType { + Type tpe = 1; +} + +message MatchType { + message CaseType { + Type key = 1; + Type body = 2; + } + Type scrutinee = 1; + repeated CaseType cases = 2; +} + +message Constant { + oneof sealed_value { + UnitConstant unit_constant = 1; + BooleanConstant boolean_constant = 2; + ByteConstant byte_constant = 3; + ShortConstant short_constant = 4; + CharConstant char_constant = 5; + IntConstant int_constant = 6; + LongConstant long_constant = 7; + FloatConstant float_constant = 8; + DoubleConstant double_constant = 9; + StringConstant string_constant = 10; + NullConstant null_constant = 11; + } +} + +message UnitConstant { +} + +message BooleanConstant { + bool value = 1; +} + +message ByteConstant { + int32 value = 1; +} + +message ShortConstant { + int32 value = 1; +} + +message CharConstant { + int32 value = 1; +} + +message IntConstant { + int32 value = 1; +} + +message LongConstant { + int64 value = 1; +} + +message FloatConstant { + float value = 1; +} + +message DoubleConstant { + double value = 1; +} + +message StringConstant { + string value = 1; +} + +message NullConstant { +} + +message Signature { + oneof sealed_value { + ClassSignature class_signature = 1; + MethodSignature method_signature = 2; + TypeSignature type_signature = 3; + ValueSignature value_signature = 4; + } +} + +message ClassSignature { + Scope type_parameters = 1; + repeated Type parents = 2; + Type self = 3; + Scope declarations = 4; +} + +message MethodSignature { + Scope type_parameters = 1; + repeated Scope parameter_lists = 2; + Type return_type = 3; +} + +message TypeSignature { + Scope type_parameters = 1; + Type lower_bound = 2; + Type upper_bound = 3; +} + +message ValueSignature { + Type tpe = 1; +} + +message SymbolInformation { + enum Kind { + reserved 1, 2, 4, 5, 15, 16; + UNKNOWN_KIND = 0; + LOCAL = 19; + FIELD = 20; + METHOD = 3; + CONSTRUCTOR = 21; + MACRO = 6; + TYPE = 7; + PARAMETER = 8; + SELF_PARAMETER = 17; + TYPE_PARAMETER = 9; + OBJECT = 10; + PACKAGE = 11; + PACKAGE_OBJECT = 12; + CLASS = 13; + TRAIT = 14; + INTERFACE = 18; + } + enum Property { + UNKNOWN_PROPERTY = 0; + // reserved 0x1; + // reserved 0x2; + ABSTRACT = 0x4; + FINAL = 0x8; + SEALED = 0x10; + IMPLICIT = 0x20; + LAZY = 0x40; + CASE = 0x80; + COVARIANT = 0x100; + CONTRAVARIANT = 0x200; + VAL = 0x400; + VAR = 0x800; + STATIC = 0x1000; + PRIMARY = 0x2000; + ENUM = 0x4000; + DEFAULT = 0x8000; + GIVEN = 0x10000; + INLINE = 0x20000; + OPEN = 0x40000; + TRANSPARENT = 0x80000; + INFIX = 0x100000; + OPAQUE = 0x200000; + } + reserved 2, 6, 7, 8, 9, 10, 11, 12, 14, 15; + string symbol = 1; + Language language = 16; + Kind kind = 3; + int32 properties = 4; + string display_name = 5; + Signature signature = 17; + repeated Annotation annotations = 13; + Access access = 18; + repeated string overridden_symbols = 19; + Documentation documentation = 20; +} + +message Documentation { + enum Format { + HTML = 0; + MARKDOWN = 1; + JAVADOC = 2; + SCALADOC = 3; + KDOC = 4; + } + string message = 1; + Format format = 2; +} + +message Annotation { + Type tpe = 1; +} + +message Access { + oneof sealed_value { + PrivateAccess private_access = 1; + PrivateThisAccess private_this_access = 2; + PrivateWithinAccess private_within_access = 3; + ProtectedAccess protected_access = 4; + ProtectedThisAccess protected_this_access = 5; + ProtectedWithinAccess protected_within_access = 6; + PublicAccess public_access = 7; + } +} + +message PrivateAccess { +} + +message PrivateThisAccess { +} + +message PrivateWithinAccess { + string symbol = 1; +} + +message ProtectedAccess { +} + +message ProtectedThisAccess { +} + +message ProtectedWithinAccess { + string symbol = 1; +} + +message PublicAccess { +} + +message SymbolOccurrence { + enum Role { + UNKNOWN_ROLE = 0; + REFERENCE = 1; + DEFINITION = 2; + } + Range range = 1; + string symbol = 2; + Role role = 3; +} + +message Diagnostic { + enum Severity { + UNKNOWN_SEVERITY = 0; + ERROR = 1; + WARNING = 2; + INFORMATION = 3; + HINT = 4; + } + Range range = 1; + Severity severity = 2; + string message = 3; +} + +message Synthetic { + Range range = 1; + Tree tree = 2; +} + +message Tree { + oneof sealed_value { + ApplyTree apply_tree = 1; + FunctionTree function_tree = 2; + IdTree id_tree = 3; + LiteralTree literal_tree = 4; + MacroExpansionTree macro_expansion_tree = 5; + OriginalTree original_tree = 6; + SelectTree select_tree = 7; + TypeApplyTree type_apply_tree = 8; + } +} + +message ApplyTree { + Tree function = 1; + repeated Tree arguments = 2; +} + +message FunctionTree { + repeated IdTree parameters = 1; + Tree body = 2; +} + +message IdTree { + string symbol = 1; +} + +message LiteralTree { + Constant constant = 1; +} + +message MacroExpansionTree { + Tree before_expansion = 1; + Type tpe = 2; +} + +message OriginalTree { + Range range = 1; +} + +message SelectTree { + Tree qualifier = 1; + IdTree id = 2; +} + +message TypeApplyTree { + Tree function = 1; + repeated Type type_arguments = 2; +} diff --git a/scalapb/BUILD.bazel b/scalapb/BUILD.bazel new file mode 100644 index 00000000..bd226b8a --- /dev/null +++ b/scalapb/BUILD.bazel @@ -0,0 +1,30 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library") +load("@rules_proto//proto:defs.bzl", "proto_library") +load("@build_stack_rules_proto//rules:proto_compiled_sources.bzl", "proto_compiled_sources") + +proto_library( + name = "scalapb_proto", + srcs = ["scalapb.proto"], + visibility = ["//visibility:public"], + deps = ["@com_google_protobuf//:descriptor_proto"], +) + +proto_compiled_sources( + name = "scalapb_go_compiled_sources", + srcs = ["scalapb.pb.go"], + output_mappings = ["scalapb.pb.go=github.com/stackb/scala-gazelle/scalapb/scalapb.pb.go"], + plugins = ["@build_stack_rules_proto//plugin/golang/protobuf:protoc-gen-go"], + proto = "scalapb_proto", +) + +go_library( + name = "scalapb", + srcs = ["scalapb.pb.go"], + importpath = "github.com/stackb/scala-gazelle/scalapb", + visibility = ["//visibility:public"], + deps = [ + "@org_golang_google_protobuf//reflect/protoreflect", + "@org_golang_google_protobuf//runtime/protoimpl", + "@org_golang_google_protobuf//types/descriptorpb", + ], +) diff --git a/scalapb/scalapb.pb.go b/scalapb/scalapb.pb.go new file mode 100644 index 00000000..0af150a4 --- /dev/null +++ b/scalapb/scalapb.pb.go @@ -0,0 +1,1357 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc v3.14.0 +// source: scalapb/scalapb.proto + +package scalapb + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + descriptorpb "google.golang.org/protobuf/types/descriptorpb" + 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 ScalaPbOptions_OptionsScope int32 + +const ( + ScalaPbOptions_FILE ScalaPbOptions_OptionsScope = 0 + ScalaPbOptions_PACKAGE ScalaPbOptions_OptionsScope = 1 +) + +// Enum value maps for ScalaPbOptions_OptionsScope. +var ( + ScalaPbOptions_OptionsScope_name = map[int32]string{ + 0: "FILE", + 1: "PACKAGE", + } + ScalaPbOptions_OptionsScope_value = map[string]int32{ + "FILE": 0, + "PACKAGE": 1, + } +) + +func (x ScalaPbOptions_OptionsScope) Enum() *ScalaPbOptions_OptionsScope { + p := new(ScalaPbOptions_OptionsScope) + *p = x + return p +} + +func (x ScalaPbOptions_OptionsScope) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ScalaPbOptions_OptionsScope) Descriptor() protoreflect.EnumDescriptor { + return file_scalapb_scalapb_proto_enumTypes[0].Descriptor() +} + +func (ScalaPbOptions_OptionsScope) Type() protoreflect.EnumType { + return &file_scalapb_scalapb_proto_enumTypes[0] +} + +func (x ScalaPbOptions_OptionsScope) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *ScalaPbOptions_OptionsScope) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) + if err != nil { + return err + } + *x = ScalaPbOptions_OptionsScope(num) + return nil +} + +// Deprecated: Use ScalaPbOptions_OptionsScope.Descriptor instead. +func (ScalaPbOptions_OptionsScope) EnumDescriptor() ([]byte, []int) { + return file_scalapb_scalapb_proto_rawDescGZIP(), []int{0, 0} +} + +type ScalaPbOptions_EnumValueNaming int32 + +const ( + ScalaPbOptions_AS_IN_PROTO ScalaPbOptions_EnumValueNaming = 0 + ScalaPbOptions_CAMEL_CASE ScalaPbOptions_EnumValueNaming = 1 +) + +// Enum value maps for ScalaPbOptions_EnumValueNaming. +var ( + ScalaPbOptions_EnumValueNaming_name = map[int32]string{ + 0: "AS_IN_PROTO", + 1: "CAMEL_CASE", + } + ScalaPbOptions_EnumValueNaming_value = map[string]int32{ + "AS_IN_PROTO": 0, + "CAMEL_CASE": 1, + } +) + +func (x ScalaPbOptions_EnumValueNaming) Enum() *ScalaPbOptions_EnumValueNaming { + p := new(ScalaPbOptions_EnumValueNaming) + *p = x + return p +} + +func (x ScalaPbOptions_EnumValueNaming) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ScalaPbOptions_EnumValueNaming) Descriptor() protoreflect.EnumDescriptor { + return file_scalapb_scalapb_proto_enumTypes[1].Descriptor() +} + +func (ScalaPbOptions_EnumValueNaming) Type() protoreflect.EnumType { + return &file_scalapb_scalapb_proto_enumTypes[1] +} + +func (x ScalaPbOptions_EnumValueNaming) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *ScalaPbOptions_EnumValueNaming) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) + if err != nil { + return err + } + *x = ScalaPbOptions_EnumValueNaming(num) + return nil +} + +// Deprecated: Use ScalaPbOptions_EnumValueNaming.Descriptor instead. +func (ScalaPbOptions_EnumValueNaming) EnumDescriptor() ([]byte, []int) { + return file_scalapb_scalapb_proto_rawDescGZIP(), []int{0, 1} +} + +type ScalaPbOptions struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PackageName *string `protobuf:"bytes,1,opt,name=package_name,json=packageName" json:"package_name,omitempty"` + FlatPackage *bool `protobuf:"varint,2,opt,name=flat_package,json=flatPackage" json:"flat_package,omitempty"` + Import []string `protobuf:"bytes,3,rep,name=import" json:"import,omitempty"` + Preamble []string `protobuf:"bytes,4,rep,name=preamble" json:"preamble,omitempty"` + SingleFile *bool `protobuf:"varint,5,opt,name=single_file,json=singleFile" json:"single_file,omitempty"` + NoPrimitiveWrappers *bool `protobuf:"varint,7,opt,name=no_primitive_wrappers,json=noPrimitiveWrappers" json:"no_primitive_wrappers,omitempty"` + PrimitiveWrappers *bool `protobuf:"varint,6,opt,name=primitive_wrappers,json=primitiveWrappers" json:"primitive_wrappers,omitempty"` + CollectionType *string `protobuf:"bytes,8,opt,name=collection_type,json=collectionType" json:"collection_type,omitempty"` + PreserveUnknownFields *bool `protobuf:"varint,9,opt,name=preserve_unknown_fields,json=preserveUnknownFields,def=1" json:"preserve_unknown_fields,omitempty"` + ObjectName *string `protobuf:"bytes,10,opt,name=object_name,json=objectName" json:"object_name,omitempty"` + Scope *ScalaPbOptions_OptionsScope `protobuf:"varint,11,opt,name=scope,enum=scalapb.ScalaPbOptions_OptionsScope" json:"scope,omitempty"` + Lenses *bool `protobuf:"varint,12,opt,name=lenses,def=1" json:"lenses,omitempty"` + RetainSourceCodeInfo *bool `protobuf:"varint,13,opt,name=retain_source_code_info,json=retainSourceCodeInfo" json:"retain_source_code_info,omitempty"` + MapType *string `protobuf:"bytes,14,opt,name=map_type,json=mapType" json:"map_type,omitempty"` + NoDefaultValuesInConstructor *bool `protobuf:"varint,15,opt,name=no_default_values_in_constructor,json=noDefaultValuesInConstructor" json:"no_default_values_in_constructor,omitempty"` + EnumValueNaming *ScalaPbOptions_EnumValueNaming `protobuf:"varint,16,opt,name=enum_value_naming,json=enumValueNaming,enum=scalapb.ScalaPbOptions_EnumValueNaming" json:"enum_value_naming,omitempty"` + EnumStripPrefix *bool `protobuf:"varint,17,opt,name=enum_strip_prefix,json=enumStripPrefix,def=0" json:"enum_strip_prefix,omitempty"` + AuxMessageOptions []*ScalaPbOptions_AuxMessageOptions `protobuf:"bytes,18,rep,name=aux_message_options,json=auxMessageOptions" json:"aux_message_options,omitempty"` + AuxFieldOptions []*ScalaPbOptions_AuxFieldOptions `protobuf:"bytes,19,rep,name=aux_field_options,json=auxFieldOptions" json:"aux_field_options,omitempty"` + AuxEnumOptions []*ScalaPbOptions_AuxEnumOptions `protobuf:"bytes,20,rep,name=aux_enum_options,json=auxEnumOptions" json:"aux_enum_options,omitempty"` + BytesType *string `protobuf:"bytes,21,opt,name=bytes_type,json=bytesType" json:"bytes_type,omitempty"` + TestOnlyNoJavaConversions *bool `protobuf:"varint,100001,opt,name=test_only_no_java_conversions,json=testOnlyNoJavaConversions" json:"test_only_no_java_conversions,omitempty"` +} + +// Default values for ScalaPbOptions fields. +const ( + Default_ScalaPbOptions_PreserveUnknownFields = bool(true) + Default_ScalaPbOptions_Lenses = bool(true) + Default_ScalaPbOptions_EnumStripPrefix = bool(false) +) + +func (x *ScalaPbOptions) Reset() { + *x = ScalaPbOptions{} + if protoimpl.UnsafeEnabled { + mi := &file_scalapb_scalapb_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ScalaPbOptions) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ScalaPbOptions) ProtoMessage() {} + +func (x *ScalaPbOptions) ProtoReflect() protoreflect.Message { + mi := &file_scalapb_scalapb_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 ScalaPbOptions.ProtoReflect.Descriptor instead. +func (*ScalaPbOptions) Descriptor() ([]byte, []int) { + return file_scalapb_scalapb_proto_rawDescGZIP(), []int{0} +} + +func (x *ScalaPbOptions) GetPackageName() string { + if x != nil && x.PackageName != nil { + return *x.PackageName + } + return "" +} + +func (x *ScalaPbOptions) GetFlatPackage() bool { + if x != nil && x.FlatPackage != nil { + return *x.FlatPackage + } + return false +} + +func (x *ScalaPbOptions) GetImport() []string { + if x != nil { + return x.Import + } + return nil +} + +func (x *ScalaPbOptions) GetPreamble() []string { + if x != nil { + return x.Preamble + } + return nil +} + +func (x *ScalaPbOptions) GetSingleFile() bool { + if x != nil && x.SingleFile != nil { + return *x.SingleFile + } + return false +} + +func (x *ScalaPbOptions) GetNoPrimitiveWrappers() bool { + if x != nil && x.NoPrimitiveWrappers != nil { + return *x.NoPrimitiveWrappers + } + return false +} + +func (x *ScalaPbOptions) GetPrimitiveWrappers() bool { + if x != nil && x.PrimitiveWrappers != nil { + return *x.PrimitiveWrappers + } + return false +} + +func (x *ScalaPbOptions) GetCollectionType() string { + if x != nil && x.CollectionType != nil { + return *x.CollectionType + } + return "" +} + +func (x *ScalaPbOptions) GetPreserveUnknownFields() bool { + if x != nil && x.PreserveUnknownFields != nil { + return *x.PreserveUnknownFields + } + return Default_ScalaPbOptions_PreserveUnknownFields +} + +func (x *ScalaPbOptions) GetObjectName() string { + if x != nil && x.ObjectName != nil { + return *x.ObjectName + } + return "" +} + +func (x *ScalaPbOptions) GetScope() ScalaPbOptions_OptionsScope { + if x != nil && x.Scope != nil { + return *x.Scope + } + return ScalaPbOptions_FILE +} + +func (x *ScalaPbOptions) GetLenses() bool { + if x != nil && x.Lenses != nil { + return *x.Lenses + } + return Default_ScalaPbOptions_Lenses +} + +func (x *ScalaPbOptions) GetRetainSourceCodeInfo() bool { + if x != nil && x.RetainSourceCodeInfo != nil { + return *x.RetainSourceCodeInfo + } + return false +} + +func (x *ScalaPbOptions) GetMapType() string { + if x != nil && x.MapType != nil { + return *x.MapType + } + return "" +} + +func (x *ScalaPbOptions) GetNoDefaultValuesInConstructor() bool { + if x != nil && x.NoDefaultValuesInConstructor != nil { + return *x.NoDefaultValuesInConstructor + } + return false +} + +func (x *ScalaPbOptions) GetEnumValueNaming() ScalaPbOptions_EnumValueNaming { + if x != nil && x.EnumValueNaming != nil { + return *x.EnumValueNaming + } + return ScalaPbOptions_AS_IN_PROTO +} + +func (x *ScalaPbOptions) GetEnumStripPrefix() bool { + if x != nil && x.EnumStripPrefix != nil { + return *x.EnumStripPrefix + } + return Default_ScalaPbOptions_EnumStripPrefix +} + +func (x *ScalaPbOptions) GetAuxMessageOptions() []*ScalaPbOptions_AuxMessageOptions { + if x != nil { + return x.AuxMessageOptions + } + return nil +} + +func (x *ScalaPbOptions) GetAuxFieldOptions() []*ScalaPbOptions_AuxFieldOptions { + if x != nil { + return x.AuxFieldOptions + } + return nil +} + +func (x *ScalaPbOptions) GetAuxEnumOptions() []*ScalaPbOptions_AuxEnumOptions { + if x != nil { + return x.AuxEnumOptions + } + return nil +} + +func (x *ScalaPbOptions) GetBytesType() string { + if x != nil && x.BytesType != nil { + return *x.BytesType + } + return "" +} + +func (x *ScalaPbOptions) GetTestOnlyNoJavaConversions() bool { + if x != nil && x.TestOnlyNoJavaConversions != nil { + return *x.TestOnlyNoJavaConversions + } + return false +} + +type MessageOptions struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Extends []string `protobuf:"bytes,1,rep,name=extends" json:"extends,omitempty"` + CompanionExtends []string `protobuf:"bytes,2,rep,name=companion_extends,json=companionExtends" json:"companion_extends,omitempty"` + Annotations []string `protobuf:"bytes,3,rep,name=annotations" json:"annotations,omitempty"` + Type *string `protobuf:"bytes,4,opt,name=type" json:"type,omitempty"` + CompanionAnnotations []string `protobuf:"bytes,5,rep,name=companion_annotations,json=companionAnnotations" json:"companion_annotations,omitempty"` + SealedOneofExtends []string `protobuf:"bytes,6,rep,name=sealed_oneof_extends,json=sealedOneofExtends" json:"sealed_oneof_extends,omitempty"` + NoBox *bool `protobuf:"varint,7,opt,name=no_box,json=noBox" json:"no_box,omitempty"` +} + +func (x *MessageOptions) Reset() { + *x = MessageOptions{} + if protoimpl.UnsafeEnabled { + mi := &file_scalapb_scalapb_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MessageOptions) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MessageOptions) ProtoMessage() {} + +func (x *MessageOptions) ProtoReflect() protoreflect.Message { + mi := &file_scalapb_scalapb_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 MessageOptions.ProtoReflect.Descriptor instead. +func (*MessageOptions) Descriptor() ([]byte, []int) { + return file_scalapb_scalapb_proto_rawDescGZIP(), []int{1} +} + +func (x *MessageOptions) GetExtends() []string { + if x != nil { + return x.Extends + } + return nil +} + +func (x *MessageOptions) GetCompanionExtends() []string { + if x != nil { + return x.CompanionExtends + } + return nil +} + +func (x *MessageOptions) GetAnnotations() []string { + if x != nil { + return x.Annotations + } + return nil +} + +func (x *MessageOptions) GetType() string { + if x != nil && x.Type != nil { + return *x.Type + } + return "" +} + +func (x *MessageOptions) GetCompanionAnnotations() []string { + if x != nil { + return x.CompanionAnnotations + } + return nil +} + +func (x *MessageOptions) GetSealedOneofExtends() []string { + if x != nil { + return x.SealedOneofExtends + } + return nil +} + +func (x *MessageOptions) GetNoBox() bool { + if x != nil && x.NoBox != nil { + return *x.NoBox + } + return false +} + +type FieldOptions struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Type *string `protobuf:"bytes,1,opt,name=type" json:"type,omitempty"` + ScalaName *string `protobuf:"bytes,2,opt,name=scala_name,json=scalaName" json:"scala_name,omitempty"` + CollectionType *string `protobuf:"bytes,3,opt,name=collection_type,json=collectionType" json:"collection_type,omitempty"` + KeyType *string `protobuf:"bytes,4,opt,name=key_type,json=keyType" json:"key_type,omitempty"` + ValueType *string `protobuf:"bytes,5,opt,name=value_type,json=valueType" json:"value_type,omitempty"` + Annotations []string `protobuf:"bytes,6,rep,name=annotations" json:"annotations,omitempty"` + MapType *string `protobuf:"bytes,7,opt,name=map_type,json=mapType" json:"map_type,omitempty"` + NoBox *bool `protobuf:"varint,30,opt,name=no_box,json=noBox" json:"no_box,omitempty"` +} + +func (x *FieldOptions) Reset() { + *x = FieldOptions{} + if protoimpl.UnsafeEnabled { + mi := &file_scalapb_scalapb_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FieldOptions) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FieldOptions) ProtoMessage() {} + +func (x *FieldOptions) ProtoReflect() protoreflect.Message { + mi := &file_scalapb_scalapb_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 FieldOptions.ProtoReflect.Descriptor instead. +func (*FieldOptions) Descriptor() ([]byte, []int) { + return file_scalapb_scalapb_proto_rawDescGZIP(), []int{2} +} + +func (x *FieldOptions) GetType() string { + if x != nil && x.Type != nil { + return *x.Type + } + return "" +} + +func (x *FieldOptions) GetScalaName() string { + if x != nil && x.ScalaName != nil { + return *x.ScalaName + } + return "" +} + +func (x *FieldOptions) GetCollectionType() string { + if x != nil && x.CollectionType != nil { + return *x.CollectionType + } + return "" +} + +func (x *FieldOptions) GetKeyType() string { + if x != nil && x.KeyType != nil { + return *x.KeyType + } + return "" +} + +func (x *FieldOptions) GetValueType() string { + if x != nil && x.ValueType != nil { + return *x.ValueType + } + return "" +} + +func (x *FieldOptions) GetAnnotations() []string { + if x != nil { + return x.Annotations + } + return nil +} + +func (x *FieldOptions) GetMapType() string { + if x != nil && x.MapType != nil { + return *x.MapType + } + return "" +} + +func (x *FieldOptions) GetNoBox() bool { + if x != nil && x.NoBox != nil { + return *x.NoBox + } + return false +} + +type EnumOptions struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Extends []string `protobuf:"bytes,1,rep,name=extends" json:"extends,omitempty"` + CompanionExtends []string `protobuf:"bytes,2,rep,name=companion_extends,json=companionExtends" json:"companion_extends,omitempty"` + Type *string `protobuf:"bytes,3,opt,name=type" json:"type,omitempty"` +} + +func (x *EnumOptions) Reset() { + *x = EnumOptions{} + if protoimpl.UnsafeEnabled { + mi := &file_scalapb_scalapb_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EnumOptions) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EnumOptions) ProtoMessage() {} + +func (x *EnumOptions) ProtoReflect() protoreflect.Message { + mi := &file_scalapb_scalapb_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 EnumOptions.ProtoReflect.Descriptor instead. +func (*EnumOptions) Descriptor() ([]byte, []int) { + return file_scalapb_scalapb_proto_rawDescGZIP(), []int{3} +} + +func (x *EnumOptions) GetExtends() []string { + if x != nil { + return x.Extends + } + return nil +} + +func (x *EnumOptions) GetCompanionExtends() []string { + if x != nil { + return x.CompanionExtends + } + return nil +} + +func (x *EnumOptions) GetType() string { + if x != nil && x.Type != nil { + return *x.Type + } + return "" +} + +type EnumValueOptions struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Extends []string `protobuf:"bytes,1,rep,name=extends" json:"extends,omitempty"` + ScalaName *string `protobuf:"bytes,2,opt,name=scala_name,json=scalaName" json:"scala_name,omitempty"` +} + +func (x *EnumValueOptions) Reset() { + *x = EnumValueOptions{} + if protoimpl.UnsafeEnabled { + mi := &file_scalapb_scalapb_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EnumValueOptions) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EnumValueOptions) ProtoMessage() {} + +func (x *EnumValueOptions) ProtoReflect() protoreflect.Message { + mi := &file_scalapb_scalapb_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 EnumValueOptions.ProtoReflect.Descriptor instead. +func (*EnumValueOptions) Descriptor() ([]byte, []int) { + return file_scalapb_scalapb_proto_rawDescGZIP(), []int{4} +} + +func (x *EnumValueOptions) GetExtends() []string { + if x != nil { + return x.Extends + } + return nil +} + +func (x *EnumValueOptions) GetScalaName() string { + if x != nil && x.ScalaName != nil { + return *x.ScalaName + } + return "" +} + +type OneofOptions struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Extends []string `protobuf:"bytes,1,rep,name=extends" json:"extends,omitempty"` +} + +func (x *OneofOptions) Reset() { + *x = OneofOptions{} + if protoimpl.UnsafeEnabled { + mi := &file_scalapb_scalapb_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OneofOptions) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OneofOptions) ProtoMessage() {} + +func (x *OneofOptions) ProtoReflect() protoreflect.Message { + mi := &file_scalapb_scalapb_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 OneofOptions.ProtoReflect.Descriptor instead. +func (*OneofOptions) Descriptor() ([]byte, []int) { + return file_scalapb_scalapb_proto_rawDescGZIP(), []int{5} +} + +func (x *OneofOptions) GetExtends() []string { + if x != nil { + return x.Extends + } + return nil +} + +type ScalaPbOptions_AuxMessageOptions struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Target *string `protobuf:"bytes,1,opt,name=target" json:"target,omitempty"` + Options *MessageOptions `protobuf:"bytes,2,opt,name=options" json:"options,omitempty"` +} + +func (x *ScalaPbOptions_AuxMessageOptions) Reset() { + *x = ScalaPbOptions_AuxMessageOptions{} + if protoimpl.UnsafeEnabled { + mi := &file_scalapb_scalapb_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ScalaPbOptions_AuxMessageOptions) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ScalaPbOptions_AuxMessageOptions) ProtoMessage() {} + +func (x *ScalaPbOptions_AuxMessageOptions) ProtoReflect() protoreflect.Message { + mi := &file_scalapb_scalapb_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 ScalaPbOptions_AuxMessageOptions.ProtoReflect.Descriptor instead. +func (*ScalaPbOptions_AuxMessageOptions) Descriptor() ([]byte, []int) { + return file_scalapb_scalapb_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *ScalaPbOptions_AuxMessageOptions) GetTarget() string { + if x != nil && x.Target != nil { + return *x.Target + } + return "" +} + +func (x *ScalaPbOptions_AuxMessageOptions) GetOptions() *MessageOptions { + if x != nil { + return x.Options + } + return nil +} + +type ScalaPbOptions_AuxFieldOptions struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Target *string `protobuf:"bytes,1,opt,name=target" json:"target,omitempty"` + Options *FieldOptions `protobuf:"bytes,2,opt,name=options" json:"options,omitempty"` +} + +func (x *ScalaPbOptions_AuxFieldOptions) Reset() { + *x = ScalaPbOptions_AuxFieldOptions{} + if protoimpl.UnsafeEnabled { + mi := &file_scalapb_scalapb_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ScalaPbOptions_AuxFieldOptions) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ScalaPbOptions_AuxFieldOptions) ProtoMessage() {} + +func (x *ScalaPbOptions_AuxFieldOptions) ProtoReflect() protoreflect.Message { + mi := &file_scalapb_scalapb_proto_msgTypes[7] + 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 ScalaPbOptions_AuxFieldOptions.ProtoReflect.Descriptor instead. +func (*ScalaPbOptions_AuxFieldOptions) Descriptor() ([]byte, []int) { + return file_scalapb_scalapb_proto_rawDescGZIP(), []int{0, 1} +} + +func (x *ScalaPbOptions_AuxFieldOptions) GetTarget() string { + if x != nil && x.Target != nil { + return *x.Target + } + return "" +} + +func (x *ScalaPbOptions_AuxFieldOptions) GetOptions() *FieldOptions { + if x != nil { + return x.Options + } + return nil +} + +type ScalaPbOptions_AuxEnumOptions struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Target *string `protobuf:"bytes,1,opt,name=target" json:"target,omitempty"` + Options *EnumOptions `protobuf:"bytes,2,opt,name=options" json:"options,omitempty"` +} + +func (x *ScalaPbOptions_AuxEnumOptions) Reset() { + *x = ScalaPbOptions_AuxEnumOptions{} + if protoimpl.UnsafeEnabled { + mi := &file_scalapb_scalapb_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ScalaPbOptions_AuxEnumOptions) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ScalaPbOptions_AuxEnumOptions) ProtoMessage() {} + +func (x *ScalaPbOptions_AuxEnumOptions) ProtoReflect() protoreflect.Message { + mi := &file_scalapb_scalapb_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 ScalaPbOptions_AuxEnumOptions.ProtoReflect.Descriptor instead. +func (*ScalaPbOptions_AuxEnumOptions) Descriptor() ([]byte, []int) { + return file_scalapb_scalapb_proto_rawDescGZIP(), []int{0, 2} +} + +func (x *ScalaPbOptions_AuxEnumOptions) GetTarget() string { + if x != nil && x.Target != nil { + return *x.Target + } + return "" +} + +func (x *ScalaPbOptions_AuxEnumOptions) GetOptions() *EnumOptions { + if x != nil { + return x.Options + } + return nil +} + +var file_scalapb_scalapb_proto_extTypes = []protoimpl.ExtensionInfo{ + { + ExtendedType: (*descriptorpb.FileOptions)(nil), + ExtensionType: (*ScalaPbOptions)(nil), + Field: 1020, + Name: "scalapb.options", + Tag: "bytes,1020,opt,name=options", + Filename: "scalapb/scalapb.proto", + }, + { + ExtendedType: (*descriptorpb.MessageOptions)(nil), + ExtensionType: (*MessageOptions)(nil), + Field: 1020, + Name: "scalapb.message", + Tag: "bytes,1020,opt,name=message", + Filename: "scalapb/scalapb.proto", + }, + { + ExtendedType: (*descriptorpb.FieldOptions)(nil), + ExtensionType: (*FieldOptions)(nil), + Field: 1020, + Name: "scalapb.field", + Tag: "bytes,1020,opt,name=field", + Filename: "scalapb/scalapb.proto", + }, + { + ExtendedType: (*descriptorpb.EnumOptions)(nil), + ExtensionType: (*EnumOptions)(nil), + Field: 1020, + Name: "scalapb.enum_options", + Tag: "bytes,1020,opt,name=enum_options", + Filename: "scalapb/scalapb.proto", + }, + { + ExtendedType: (*descriptorpb.EnumValueOptions)(nil), + ExtensionType: (*EnumValueOptions)(nil), + Field: 1020, + Name: "scalapb.enum_value", + Tag: "bytes,1020,opt,name=enum_value", + Filename: "scalapb/scalapb.proto", + }, + { + ExtendedType: (*descriptorpb.OneofOptions)(nil), + ExtensionType: (*OneofOptions)(nil), + Field: 1020, + Name: "scalapb.oneof", + Tag: "bytes,1020,opt,name=oneof", + Filename: "scalapb/scalapb.proto", + }, +} + +// Extension fields to descriptorpb.FileOptions. +var ( + // optional scalapb.ScalaPbOptions options = 1020; + E_Options = &file_scalapb_scalapb_proto_extTypes[0] +) + +// Extension fields to descriptorpb.MessageOptions. +var ( + // optional scalapb.MessageOptions message = 1020; + E_Message = &file_scalapb_scalapb_proto_extTypes[1] +) + +// Extension fields to descriptorpb.FieldOptions. +var ( + // optional scalapb.FieldOptions field = 1020; + E_Field = &file_scalapb_scalapb_proto_extTypes[2] +) + +// Extension fields to descriptorpb.EnumOptions. +var ( + // optional scalapb.EnumOptions enum_options = 1020; + E_EnumOptions = &file_scalapb_scalapb_proto_extTypes[3] +) + +// Extension fields to descriptorpb.EnumValueOptions. +var ( + // optional scalapb.EnumValueOptions enum_value = 1020; + E_EnumValue = &file_scalapb_scalapb_proto_extTypes[4] +) + +// Extension fields to descriptorpb.OneofOptions. +var ( + // optional scalapb.OneofOptions oneof = 1020; + E_Oneof = &file_scalapb_scalapb_proto_extTypes[5] +) + +var File_scalapb_scalapb_proto protoreflect.FileDescriptor + +var file_scalapb_scalapb_proto_rawDesc = []byte{ + 0x0a, 0x15, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x70, 0x62, 0x2f, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x70, + 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x70, 0x62, + 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x22, 0xe8, 0x0b, 0x0a, 0x0e, 0x53, 0x63, 0x61, 0x6c, 0x61, 0x50, 0x62, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x61, 0x63, + 0x6b, 0x61, 0x67, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x66, 0x6c, 0x61, 0x74, + 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, + 0x66, 0x6c, 0x61, 0x74, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x69, + 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x69, 0x6d, 0x70, + 0x6f, 0x72, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x65, 0x61, 0x6d, 0x62, 0x6c, 0x65, 0x18, + 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x65, 0x61, 0x6d, 0x62, 0x6c, 0x65, 0x12, + 0x1f, 0x0a, 0x0b, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x46, 0x69, 0x6c, 0x65, + 0x12, 0x32, 0x0a, 0x15, 0x6e, 0x6f, 0x5f, 0x70, 0x72, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x76, 0x65, + 0x5f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x13, 0x6e, 0x6f, 0x50, 0x72, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x76, 0x65, 0x57, 0x72, 0x61, 0x70, + 0x70, 0x65, 0x72, 0x73, 0x12, 0x2d, 0x0a, 0x12, 0x70, 0x72, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x76, + 0x65, 0x5f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x11, 0x70, 0x72, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x76, 0x65, 0x57, 0x72, 0x61, 0x70, 0x70, + 0x65, 0x72, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6f, + 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x3c, 0x0a, 0x17, + 0x70, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x5f, 0x75, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, + 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x04, 0x74, + 0x72, 0x75, 0x65, 0x52, 0x15, 0x70, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x55, 0x6e, 0x6b, + 0x6e, 0x6f, 0x77, 0x6e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x6f, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0a, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x3a, 0x0a, 0x05, 0x73, + 0x63, 0x6f, 0x70, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x73, 0x63, 0x61, + 0x6c, 0x61, 0x70, 0x62, 0x2e, 0x53, 0x63, 0x61, 0x6c, 0x61, 0x50, 0x62, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x53, 0x63, 0x6f, 0x70, 0x65, + 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x73, 0x65, + 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x04, 0x74, 0x72, 0x75, 0x65, 0x52, 0x06, 0x6c, + 0x65, 0x6e, 0x73, 0x65, 0x73, 0x12, 0x35, 0x0a, 0x17, 0x72, 0x65, 0x74, 0x61, 0x69, 0x6e, 0x5f, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, + 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x72, 0x65, 0x74, 0x61, 0x69, 0x6e, 0x53, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x19, 0x0a, 0x08, + 0x6d, 0x61, 0x70, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x6d, 0x61, 0x70, 0x54, 0x79, 0x70, 0x65, 0x12, 0x46, 0x0a, 0x20, 0x6e, 0x6f, 0x5f, 0x64, 0x65, + 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x5f, 0x69, 0x6e, 0x5f, + 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x0f, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x1c, 0x6e, 0x6f, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x73, 0x49, 0x6e, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x6f, 0x72, 0x12, + 0x53, 0x0a, 0x11, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x6e, 0x61, + 0x6d, 0x69, 0x6e, 0x67, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x27, 0x2e, 0x73, 0x63, 0x61, + 0x6c, 0x61, 0x70, 0x62, 0x2e, 0x53, 0x63, 0x61, 0x6c, 0x61, 0x50, 0x62, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4e, 0x61, 0x6d, + 0x69, 0x6e, 0x67, 0x52, 0x0f, 0x65, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4e, 0x61, + 0x6d, 0x69, 0x6e, 0x67, 0x12, 0x31, 0x0a, 0x11, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x73, 0x74, 0x72, + 0x69, 0x70, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x11, 0x20, 0x01, 0x28, 0x08, 0x3a, + 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0f, 0x65, 0x6e, 0x75, 0x6d, 0x53, 0x74, 0x72, 0x69, + 0x70, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x59, 0x0a, 0x13, 0x61, 0x75, 0x78, 0x5f, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x12, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x70, 0x62, 0x2e, 0x53, + 0x63, 0x61, 0x6c, 0x61, 0x50, 0x62, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x41, 0x75, + 0x78, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, + 0x11, 0x61, 0x75, 0x78, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x12, 0x53, 0x0a, 0x11, 0x61, 0x75, 0x78, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, + 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x13, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, + 0x73, 0x63, 0x61, 0x6c, 0x61, 0x70, 0x62, 0x2e, 0x53, 0x63, 0x61, 0x6c, 0x61, 0x50, 0x62, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x41, 0x75, 0x78, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0f, 0x61, 0x75, 0x78, 0x46, 0x69, 0x65, 0x6c, 0x64, + 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x50, 0x0a, 0x10, 0x61, 0x75, 0x78, 0x5f, 0x65, + 0x6e, 0x75, 0x6d, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x14, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x26, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x70, 0x62, 0x2e, 0x53, 0x63, 0x61, 0x6c, + 0x61, 0x50, 0x62, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x41, 0x75, 0x78, 0x45, 0x6e, + 0x75, 0x6d, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0e, 0x61, 0x75, 0x78, 0x45, 0x6e, + 0x75, 0x6d, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x79, 0x74, + 0x65, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x15, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, + 0x79, 0x74, 0x65, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x42, 0x0a, 0x1d, 0x74, 0x65, 0x73, 0x74, + 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x5f, 0x6e, 0x6f, 0x5f, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x63, 0x6f, + 0x6e, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xa1, 0x8d, 0x06, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x19, 0x74, 0x65, 0x73, 0x74, 0x4f, 0x6e, 0x6c, 0x79, 0x4e, 0x6f, 0x4a, 0x61, 0x76, + 0x61, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x5e, 0x0a, 0x11, + 0x41, 0x75, 0x78, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x31, 0x0a, 0x07, 0x6f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x73, 0x63, 0x61, + 0x6c, 0x61, 0x70, 0x62, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x5a, 0x0a, 0x0f, + 0x41, 0x75, 0x78, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, + 0x16, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x2f, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x61, + 0x70, 0x62, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, + 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x58, 0x0a, 0x0e, 0x41, 0x75, 0x78, 0x45, + 0x6e, 0x75, 0x6d, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, + 0x72, 0x67, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, + 0x65, 0x74, 0x12, 0x2e, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x70, 0x62, 0x2e, 0x45, 0x6e, + 0x75, 0x6d, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x22, 0x25, 0x0a, 0x0c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x53, 0x63, 0x6f, + 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x46, 0x49, 0x4c, 0x45, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, + 0x50, 0x41, 0x43, 0x4b, 0x41, 0x47, 0x45, 0x10, 0x01, 0x22, 0x32, 0x0a, 0x0f, 0x45, 0x6e, 0x75, + 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4e, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x12, 0x0f, 0x0a, 0x0b, + 0x41, 0x53, 0x5f, 0x49, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x10, 0x00, 0x12, 0x0e, 0x0a, + 0x0a, 0x43, 0x41, 0x4d, 0x45, 0x4c, 0x5f, 0x43, 0x41, 0x53, 0x45, 0x10, 0x01, 0x22, 0x8b, 0x02, + 0x0a, 0x0e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x12, 0x18, 0x0a, 0x07, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x07, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x63, 0x6f, + 0x6d, 0x70, 0x61, 0x6e, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x73, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x69, 0x6f, 0x6e, + 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, + 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x33, 0x0a, + 0x15, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x69, 0x6f, 0x6e, 0x5f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x14, 0x63, 0x6f, + 0x6d, 0x70, 0x61, 0x6e, 0x69, 0x6f, 0x6e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x12, 0x30, 0x0a, 0x14, 0x73, 0x65, 0x61, 0x6c, 0x65, 0x64, 0x5f, 0x6f, 0x6e, 0x65, + 0x6f, 0x66, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x12, 0x73, 0x65, 0x61, 0x6c, 0x65, 0x64, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x45, 0x78, 0x74, + 0x65, 0x6e, 0x64, 0x73, 0x12, 0x15, 0x0a, 0x06, 0x6e, 0x6f, 0x5f, 0x62, 0x6f, 0x78, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x6e, 0x6f, 0x42, 0x6f, 0x78, 0x22, 0xf8, 0x01, 0x0a, 0x0c, + 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x12, 0x0a, 0x04, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, + 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x4e, 0x61, 0x6d, 0x65, 0x12, + 0x27, 0x0a, 0x0f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, + 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x74, 0x79, 0x70, + 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x54, 0x79, + 0x70, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x6d, 0x61, 0x70, 0x5f, 0x74, 0x79, 0x70, 0x65, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x61, 0x70, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x15, 0x0a, 0x06, 0x6e, 0x6f, 0x5f, 0x62, 0x6f, 0x78, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x05, 0x6e, 0x6f, 0x42, 0x6f, 0x78, 0x22, 0x68, 0x0a, 0x0b, 0x45, 0x6e, 0x75, 0x6d, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x73, 0x12, + 0x2b, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, 0x63, 0x6f, 0x6d, 0x70, + 0x61, 0x6e, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x73, 0x12, 0x12, 0x0a, 0x04, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, + 0x22, 0x4b, 0x0a, 0x10, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x73, 0x12, 0x1d, + 0x0a, 0x0a, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x28, 0x0a, + 0x0c, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x18, 0x0a, + 0x07, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x73, 0x3a, 0x50, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x12, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x18, 0xfc, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x70, + 0x62, 0x2e, 0x53, 0x63, 0x61, 0x6c, 0x61, 0x50, 0x62, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3a, 0x53, 0x0a, 0x07, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xfc, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x73, + 0x63, 0x61, 0x6c, 0x61, 0x70, 0x62, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x3a, 0x4b, + 0x0a, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xfc, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, + 0x73, 0x63, 0x61, 0x6c, 0x61, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x3a, 0x56, 0x0a, 0x0c, 0x65, + 0x6e, 0x75, 0x6d, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1c, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, + 0x75, 0x6d, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xfc, 0x07, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x14, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x70, 0x62, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0b, 0x65, 0x6e, 0x75, 0x6d, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x3a, 0x5c, 0x0a, 0x0a, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x12, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xfc, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x73, 0x63, + 0x61, 0x6c, 0x61, 0x70, 0x62, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x09, 0x65, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x3a, 0x4b, 0x0a, 0x05, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4f, 0x6e, 0x65, + 0x6f, 0x66, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xfc, 0x07, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x15, 0x2e, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x70, 0x62, 0x2e, 0x4f, 0x6e, 0x65, 0x6f, 0x66, + 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x05, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x42, 0x58, + 0x0a, 0x0f, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x70, 0x62, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x74, + 0x61, 0x63, 0x6b, 0x62, 0x2f, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x2d, 0x67, 0x61, 0x7a, 0x65, 0x6c, + 0x6c, 0x65, 0x2f, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x70, 0x62, 0x3b, 0x73, 0x63, 0x61, 0x6c, 0x61, + 0x70, 0x62, 0xe2, 0x3f, 0x13, 0x0a, 0x0f, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x70, 0x62, 0x2e, 0x6f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x10, 0x01, +} + +var ( + file_scalapb_scalapb_proto_rawDescOnce sync.Once + file_scalapb_scalapb_proto_rawDescData = file_scalapb_scalapb_proto_rawDesc +) + +func file_scalapb_scalapb_proto_rawDescGZIP() []byte { + file_scalapb_scalapb_proto_rawDescOnce.Do(func() { + file_scalapb_scalapb_proto_rawDescData = protoimpl.X.CompressGZIP(file_scalapb_scalapb_proto_rawDescData) + }) + return file_scalapb_scalapb_proto_rawDescData +} + +var file_scalapb_scalapb_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_scalapb_scalapb_proto_msgTypes = make([]protoimpl.MessageInfo, 9) +var file_scalapb_scalapb_proto_goTypes = []interface{}{ + (ScalaPbOptions_OptionsScope)(0), // 0: scalapb.ScalaPbOptions.OptionsScope + (ScalaPbOptions_EnumValueNaming)(0), // 1: scalapb.ScalaPbOptions.EnumValueNaming + (*ScalaPbOptions)(nil), // 2: scalapb.ScalaPbOptions + (*MessageOptions)(nil), // 3: scalapb.MessageOptions + (*FieldOptions)(nil), // 4: scalapb.FieldOptions + (*EnumOptions)(nil), // 5: scalapb.EnumOptions + (*EnumValueOptions)(nil), // 6: scalapb.EnumValueOptions + (*OneofOptions)(nil), // 7: scalapb.OneofOptions + (*ScalaPbOptions_AuxMessageOptions)(nil), // 8: scalapb.ScalaPbOptions.AuxMessageOptions + (*ScalaPbOptions_AuxFieldOptions)(nil), // 9: scalapb.ScalaPbOptions.AuxFieldOptions + (*ScalaPbOptions_AuxEnumOptions)(nil), // 10: scalapb.ScalaPbOptions.AuxEnumOptions + (*descriptorpb.FileOptions)(nil), // 11: google.protobuf.FileOptions + (*descriptorpb.MessageOptions)(nil), // 12: google.protobuf.MessageOptions + (*descriptorpb.FieldOptions)(nil), // 13: google.protobuf.FieldOptions + (*descriptorpb.EnumOptions)(nil), // 14: google.protobuf.EnumOptions + (*descriptorpb.EnumValueOptions)(nil), // 15: google.protobuf.EnumValueOptions + (*descriptorpb.OneofOptions)(nil), // 16: google.protobuf.OneofOptions +} +var file_scalapb_scalapb_proto_depIdxs = []int32{ + 0, // 0: scalapb.ScalaPbOptions.scope:type_name -> scalapb.ScalaPbOptions.OptionsScope + 1, // 1: scalapb.ScalaPbOptions.enum_value_naming:type_name -> scalapb.ScalaPbOptions.EnumValueNaming + 8, // 2: scalapb.ScalaPbOptions.aux_message_options:type_name -> scalapb.ScalaPbOptions.AuxMessageOptions + 9, // 3: scalapb.ScalaPbOptions.aux_field_options:type_name -> scalapb.ScalaPbOptions.AuxFieldOptions + 10, // 4: scalapb.ScalaPbOptions.aux_enum_options:type_name -> scalapb.ScalaPbOptions.AuxEnumOptions + 3, // 5: scalapb.ScalaPbOptions.AuxMessageOptions.options:type_name -> scalapb.MessageOptions + 4, // 6: scalapb.ScalaPbOptions.AuxFieldOptions.options:type_name -> scalapb.FieldOptions + 5, // 7: scalapb.ScalaPbOptions.AuxEnumOptions.options:type_name -> scalapb.EnumOptions + 11, // 8: scalapb.options:extendee -> google.protobuf.FileOptions + 12, // 9: scalapb.message:extendee -> google.protobuf.MessageOptions + 13, // 10: scalapb.field:extendee -> google.protobuf.FieldOptions + 14, // 11: scalapb.enum_options:extendee -> google.protobuf.EnumOptions + 15, // 12: scalapb.enum_value:extendee -> google.protobuf.EnumValueOptions + 16, // 13: scalapb.oneof:extendee -> google.protobuf.OneofOptions + 2, // 14: scalapb.options:type_name -> scalapb.ScalaPbOptions + 3, // 15: scalapb.message:type_name -> scalapb.MessageOptions + 4, // 16: scalapb.field:type_name -> scalapb.FieldOptions + 5, // 17: scalapb.enum_options:type_name -> scalapb.EnumOptions + 6, // 18: scalapb.enum_value:type_name -> scalapb.EnumValueOptions + 7, // 19: scalapb.oneof:type_name -> scalapb.OneofOptions + 20, // [20:20] is the sub-list for method output_type + 20, // [20:20] is the sub-list for method input_type + 14, // [14:20] is the sub-list for extension type_name + 8, // [8:14] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name +} + +func init() { file_scalapb_scalapb_proto_init() } +func file_scalapb_scalapb_proto_init() { + if File_scalapb_scalapb_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_scalapb_scalapb_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ScalaPbOptions); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_scalapb_scalapb_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MessageOptions); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_scalapb_scalapb_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FieldOptions); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_scalapb_scalapb_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EnumOptions); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_scalapb_scalapb_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EnumValueOptions); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_scalapb_scalapb_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OneofOptions); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_scalapb_scalapb_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ScalaPbOptions_AuxMessageOptions); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_scalapb_scalapb_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ScalaPbOptions_AuxFieldOptions); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_scalapb_scalapb_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ScalaPbOptions_AuxEnumOptions); 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_scalapb_scalapb_proto_rawDesc, + NumEnums: 2, + NumMessages: 9, + NumExtensions: 6, + NumServices: 0, + }, + GoTypes: file_scalapb_scalapb_proto_goTypes, + DependencyIndexes: file_scalapb_scalapb_proto_depIdxs, + EnumInfos: file_scalapb_scalapb_proto_enumTypes, + MessageInfos: file_scalapb_scalapb_proto_msgTypes, + ExtensionInfos: file_scalapb_scalapb_proto_extTypes, + }.Build() + File_scalapb_scalapb_proto = out.File + file_scalapb_scalapb_proto_rawDesc = nil + file_scalapb_scalapb_proto_goTypes = nil + file_scalapb_scalapb_proto_depIdxs = nil +} diff --git a/scalapb/scalapb.proto b/scalapb/scalapb.proto new file mode 100644 index 00000000..26b38b74 --- /dev/null +++ b/scalapb/scalapb.proto @@ -0,0 +1,266 @@ +syntax = "proto2"; + +package scalapb; + +option java_package = "scalapb.options"; +option go_package = "github.com/stackb/scala-gazelle/scalapb;scalapb"; + +option (options) = { + package_name: "scalapb.options" + flat_package: true +}; + +import "google/protobuf/descriptor.proto"; + +message ScalaPbOptions { + // If set then it overrides the java_package and package. + optional string package_name = 1; + + // If true, the compiler does not append the proto base file name + // into the generated package name. If false (the default), the + // generated scala package name is the package_name.basename where + // basename is the proto file name without the .proto extension. + optional bool flat_package = 2; + + // Adds the following imports at the top of the file (this is meant + // to provide implicit TypeMappers) + repeated string import = 3; + + // Text to add to the generated scala file. This can be used only + // when single_file is true. + repeated string preamble = 4; + + // If true, all messages and enums (but not services) will be written + // to a single Scala file. + optional bool single_file = 5; + + // By default, wrappers defined at + // https://github.com/google/protobuf/blob/master/src/google/protobuf/wrappers.proto, + // are mapped to an Option[T] where T is a primitive type. When this field + // is set to true, we do not perform this transformation. + optional bool no_primitive_wrappers = 7; + + // DEPRECATED. In ScalaPB <= 0.5.47, it was necessary to explicitly enable + // primitive_wrappers. This field remains here for backwards compatibility, + // but it has no effect on generated code. It is an error to set both + // `primitive_wrappers` and `no_primitive_wrappers`. + optional bool primitive_wrappers = 6; + + // Scala type to be used for repeated fields. If unspecified, + // `scala.collection.Seq` will be used. + optional string collection_type = 8; + + // If set to true, all generated messages in this file will preserve unknown + // fields. + optional bool preserve_unknown_fields = 9 [default = true]; + + // If defined, sets the name of the file-level object that would be generated. This + // object extends `GeneratedFileObject` and contains descriptors, and list of message + // and enum companions. + optional string object_name = 10; + + // Whether to apply the options only to this file, or for the entire package (and its subpackages) + enum OptionsScope { + // Apply the options for this file only (default) + FILE = 0; + + // Apply the options for the entire package and its subpackages. + PACKAGE = 1; + } + // Experimental: scope to apply the given options. + optional OptionsScope scope = 11; + + // If true, lenses will be generated. + optional bool lenses = 12 [default = true]; + + // If true, then source-code info information will be included in the + // generated code - normally the source code info is cleared out to reduce + // code size. The source code info is useful for extracting source code + // location from the descriptors as well as comments. + optional bool retain_source_code_info = 13; + + // Scala type to be used for maps. If unspecified, + // `scala.collection.immutable.Map` will be used. + optional string map_type = 14; + + // If true, no default values will be generated in message constructors. + optional bool no_default_values_in_constructor = 15; + + /* Naming convention for generated enum values */ + enum EnumValueNaming { + AS_IN_PROTO = 0; // Enum value names in Scala use the same name as in the proto + CAMEL_CASE = 1; // Convert enum values to CamelCase in Scala. + } + optional EnumValueNaming enum_value_naming = 16; + + // Indicate if prefix (enum name + optional underscore) should be removed in scala code + // Strip is applied before enum value naming changes. + optional bool enum_strip_prefix = 17 [default = false]; + + // AuxMessageOptions enables you to set message-level options through package-scoped options. + // This is useful when you can't add a dependency on scalapb.proto from the proto file that + // defines the message. + message AuxMessageOptions { + // The fully-qualified name of the message in the proto name space. + optional string target = 1; + + // Options to apply to the message. If there are any options defined on the target message + // they take precedence over the options. + optional MessageOptions options = 2; + } + + // AuxFieldOptions enables you to set field-level options through package-scoped options. + // This is useful when you can't add a dependency on scalapb.proto from the proto file that + // defines the field. + message AuxFieldOptions { + // The fully-qualified name of the field in the proto name space. + optional string target = 1; + + // Options to apply to the field. If there are any options defined on the target message + // they take precedence over the options. + optional FieldOptions options = 2; + } + + // AuxEnumOptions enables you to set enum-level options through package-scoped options. + // This is useful when you can't add a dependency on scalapb.proto from the proto file that + // defines the enum. + message AuxEnumOptions { + // The fully-qualified name of the enum in the proto name space. + optional string target = 1; + + // Options to apply to the enum. If there are any options defined on the target message + // they take precedence over the options. + optional EnumOptions options = 2; + } + + // List of message options to apply to some messages. + repeated AuxMessageOptions aux_message_options = 18; + + // List of message options to apply to some fields. + repeated AuxFieldOptions aux_field_options = 19; + + // List of message options to apply to some enums. + repeated AuxEnumOptions aux_enum_options = 20; + + // Scala type to use for bytes fields. + optional string bytes_type = 21; + + // For use in tests only. Inhibit Java conversions even when when generator parameters + // request for it. + optional bool test_only_no_java_conversions = 100001; +} + +extend google.protobuf.FileOptions { + // File-level optionals for ScalaPB. + // Extension number officially assigned by protobuf-global-extension-registry@google.com + optional ScalaPbOptions options = 1020; +} + +message MessageOptions { + // Additional classes and traits to mix in to the case class. + repeated string extends = 1; + + // Additional classes and traits to mix in to the companion object. + repeated string companion_extends = 2; + + // Custom annotations to add to the generated case class. + repeated string annotations = 3; + + // All instances of this message will be converted to this type. An implicit TypeMapper + // must be present. + optional string type = 4; + + // Custom annotations to add to the companion object of the generated class. + repeated string companion_annotations = 5; + + // Additional classes and traits to mix in to generated sealed_oneof base trait. + repeated string sealed_oneof_extends = 6; + + // If true, when this message is used as an optional field, do not wrap it in an `Option`. + // This is equivalent of setting `(field).no_box` to true on each field with the message type. + optional bool no_box = 7; +} + +extend google.protobuf.MessageOptions { + // Message-level optionals for ScalaPB. + // Extension number officially assigned by protobuf-global-extension-registry@google.com + optional MessageOptions message = 1020; +} + +message FieldOptions { + optional string type = 1; + + optional string scala_name = 2; + + // Can be specified only if this field is repeated. If unspecified, + // it falls back to the file option named `collection_type`, which defaults + // to `scala.collection.Seq`. + optional string collection_type = 3; + + // If the field is a map, you can specify custom Scala types for the key + // or value. + optional string key_type = 4; + optional string value_type = 5; + + // Custom annotations to add to the field. + repeated string annotations = 6; + + // Can be specified only if this field is a map. If unspecified, + // it falls back to the file option named `map_type` which defaults to + // `scala.collection.immutable.Map` + optional string map_type = 7; + + // Do not box this value in Option[T]. If set, this overrides MessageOptions.no_box + optional bool no_box = 30; +} + +extend google.protobuf.FieldOptions { + // Field-level optionals for ScalaPB. + // Extension number officially assigned by protobuf-global-extension-registry@google.com + optional FieldOptions field = 1020; +} + +message EnumOptions { + // Additional classes and traits to mix in to the base trait + repeated string extends = 1; + + // Additional classes and traits to mix in to the companion object. + repeated string companion_extends = 2; + + // All instances of this enum will be converted to this type. An implicit TypeMapper + // must be present. + optional string type = 3; +} + +extend google.protobuf.EnumOptions { + // Enum-level optionals for ScalaPB. + // Extension number officially assigned by protobuf-global-extension-registry@google.com + // + // The field is called enum_options and not enum since enum is not allowed in Java. + optional EnumOptions enum_options = 1020; +} + +message EnumValueOptions { + // Additional classes and traits to mix in to an individual enum value. + repeated string extends = 1; + + // Name in Scala to use for this enum value. + optional string scala_name = 2; +} + +extend google.protobuf.EnumValueOptions { + // Enum-level optionals for ScalaPB. + // Extension number officially assigned by protobuf-global-extension-registry@google.com + optional EnumValueOptions enum_value = 1020; +} + +message OneofOptions { + // Additional traits to mix in to a oneof. + repeated string extends = 1; +} + +extend google.protobuf.OneofOptions { + // Enum-level optionals for ScalaPB. + // Extension number officially assigned by protobuf-global-extension-registry@google.com + optional OneofOptions oneof = 1020; +} diff --git a/tools/plantuml/BUILD.bazel b/tools/plantuml/BUILD.bazel new file mode 100644 index 00000000..8821e14a --- /dev/null +++ b/tools/plantuml/BUILD.bazel @@ -0,0 +1,7 @@ +java_binary( + name = "plantuml", + srcs = ["Main.java"], + main_class = "Main", + visibility = ["//visibility:public"], + deps = ["@plantuml_jar//jar"], +) diff --git a/tools/plantuml/Main.java b/tools/plantuml/Main.java new file mode 100644 index 00000000..363a4064 --- /dev/null +++ b/tools/plantuml/Main.java @@ -0,0 +1,39 @@ +import net.sourceforge.plantuml.SourceStringReader; +import net.sourceforge.plantuml.FileFormat; +import net.sourceforge.plantuml.FileFormatOption; + +import java.io.FileOutputStream; +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class Main { + public static void main(String[] args) { + if (args.length != 2) { + System.err.println("Usage: java PlantUMLToPNG "); + System.exit(1); + } + + String inputFilePath = args[0]; + String outputFilePath = args[1]; + + try { + // Read PlantUML source from file + String source = new String(Files.readAllBytes(Paths.get(inputFilePath))); + + // Create a SourceStringReader + SourceStringReader reader = new SourceStringReader(source); + + // Generate the PNG image + FileOutputStream outputStream = new FileOutputStream(outputFilePath); + reader.generateImage(outputStream, new FileFormatOption(FileFormat.PNG)); + outputStream.close(); + + System.out.println("PNG image generated successfully!"); + + } catch (IOException e) { + System.err.println("Error processing PlantUML file: " + e.getMessage()); + e.printStackTrace(); + } + } +} \ No newline at end of file diff --git a/tools/plantuml/plantuml.bzl b/tools/plantuml/plantuml.bzl new file mode 100644 index 00000000..6431b239 --- /dev/null +++ b/tools/plantuml/plantuml.bzl @@ -0,0 +1,51 @@ +"""plantuml_diagram.bzl provides the plantuml_diagram rule. +""" + +def _plantuml_diagram_impl(ctx): + args = ctx.actions.args() + args.add(ctx.file.src.path) + args.add(ctx.outputs.dst.path) + + ctx.actions.run( + mnemonic = "PlantUML", + progress_message = "Generating PlantUML file: %s" % ctx.outputs.dst.basename, + executable = ctx.executable._plantuml_tool, + arguments = [args], + inputs = [ctx.file.src], + outputs = [ctx.outputs.dst], + ) + + return [DefaultInfo( + files = depset([ctx.outputs.dst]), + )] + +plantuml_diagram = rule( + implementation = _plantuml_diagram_impl, + attrs = { + "src": attr.label( + doc = "the plantuml source file", + allow_single_file = True, + ), + "_plantuml_tool": attr.label( + default = Label("@build_stack_scala_gazelle//tools/plantuml"), + cfg = "exec", + executable = True, + doc = "the mergeindex tool", + ), + "dst": attr.output( + mandatory = True, + doc = "the output file for the diagram", + ), + }, +) + +def plantuml_diagram_genrule(name, srcs, format = "png", visibility = None): + native.genrule( + name = name, + srcs = srcs, + cmd = "java -jar $(location @plantuml_jar//jar) -t%s -o $@ $(SRCS)" % format, + outs = [name + ".sh"], + executable = True, + tools = ["@plantuml_jar//jar"], + visibility = visibility, + ) diff --git a/workspace_deps.bzl b/workspace_deps.bzl index 3fd0e8cb..5d257a30 100644 --- a/workspace_deps.bzl +++ b/workspace_deps.bzl @@ -30,6 +30,7 @@ def workspace_deps(): io_bazel_rules_scala() protobuf_core_deps() hermetic_cc_toolchain() + plantuml_jar() def protobuf_core_deps(): bazel_skylib() # via com_google_protobuf @@ -283,3 +284,11 @@ def hermetic_cc_toolchain(): "https://github.com/uber/hermetic_cc_toolchain/releases/download/{0}/hermetic_cc_toolchain-{0}.tar.gz".format(HERMETIC_CC_TOOLCHAIN_VERSION), ], ) + +def plantuml_jar(): + _maybe( + http_jar, + name = "plantuml_jar", + url = "https://github.com/plantuml/plantuml/releases/download/v1.2024.6/plantuml-1.2024.6.jar", + sha256 = "5a8dc3b37fe133a4744e55be80caf6080a70350aba716d95400a0f0cbd79e846", + )