diff --git a/backend/protos/xyz/block/ftl/v1/language/language.pb.go b/backend/protos/xyz/block/ftl/v1/language/language.pb.go index 236e9ef460..cd135c7c5f 100644 --- a/backend/protos/xyz/block/ftl/v1/language/language.pb.go +++ b/backend/protos/xyz/block/ftl/v1/language/language.pb.go @@ -7,9 +7,11 @@ package languagepb import ( + v1 "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1" schema "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1/schema" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + structpb "google.golang.org/protobuf/types/known/structpb" reflect "reflect" sync "sync" ) @@ -67,22 +69,83 @@ func (x Error_ErrorLevel) Number() protoreflect.EnumNumber { // Deprecated: Use Error_ErrorLevel.Descriptor instead. func (Error_ErrorLevel) EnumDescriptor() ([]byte, []int) { - return file_xyz_block_ftl_v1_language_language_proto_rawDescGZIP(), []int{0, 0} + return file_xyz_block_ftl_v1_language_language_proto_rawDescGZIP(), []int{13, 0} } -type Error struct { +type LogMessage_LogLevel int32 + +const ( + LogMessage_DEBUG LogMessage_LogLevel = 0 + LogMessage_INFO LogMessage_LogLevel = 1 + LogMessage_WARN LogMessage_LogLevel = 2 + LogMessage_ERROR LogMessage_LogLevel = 3 +) + +// Enum value maps for LogMessage_LogLevel. +var ( + LogMessage_LogLevel_name = map[int32]string{ + 0: "DEBUG", + 1: "INFO", + 2: "WARN", + 3: "ERROR", + } + LogMessage_LogLevel_value = map[string]int32{ + "DEBUG": 0, + "INFO": 1, + "WARN": 2, + "ERROR": 3, + } +) + +func (x LogMessage_LogLevel) Enum() *LogMessage_LogLevel { + p := new(LogMessage_LogLevel) + *p = x + return p +} + +func (x LogMessage_LogLevel) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (LogMessage_LogLevel) Descriptor() protoreflect.EnumDescriptor { + return file_xyz_block_ftl_v1_language_language_proto_enumTypes[1].Descriptor() +} + +func (LogMessage_LogLevel) Type() protoreflect.EnumType { + return &file_xyz_block_ftl_v1_language_language_proto_enumTypes[1] +} + +func (x LogMessage_LogLevel) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use LogMessage_LogLevel.Descriptor instead. +func (LogMessage_LogLevel) EnumDescriptor() ([]byte, []int) { + return file_xyz_block_ftl_v1_language_language_proto_rawDescGZIP(), []int{20, 0} +} + +// ModuleConfig contains the configuration for a module, found in the module's ftl.toml file. +type ModuleConfig struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"` - Pos *schema.Position `protobuf:"bytes,2,opt,name=pos,proto3" json:"pos,omitempty"` - EndColumn int64 `protobuf:"varint,3,opt,name=endColumn,proto3" json:"endColumn,omitempty"` - Level Error_ErrorLevel `protobuf:"varint,4,opt,name=level,proto3,enum=xyz.block.ftl.v1.language.Error_ErrorLevel" json:"level,omitempty"` + // name of the module + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // absolute path to the module's directory + Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` + // absolute path + DeployDir string `protobuf:"bytes,3,opt,name=deployDir,proto3" json:"deployDir,omitempty"` + Build *string `protobuf:"bytes,4,opt,name=build,proto3,oneof" json:"build,omitempty"` + GeneratedSchemaDir *string `protobuf:"bytes,5,opt,name=generated_schema_dir,json=generatedSchemaDir,proto3,oneof" json:"generated_schema_dir,omitempty"` + Watch []string `protobuf:"bytes,6,rep,name=watch,proto3" json:"watch,omitempty"` + // LanguageConfig contains any metadata specific to a specific language. + // These are stored in the ftl.toml file under the same key as the language (eg: "go", "java") + LanguageConfig *structpb.Struct `protobuf:"bytes,7,opt,name=language_config,json=languageConfig,proto3" json:"language_config,omitempty"` } -func (x *Error) Reset() { - *x = Error{} +func (x *ModuleConfig) Reset() { + *x = ModuleConfig{} if protoimpl.UnsafeEnabled { mi := &file_xyz_block_ftl_v1_language_language_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -90,13 +153,13 @@ func (x *Error) Reset() { } } -func (x *Error) String() string { +func (x *ModuleConfig) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Error) ProtoMessage() {} +func (*ModuleConfig) ProtoMessage() {} -func (x *Error) ProtoReflect() protoreflect.Message { +func (x *ModuleConfig) ProtoReflect() protoreflect.Message { mi := &file_xyz_block_ftl_v1_language_language_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -108,49 +171,74 @@ func (x *Error) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Error.ProtoReflect.Descriptor instead. -func (*Error) Descriptor() ([]byte, []int) { +// Deprecated: Use ModuleConfig.ProtoReflect.Descriptor instead. +func (*ModuleConfig) Descriptor() ([]byte, []int) { return file_xyz_block_ftl_v1_language_language_proto_rawDescGZIP(), []int{0} } -func (x *Error) GetMsg() string { +func (x *ModuleConfig) GetName() string { if x != nil { - return x.Msg + return x.Name } return "" } -func (x *Error) GetPos() *schema.Position { +func (x *ModuleConfig) GetPath() string { if x != nil { - return x.Pos + return x.Path } - return nil + return "" } -func (x *Error) GetEndColumn() int64 { +func (x *ModuleConfig) GetDeployDir() string { if x != nil { - return x.EndColumn + return x.DeployDir } - return 0 + return "" } -func (x *Error) GetLevel() Error_ErrorLevel { +func (x *ModuleConfig) GetBuild() string { + if x != nil && x.Build != nil { + return *x.Build + } + return "" +} + +func (x *ModuleConfig) GetGeneratedSchemaDir() string { + if x != nil && x.GeneratedSchemaDir != nil { + return *x.GeneratedSchemaDir + } + return "" +} + +func (x *ModuleConfig) GetWatch() []string { if x != nil { - return x.Level + return x.Watch } - return Error_INFO + return nil } -type ErrorList struct { +func (x *ModuleConfig) GetLanguageConfig() *structpb.Struct { + if x != nil { + return x.LanguageConfig + } + return nil +} + +// ProjectConfig contains the configuration for a project, found in the ftl-project.toml file. +type ProjectConfig struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Errors []*Error `protobuf:"bytes,1,rep,name=errors,proto3" json:"errors,omitempty"` + Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + NoGit bool `protobuf:"varint,3,opt,name=no_git,json=noGit,proto3" json:"no_git,omitempty"` + Hermit bool `protobuf:"varint,4,opt,name=hermit,proto3" json:"hermit,omitempty"` } -func (x *ErrorList) Reset() { - *x = ErrorList{} +func (x *ProjectConfig) Reset() { + *x = ProjectConfig{} if protoimpl.UnsafeEnabled { mi := &file_xyz_block_ftl_v1_language_language_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -158,13 +246,13 @@ func (x *ErrorList) Reset() { } } -func (x *ErrorList) String() string { +func (x *ProjectConfig) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ErrorList) ProtoMessage() {} +func (*ProjectConfig) ProtoMessage() {} -func (x *ErrorList) ProtoReflect() protoreflect.Message { +func (x *ProjectConfig) ProtoReflect() protoreflect.Message { mi := &file_xyz_block_ftl_v1_language_language_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -176,125 +264,2058 @@ func (x *ErrorList) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ErrorList.ProtoReflect.Descriptor instead. -func (*ErrorList) Descriptor() ([]byte, []int) { +// Deprecated: Use ProjectConfig.ProtoReflect.Descriptor instead. +func (*ProjectConfig) Descriptor() ([]byte, []int) { return file_xyz_block_ftl_v1_language_language_proto_rawDescGZIP(), []int{1} } -func (x *ErrorList) GetErrors() []*Error { +func (x *ProjectConfig) GetPath() string { if x != nil { - return x.Errors + return x.Path } - return nil + return "" } -var File_xyz_block_ftl_v1_language_language_proto protoreflect.FileDescriptor +func (x *ProjectConfig) GetName() string { + if x != nil { + return x.Name + } + return "" +} -var file_xyz_block_ftl_v1_language_language_proto_rawDesc = []byte{ - 0x0a, 0x28, 0x78, 0x79, 0x7a, 0x2f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2f, 0x66, 0x74, 0x6c, 0x2f, - 0x76, 0x31, 0x2f, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x2f, 0x6c, 0x61, 0x6e, 0x67, - 0x75, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19, 0x78, 0x79, 0x7a, 0x2e, - 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x6c, 0x61, 0x6e, - 0x67, 0x75, 0x61, 0x67, 0x65, 0x1a, 0x24, 0x78, 0x79, 0x7a, 0x2f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, - 0x2f, 0x66, 0x74, 0x6c, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2f, 0x73, - 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xdc, 0x01, 0x0a, 0x05, - 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x12, 0x33, 0x0a, 0x03, 0x70, 0x6f, 0x73, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, - 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x50, - 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x70, 0x6f, 0x73, 0x12, 0x1c, 0x0a, 0x09, - 0x65, 0x6e, 0x64, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x09, 0x65, 0x6e, 0x64, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x12, 0x41, 0x0a, 0x05, 0x6c, 0x65, - 0x76, 0x65, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x78, 0x79, 0x7a, 0x2e, - 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x6c, 0x61, 0x6e, - 0x67, 0x75, 0x61, 0x67, 0x65, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x45, 0x72, 0x72, 0x6f, - 0x72, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x22, 0x2b, 0x0a, - 0x0a, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x08, 0x0a, 0x04, 0x49, - 0x4e, 0x46, 0x4f, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x57, 0x41, 0x52, 0x4e, 0x10, 0x01, 0x12, - 0x09, 0x0a, 0x05, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x02, 0x22, 0x45, 0x0a, 0x09, 0x45, 0x72, - 0x72, 0x6f, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x06, 0x65, 0x72, 0x72, 0x6f, 0x72, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, - 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x6c, 0x61, 0x6e, 0x67, 0x75, - 0x61, 0x67, 0x65, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x06, 0x65, 0x72, 0x72, 0x6f, 0x72, - 0x73, 0x42, 0x52, 0x50, 0x01, 0x5a, 0x4e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x54, 0x42, 0x44, 0x35, 0x34, 0x35, 0x36, 0x36, 0x39, 0x37, 0x35, 0x2f, 0x66, 0x74, - 0x6c, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, - 0x2f, 0x78, 0x79, 0x7a, 0x2f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2f, 0x66, 0x74, 0x6c, 0x2f, 0x76, - 0x31, 0x2f, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x3b, 0x6c, 0x61, 0x6e, 0x67, 0x75, - 0x61, 0x67, 0x65, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +func (x *ProjectConfig) GetNoGit() bool { + if x != nil { + return x.NoGit + } + return false } -var ( - file_xyz_block_ftl_v1_language_language_proto_rawDescOnce sync.Once - file_xyz_block_ftl_v1_language_language_proto_rawDescData = file_xyz_block_ftl_v1_language_language_proto_rawDesc -) +func (x *ProjectConfig) GetHermit() bool { + if x != nil { + return x.Hermit + } + return false +} -func file_xyz_block_ftl_v1_language_language_proto_rawDescGZIP() []byte { - file_xyz_block_ftl_v1_language_language_proto_rawDescOnce.Do(func() { - file_xyz_block_ftl_v1_language_language_proto_rawDescData = protoimpl.X.CompressGZIP(file_xyz_block_ftl_v1_language_language_proto_rawDescData) - }) - return file_xyz_block_ftl_v1_language_language_proto_rawDescData +type GetCreateModuleFlagsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Language string `protobuf:"bytes,1,opt,name=language,proto3" json:"language,omitempty"` } -var file_xyz_block_ftl_v1_language_language_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_xyz_block_ftl_v1_language_language_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_xyz_block_ftl_v1_language_language_proto_goTypes = []any{ - (Error_ErrorLevel)(0), // 0: xyz.block.ftl.v1.language.Error.ErrorLevel - (*Error)(nil), // 1: xyz.block.ftl.v1.language.Error - (*ErrorList)(nil), // 2: xyz.block.ftl.v1.language.ErrorList - (*schema.Position)(nil), // 3: xyz.block.ftl.v1.schema.Position +func (x *GetCreateModuleFlagsRequest) Reset() { + *x = GetCreateModuleFlagsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_xyz_block_ftl_v1_language_language_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -var file_xyz_block_ftl_v1_language_language_proto_depIdxs = []int32{ - 3, // 0: xyz.block.ftl.v1.language.Error.pos:type_name -> xyz.block.ftl.v1.schema.Position - 0, // 1: xyz.block.ftl.v1.language.Error.level:type_name -> xyz.block.ftl.v1.language.Error.ErrorLevel - 1, // 2: xyz.block.ftl.v1.language.ErrorList.errors:type_name -> xyz.block.ftl.v1.language.Error - 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 (x *GetCreateModuleFlagsRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func init() { file_xyz_block_ftl_v1_language_language_proto_init() } -func file_xyz_block_ftl_v1_language_language_proto_init() { - if File_xyz_block_ftl_v1_language_language_proto != nil { - return +func (*GetCreateModuleFlagsRequest) ProtoMessage() {} + +func (x *GetCreateModuleFlagsRequest) ProtoReflect() protoreflect.Message { + mi := &file_xyz_block_ftl_v1_language_language_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - if !protoimpl.UnsafeEnabled { - file_xyz_block_ftl_v1_language_language_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Error); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } + return mi.MessageOf(x) +} + +// Deprecated: Use GetCreateModuleFlagsRequest.ProtoReflect.Descriptor instead. +func (*GetCreateModuleFlagsRequest) Descriptor() ([]byte, []int) { + return file_xyz_block_ftl_v1_language_language_proto_rawDescGZIP(), []int{2} +} + +func (x *GetCreateModuleFlagsRequest) GetLanguage() string { + if x != nil { + return x.Language + } + return "" +} + +type GetCreateModuleFlagsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Flags []*GetCreateModuleFlagsResponse_Flag `protobuf:"bytes,1,rep,name=flags,proto3" json:"flags,omitempty"` +} + +func (x *GetCreateModuleFlagsResponse) Reset() { + *x = GetCreateModuleFlagsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_xyz_block_ftl_v1_language_language_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetCreateModuleFlagsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetCreateModuleFlagsResponse) ProtoMessage() {} + +func (x *GetCreateModuleFlagsResponse) ProtoReflect() protoreflect.Message { + mi := &file_xyz_block_ftl_v1_language_language_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) } - file_xyz_block_ftl_v1_language_language_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ErrorList); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetCreateModuleFlagsResponse.ProtoReflect.Descriptor instead. +func (*GetCreateModuleFlagsResponse) Descriptor() ([]byte, []int) { + return file_xyz_block_ftl_v1_language_language_proto_rawDescGZIP(), []int{3} +} + +func (x *GetCreateModuleFlagsResponse) GetFlags() []*GetCreateModuleFlagsResponse_Flag { + if x != nil { + return x.Flags + } + return nil +} + +// Request to create a new module. +type CreateModuleRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The root path for the module, which does not yet exist. + // The plugin should create the directory. + Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` + // The project configuration + ProjectConfig *ProjectConfig `protobuf:"bytes,3,opt,name=project_config,json=projectConfig,proto3" json:"project_config,omitempty"` + // Flags contains any values set for those configured in the GetCreateModuleFlags call + Flags *structpb.Struct `protobuf:"bytes,4,opt,name=Flags,proto3" json:"Flags,omitempty"` +} + +func (x *CreateModuleRequest) Reset() { + *x = CreateModuleRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_xyz_block_ftl_v1_language_language_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateModuleRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateModuleRequest) ProtoMessage() {} + +func (x *CreateModuleRequest) ProtoReflect() protoreflect.Message { + mi := &file_xyz_block_ftl_v1_language_language_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 CreateModuleRequest.ProtoReflect.Descriptor instead. +func (*CreateModuleRequest) Descriptor() ([]byte, []int) { + return file_xyz_block_ftl_v1_language_language_proto_rawDescGZIP(), []int{4} +} + +func (x *CreateModuleRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *CreateModuleRequest) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +func (x *CreateModuleRequest) GetProjectConfig() *ProjectConfig { + if x != nil { + return x.ProjectConfig + } + return nil +} + +func (x *CreateModuleRequest) GetFlags() *structpb.Struct { + if x != nil { + return x.Flags + } + return nil +} + +// Response to a create module request. +type CreateModuleResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *CreateModuleResponse) Reset() { + *x = CreateModuleResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_xyz_block_ftl_v1_language_language_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateModuleResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateModuleResponse) ProtoMessage() {} + +func (x *CreateModuleResponse) ProtoReflect() protoreflect.Message { + mi := &file_xyz_block_ftl_v1_language_language_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 CreateModuleResponse.ProtoReflect.Descriptor instead. +func (*CreateModuleResponse) Descriptor() ([]byte, []int) { + return file_xyz_block_ftl_v1_language_language_proto_rawDescGZIP(), []int{5} +} + +type ModuleConfigDefaultsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` +} + +func (x *ModuleConfigDefaultsRequest) Reset() { + *x = ModuleConfigDefaultsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_xyz_block_ftl_v1_language_language_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ModuleConfigDefaultsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ModuleConfigDefaultsRequest) ProtoMessage() {} + +func (x *ModuleConfigDefaultsRequest) ProtoReflect() protoreflect.Message { + mi := &file_xyz_block_ftl_v1_language_language_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 ModuleConfigDefaultsRequest.ProtoReflect.Descriptor instead. +func (*ModuleConfigDefaultsRequest) Descriptor() ([]byte, []int) { + return file_xyz_block_ftl_v1_language_language_proto_rawDescGZIP(), []int{6} +} + +func (x *ModuleConfigDefaultsRequest) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +// ModuleConfigDefaultsResponse provides defaults for ModuleConfig. +// +// The result may be cached by FTL, so defaulting logic should not be changing due to normal module changes. +// For example, it is valid to return defaults based on which build tool is configured within the module directory, +// as that is not expected to change during normal operation. +// It is not recommended to read the module's toml file to determine defaults, as when the toml file is updated, +// the module defaults will not be recalculated. +type ModuleConfigDefaultsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Default relative path to the directory containing all build artifacts for deployments + DeployDir string `protobuf:"bytes,1,opt,name=deployDir,proto3" json:"deployDir,omitempty"` + // Default build command + Build *string `protobuf:"bytes,2,opt,name=build,proto3,oneof" json:"build,omitempty"` + // Default relative path to the directory containing generated schema files + GeneratedSchemaDir *string `protobuf:"bytes,3,opt,name=generated_schema_dir,json=generatedSchemaDir,proto3,oneof" json:"generated_schema_dir,omitempty"` + // Default patterns to watch for file changes + Watch []string `protobuf:"bytes,4,rep,name=watch,proto3" json:"watch,omitempty"` + // Default language specific configuration. + // These defaults are filled in by looking at each root key only. If the key is not present, the default is used. + LanguageConfig *structpb.Struct `protobuf:"bytes,5,opt,name=language_config,json=languageConfig,proto3" json:"language_config,omitempty"` +} + +func (x *ModuleConfigDefaultsResponse) Reset() { + *x = ModuleConfigDefaultsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_xyz_block_ftl_v1_language_language_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ModuleConfigDefaultsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ModuleConfigDefaultsResponse) ProtoMessage() {} + +func (x *ModuleConfigDefaultsResponse) ProtoReflect() protoreflect.Message { + mi := &file_xyz_block_ftl_v1_language_language_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 ModuleConfigDefaultsResponse.ProtoReflect.Descriptor instead. +func (*ModuleConfigDefaultsResponse) Descriptor() ([]byte, []int) { + return file_xyz_block_ftl_v1_language_language_proto_rawDescGZIP(), []int{7} +} + +func (x *ModuleConfigDefaultsResponse) GetDeployDir() string { + if x != nil { + return x.DeployDir + } + return "" +} + +func (x *ModuleConfigDefaultsResponse) GetBuild() string { + if x != nil && x.Build != nil { + return *x.Build + } + return "" +} + +func (x *ModuleConfigDefaultsResponse) GetGeneratedSchemaDir() string { + if x != nil && x.GeneratedSchemaDir != nil { + return *x.GeneratedSchemaDir + } + return "" +} + +func (x *ModuleConfigDefaultsResponse) GetWatch() []string { + if x != nil { + return x.Watch + } + return nil +} + +func (x *ModuleConfigDefaultsResponse) GetLanguageConfig() *structpb.Struct { + if x != nil { + return x.LanguageConfig + } + return nil +} + +type DependenciesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ModuleConfig *ModuleConfig `protobuf:"bytes,1,opt,name=module_config,json=moduleConfig,proto3" json:"module_config,omitempty"` +} + +func (x *DependenciesRequest) Reset() { + *x = DependenciesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_xyz_block_ftl_v1_language_language_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DependenciesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DependenciesRequest) ProtoMessage() {} + +func (x *DependenciesRequest) ProtoReflect() protoreflect.Message { + mi := &file_xyz_block_ftl_v1_language_language_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 DependenciesRequest.ProtoReflect.Descriptor instead. +func (*DependenciesRequest) Descriptor() ([]byte, []int) { + return file_xyz_block_ftl_v1_language_language_proto_rawDescGZIP(), []int{8} +} + +func (x *DependenciesRequest) GetModuleConfig() *ModuleConfig { + if x != nil { + return x.ModuleConfig + } + return nil +} + +type DependenciesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Modules []string `protobuf:"bytes,1,rep,name=modules,proto3" json:"modules,omitempty"` +} + +func (x *DependenciesResponse) Reset() { + *x = DependenciesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_xyz_block_ftl_v1_language_language_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DependenciesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DependenciesResponse) ProtoMessage() {} + +func (x *DependenciesResponse) ProtoReflect() protoreflect.Message { + mi := &file_xyz_block_ftl_v1_language_language_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 DependenciesResponse.ProtoReflect.Descriptor instead. +func (*DependenciesResponse) Descriptor() ([]byte, []int) { + return file_xyz_block_ftl_v1_language_language_proto_rawDescGZIP(), []int{9} +} + +func (x *DependenciesResponse) GetModules() []string { + if x != nil { + return x.Modules + } + return nil +} + +// BuildContext contains contextual information needed to build. +// +// Plugins must include the build context's id when a build succeeds or fails. +// For automatic rebuilds, plugins must use the most recent build context they have received. +type BuildContext struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // The configuration for the module + ModuleConfig *ModuleConfig `protobuf:"bytes,2,opt,name=module_config,json=moduleConfig,proto3" json:"module_config,omitempty"` + // The FTL schema including all dependencies + Schema *schema.Schema `protobuf:"bytes,3,opt,name=schema,proto3" json:"schema,omitempty"` + // The dependencies for the module + Dependencies []string `protobuf:"bytes,4,rep,name=dependencies,proto3" json:"dependencies,omitempty"` +} + +func (x *BuildContext) Reset() { + *x = BuildContext{} + if protoimpl.UnsafeEnabled { + mi := &file_xyz_block_ftl_v1_language_language_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BuildContext) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BuildContext) ProtoMessage() {} + +func (x *BuildContext) ProtoReflect() protoreflect.Message { + mi := &file_xyz_block_ftl_v1_language_language_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 BuildContext.ProtoReflect.Descriptor instead. +func (*BuildContext) Descriptor() ([]byte, []int) { + return file_xyz_block_ftl_v1_language_language_proto_rawDescGZIP(), []int{10} +} + +func (x *BuildContext) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *BuildContext) GetModuleConfig() *ModuleConfig { + if x != nil { + return x.ModuleConfig + } + return nil +} + +func (x *BuildContext) GetSchema() *schema.Schema { + if x != nil { + return x.Schema + } + return nil +} + +func (x *BuildContext) GetDependencies() []string { + if x != nil { + return x.Dependencies + } + return nil +} + +type BuildContextUpdatedRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BuildContext *BuildContext `protobuf:"bytes,1,opt,name=buildContext,proto3" json:"buildContext,omitempty"` +} + +func (x *BuildContextUpdatedRequest) Reset() { + *x = BuildContextUpdatedRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_xyz_block_ftl_v1_language_language_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BuildContextUpdatedRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BuildContextUpdatedRequest) ProtoMessage() {} + +func (x *BuildContextUpdatedRequest) ProtoReflect() protoreflect.Message { + mi := &file_xyz_block_ftl_v1_language_language_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 BuildContextUpdatedRequest.ProtoReflect.Descriptor instead. +func (*BuildContextUpdatedRequest) Descriptor() ([]byte, []int) { + return file_xyz_block_ftl_v1_language_language_proto_rawDescGZIP(), []int{11} +} + +func (x *BuildContextUpdatedRequest) GetBuildContext() *BuildContext { + if x != nil { + return x.BuildContext + } + return nil +} + +type BuildContextUpdatedResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *BuildContextUpdatedResponse) Reset() { + *x = BuildContextUpdatedResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_xyz_block_ftl_v1_language_language_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BuildContextUpdatedResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BuildContextUpdatedResponse) ProtoMessage() {} + +func (x *BuildContextUpdatedResponse) ProtoReflect() protoreflect.Message { + mi := &file_xyz_block_ftl_v1_language_language_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 BuildContextUpdatedResponse.ProtoReflect.Descriptor instead. +func (*BuildContextUpdatedResponse) Descriptor() ([]byte, []int) { + return file_xyz_block_ftl_v1_language_language_proto_rawDescGZIP(), []int{12} +} + +// Error contains information about an error that occurred during a build. +// Errors do not always cause a build failure. Use lesser levels to help guide the user. +type Error struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"` + Level Error_ErrorLevel `protobuf:"varint,4,opt,name=level,proto3,enum=xyz.block.ftl.v1.language.Error_ErrorLevel" json:"level,omitempty"` + Pos *Position `protobuf:"bytes,5,opt,name=pos,proto3" json:"pos,omitempty"` +} + +func (x *Error) Reset() { + *x = Error{} + if protoimpl.UnsafeEnabled { + mi := &file_xyz_block_ftl_v1_language_language_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Error) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Error) ProtoMessage() {} + +func (x *Error) ProtoReflect() protoreflect.Message { + mi := &file_xyz_block_ftl_v1_language_language_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 Error.ProtoReflect.Descriptor instead. +func (*Error) Descriptor() ([]byte, []int) { + return file_xyz_block_ftl_v1_language_language_proto_rawDescGZIP(), []int{13} +} + +func (x *Error) GetMsg() string { + if x != nil { + return x.Msg + } + return "" +} + +func (x *Error) GetLevel() Error_ErrorLevel { + if x != nil { + return x.Level + } + return Error_INFO +} + +func (x *Error) GetPos() *Position { + if x != nil { + return x.Pos + } + return nil +} + +type Position struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Filename string `protobuf:"bytes,1,opt,name=filename,proto3" json:"filename,omitempty"` + Line int64 `protobuf:"varint,2,opt,name=line,proto3" json:"line,omitempty"` + StartColumn int64 `protobuf:"varint,3,opt,name=startColumn,proto3" json:"startColumn,omitempty"` + EndColumn int64 `protobuf:"varint,4,opt,name=endColumn,proto3" json:"endColumn,omitempty"` +} + +func (x *Position) Reset() { + *x = Position{} + if protoimpl.UnsafeEnabled { + mi := &file_xyz_block_ftl_v1_language_language_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Position) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Position) ProtoMessage() {} + +func (x *Position) ProtoReflect() protoreflect.Message { + mi := &file_xyz_block_ftl_v1_language_language_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 Position.ProtoReflect.Descriptor instead. +func (*Position) Descriptor() ([]byte, []int) { + return file_xyz_block_ftl_v1_language_language_proto_rawDescGZIP(), []int{14} +} + +func (x *Position) GetFilename() string { + if x != nil { + return x.Filename + } + return "" +} + +func (x *Position) GetLine() int64 { + if x != nil { + return x.Line + } + return 0 +} + +func (x *Position) GetStartColumn() int64 { + if x != nil { + return x.StartColumn + } + return 0 +} + +func (x *Position) GetEndColumn() int64 { + if x != nil { + return x.EndColumn + } + return 0 +} + +type ErrorList struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Errors []*Error `protobuf:"bytes,1,rep,name=errors,proto3" json:"errors,omitempty"` +} + +func (x *ErrorList) Reset() { + *x = ErrorList{} + if protoimpl.UnsafeEnabled { + mi := &file_xyz_block_ftl_v1_language_language_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ErrorList) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ErrorList) ProtoMessage() {} + +func (x *ErrorList) ProtoReflect() protoreflect.Message { + mi := &file_xyz_block_ftl_v1_language_language_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 ErrorList.ProtoReflect.Descriptor instead. +func (*ErrorList) Descriptor() ([]byte, []int) { + return file_xyz_block_ftl_v1_language_language_proto_rawDescGZIP(), []int{15} +} + +func (x *ErrorList) GetErrors() []*Error { + if x != nil { + return x.Errors + } + return nil +} + +// Request to build a module. +type BuildRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The root path for the FTL project + ProjectPath string `protobuf:"bytes,1,opt,name=project_path,json=projectPath,proto3" json:"project_path,omitempty"` + // Indicates whether to watch for file changes and automatically rebuild + RebuildAutomatically bool `protobuf:"varint,2,opt,name=rebuild_automatically,json=rebuildAutomatically,proto3" json:"rebuild_automatically,omitempty"` + BuildContext *BuildContext `protobuf:"bytes,3,opt,name=build_context,json=buildContext,proto3" json:"build_context,omitempty"` +} + +func (x *BuildRequest) Reset() { + *x = BuildRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_xyz_block_ftl_v1_language_language_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BuildRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BuildRequest) ProtoMessage() {} + +func (x *BuildRequest) ProtoReflect() protoreflect.Message { + mi := &file_xyz_block_ftl_v1_language_language_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 BuildRequest.ProtoReflect.Descriptor instead. +func (*BuildRequest) Descriptor() ([]byte, []int) { + return file_xyz_block_ftl_v1_language_language_proto_rawDescGZIP(), []int{16} +} + +func (x *BuildRequest) GetProjectPath() string { + if x != nil { + return x.ProjectPath + } + return "" +} + +func (x *BuildRequest) GetRebuildAutomatically() bool { + if x != nil { + return x.RebuildAutomatically + } + return false +} + +func (x *BuildRequest) GetBuildContext() *BuildContext { + if x != nil { + return x.BuildContext + } + return nil +} + +// AutoRebuildStarted should be sent when the plugin decides to start rebuilding automatically. +// +// It is not required to send this event, though it helps inform the user that their changes are not yet built. +// FTL may ignore this event if it does not match FTL's current build context and state. +// If the plugin decides to cancel the build because another build started, no failure or cancellation event needs +// to be sent. +type AutoRebuildStarted struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ContextId string `protobuf:"bytes,1,opt,name=context_id,json=contextId,proto3" json:"context_id,omitempty"` +} + +func (x *AutoRebuildStarted) Reset() { + *x = AutoRebuildStarted{} + if protoimpl.UnsafeEnabled { + mi := &file_xyz_block_ftl_v1_language_language_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AutoRebuildStarted) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AutoRebuildStarted) ProtoMessage() {} + +func (x *AutoRebuildStarted) ProtoReflect() protoreflect.Message { + mi := &file_xyz_block_ftl_v1_language_language_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 AutoRebuildStarted.ProtoReflect.Descriptor instead. +func (*AutoRebuildStarted) Descriptor() ([]byte, []int) { + return file_xyz_block_ftl_v1_language_language_proto_rawDescGZIP(), []int{17} +} + +func (x *AutoRebuildStarted) GetContextId() string { + if x != nil { + return x.ContextId + } + return "" +} + +// BuildSuccess should be sent when a build succeeds. +// +// FTL may ignore this event if it does not match FTL's current build context and state. +type BuildSuccess struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The id of build context used while building. + ContextId string `protobuf:"bytes,1,opt,name=context_id,json=contextId,proto3" json:"context_id,omitempty"` + // Indicates whether the build was automatically started by the plugin, rather than due to a Build rpc call. + IsAutomaticRebuild bool `protobuf:"varint,2,opt,name=is_automatic_rebuild,json=isAutomaticRebuild,proto3" json:"is_automatic_rebuild,omitempty"` + // Module schema for the built module + Module *schema.Module `protobuf:"bytes,3,opt,name=module,proto3" json:"module,omitempty"` + // Paths for files/directories to be deployed + Deploy []string `protobuf:"bytes,4,rep,name=deploy,proto3" json:"deploy,omitempty"` + // Name of the docker image to use for the runner + DockerImage string `protobuf:"bytes,5,opt,name=docker_image,json=dockerImage,proto3" json:"docker_image,omitempty"` + // Errors contains any errors that occurred during the build + // No errors can have a level of ERROR, instead a BuildFailure should be sent + // Instead this is useful for INFO and WARN level errors. + Errors *ErrorList `protobuf:"bytes,6,opt,name=errors,proto3" json:"errors,omitempty"` +} + +func (x *BuildSuccess) Reset() { + *x = BuildSuccess{} + if protoimpl.UnsafeEnabled { + mi := &file_xyz_block_ftl_v1_language_language_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BuildSuccess) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BuildSuccess) ProtoMessage() {} + +func (x *BuildSuccess) ProtoReflect() protoreflect.Message { + mi := &file_xyz_block_ftl_v1_language_language_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 BuildSuccess.ProtoReflect.Descriptor instead. +func (*BuildSuccess) Descriptor() ([]byte, []int) { + return file_xyz_block_ftl_v1_language_language_proto_rawDescGZIP(), []int{18} +} + +func (x *BuildSuccess) GetContextId() string { + if x != nil { + return x.ContextId + } + return "" +} + +func (x *BuildSuccess) GetIsAutomaticRebuild() bool { + if x != nil { + return x.IsAutomaticRebuild + } + return false +} + +func (x *BuildSuccess) GetModule() *schema.Module { + if x != nil { + return x.Module + } + return nil +} + +func (x *BuildSuccess) GetDeploy() []string { + if x != nil { + return x.Deploy + } + return nil +} + +func (x *BuildSuccess) GetDockerImage() string { + if x != nil { + return x.DockerImage + } + return "" +} + +func (x *BuildSuccess) GetErrors() *ErrorList { + if x != nil { + return x.Errors + } + return nil +} + +// BuildFailure should be sent when a build fails. +// +// FTL may ignore this event if it does not match FTL's current build context and state. +type BuildFailure struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The id of build context used while building. + ContextId string `protobuf:"bytes,1,opt,name=context_id,json=contextId,proto3" json:"context_id,omitempty"` + // Indicates whether the build was automatically started by the plugin, rather than due to a Build rpc call. + IsAutomaticRebuild bool `protobuf:"varint,2,opt,name=is_automatic_rebuild,json=isAutomaticRebuild,proto3" json:"is_automatic_rebuild,omitempty"` + // Errors contains any errors that occurred during the build + Errors *ErrorList `protobuf:"bytes,3,opt,name=errors,proto3" json:"errors,omitempty"` + // Indicates the plugin determined that the dependencies in the BuildContext are out of date. + // If a Build stream is being kept open for automatic rebuilds, FTL will call GetDependencies, followed by + // BuildContextUpdated. + InvalidateDependencies bool `protobuf:"varint,4,opt,name=invalidate_dependencies,json=invalidateDependencies,proto3" json:"invalidate_dependencies,omitempty"` +} + +func (x *BuildFailure) Reset() { + *x = BuildFailure{} + if protoimpl.UnsafeEnabled { + mi := &file_xyz_block_ftl_v1_language_language_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BuildFailure) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BuildFailure) ProtoMessage() {} + +func (x *BuildFailure) ProtoReflect() protoreflect.Message { + mi := &file_xyz_block_ftl_v1_language_language_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 BuildFailure.ProtoReflect.Descriptor instead. +func (*BuildFailure) Descriptor() ([]byte, []int) { + return file_xyz_block_ftl_v1_language_language_proto_rawDescGZIP(), []int{19} +} + +func (x *BuildFailure) GetContextId() string { + if x != nil { + return x.ContextId + } + return "" +} + +func (x *BuildFailure) GetIsAutomaticRebuild() bool { + if x != nil { + return x.IsAutomaticRebuild + } + return false +} + +func (x *BuildFailure) GetErrors() *ErrorList { + if x != nil { + return x.Errors + } + return nil +} + +func (x *BuildFailure) GetInvalidateDependencies() bool { + if x != nil { + return x.InvalidateDependencies + } + return false +} + +// Log message from the language service. +type LogMessage struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` + Level LogMessage_LogLevel `protobuf:"varint,2,opt,name=level,proto3,enum=xyz.block.ftl.v1.language.LogMessage_LogLevel" json:"level,omitempty"` +} + +func (x *LogMessage) Reset() { + *x = LogMessage{} + if protoimpl.UnsafeEnabled { + mi := &file_xyz_block_ftl_v1_language_language_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LogMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LogMessage) ProtoMessage() {} + +func (x *LogMessage) ProtoReflect() protoreflect.Message { + mi := &file_xyz_block_ftl_v1_language_language_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 LogMessage.ProtoReflect.Descriptor instead. +func (*LogMessage) Descriptor() ([]byte, []int) { + return file_xyz_block_ftl_v1_language_language_proto_rawDescGZIP(), []int{20} +} + +func (x *LogMessage) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +func (x *LogMessage) GetLevel() LogMessage_LogLevel { + if x != nil { + return x.Level + } + return LogMessage_DEBUG +} + +// Every type of message that can be streamed from the language plugin for a build. +type BuildEvent struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Event: + // + // *BuildEvent_AutoRebuildStarted + // *BuildEvent_BuildSuccess + // *BuildEvent_BuildFailure + // *BuildEvent_LogMessage + Event isBuildEvent_Event `protobuf_oneof:"event"` +} + +func (x *BuildEvent) Reset() { + *x = BuildEvent{} + if protoimpl.UnsafeEnabled { + mi := &file_xyz_block_ftl_v1_language_language_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BuildEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BuildEvent) ProtoMessage() {} + +func (x *BuildEvent) ProtoReflect() protoreflect.Message { + mi := &file_xyz_block_ftl_v1_language_language_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 BuildEvent.ProtoReflect.Descriptor instead. +func (*BuildEvent) Descriptor() ([]byte, []int) { + return file_xyz_block_ftl_v1_language_language_proto_rawDescGZIP(), []int{21} +} + +func (m *BuildEvent) GetEvent() isBuildEvent_Event { + if m != nil { + return m.Event + } + return nil +} + +func (x *BuildEvent) GetAutoRebuildStarted() *AutoRebuildStarted { + if x, ok := x.GetEvent().(*BuildEvent_AutoRebuildStarted); ok { + return x.AutoRebuildStarted + } + return nil +} + +func (x *BuildEvent) GetBuildSuccess() *BuildSuccess { + if x, ok := x.GetEvent().(*BuildEvent_BuildSuccess); ok { + return x.BuildSuccess + } + return nil +} + +func (x *BuildEvent) GetBuildFailure() *BuildFailure { + if x, ok := x.GetEvent().(*BuildEvent_BuildFailure); ok { + return x.BuildFailure + } + return nil +} + +func (x *BuildEvent) GetLogMessage() *LogMessage { + if x, ok := x.GetEvent().(*BuildEvent_LogMessage); ok { + return x.LogMessage + } + return nil +} + +type isBuildEvent_Event interface { + isBuildEvent_Event() +} + +type BuildEvent_AutoRebuildStarted struct { + AutoRebuildStarted *AutoRebuildStarted `protobuf:"bytes,2,opt,name=auto_rebuild_started,json=autoRebuildStarted,proto3,oneof"` +} + +type BuildEvent_BuildSuccess struct { + BuildSuccess *BuildSuccess `protobuf:"bytes,3,opt,name=build_success,json=buildSuccess,proto3,oneof"` +} + +type BuildEvent_BuildFailure struct { + BuildFailure *BuildFailure `protobuf:"bytes,4,opt,name=build_failure,json=buildFailure,proto3,oneof"` +} + +type BuildEvent_LogMessage struct { + LogMessage *LogMessage `protobuf:"bytes,5,opt,name=log_message,json=logMessage,proto3,oneof"` +} + +func (*BuildEvent_AutoRebuildStarted) isBuildEvent_Event() {} + +func (*BuildEvent_BuildSuccess) isBuildEvent_Event() {} + +func (*BuildEvent_BuildFailure) isBuildEvent_Event() {} + +func (*BuildEvent_LogMessage) isBuildEvent_Event() {} + +type GetCreateModuleFlagsResponse_Flag struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Help string `protobuf:"bytes,2,opt,name=help,proto3" json:"help,omitempty"` + Envar *string `protobuf:"bytes,3,opt,name=envar,proto3,oneof" json:"envar,omitempty"` + // short must be a single character + Short *string `protobuf:"bytes,4,opt,name=short,proto3,oneof" json:"short,omitempty"` + Placeholder *string `protobuf:"bytes,5,opt,name=placeholder,proto3,oneof" json:"placeholder,omitempty"` + Default *string `protobuf:"bytes,6,opt,name=default,proto3,oneof" json:"default,omitempty"` +} + +func (x *GetCreateModuleFlagsResponse_Flag) Reset() { + *x = GetCreateModuleFlagsResponse_Flag{} + if protoimpl.UnsafeEnabled { + mi := &file_xyz_block_ftl_v1_language_language_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetCreateModuleFlagsResponse_Flag) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetCreateModuleFlagsResponse_Flag) ProtoMessage() {} + +func (x *GetCreateModuleFlagsResponse_Flag) ProtoReflect() protoreflect.Message { + mi := &file_xyz_block_ftl_v1_language_language_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 GetCreateModuleFlagsResponse_Flag.ProtoReflect.Descriptor instead. +func (*GetCreateModuleFlagsResponse_Flag) Descriptor() ([]byte, []int) { + return file_xyz_block_ftl_v1_language_language_proto_rawDescGZIP(), []int{3, 0} +} + +func (x *GetCreateModuleFlagsResponse_Flag) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *GetCreateModuleFlagsResponse_Flag) GetHelp() string { + if x != nil { + return x.Help + } + return "" +} + +func (x *GetCreateModuleFlagsResponse_Flag) GetEnvar() string { + if x != nil && x.Envar != nil { + return *x.Envar + } + return "" +} + +func (x *GetCreateModuleFlagsResponse_Flag) GetShort() string { + if x != nil && x.Short != nil { + return *x.Short + } + return "" +} + +func (x *GetCreateModuleFlagsResponse_Flag) GetPlaceholder() string { + if x != nil && x.Placeholder != nil { + return *x.Placeholder + } + return "" +} + +func (x *GetCreateModuleFlagsResponse_Flag) GetDefault() string { + if x != nil && x.Default != nil { + return *x.Default + } + return "" +} + +var File_xyz_block_ftl_v1_language_language_proto protoreflect.FileDescriptor + +var file_xyz_block_ftl_v1_language_language_proto_rawDesc = []byte{ + 0x0a, 0x28, 0x78, 0x79, 0x7a, 0x2f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2f, 0x66, 0x74, 0x6c, 0x2f, + 0x76, 0x31, 0x2f, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x2f, 0x6c, 0x61, 0x6e, 0x67, + 0x75, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19, 0x78, 0x79, 0x7a, 0x2e, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x6c, 0x61, 0x6e, + 0x67, 0x75, 0x61, 0x67, 0x65, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x78, 0x79, 0x7a, 0x2f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2f, 0x66, + 0x74, 0x6c, 0x2f, 0x76, 0x31, 0x2f, 0x66, 0x74, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x24, 0x78, 0x79, 0x7a, 0x2f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2f, 0x66, 0x74, 0x6c, 0x2f, 0x76, + 0x31, 0x2f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa1, 0x02, 0x0a, 0x0c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, + 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x1c, + 0x0a, 0x09, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x44, 0x69, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x44, 0x69, 0x72, 0x12, 0x19, 0x0a, 0x05, + 0x62, 0x75, 0x69, 0x6c, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x62, + 0x75, 0x69, 0x6c, 0x64, 0x88, 0x01, 0x01, 0x12, 0x35, 0x0a, 0x14, 0x67, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x64, 0x69, 0x72, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x12, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, + 0x65, 0x64, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x69, 0x72, 0x88, 0x01, 0x01, 0x12, 0x14, + 0x0a, 0x05, 0x77, 0x61, 0x74, 0x63, 0x68, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x77, + 0x61, 0x74, 0x63, 0x68, 0x12, 0x40, 0x0a, 0x0f, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, + 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x0e, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, + 0x42, 0x17, 0x0a, 0x15, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x73, + 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x64, 0x69, 0x72, 0x22, 0x66, 0x0a, 0x0d, 0x50, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, + 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x15, 0x0a, 0x06, 0x6e, 0x6f, 0x5f, 0x67, 0x69, 0x74, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x05, 0x6e, 0x6f, 0x47, 0x69, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x72, + 0x6d, 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x68, 0x65, 0x72, 0x6d, 0x69, + 0x74, 0x22, 0x39, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x6f, + 0x64, 0x75, 0x6c, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x22, 0xcf, 0x02, 0x0a, + 0x1c, 0x47, 0x65, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, + 0x46, 0x6c, 0x61, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x52, 0x0a, + 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x78, + 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, + 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x46, 0x6c, 0x61, 0x67, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, + 0x73, 0x1a, 0xda, 0x01, 0x0a, 0x04, 0x46, 0x6c, 0x61, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, + 0x0a, 0x04, 0x68, 0x65, 0x6c, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x65, + 0x6c, 0x70, 0x12, 0x19, 0x0a, 0x05, 0x65, 0x6e, 0x76, 0x61, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x48, 0x00, 0x52, 0x05, 0x65, 0x6e, 0x76, 0x61, 0x72, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, + 0x05, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x05, + 0x73, 0x68, 0x6f, 0x72, 0x74, 0x88, 0x01, 0x01, 0x12, 0x25, 0x0a, 0x0b, 0x70, 0x6c, 0x61, 0x63, + 0x65, 0x68, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, + 0x0b, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x68, 0x6f, 0x6c, 0x64, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, + 0x1d, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, + 0x48, 0x03, 0x52, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x88, 0x01, 0x01, 0x42, 0x08, + 0x0a, 0x06, 0x5f, 0x65, 0x6e, 0x76, 0x61, 0x72, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x68, 0x6f, + 0x72, 0x74, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x68, 0x6f, 0x6c, 0x64, + 0x65, 0x72, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x22, 0xbd, + 0x01, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, + 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x4f, + 0x0a, 0x0e, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, + 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, + 0x67, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x52, 0x0d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, + 0x2d, 0x0a, 0x05, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x05, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x22, 0x16, + 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x31, 0x0a, 0x1b, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x22, 0x89, 0x02, 0x0a, 0x1c, 0x4d, 0x6f, + 0x64, 0x75, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, + 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x64, 0x65, + 0x70, 0x6c, 0x6f, 0x79, 0x44, 0x69, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x64, + 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x44, 0x69, 0x72, 0x12, 0x19, 0x0a, 0x05, 0x62, 0x75, 0x69, 0x6c, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x62, 0x75, 0x69, 0x6c, 0x64, + 0x88, 0x01, 0x01, 0x12, 0x35, 0x0a, 0x14, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, + 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x64, 0x69, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x48, 0x01, 0x52, 0x12, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x53, 0x63, + 0x68, 0x65, 0x6d, 0x61, 0x44, 0x69, 0x72, 0x88, 0x01, 0x01, 0x12, 0x14, 0x0a, 0x05, 0x77, 0x61, + 0x74, 0x63, 0x68, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x77, 0x61, 0x74, 0x63, 0x68, + 0x12, 0x40, 0x0a, 0x0f, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, + 0x63, 0x74, 0x52, 0x0e, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x42, 0x17, 0x0a, 0x15, + 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, + 0x61, 0x5f, 0x64, 0x69, 0x72, 0x22, 0x63, 0x0a, 0x13, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, + 0x6e, 0x63, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4c, 0x0a, 0x0d, + 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, + 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x2e, + 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0c, 0x6d, 0x6f, + 0x64, 0x75, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x30, 0x0a, 0x14, 0x44, 0x65, + 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x22, 0xc9, 0x01, 0x0a, + 0x0c, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x0e, 0x0a, + 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x4c, 0x0a, + 0x0d, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, + 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0c, 0x6d, + 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x37, 0x0a, 0x06, 0x73, + 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x78, 0x79, + 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x73, + 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x06, 0x73, 0x63, + 0x68, 0x65, 0x6d, 0x61, 0x12, 0x22, 0x0a, 0x0c, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, + 0x63, 0x69, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x70, 0x65, + 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x22, 0x69, 0x0a, 0x1a, 0x42, 0x75, 0x69, 0x6c, + 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4b, 0x0a, 0x0c, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x43, + 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x78, + 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, + 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x43, 0x6f, + 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x0c, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x43, 0x6f, 0x6e, 0x74, + 0x65, 0x78, 0x74, 0x22, 0x1d, 0x0a, 0x1b, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x43, 0x6f, 0x6e, 0x74, + 0x65, 0x78, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0xc0, 0x01, 0x0a, 0x05, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x10, 0x0a, 0x03, + 0x6d, 0x73, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x12, 0x41, + 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, + 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, + 0x2e, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x2e, + 0x45, 0x72, 0x72, 0x6f, 0x72, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, + 0x6c, 0x12, 0x35, 0x0a, 0x03, 0x70, 0x6f, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, + 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, + 0x31, 0x2e, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x2e, 0x50, 0x6f, 0x73, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x70, 0x6f, 0x73, 0x22, 0x2b, 0x0a, 0x0a, 0x45, 0x72, 0x72, 0x6f, + 0x72, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x08, 0x0a, 0x04, 0x49, 0x4e, 0x46, 0x4f, 0x10, 0x00, + 0x12, 0x08, 0x0a, 0x04, 0x57, 0x41, 0x52, 0x4e, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x52, + 0x52, 0x4f, 0x52, 0x10, 0x02, 0x22, 0x7a, 0x0a, 0x08, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 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, 0x12, 0x0a, + 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x6c, 0x69, 0x6e, + 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x72, 0x74, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x73, 0x74, 0x61, 0x72, 0x74, 0x43, 0x6f, 0x6c, + 0x75, 0x6d, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x6e, 0x64, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x65, 0x6e, 0x64, 0x43, 0x6f, 0x6c, 0x75, 0x6d, + 0x6e, 0x22, 0x45, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x38, + 0x0a, 0x06, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, + 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, + 0x31, 0x2e, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, + 0x52, 0x06, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x22, 0xb4, 0x01, 0x0a, 0x0c, 0x42, 0x75, 0x69, + 0x6c, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x50, 0x61, 0x74, 0x68, 0x12, 0x33, 0x0a, 0x15, + 0x72, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x69, + 0x63, 0x61, 0x6c, 0x6c, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x72, 0x65, 0x62, + 0x75, 0x69, 0x6c, 0x64, 0x41, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x6c, + 0x79, 0x12, 0x4c, 0x0a, 0x0d, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, + 0x78, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x6c, 0x61, 0x6e, 0x67, + 0x75, 0x61, 0x67, 0x65, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, + 0x74, 0x52, 0x0c, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x22, + 0x33, 0x0a, 0x12, 0x41, 0x75, 0x74, 0x6f, 0x52, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x53, 0x74, + 0x61, 0x72, 0x74, 0x65, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6f, 0x6e, 0x74, 0x65, + 0x78, 0x74, 0x49, 0x64, 0x22, 0x91, 0x02, 0x0a, 0x0c, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x53, 0x75, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6f, 0x6e, 0x74, 0x65, + 0x78, 0x74, 0x49, 0x64, 0x12, 0x30, 0x0a, 0x14, 0x69, 0x73, 0x5f, 0x61, 0x75, 0x74, 0x6f, 0x6d, + 0x61, 0x74, 0x69, 0x63, 0x5f, 0x72, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x12, 0x69, 0x73, 0x41, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x52, + 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x12, 0x37, 0x0a, 0x06, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, + 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, + 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x52, 0x06, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12, + 0x16, 0x0a, 0x06, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x06, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x6f, 0x63, 0x6b, 0x65, + 0x72, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, + 0x6f, 0x63, 0x6b, 0x65, 0x72, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x3c, 0x0a, 0x06, 0x65, 0x72, + 0x72, 0x6f, 0x72, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x78, 0x79, 0x7a, + 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x6c, 0x61, + 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x4c, 0x69, 0x73, 0x74, + 0x52, 0x06, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x22, 0xd6, 0x01, 0x0a, 0x0c, 0x42, 0x75, 0x69, + 0x6c, 0x64, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, + 0x74, 0x65, 0x78, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, + 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x49, 0x64, 0x12, 0x30, 0x0a, 0x14, 0x69, 0x73, 0x5f, 0x61, + 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x5f, 0x72, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x69, 0x73, 0x41, 0x75, 0x74, 0x6f, 0x6d, 0x61, + 0x74, 0x69, 0x63, 0x52, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x12, 0x3c, 0x0a, 0x06, 0x65, 0x72, + 0x72, 0x6f, 0x72, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x78, 0x79, 0x7a, + 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x6c, 0x61, + 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x4c, 0x69, 0x73, 0x74, + 0x52, 0x06, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x12, 0x37, 0x0a, 0x17, 0x69, 0x6e, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, + 0x69, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x16, 0x69, 0x6e, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x65, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, + 0x73, 0x22, 0xa2, 0x01, 0x0a, 0x0a, 0x4c, 0x6f, 0x67, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 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, 0x44, 0x0a, 0x05, 0x6c, 0x65, + 0x76, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2e, 0x2e, 0x78, 0x79, 0x7a, 0x2e, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x6c, 0x61, 0x6e, + 0x67, 0x75, 0x61, 0x67, 0x65, 0x2e, 0x4c, 0x6f, 0x67, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x2e, 0x4c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, + 0x22, 0x34, 0x0a, 0x08, 0x4c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x09, 0x0a, 0x05, + 0x44, 0x45, 0x42, 0x55, 0x47, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x49, 0x4e, 0x46, 0x4f, 0x10, + 0x01, 0x12, 0x08, 0x0a, 0x04, 0x57, 0x41, 0x52, 0x4e, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x45, + 0x52, 0x52, 0x4f, 0x52, 0x10, 0x03, 0x22, 0xe2, 0x02, 0x0a, 0x0a, 0x42, 0x75, 0x69, 0x6c, 0x64, + 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x61, 0x0a, 0x14, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x72, 0x65, + 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, + 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x2e, + 0x41, 0x75, 0x74, 0x6f, 0x52, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x53, 0x74, 0x61, 0x72, 0x74, + 0x65, 0x64, 0x48, 0x00, 0x52, 0x12, 0x61, 0x75, 0x74, 0x6f, 0x52, 0x65, 0x62, 0x75, 0x69, 0x6c, + 0x64, 0x53, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x12, 0x4e, 0x0a, 0x0d, 0x62, 0x75, 0x69, 0x6c, + 0x64, 0x5f, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x27, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, + 0x76, 0x31, 0x2e, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x2e, 0x42, 0x75, 0x69, 0x6c, + 0x64, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x48, 0x00, 0x52, 0x0c, 0x62, 0x75, 0x69, 0x6c, + 0x64, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x4e, 0x0a, 0x0d, 0x62, 0x75, 0x69, 0x6c, + 0x64, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x27, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, + 0x76, 0x31, 0x2e, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x2e, 0x42, 0x75, 0x69, 0x6c, + 0x64, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x48, 0x00, 0x52, 0x0c, 0x62, 0x75, 0x69, 0x6c, + 0x64, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x12, 0x48, 0x0a, 0x0b, 0x6c, 0x6f, 0x67, 0x5f, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, + 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, + 0x2e, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x2e, 0x4c, 0x6f, 0x67, 0x4d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x48, 0x00, 0x52, 0x0a, 0x6c, 0x6f, 0x67, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x32, 0xb8, 0x06, 0x0a, 0x0f, + 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, + 0x4a, 0x0a, 0x04, 0x50, 0x69, 0x6e, 0x67, 0x12, 0x1d, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, + 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, + 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x90, 0x02, 0x01, 0x12, 0x87, 0x01, 0x0a, 0x14, + 0x47, 0x65, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x46, + 0x6c, 0x61, 0x67, 0x73, 0x12, 0x36, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, + 0x2e, 0x47, 0x65, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, + 0x46, 0x6c, 0x61, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x78, + 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, + 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6f, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, + 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x2e, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, + 0x65, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, + 0x65, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x87, 0x01, 0x0a, 0x14, 0x4d, 0x6f, 0x64, 0x75, 0x6c, + 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x12, + 0x36, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, + 0x76, 0x31, 0x2e, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x2e, 0x4d, 0x6f, 0x64, 0x75, + 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, + 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x6c, 0x61, 0x6e, 0x67, 0x75, + 0x61, 0x67, 0x65, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x72, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, + 0x69, 0x65, 0x73, 0x12, 0x2e, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, + 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x2e, + 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, + 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x2e, + 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x59, 0x0a, 0x05, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x12, 0x27, 0x2e, + 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, + 0x2e, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, + 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, + 0x67, 0x65, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x30, 0x01, 0x12, + 0x84, 0x01, 0x0a, 0x13, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x12, 0x35, 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, + 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x6c, 0x61, 0x6e, 0x67, 0x75, + 0x61, 0x67, 0x65, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x36, + 0x2e, 0x78, 0x79, 0x7a, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x66, 0x74, 0x6c, 0x2e, 0x76, + 0x31, 0x2e, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, + 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x52, 0x50, 0x01, 0x5a, 0x4e, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x54, 0x42, 0x44, 0x35, 0x34, 0x35, 0x36, 0x36, 0x39, + 0x37, 0x35, 0x2f, 0x66, 0x74, 0x6c, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x78, 0x79, 0x7a, 0x2f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2f, + 0x66, 0x74, 0x6c, 0x2f, 0x76, 0x31, 0x2f, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x3b, + 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, +} + +var ( + file_xyz_block_ftl_v1_language_language_proto_rawDescOnce sync.Once + file_xyz_block_ftl_v1_language_language_proto_rawDescData = file_xyz_block_ftl_v1_language_language_proto_rawDesc +) + +func file_xyz_block_ftl_v1_language_language_proto_rawDescGZIP() []byte { + file_xyz_block_ftl_v1_language_language_proto_rawDescOnce.Do(func() { + file_xyz_block_ftl_v1_language_language_proto_rawDescData = protoimpl.X.CompressGZIP(file_xyz_block_ftl_v1_language_language_proto_rawDescData) + }) + return file_xyz_block_ftl_v1_language_language_proto_rawDescData +} + +var file_xyz_block_ftl_v1_language_language_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_xyz_block_ftl_v1_language_language_proto_msgTypes = make([]protoimpl.MessageInfo, 23) +var file_xyz_block_ftl_v1_language_language_proto_goTypes = []any{ + (Error_ErrorLevel)(0), // 0: xyz.block.ftl.v1.language.Error.ErrorLevel + (LogMessage_LogLevel)(0), // 1: xyz.block.ftl.v1.language.LogMessage.LogLevel + (*ModuleConfig)(nil), // 2: xyz.block.ftl.v1.language.ModuleConfig + (*ProjectConfig)(nil), // 3: xyz.block.ftl.v1.language.ProjectConfig + (*GetCreateModuleFlagsRequest)(nil), // 4: xyz.block.ftl.v1.language.GetCreateModuleFlagsRequest + (*GetCreateModuleFlagsResponse)(nil), // 5: xyz.block.ftl.v1.language.GetCreateModuleFlagsResponse + (*CreateModuleRequest)(nil), // 6: xyz.block.ftl.v1.language.CreateModuleRequest + (*CreateModuleResponse)(nil), // 7: xyz.block.ftl.v1.language.CreateModuleResponse + (*ModuleConfigDefaultsRequest)(nil), // 8: xyz.block.ftl.v1.language.ModuleConfigDefaultsRequest + (*ModuleConfigDefaultsResponse)(nil), // 9: xyz.block.ftl.v1.language.ModuleConfigDefaultsResponse + (*DependenciesRequest)(nil), // 10: xyz.block.ftl.v1.language.DependenciesRequest + (*DependenciesResponse)(nil), // 11: xyz.block.ftl.v1.language.DependenciesResponse + (*BuildContext)(nil), // 12: xyz.block.ftl.v1.language.BuildContext + (*BuildContextUpdatedRequest)(nil), // 13: xyz.block.ftl.v1.language.BuildContextUpdatedRequest + (*BuildContextUpdatedResponse)(nil), // 14: xyz.block.ftl.v1.language.BuildContextUpdatedResponse + (*Error)(nil), // 15: xyz.block.ftl.v1.language.Error + (*Position)(nil), // 16: xyz.block.ftl.v1.language.Position + (*ErrorList)(nil), // 17: xyz.block.ftl.v1.language.ErrorList + (*BuildRequest)(nil), // 18: xyz.block.ftl.v1.language.BuildRequest + (*AutoRebuildStarted)(nil), // 19: xyz.block.ftl.v1.language.AutoRebuildStarted + (*BuildSuccess)(nil), // 20: xyz.block.ftl.v1.language.BuildSuccess + (*BuildFailure)(nil), // 21: xyz.block.ftl.v1.language.BuildFailure + (*LogMessage)(nil), // 22: xyz.block.ftl.v1.language.LogMessage + (*BuildEvent)(nil), // 23: xyz.block.ftl.v1.language.BuildEvent + (*GetCreateModuleFlagsResponse_Flag)(nil), // 24: xyz.block.ftl.v1.language.GetCreateModuleFlagsResponse.Flag + (*structpb.Struct)(nil), // 25: google.protobuf.Struct + (*schema.Schema)(nil), // 26: xyz.block.ftl.v1.schema.Schema + (*schema.Module)(nil), // 27: xyz.block.ftl.v1.schema.Module + (*v1.PingRequest)(nil), // 28: xyz.block.ftl.v1.PingRequest + (*v1.PingResponse)(nil), // 29: xyz.block.ftl.v1.PingResponse +} +var file_xyz_block_ftl_v1_language_language_proto_depIdxs = []int32{ + 25, // 0: xyz.block.ftl.v1.language.ModuleConfig.language_config:type_name -> google.protobuf.Struct + 24, // 1: xyz.block.ftl.v1.language.GetCreateModuleFlagsResponse.flags:type_name -> xyz.block.ftl.v1.language.GetCreateModuleFlagsResponse.Flag + 3, // 2: xyz.block.ftl.v1.language.CreateModuleRequest.project_config:type_name -> xyz.block.ftl.v1.language.ProjectConfig + 25, // 3: xyz.block.ftl.v1.language.CreateModuleRequest.Flags:type_name -> google.protobuf.Struct + 25, // 4: xyz.block.ftl.v1.language.ModuleConfigDefaultsResponse.language_config:type_name -> google.protobuf.Struct + 2, // 5: xyz.block.ftl.v1.language.DependenciesRequest.module_config:type_name -> xyz.block.ftl.v1.language.ModuleConfig + 2, // 6: xyz.block.ftl.v1.language.BuildContext.module_config:type_name -> xyz.block.ftl.v1.language.ModuleConfig + 26, // 7: xyz.block.ftl.v1.language.BuildContext.schema:type_name -> xyz.block.ftl.v1.schema.Schema + 12, // 8: xyz.block.ftl.v1.language.BuildContextUpdatedRequest.buildContext:type_name -> xyz.block.ftl.v1.language.BuildContext + 0, // 9: xyz.block.ftl.v1.language.Error.level:type_name -> xyz.block.ftl.v1.language.Error.ErrorLevel + 16, // 10: xyz.block.ftl.v1.language.Error.pos:type_name -> xyz.block.ftl.v1.language.Position + 15, // 11: xyz.block.ftl.v1.language.ErrorList.errors:type_name -> xyz.block.ftl.v1.language.Error + 12, // 12: xyz.block.ftl.v1.language.BuildRequest.build_context:type_name -> xyz.block.ftl.v1.language.BuildContext + 27, // 13: xyz.block.ftl.v1.language.BuildSuccess.module:type_name -> xyz.block.ftl.v1.schema.Module + 17, // 14: xyz.block.ftl.v1.language.BuildSuccess.errors:type_name -> xyz.block.ftl.v1.language.ErrorList + 17, // 15: xyz.block.ftl.v1.language.BuildFailure.errors:type_name -> xyz.block.ftl.v1.language.ErrorList + 1, // 16: xyz.block.ftl.v1.language.LogMessage.level:type_name -> xyz.block.ftl.v1.language.LogMessage.LogLevel + 19, // 17: xyz.block.ftl.v1.language.BuildEvent.auto_rebuild_started:type_name -> xyz.block.ftl.v1.language.AutoRebuildStarted + 20, // 18: xyz.block.ftl.v1.language.BuildEvent.build_success:type_name -> xyz.block.ftl.v1.language.BuildSuccess + 21, // 19: xyz.block.ftl.v1.language.BuildEvent.build_failure:type_name -> xyz.block.ftl.v1.language.BuildFailure + 22, // 20: xyz.block.ftl.v1.language.BuildEvent.log_message:type_name -> xyz.block.ftl.v1.language.LogMessage + 28, // 21: xyz.block.ftl.v1.language.LanguageService.Ping:input_type -> xyz.block.ftl.v1.PingRequest + 4, // 22: xyz.block.ftl.v1.language.LanguageService.GetCreateModuleFlags:input_type -> xyz.block.ftl.v1.language.GetCreateModuleFlagsRequest + 6, // 23: xyz.block.ftl.v1.language.LanguageService.CreateModule:input_type -> xyz.block.ftl.v1.language.CreateModuleRequest + 8, // 24: xyz.block.ftl.v1.language.LanguageService.ModuleConfigDefaults:input_type -> xyz.block.ftl.v1.language.ModuleConfigDefaultsRequest + 10, // 25: xyz.block.ftl.v1.language.LanguageService.GetDependencies:input_type -> xyz.block.ftl.v1.language.DependenciesRequest + 18, // 26: xyz.block.ftl.v1.language.LanguageService.Build:input_type -> xyz.block.ftl.v1.language.BuildRequest + 13, // 27: xyz.block.ftl.v1.language.LanguageService.BuildContextUpdated:input_type -> xyz.block.ftl.v1.language.BuildContextUpdatedRequest + 29, // 28: xyz.block.ftl.v1.language.LanguageService.Ping:output_type -> xyz.block.ftl.v1.PingResponse + 5, // 29: xyz.block.ftl.v1.language.LanguageService.GetCreateModuleFlags:output_type -> xyz.block.ftl.v1.language.GetCreateModuleFlagsResponse + 7, // 30: xyz.block.ftl.v1.language.LanguageService.CreateModule:output_type -> xyz.block.ftl.v1.language.CreateModuleResponse + 9, // 31: xyz.block.ftl.v1.language.LanguageService.ModuleConfigDefaults:output_type -> xyz.block.ftl.v1.language.ModuleConfigDefaultsResponse + 11, // 32: xyz.block.ftl.v1.language.LanguageService.GetDependencies:output_type -> xyz.block.ftl.v1.language.DependenciesResponse + 23, // 33: xyz.block.ftl.v1.language.LanguageService.Build:output_type -> xyz.block.ftl.v1.language.BuildEvent + 14, // 34: xyz.block.ftl.v1.language.LanguageService.BuildContextUpdated:output_type -> xyz.block.ftl.v1.language.BuildContextUpdatedResponse + 28, // [28:35] is the sub-list for method output_type + 21, // [21:28] is the sub-list for method input_type + 21, // [21:21] is the sub-list for extension type_name + 21, // [21:21] is the sub-list for extension extendee + 0, // [0:21] is the sub-list for field type_name +} + +func init() { file_xyz_block_ftl_v1_language_language_proto_init() } +func file_xyz_block_ftl_v1_language_language_proto_init() { + if File_xyz_block_ftl_v1_language_language_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_xyz_block_ftl_v1_language_language_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*ModuleConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_xyz_block_ftl_v1_language_language_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*ProjectConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_xyz_block_ftl_v1_language_language_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*GetCreateModuleFlagsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_xyz_block_ftl_v1_language_language_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*GetCreateModuleFlagsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_xyz_block_ftl_v1_language_language_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*CreateModuleRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_xyz_block_ftl_v1_language_language_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*CreateModuleResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_xyz_block_ftl_v1_language_language_proto_msgTypes[6].Exporter = func(v any, i int) any { + switch v := v.(*ModuleConfigDefaultsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_xyz_block_ftl_v1_language_language_proto_msgTypes[7].Exporter = func(v any, i int) any { + switch v := v.(*ModuleConfigDefaultsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_xyz_block_ftl_v1_language_language_proto_msgTypes[8].Exporter = func(v any, i int) any { + switch v := v.(*DependenciesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_xyz_block_ftl_v1_language_language_proto_msgTypes[9].Exporter = func(v any, i int) any { + switch v := v.(*DependenciesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_xyz_block_ftl_v1_language_language_proto_msgTypes[10].Exporter = func(v any, i int) any { + switch v := v.(*BuildContext); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_xyz_block_ftl_v1_language_language_proto_msgTypes[11].Exporter = func(v any, i int) any { + switch v := v.(*BuildContextUpdatedRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_xyz_block_ftl_v1_language_language_proto_msgTypes[12].Exporter = func(v any, i int) any { + switch v := v.(*BuildContextUpdatedResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_xyz_block_ftl_v1_language_language_proto_msgTypes[13].Exporter = func(v any, i int) any { + switch v := v.(*Error); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_xyz_block_ftl_v1_language_language_proto_msgTypes[14].Exporter = func(v any, i int) any { + switch v := v.(*Position); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_xyz_block_ftl_v1_language_language_proto_msgTypes[15].Exporter = func(v any, i int) any { + switch v := v.(*ErrorList); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_xyz_block_ftl_v1_language_language_proto_msgTypes[16].Exporter = func(v any, i int) any { + switch v := v.(*BuildRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_xyz_block_ftl_v1_language_language_proto_msgTypes[17].Exporter = func(v any, i int) any { + switch v := v.(*AutoRebuildStarted); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_xyz_block_ftl_v1_language_language_proto_msgTypes[18].Exporter = func(v any, i int) any { + switch v := v.(*BuildSuccess); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_xyz_block_ftl_v1_language_language_proto_msgTypes[19].Exporter = func(v any, i int) any { + switch v := v.(*BuildFailure); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_xyz_block_ftl_v1_language_language_proto_msgTypes[20].Exporter = func(v any, i int) any { + switch v := v.(*LogMessage); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_xyz_block_ftl_v1_language_language_proto_msgTypes[21].Exporter = func(v any, i int) any { + switch v := v.(*BuildEvent); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_xyz_block_ftl_v1_language_language_proto_msgTypes[22].Exporter = func(v any, i int) any { + switch v := v.(*GetCreateModuleFlagsResponse_Flag); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_xyz_block_ftl_v1_language_language_proto_msgTypes[0].OneofWrappers = []any{} + file_xyz_block_ftl_v1_language_language_proto_msgTypes[7].OneofWrappers = []any{} + file_xyz_block_ftl_v1_language_language_proto_msgTypes[21].OneofWrappers = []any{ + (*BuildEvent_AutoRebuildStarted)(nil), + (*BuildEvent_BuildSuccess)(nil), + (*BuildEvent_BuildFailure)(nil), + (*BuildEvent_LogMessage)(nil), } + file_xyz_block_ftl_v1_language_language_proto_msgTypes[22].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_xyz_block_ftl_v1_language_language_proto_rawDesc, - NumEnums: 1, - NumMessages: 2, + NumEnums: 2, + NumMessages: 23, NumExtensions: 0, - NumServices: 0, + NumServices: 1, }, GoTypes: file_xyz_block_ftl_v1_language_language_proto_goTypes, DependencyIndexes: file_xyz_block_ftl_v1_language_language_proto_depIdxs, diff --git a/backend/protos/xyz/block/ftl/v1/language/language.proto b/backend/protos/xyz/block/ftl/v1/language/language.proto index 951ee4b34e..2457e2e406 100644 --- a/backend/protos/xyz/block/ftl/v1/language/language.proto +++ b/backend/protos/xyz/block/ftl/v1/language/language.proto @@ -2,11 +2,132 @@ syntax = "proto3"; package xyz.block.ftl.v1.language; +import "google/protobuf/struct.proto"; +import "xyz/block/ftl/v1/ftl.proto"; import "xyz/block/ftl/v1/schema/schema.proto"; option go_package = "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1/language;languagepb"; option java_multiple_files = true; +// ModuleConfig contains the configuration for a module, found in the module's ftl.toml file. +message ModuleConfig { + // name of the module + string name = 1; + // absolute path to the module's directory + string path = 2; + + // absolute path + string deployDir = 3; + optional string build = 4; + optional string generated_schema_dir = 5; + repeated string watch = 6; + + // LanguageConfig contains any metadata specific to a specific language. + // These are stored in the ftl.toml file under the same key as the language (eg: "go", "java") + google.protobuf.Struct language_config = 7; +} + +// ProjectConfig contains the configuration for a project, found in the ftl-project.toml file. +message ProjectConfig { + string path = 1; + string name = 2; + bool no_git = 3; + bool hermit = 4; +} + +message GetCreateModuleFlagsRequest { + string language = 1; +} + +message GetCreateModuleFlagsResponse { + message Flag { + string name = 1; + string help = 2; + optional string envar = 3; + // short must be a single character + optional string short = 4; + optional string placeholder = 5; + optional string default = 6; + } + repeated Flag flags = 1; +} + +// Request to create a new module. +message CreateModuleRequest { + string name = 1; + // The root path for the module, which does not yet exist. + // The plugin should create the directory. + string path = 2; + + // The project configuration + ProjectConfig project_config = 3; + + // Flags contains any values set for those configured in the GetCreateModuleFlags call + google.protobuf.Struct Flags = 4; +} + +// Response to a create module request. +message CreateModuleResponse {} + +message ModuleConfigDefaultsRequest { + string path = 1; +} + +// ModuleConfigDefaultsResponse provides defaults for ModuleConfig. +// +// The result may be cached by FTL, so defaulting logic should not be changing due to normal module changes. +// For example, it is valid to return defaults based on which build tool is configured within the module directory, +// as that is not expected to change during normal operation. +// It is not recommended to read the module's toml file to determine defaults, as when the toml file is updated, +// the module defaults will not be recalculated. +message ModuleConfigDefaultsResponse { + // Default relative path to the directory containing all build artifacts for deployments + string deployDir = 1; + + // Default build command + optional string build = 2; + + // Default relative path to the directory containing generated schema files + optional string generated_schema_dir = 3; + + // Default patterns to watch for file changes + repeated string watch = 4; + + // Default language specific configuration. + // These defaults are filled in by looking at each root key only. If the key is not present, the default is used. + google.protobuf.Struct language_config = 5; +} + +message DependenciesRequest { + ModuleConfig module_config = 1; +} + +message DependenciesResponse { + repeated string modules = 1; +} + +// BuildContext contains contextual information needed to build. +// +// Plugins must include the build context's id when a build succeeds or fails. +// For automatic rebuilds, plugins must use the most recent build context they have received. +message BuildContext { + string id = 1; + // The configuration for the module + ModuleConfig module_config = 2; + // The FTL schema including all dependencies + schema.Schema schema = 3; + // The dependencies for the module + repeated string dependencies = 4; +} + +message BuildContextUpdatedRequest { + BuildContext buildContext = 1; +} + +message BuildContextUpdatedResponse {} + +// Error contains information about an error that occurred during a build. +// Errors do not always cause a build failure. Use lesser levels to help guide the user. message Error { enum ErrorLevel { INFO = 0; @@ -15,11 +136,138 @@ message Error { } string msg = 1; - schema.Position pos = 2; - int64 endColumn = 3; ErrorLevel level = 4; + Position pos = 5; +} + +message Position { + string filename = 1; + int64 line = 2; + int64 startColumn = 3; + int64 endColumn = 4; } message ErrorList { repeated Error errors = 1; } + +// Request to build a module. +message BuildRequest { + // The root path for the FTL project + string project_path = 1; + // Indicates whether to watch for file changes and automatically rebuild + bool rebuild_automatically = 2; + + BuildContext build_context = 3; +} + +// AutoRebuildStarted should be sent when the plugin decides to start rebuilding automatically. +// +// It is not required to send this event, though it helps inform the user that their changes are not yet built. +// FTL may ignore this event if it does not match FTL's current build context and state. +// If the plugin decides to cancel the build because another build started, no failure or cancellation event needs +// to be sent. +message AutoRebuildStarted { + string context_id = 1; +} + +// BuildSuccess should be sent when a build succeeds. +// +// FTL may ignore this event if it does not match FTL's current build context and state. +message BuildSuccess { + // The id of build context used while building. + string context_id = 1; + // Indicates whether the build was automatically started by the plugin, rather than due to a Build rpc call. + bool is_automatic_rebuild = 2; + // Module schema for the built module + schema.Module module = 3; + // Paths for files/directories to be deployed + repeated string deploy = 4; + // Name of the docker image to use for the runner + string docker_image = 5; + + // Errors contains any errors that occurred during the build + // No errors can have a level of ERROR, instead a BuildFailure should be sent + // Instead this is useful for INFO and WARN level errors. + ErrorList errors = 6; +} + +// BuildFailure should be sent when a build fails. +// +// FTL may ignore this event if it does not match FTL's current build context and state. +message BuildFailure { + // The id of build context used while building. + string context_id = 1; + // Indicates whether the build was automatically started by the plugin, rather than due to a Build rpc call. + bool is_automatic_rebuild = 2; + + // Errors contains any errors that occurred during the build + ErrorList errors = 3; + + // Indicates the plugin determined that the dependencies in the BuildContext are out of date. + // If a Build stream is being kept open for automatic rebuilds, FTL will call GetDependencies, followed by + // BuildContextUpdated. + bool invalidate_dependencies = 4; +} + +// Log message from the language service. +message LogMessage { + enum LogLevel { + DEBUG = 0; + INFO = 1; + WARN = 2; + ERROR = 3; + } + + string message = 1; + LogLevel level = 2; +} + +// Every type of message that can be streamed from the language plugin for a build. +message BuildEvent { + oneof event { + AutoRebuildStarted auto_rebuild_started = 2; + BuildSuccess build_success = 3; + BuildFailure build_failure = 4; + LogMessage log_message = 5; + } +} + +// LanguageService allows a plugin to add support for a programming language. +service LanguageService { + // Ping service for readiness. + rpc Ping(xyz.block.ftl.v1.PingRequest) returns (xyz.block.ftl.v1.PingResponse) { + option idempotency_level = NO_SIDE_EFFECTS; + } + + // Get language specific flags that can be used to create a new module. + rpc GetCreateModuleFlags(GetCreateModuleFlagsRequest) returns (GetCreateModuleFlagsResponse); + + // Generates files for a new module with the requested name + rpc CreateModule(CreateModuleRequest) returns (CreateModuleResponse); + + // Provide default values for ModuleConfig for values that are not configured in the ftl.toml file. + rpc ModuleConfigDefaults(ModuleConfigDefaultsRequest) returns (ModuleConfigDefaultsResponse); + + // Extract dependencies for a module + // FTL will ensure that these dependencies are built before requesting a build for this module. + rpc GetDependencies(DependenciesRequest) returns (DependenciesResponse); + + // Build the module and stream back build events. + // + // A BuildSuccess or BuildFailure event must be streamed back with the request's context id to indicate the + // end of the build. + // + // The request can include the option to "rebuild_automatically". In this case the plugin should watch for + // file changes and automatically rebuild as needed as long as this build request is alive. Each automactic + // rebuild must include the latest build context id provided by the request or subsequent BuildContextUpdated + // calls. + rpc Build(BuildRequest) returns (stream BuildEvent); + + // While a Build call with "rebuild_automatically" set is active, BuildContextUpdated is called whenever the + // build context is updated. + // + // Each time this call is made, the Build call must send back a corresponding BuildSuccess or BuildFailure + // event with the updated build context id with "is_automatic_rebuild" as false. + rpc BuildContextUpdated(BuildContextUpdatedRequest) returns (BuildContextUpdatedResponse); +} diff --git a/backend/protos/xyz/block/ftl/v1/language/languagepbconnect/language.connect.go b/backend/protos/xyz/block/ftl/v1/language/languagepbconnect/language.connect.go new file mode 100644 index 0000000000..ac1af73ef8 --- /dev/null +++ b/backend/protos/xyz/block/ftl/v1/language/languagepbconnect/language.connect.go @@ -0,0 +1,309 @@ +// Code generated by protoc-gen-connect-go. DO NOT EDIT. +// +// Source: xyz/block/ftl/v1/language/language.proto + +package languagepbconnect + +import ( + connect "connectrpc.com/connect" + context "context" + errors "errors" + v1 "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1" + language "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1/language" + http "net/http" + strings "strings" +) + +// This is a compile-time assertion to ensure that this generated file and the connect package are +// compatible. If you get a compiler error that this constant is not defined, this code was +// generated with a version of connect newer than the one compiled into your binary. You can fix the +// problem by either regenerating this code with an older version of connect or updating the connect +// version compiled into your binary. +const _ = connect.IsAtLeastVersion1_7_0 + +const ( + // LanguageServiceName is the fully-qualified name of the LanguageService service. + LanguageServiceName = "xyz.block.ftl.v1.language.LanguageService" +) + +// These constants are the fully-qualified names of the RPCs defined in this package. They're +// exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route. +// +// Note that these are different from the fully-qualified method names used by +// google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to +// reflection-formatted method names, remove the leading slash and convert the remaining slash to a +// period. +const ( + // LanguageServicePingProcedure is the fully-qualified name of the LanguageService's Ping RPC. + LanguageServicePingProcedure = "/xyz.block.ftl.v1.language.LanguageService/Ping" + // LanguageServiceGetCreateModuleFlagsProcedure is the fully-qualified name of the LanguageService's + // GetCreateModuleFlags RPC. + LanguageServiceGetCreateModuleFlagsProcedure = "/xyz.block.ftl.v1.language.LanguageService/GetCreateModuleFlags" + // LanguageServiceCreateModuleProcedure is the fully-qualified name of the LanguageService's + // CreateModule RPC. + LanguageServiceCreateModuleProcedure = "/xyz.block.ftl.v1.language.LanguageService/CreateModule" + // LanguageServiceModuleConfigDefaultsProcedure is the fully-qualified name of the LanguageService's + // ModuleConfigDefaults RPC. + LanguageServiceModuleConfigDefaultsProcedure = "/xyz.block.ftl.v1.language.LanguageService/ModuleConfigDefaults" + // LanguageServiceGetDependenciesProcedure is the fully-qualified name of the LanguageService's + // GetDependencies RPC. + LanguageServiceGetDependenciesProcedure = "/xyz.block.ftl.v1.language.LanguageService/GetDependencies" + // LanguageServiceBuildProcedure is the fully-qualified name of the LanguageService's Build RPC. + LanguageServiceBuildProcedure = "/xyz.block.ftl.v1.language.LanguageService/Build" + // LanguageServiceBuildContextUpdatedProcedure is the fully-qualified name of the LanguageService's + // BuildContextUpdated RPC. + LanguageServiceBuildContextUpdatedProcedure = "/xyz.block.ftl.v1.language.LanguageService/BuildContextUpdated" +) + +// LanguageServiceClient is a client for the xyz.block.ftl.v1.language.LanguageService service. +type LanguageServiceClient interface { + // Ping service for readiness. + Ping(context.Context, *connect.Request[v1.PingRequest]) (*connect.Response[v1.PingResponse], error) + // Get language specific flags that can be used to create a new module. + GetCreateModuleFlags(context.Context, *connect.Request[language.GetCreateModuleFlagsRequest]) (*connect.Response[language.GetCreateModuleFlagsResponse], error) + // Generates files for a new module with the requested name + CreateModule(context.Context, *connect.Request[language.CreateModuleRequest]) (*connect.Response[language.CreateModuleResponse], error) + // Provide default values for ModuleConfig for values that are not configured in the ftl.toml file. + ModuleConfigDefaults(context.Context, *connect.Request[language.ModuleConfigDefaultsRequest]) (*connect.Response[language.ModuleConfigDefaultsResponse], error) + // Extract dependencies for a module + // FTL will ensure that these dependencies are built before requesting a build for this module. + GetDependencies(context.Context, *connect.Request[language.DependenciesRequest]) (*connect.Response[language.DependenciesResponse], error) + // Build the module and stream back build events. + // + // A BuildSuccess or BuildFailure event must be streamed back with the request's context id to indicate the + // end of the build. + // + // The request can include the option to "rebuild_automatically". In this case the plugin should watch for + // file changes and automatically rebuild as needed as long as this build request is alive. Each automactic + // rebuild must include the latest build context id provided by the request or subsequent BuildContextUpdated + // calls. + Build(context.Context, *connect.Request[language.BuildRequest]) (*connect.ServerStreamForClient[language.BuildEvent], error) + // While a Build call with "rebuild_automatically" set is active, BuildContextUpdated is called whenever the + // build context is updated. + // + // Each time this call is made, the Build call must send back a corresponding BuildSuccess or BuildFailure + // event with the updated build context id with "is_automatic_rebuild" as false. + BuildContextUpdated(context.Context, *connect.Request[language.BuildContextUpdatedRequest]) (*connect.Response[language.BuildContextUpdatedResponse], error) +} + +// NewLanguageServiceClient constructs a client for the xyz.block.ftl.v1.language.LanguageService +// service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for +// gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply +// the connect.WithGRPC() or connect.WithGRPCWeb() options. +// +// The URL supplied here should be the base URL for the Connect or gRPC server (for example, +// http://api.acme.com or https://acme.com/grpc). +func NewLanguageServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) LanguageServiceClient { + baseURL = strings.TrimRight(baseURL, "/") + return &languageServiceClient{ + ping: connect.NewClient[v1.PingRequest, v1.PingResponse]( + httpClient, + baseURL+LanguageServicePingProcedure, + connect.WithIdempotency(connect.IdempotencyNoSideEffects), + connect.WithClientOptions(opts...), + ), + getCreateModuleFlags: connect.NewClient[language.GetCreateModuleFlagsRequest, language.GetCreateModuleFlagsResponse]( + httpClient, + baseURL+LanguageServiceGetCreateModuleFlagsProcedure, + opts..., + ), + createModule: connect.NewClient[language.CreateModuleRequest, language.CreateModuleResponse]( + httpClient, + baseURL+LanguageServiceCreateModuleProcedure, + opts..., + ), + moduleConfigDefaults: connect.NewClient[language.ModuleConfigDefaultsRequest, language.ModuleConfigDefaultsResponse]( + httpClient, + baseURL+LanguageServiceModuleConfigDefaultsProcedure, + opts..., + ), + getDependencies: connect.NewClient[language.DependenciesRequest, language.DependenciesResponse]( + httpClient, + baseURL+LanguageServiceGetDependenciesProcedure, + opts..., + ), + build: connect.NewClient[language.BuildRequest, language.BuildEvent]( + httpClient, + baseURL+LanguageServiceBuildProcedure, + opts..., + ), + buildContextUpdated: connect.NewClient[language.BuildContextUpdatedRequest, language.BuildContextUpdatedResponse]( + httpClient, + baseURL+LanguageServiceBuildContextUpdatedProcedure, + opts..., + ), + } +} + +// languageServiceClient implements LanguageServiceClient. +type languageServiceClient struct { + ping *connect.Client[v1.PingRequest, v1.PingResponse] + getCreateModuleFlags *connect.Client[language.GetCreateModuleFlagsRequest, language.GetCreateModuleFlagsResponse] + createModule *connect.Client[language.CreateModuleRequest, language.CreateModuleResponse] + moduleConfigDefaults *connect.Client[language.ModuleConfigDefaultsRequest, language.ModuleConfigDefaultsResponse] + getDependencies *connect.Client[language.DependenciesRequest, language.DependenciesResponse] + build *connect.Client[language.BuildRequest, language.BuildEvent] + buildContextUpdated *connect.Client[language.BuildContextUpdatedRequest, language.BuildContextUpdatedResponse] +} + +// Ping calls xyz.block.ftl.v1.language.LanguageService.Ping. +func (c *languageServiceClient) Ping(ctx context.Context, req *connect.Request[v1.PingRequest]) (*connect.Response[v1.PingResponse], error) { + return c.ping.CallUnary(ctx, req) +} + +// GetCreateModuleFlags calls xyz.block.ftl.v1.language.LanguageService.GetCreateModuleFlags. +func (c *languageServiceClient) GetCreateModuleFlags(ctx context.Context, req *connect.Request[language.GetCreateModuleFlagsRequest]) (*connect.Response[language.GetCreateModuleFlagsResponse], error) { + return c.getCreateModuleFlags.CallUnary(ctx, req) +} + +// CreateModule calls xyz.block.ftl.v1.language.LanguageService.CreateModule. +func (c *languageServiceClient) CreateModule(ctx context.Context, req *connect.Request[language.CreateModuleRequest]) (*connect.Response[language.CreateModuleResponse], error) { + return c.createModule.CallUnary(ctx, req) +} + +// ModuleConfigDefaults calls xyz.block.ftl.v1.language.LanguageService.ModuleConfigDefaults. +func (c *languageServiceClient) ModuleConfigDefaults(ctx context.Context, req *connect.Request[language.ModuleConfigDefaultsRequest]) (*connect.Response[language.ModuleConfigDefaultsResponse], error) { + return c.moduleConfigDefaults.CallUnary(ctx, req) +} + +// GetDependencies calls xyz.block.ftl.v1.language.LanguageService.GetDependencies. +func (c *languageServiceClient) GetDependencies(ctx context.Context, req *connect.Request[language.DependenciesRequest]) (*connect.Response[language.DependenciesResponse], error) { + return c.getDependencies.CallUnary(ctx, req) +} + +// Build calls xyz.block.ftl.v1.language.LanguageService.Build. +func (c *languageServiceClient) Build(ctx context.Context, req *connect.Request[language.BuildRequest]) (*connect.ServerStreamForClient[language.BuildEvent], error) { + return c.build.CallServerStream(ctx, req) +} + +// BuildContextUpdated calls xyz.block.ftl.v1.language.LanguageService.BuildContextUpdated. +func (c *languageServiceClient) BuildContextUpdated(ctx context.Context, req *connect.Request[language.BuildContextUpdatedRequest]) (*connect.Response[language.BuildContextUpdatedResponse], error) { + return c.buildContextUpdated.CallUnary(ctx, req) +} + +// LanguageServiceHandler is an implementation of the xyz.block.ftl.v1.language.LanguageService +// service. +type LanguageServiceHandler interface { + // Ping service for readiness. + Ping(context.Context, *connect.Request[v1.PingRequest]) (*connect.Response[v1.PingResponse], error) + // Get language specific flags that can be used to create a new module. + GetCreateModuleFlags(context.Context, *connect.Request[language.GetCreateModuleFlagsRequest]) (*connect.Response[language.GetCreateModuleFlagsResponse], error) + // Generates files for a new module with the requested name + CreateModule(context.Context, *connect.Request[language.CreateModuleRequest]) (*connect.Response[language.CreateModuleResponse], error) + // Provide default values for ModuleConfig for values that are not configured in the ftl.toml file. + ModuleConfigDefaults(context.Context, *connect.Request[language.ModuleConfigDefaultsRequest]) (*connect.Response[language.ModuleConfigDefaultsResponse], error) + // Extract dependencies for a module + // FTL will ensure that these dependencies are built before requesting a build for this module. + GetDependencies(context.Context, *connect.Request[language.DependenciesRequest]) (*connect.Response[language.DependenciesResponse], error) + // Build the module and stream back build events. + // + // A BuildSuccess or BuildFailure event must be streamed back with the request's context id to indicate the + // end of the build. + // + // The request can include the option to "rebuild_automatically". In this case the plugin should watch for + // file changes and automatically rebuild as needed as long as this build request is alive. Each automactic + // rebuild must include the latest build context id provided by the request or subsequent BuildContextUpdated + // calls. + Build(context.Context, *connect.Request[language.BuildRequest], *connect.ServerStream[language.BuildEvent]) error + // While a Build call with "rebuild_automatically" set is active, BuildContextUpdated is called whenever the + // build context is updated. + // + // Each time this call is made, the Build call must send back a corresponding BuildSuccess or BuildFailure + // event with the updated build context id with "is_automatic_rebuild" as false. + BuildContextUpdated(context.Context, *connect.Request[language.BuildContextUpdatedRequest]) (*connect.Response[language.BuildContextUpdatedResponse], error) +} + +// NewLanguageServiceHandler builds an HTTP handler from the service implementation. It returns the +// path on which to mount the handler and the handler itself. +// +// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf +// and JSON codecs. They also support gzip compression. +func NewLanguageServiceHandler(svc LanguageServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) { + languageServicePingHandler := connect.NewUnaryHandler( + LanguageServicePingProcedure, + svc.Ping, + connect.WithIdempotency(connect.IdempotencyNoSideEffects), + connect.WithHandlerOptions(opts...), + ) + languageServiceGetCreateModuleFlagsHandler := connect.NewUnaryHandler( + LanguageServiceGetCreateModuleFlagsProcedure, + svc.GetCreateModuleFlags, + opts..., + ) + languageServiceCreateModuleHandler := connect.NewUnaryHandler( + LanguageServiceCreateModuleProcedure, + svc.CreateModule, + opts..., + ) + languageServiceModuleConfigDefaultsHandler := connect.NewUnaryHandler( + LanguageServiceModuleConfigDefaultsProcedure, + svc.ModuleConfigDefaults, + opts..., + ) + languageServiceGetDependenciesHandler := connect.NewUnaryHandler( + LanguageServiceGetDependenciesProcedure, + svc.GetDependencies, + opts..., + ) + languageServiceBuildHandler := connect.NewServerStreamHandler( + LanguageServiceBuildProcedure, + svc.Build, + opts..., + ) + languageServiceBuildContextUpdatedHandler := connect.NewUnaryHandler( + LanguageServiceBuildContextUpdatedProcedure, + svc.BuildContextUpdated, + opts..., + ) + return "/xyz.block.ftl.v1.language.LanguageService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + switch r.URL.Path { + case LanguageServicePingProcedure: + languageServicePingHandler.ServeHTTP(w, r) + case LanguageServiceGetCreateModuleFlagsProcedure: + languageServiceGetCreateModuleFlagsHandler.ServeHTTP(w, r) + case LanguageServiceCreateModuleProcedure: + languageServiceCreateModuleHandler.ServeHTTP(w, r) + case LanguageServiceModuleConfigDefaultsProcedure: + languageServiceModuleConfigDefaultsHandler.ServeHTTP(w, r) + case LanguageServiceGetDependenciesProcedure: + languageServiceGetDependenciesHandler.ServeHTTP(w, r) + case LanguageServiceBuildProcedure: + languageServiceBuildHandler.ServeHTTP(w, r) + case LanguageServiceBuildContextUpdatedProcedure: + languageServiceBuildContextUpdatedHandler.ServeHTTP(w, r) + default: + http.NotFound(w, r) + } + }) +} + +// UnimplementedLanguageServiceHandler returns CodeUnimplemented from all methods. +type UnimplementedLanguageServiceHandler struct{} + +func (UnimplementedLanguageServiceHandler) Ping(context.Context, *connect.Request[v1.PingRequest]) (*connect.Response[v1.PingResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("xyz.block.ftl.v1.language.LanguageService.Ping is not implemented")) +} + +func (UnimplementedLanguageServiceHandler) GetCreateModuleFlags(context.Context, *connect.Request[language.GetCreateModuleFlagsRequest]) (*connect.Response[language.GetCreateModuleFlagsResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("xyz.block.ftl.v1.language.LanguageService.GetCreateModuleFlags is not implemented")) +} + +func (UnimplementedLanguageServiceHandler) CreateModule(context.Context, *connect.Request[language.CreateModuleRequest]) (*connect.Response[language.CreateModuleResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("xyz.block.ftl.v1.language.LanguageService.CreateModule is not implemented")) +} + +func (UnimplementedLanguageServiceHandler) ModuleConfigDefaults(context.Context, *connect.Request[language.ModuleConfigDefaultsRequest]) (*connect.Response[language.ModuleConfigDefaultsResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("xyz.block.ftl.v1.language.LanguageService.ModuleConfigDefaults is not implemented")) +} + +func (UnimplementedLanguageServiceHandler) GetDependencies(context.Context, *connect.Request[language.DependenciesRequest]) (*connect.Response[language.DependenciesResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("xyz.block.ftl.v1.language.LanguageService.GetDependencies is not implemented")) +} + +func (UnimplementedLanguageServiceHandler) Build(context.Context, *connect.Request[language.BuildRequest], *connect.ServerStream[language.BuildEvent]) error { + return connect.NewError(connect.CodeUnimplemented, errors.New("xyz.block.ftl.v1.language.LanguageService.Build is not implemented")) +} + +func (UnimplementedLanguageServiceHandler) BuildContextUpdated(context.Context, *connect.Request[language.BuildContextUpdatedRequest]) (*connect.Response[language.BuildContextUpdatedResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("xyz.block.ftl.v1.language.LanguageService.BuildContextUpdated is not implemented")) +} diff --git a/backend/protos/xyz/block/ftl/v1/language/mixins.go b/backend/protos/xyz/block/ftl/v1/language/mixins.go index 0c177a15e3..bf76ad09f8 100644 --- a/backend/protos/xyz/block/ftl/v1/language/mixins.go +++ b/backend/protos/xyz/block/ftl/v1/language/mixins.go @@ -3,9 +3,7 @@ package languagepb import ( "fmt" - schemapb "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1/schema" "github.com/TBD54566975/ftl/internal/builderrors" - "github.com/TBD54566975/ftl/internal/schema" "github.com/TBD54566975/ftl/internal/slices" ) @@ -44,7 +42,7 @@ func levelToProto(level builderrors.ErrorLevel) Error_ErrorLevel { func errorFromProto(e *Error) builderrors.Error { return builderrors.Error{ - Pos: schema.PosFromProto(e.Pos).ToErrorPosWithEnd(int(e.EndColumn)), + Pos: PosFromProto(e.Pos), Msg: e.Msg, Level: levelFromProto(e.Level), } @@ -53,12 +51,24 @@ func errorFromProto(e *Error) builderrors.Error { func errorToProto(e builderrors.Error) *Error { return &Error{ Msg: e.Msg, - Pos: &schemapb.Position{ - Filename: e.Pos.Filename, - Column: int64(e.Pos.StartColumn), - Line: int64(e.Pos.Line), + Pos: &Position{ + Filename: e.Pos.Filename, + StartColumn: int64(e.Pos.StartColumn), + EndColumn: int64(e.Pos.EndColumn), + Line: int64(e.Pos.Line), }, - EndColumn: int64(e.Pos.EndColumn), - Level: levelToProto(e.Level), + Level: levelToProto(e.Level), + } +} + +func PosFromProto(pos *Position) builderrors.Position { + if pos == nil { + return builderrors.Position{} + } + return builderrors.Position{ + Line: int(pos.Line), + StartColumn: int(pos.StartColumn), + EndColumn: int(pos.EndColumn), + Filename: pos.Filename, } } diff --git a/frontend/console/src/protos/xyz/block/ftl/v1/language.go/language_connect.ts b/frontend/console/src/protos/xyz/block/ftl/v1/language.go/language_connect.ts new file mode 100644 index 0000000000..da640cee3d --- /dev/null +++ b/frontend/console/src/protos/xyz/block/ftl/v1/language.go/language_connect.ts @@ -0,0 +1,98 @@ +// @generated by protoc-gen-connect-es v1.4.0 with parameter "target=ts" +// @generated from file xyz/block/ftl/v1/language.go/language.proto (package xyz.block.ftl.v1.language, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import { PingRequest, PingResponse } from "../ftl_pb.js"; +import { MethodIdempotency, MethodKind } from "@bufbuild/protobuf"; +import { BuildEvent, BuildRequest, CreateModuleRequest, CreateModuleResponse, DependenciesRequest, DependenciesResponse, MetadataUpdatedRequest, MetadataUpdatedResponse, SchemaUpdatedRequest, SchemaUpdatedResponse } from "./language_pb.js"; + +/** + * LanguageService allows a plugin to add support for a programming language. + * + * @generated from service xyz.block.ftl.v1.language.LanguageService + */ +export const LanguageService = { + typeName: "xyz.block.ftl.v1.language.LanguageService", + methods: { + /** + * Ping service for readiness. + * + * @generated from rpc xyz.block.ftl.v1.language.LanguageService.Ping + */ + ping: { + name: "Ping", + I: PingRequest, + O: PingResponse, + kind: MethodKind.Unary, + idempotency: MethodIdempotency.NoSideEffects, + }, + /** + * Generates files for a new empty module with the requested name + * + * @generated from rpc xyz.block.ftl.v1.language.LanguageService.CreateModule + */ + createModule: { + name: "CreateModule", + I: CreateModuleRequest, + O: CreateModuleResponse, + kind: MethodKind.Unary, + }, + /** + * Extract dependencies for a module + * + * @generated from rpc xyz.block.ftl.v1.language.LanguageService.GetDependencies + */ + getDependencies: { + name: "GetDependencies", + I: DependenciesRequest, + O: DependenciesResponse, + kind: MethodKind.Unary, + }, + /** + * MetadataUpdated is called whenever the metadata for a module is updated. + * + * @generated from rpc xyz.block.ftl.v1.language.LanguageService.MetadataUpdated + */ + metadataUpdated: { + name: "MetadataUpdated", + I: MetadataUpdatedRequest, + O: MetadataUpdatedResponse, + kind: MethodKind.Unary, + }, + /** + * SchemaUpdated is called whenever the relevant part of a schema is updated. + * + * The schema is not the full schema, rather it only modules in this module's dependency graph. + * It does not contain the schema for this plugin's module. + * + * Language plugins should hold on to the latest schema they have seen. + * SchemaUpdated is called: + * - after ExtractDependencies and before Build (if there are any dependencies) + * - when a dependant module is updated + * - when the module's dependancies change + * + * @generated from rpc xyz.block.ftl.v1.language.LanguageService.SchemaUpdated + */ + schemaUpdated: { + name: "SchemaUpdated", + I: SchemaUpdatedRequest, + O: SchemaUpdatedResponse, + kind: MethodKind.Unary, + }, + /** + * Build the module + * The request can also indicate whether the plugin should watch for changes to the module and automatically rebuild + * The response stream can send LogMessages and BuildResults, and ends with a BuildResponse + * + * @generated from rpc xyz.block.ftl.v1.language.LanguageService.Build + */ + build: { + name: "Build", + I: BuildRequest, + O: BuildEvent, + kind: MethodKind.ServerStreaming, + }, + } +} as const; + diff --git a/frontend/console/src/protos/xyz/block/ftl/v1/language.go/language_pb.ts b/frontend/console/src/protos/xyz/block/ftl/v1/language.go/language_pb.ts new file mode 100644 index 0000000000..ec78ef18ae --- /dev/null +++ b/frontend/console/src/protos/xyz/block/ftl/v1/language.go/language_pb.ts @@ -0,0 +1,770 @@ +// @generated by protoc-gen-es v1.10.0 with parameter "target=ts" +// @generated from file xyz/block/ftl/v1/language.go/language.proto (package xyz.block.ftl.v1.language, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; +import { Any, Message, proto3, protoInt64 } from "@bufbuild/protobuf"; +import { Module, Position, Schema } from "../schema/schema_pb.js"; + +/** + * @generated from enum xyz.block.ftl.v1.language.LogLevel + */ +export enum LogLevel { + /** + * @generated from enum value: DEBUG = 0; + */ + DEBUG = 0, + + /** + * @generated from enum value: INFO = 1; + */ + INFO = 1, + + /** + * @generated from enum value: WARN = 2; + */ + WARN = 2, + + /** + * @generated from enum value: ERROR = 3; + */ + ERROR = 3, +} +// Retrieve enum metadata with: proto3.getEnumType(LogLevel) +proto3.util.setEnumType(LogLevel, "xyz.block.ftl.v1.language.LogLevel", [ + { no: 0, name: "DEBUG" }, + { no: 1, name: "INFO" }, + { no: 2, name: "WARN" }, + { no: 3, name: "ERROR" }, +]); + +/** + * Log message from the language service. + * + * @generated from message xyz.block.ftl.v1.language.LogMessage + */ +export class LogMessage extends Message { + /** + * @generated from field: string message = 1; + */ + message = ""; + + /** + * @generated from field: xyz.block.ftl.v1.language.LogLevel level = 2; + */ + level = LogLevel.DEBUG; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.language.LogMessage"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "message", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "level", kind: "enum", T: proto3.getEnumType(LogLevel) }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): LogMessage { + return new LogMessage().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): LogMessage { + return new LogMessage().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): LogMessage { + return new LogMessage().fromJsonString(jsonString, options); + } + + static equals(a: LogMessage | PlainMessage | undefined, b: LogMessage | PlainMessage | undefined): boolean { + return proto3.util.equals(LogMessage, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.language.Metadata + */ +export class Metadata extends Message { + /** + * Universal metadata + * + * @generated from field: string name = 1; + */ + name = ""; + + /** + * Language metadata contains any metadata specific to a specific language. + * + * @generated from field: repeated google.protobuf.Any LanguageMetadata = 2; + */ + LanguageMetadata: Any[] = []; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.language.Metadata"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "LanguageMetadata", kind: "message", T: Any, repeated: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): Metadata { + return new Metadata().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): Metadata { + return new Metadata().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): Metadata { + return new Metadata().fromJsonString(jsonString, options); + } + + static equals(a: Metadata | PlainMessage | undefined, b: Metadata | PlainMessage | undefined): boolean { + return proto3.util.equals(Metadata, a, b); + } +} + +/** + * Request to create a new module. + * + * @generated from message xyz.block.ftl.v1.language.CreateModuleRequest + */ +export class CreateModuleRequest extends Message { + /** + * @generated from field: string name = 1; + */ + name = ""; + + /** + * @generated from field: string path = 2; + */ + path = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.language.CreateModuleRequest"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "path", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): CreateModuleRequest { + return new CreateModuleRequest().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): CreateModuleRequest { + return new CreateModuleRequest().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): CreateModuleRequest { + return new CreateModuleRequest().fromJsonString(jsonString, options); + } + + static equals(a: CreateModuleRequest | PlainMessage | undefined, b: CreateModuleRequest | PlainMessage | undefined): boolean { + return proto3.util.equals(CreateModuleRequest, a, b); + } +} + +/** + * Response to a create module request. + * + * @generated from message xyz.block.ftl.v1.language.CreateModuleResponse + */ +export class CreateModuleResponse extends Message { + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.language.CreateModuleResponse"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): CreateModuleResponse { + return new CreateModuleResponse().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): CreateModuleResponse { + return new CreateModuleResponse().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): CreateModuleResponse { + return new CreateModuleResponse().fromJsonString(jsonString, options); + } + + static equals(a: CreateModuleResponse | PlainMessage | undefined, b: CreateModuleResponse | PlainMessage | undefined): boolean { + return proto3.util.equals(CreateModuleResponse, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.language.DependenciesRequest + */ +export class DependenciesRequest extends Message { + /** + * @generated from field: string path = 1; + */ + path = ""; + + /** + * @generated from field: xyz.block.ftl.v1.language.Metadata metadata = 2; + */ + metadata?: Metadata; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.language.DependenciesRequest"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "path", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "metadata", kind: "message", T: Metadata }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): DependenciesRequest { + return new DependenciesRequest().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): DependenciesRequest { + return new DependenciesRequest().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): DependenciesRequest { + return new DependenciesRequest().fromJsonString(jsonString, options); + } + + static equals(a: DependenciesRequest | PlainMessage | undefined, b: DependenciesRequest | PlainMessage | undefined): boolean { + return proto3.util.equals(DependenciesRequest, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.language.DependenciesResponse + */ +export class DependenciesResponse extends Message { + /** + * @generated from field: repeated string modules = 1; + */ + modules: string[] = []; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.language.DependenciesResponse"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "modules", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): DependenciesResponse { + return new DependenciesResponse().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): DependenciesResponse { + return new DependenciesResponse().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): DependenciesResponse { + return new DependenciesResponse().fromJsonString(jsonString, options); + } + + static equals(a: DependenciesResponse | PlainMessage | undefined, b: DependenciesResponse | PlainMessage | undefined): boolean { + return proto3.util.equals(DependenciesResponse, a, b); + } +} + +/** + * Response to a dependency extraction request. + * + * @generated from message xyz.block.ftl.v1.language.DependencyUpdate + */ +export class DependencyUpdate extends Message { + /** + * @generated from field: repeated string modules = 1; + */ + modules: string[] = []; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.language.DependencyUpdate"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "modules", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): DependencyUpdate { + return new DependencyUpdate().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): DependencyUpdate { + return new DependencyUpdate().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): DependencyUpdate { + return new DependencyUpdate().fromJsonString(jsonString, options); + } + + static equals(a: DependencyUpdate | PlainMessage | undefined, b: DependencyUpdate | PlainMessage | undefined): boolean { + return proto3.util.equals(DependencyUpdate, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.language.MetadataUpdatedRequest + */ +export class MetadataUpdatedRequest extends Message { + /** + * @generated from field: xyz.block.ftl.v1.language.Metadata metadata = 1; + */ + metadata?: Metadata; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.language.MetadataUpdatedRequest"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "metadata", kind: "message", T: Metadata }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): MetadataUpdatedRequest { + return new MetadataUpdatedRequest().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): MetadataUpdatedRequest { + return new MetadataUpdatedRequest().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): MetadataUpdatedRequest { + return new MetadataUpdatedRequest().fromJsonString(jsonString, options); + } + + static equals(a: MetadataUpdatedRequest | PlainMessage | undefined, b: MetadataUpdatedRequest | PlainMessage | undefined): boolean { + return proto3.util.equals(MetadataUpdatedRequest, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.language.MetadataUpdatedResponse + */ +export class MetadataUpdatedResponse extends Message { + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.language.MetadataUpdatedResponse"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): MetadataUpdatedResponse { + return new MetadataUpdatedResponse().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): MetadataUpdatedResponse { + return new MetadataUpdatedResponse().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): MetadataUpdatedResponse { + return new MetadataUpdatedResponse().fromJsonString(jsonString, options); + } + + static equals(a: MetadataUpdatedResponse | PlainMessage | undefined, b: MetadataUpdatedResponse | PlainMessage | undefined): boolean { + return proto3.util.equals(MetadataUpdatedResponse, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.language.SchemaUpdatedRequest + */ +export class SchemaUpdatedRequest extends Message { + /** + * @generated from field: xyz.block.ftl.v1.schema.Schema schema = 1; + */ + schema?: Schema; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.language.SchemaUpdatedRequest"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "schema", kind: "message", T: Schema }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): SchemaUpdatedRequest { + return new SchemaUpdatedRequest().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): SchemaUpdatedRequest { + return new SchemaUpdatedRequest().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): SchemaUpdatedRequest { + return new SchemaUpdatedRequest().fromJsonString(jsonString, options); + } + + static equals(a: SchemaUpdatedRequest | PlainMessage | undefined, b: SchemaUpdatedRequest | PlainMessage | undefined): boolean { + return proto3.util.equals(SchemaUpdatedRequest, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.language.SchemaUpdatedResponse + */ +export class SchemaUpdatedResponse extends Message { + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.language.SchemaUpdatedResponse"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): SchemaUpdatedResponse { + return new SchemaUpdatedResponse().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): SchemaUpdatedResponse { + return new SchemaUpdatedResponse().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): SchemaUpdatedResponse { + return new SchemaUpdatedResponse().fromJsonString(jsonString, options); + } + + static equals(a: SchemaUpdatedResponse | PlainMessage | undefined, b: SchemaUpdatedResponse | PlainMessage | undefined): boolean { + return proto3.util.equals(SchemaUpdatedResponse, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.language.Error + */ +export class Error extends Message { + /** + * @generated from field: string msg = 1; + */ + msg = ""; + + /** + * @generated from field: xyz.block.ftl.v1.schema.Position pos = 2; + */ + pos?: Position; + + /** + * @generated from field: int64 endColumn = 3; + */ + endColumn = protoInt64.zero; + + /** + * @generated from field: xyz.block.ftl.v1.language.Error.ErrorLevel level = 4; + */ + level = Error_ErrorLevel.INFO; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.language.Error"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "msg", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "pos", kind: "message", T: Position }, + { no: 3, name: "endColumn", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, + { no: 4, name: "level", kind: "enum", T: proto3.getEnumType(Error_ErrorLevel) }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): Error { + return new Error().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): Error { + return new Error().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): Error { + return new Error().fromJsonString(jsonString, options); + } + + static equals(a: Error | PlainMessage | undefined, b: Error | PlainMessage | undefined): boolean { + return proto3.util.equals(Error, a, b); + } +} + +/** + * @generated from enum xyz.block.ftl.v1.language.Error.ErrorLevel + */ +export enum Error_ErrorLevel { + /** + * @generated from enum value: INFO = 0; + */ + INFO = 0, + + /** + * @generated from enum value: WARN = 1; + */ + WARN = 1, + + /** + * @generated from enum value: ERROR = 2; + */ + ERROR = 2, +} +// Retrieve enum metadata with: proto3.getEnumType(Error_ErrorLevel) +proto3.util.setEnumType(Error_ErrorLevel, "xyz.block.ftl.v1.language.Error.ErrorLevel", [ + { no: 0, name: "INFO" }, + { no: 1, name: "WARN" }, + { no: 2, name: "ERROR" }, +]); + +/** + * @generated from message xyz.block.ftl.v1.language.ErrorList + */ +export class ErrorList extends Message { + /** + * @generated from field: repeated xyz.block.ftl.v1.language.Error errors = 1; + */ + errors: Error[] = []; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.language.ErrorList"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "errors", kind: "message", T: Error, repeated: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): ErrorList { + return new ErrorList().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): ErrorList { + return new ErrorList().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): ErrorList { + return new ErrorList().fromJsonString(jsonString, options); + } + + static equals(a: ErrorList | PlainMessage | undefined, b: ErrorList | PlainMessage | undefined): boolean { + return proto3.util.equals(ErrorList, a, b); + } +} + +/** + * Request to build a module. + * + * @generated from message xyz.block.ftl.v1.language.BuildRequest + */ +export class BuildRequest extends Message { + /** + * the root path for the module + * + * @generated from field: string path = 1; + */ + path = ""; + + /** + * the root path for the FTL project + * + * @generated from field: string project_path = 2; + */ + projectPath = ""; + + /** + * indicates whether to watch for changes to the module + * + * @generated from field: bool watch = 3; + */ + watch = false; + + /** + * @generated from field: xyz.block.ftl.v1.language.Metadata metadata = 4; + */ + metadata?: Metadata; + + /** + * @generated from field: xyz.block.ftl.v1.schema.Schema schema = 5; + */ + schema?: Schema; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.language.BuildRequest"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "path", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "project_path", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "watch", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 4, name: "metadata", kind: "message", T: Metadata }, + { no: 5, name: "schema", kind: "message", T: Schema }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): BuildRequest { + return new BuildRequest().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): BuildRequest { + return new BuildRequest().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): BuildRequest { + return new BuildRequest().fromJsonString(jsonString, options); + } + + static equals(a: BuildRequest | PlainMessage | undefined, b: BuildRequest | PlainMessage | undefined): boolean { + return proto3.util.equals(BuildRequest, a, b); + } +} + +/** + * Response to a build request. + * + * @generated from message xyz.block.ftl.v1.language.BuildResult + */ +export class BuildResult extends Message { + /** + * module schema for the built module + * only set if the build was successful + * + * @generated from field: optional xyz.block.ftl.v1.schema.Module module = 1; + */ + module?: Module; + + /** + * paths for files/directories to be deployed + * + * @generated from field: repeated string deploy = 2; + */ + deploy: string[] = []; + + /** + * errors and warnings encountered during the build + * + * @generated from field: xyz.block.ftl.v1.language.ErrorList errors = 3; + */ + errors?: ErrorList; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.language.BuildResult"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "module", kind: "message", T: Module, opt: true }, + { no: 2, name: "deploy", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + { no: 3, name: "errors", kind: "message", T: ErrorList }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): BuildResult { + return new BuildResult().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): BuildResult { + return new BuildResult().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): BuildResult { + return new BuildResult().fromJsonString(jsonString, options); + } + + static equals(a: BuildResult | PlainMessage | undefined, b: BuildResult | PlainMessage | undefined): boolean { + return proto3.util.equals(BuildResult, a, b); + } +} + +/** + * Every type of message that can be streamed from the language service for a build. + * + * @generated from message xyz.block.ftl.v1.language.BuildEvent + */ +export class BuildEvent extends Message { + /** + * @generated from oneof xyz.block.ftl.v1.language.BuildEvent.event + */ + event: { + /** + * @generated from field: xyz.block.ftl.v1.language.DependencyUpdate dependency_update = 1; + */ + value: DependencyUpdate; + case: "dependencyUpdate"; + } | { + /** + * @generated from field: xyz.block.ftl.v1.language.BuildResult build_result = 2; + */ + value: BuildResult; + case: "buildResult"; + } | { + /** + * @generated from field: xyz.block.ftl.v1.language.LogMessage log_message = 3; + */ + value: LogMessage; + case: "logMessage"; + } | { case: undefined; value?: undefined } = { case: undefined }; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.language.BuildEvent"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "dependency_update", kind: "message", T: DependencyUpdate, oneof: "event" }, + { no: 2, name: "build_result", kind: "message", T: BuildResult, oneof: "event" }, + { no: 3, name: "log_message", kind: "message", T: LogMessage, oneof: "event" }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): BuildEvent { + return new BuildEvent().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): BuildEvent { + return new BuildEvent().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): BuildEvent { + return new BuildEvent().fromJsonString(jsonString, options); + } + + static equals(a: BuildEvent | PlainMessage | undefined, b: BuildEvent | PlainMessage | undefined): boolean { + return proto3.util.equals(BuildEvent, a, b); + } +} + diff --git a/frontend/console/src/protos/xyz/block/ftl/v1/language/language_connect.ts b/frontend/console/src/protos/xyz/block/ftl/v1/language/language_connect.ts new file mode 100644 index 0000000000..c6c1386c4c --- /dev/null +++ b/frontend/console/src/protos/xyz/block/ftl/v1/language/language_connect.ts @@ -0,0 +1,111 @@ +// @generated by protoc-gen-connect-es v1.5.0 with parameter "target=ts" +// @generated from file xyz/block/ftl/v1/language/language.proto (package xyz.block.ftl.v1.language, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import { PingRequest, PingResponse } from "../ftl_pb.js"; +import { MethodIdempotency, MethodKind } from "@bufbuild/protobuf"; +import { BuildContextUpdatedRequest, BuildContextUpdatedResponse, BuildEvent, BuildRequest, CreateModuleRequest, CreateModuleResponse, DependenciesRequest, DependenciesResponse, GetCreateModuleFlagsRequest, GetCreateModuleFlagsResponse, ModuleConfigDefaultsRequest, ModuleConfigDefaultsResponse } from "./language_pb.js"; + +/** + * LanguageService allows a plugin to add support for a programming language. + * + * @generated from service xyz.block.ftl.v1.language.LanguageService + */ +export const LanguageService = { + typeName: "xyz.block.ftl.v1.language.LanguageService", + methods: { + /** + * Ping service for readiness. + * + * @generated from rpc xyz.block.ftl.v1.language.LanguageService.Ping + */ + ping: { + name: "Ping", + I: PingRequest, + O: PingResponse, + kind: MethodKind.Unary, + idempotency: MethodIdempotency.NoSideEffects, + }, + /** + * Get language specific flags that can be used to create a new module. + * + * @generated from rpc xyz.block.ftl.v1.language.LanguageService.GetCreateModuleFlags + */ + getCreateModuleFlags: { + name: "GetCreateModuleFlags", + I: GetCreateModuleFlagsRequest, + O: GetCreateModuleFlagsResponse, + kind: MethodKind.Unary, + }, + /** + * Generates files for a new module with the requested name + * + * @generated from rpc xyz.block.ftl.v1.language.LanguageService.CreateModule + */ + createModule: { + name: "CreateModule", + I: CreateModuleRequest, + O: CreateModuleResponse, + kind: MethodKind.Unary, + }, + /** + * Provide default values for ModuleConfig for values that are not configured in the ftl.toml file. + * + * @generated from rpc xyz.block.ftl.v1.language.LanguageService.ModuleConfigDefaults + */ + moduleConfigDefaults: { + name: "ModuleConfigDefaults", + I: ModuleConfigDefaultsRequest, + O: ModuleConfigDefaultsResponse, + kind: MethodKind.Unary, + }, + /** + * Extract dependencies for a module + * FTL will ensure that these dependencies are built before requesting a build for this module. + * + * @generated from rpc xyz.block.ftl.v1.language.LanguageService.GetDependencies + */ + getDependencies: { + name: "GetDependencies", + I: DependenciesRequest, + O: DependenciesResponse, + kind: MethodKind.Unary, + }, + /** + * Build the module and stream back build events. + * + * A BuildSuccess or BuildFailure event must be streamed back with the request's context id to indicate the + * end of the build. + * + * The request can include the option to "rebuild_automatically". In this case the plugin should watch for + * file changes and automatically rebuild as needed as long as this build request is alive. Each automactic + * rebuild must include the latest build context id provided by the request or subsequent BuildContextUpdated + * calls. + * + * @generated from rpc xyz.block.ftl.v1.language.LanguageService.Build + */ + build: { + name: "Build", + I: BuildRequest, + O: BuildEvent, + kind: MethodKind.ServerStreaming, + }, + /** + * While a Build call with "rebuild_automatically" set is active, BuildContextUpdated is called whenever the + * build context is updated. + * + * Each time this call is made, the Build call must send back a corresponding BuildSuccess or BuildFailure + * event with the updated build context id with "is_automatic_rebuild" as false. + * + * @generated from rpc xyz.block.ftl.v1.language.LanguageService.BuildContextUpdated + */ + buildContextUpdated: { + name: "BuildContextUpdated", + I: BuildContextUpdatedRequest, + O: BuildContextUpdatedResponse, + kind: MethodKind.Unary, + }, + } +} as const; + diff --git a/frontend/console/src/protos/xyz/block/ftl/v1/language/language_pb.ts b/frontend/console/src/protos/xyz/block/ftl/v1/language/language_pb.ts index 14fa9143e8..044a934dd0 100644 --- a/frontend/console/src/protos/xyz/block/ftl/v1/language/language_pb.ts +++ b/frontend/console/src/protos/xyz/block/ftl/v1/language/language_pb.ts @@ -4,10 +4,719 @@ // @ts-nocheck import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; -import { Message, proto3, protoInt64 } from "@bufbuild/protobuf"; -import { Position } from "../schema/schema_pb.js"; +import { Message, proto3, protoInt64, Struct } from "@bufbuild/protobuf"; +import { Module, Schema } from "../schema/schema_pb.js"; /** + * ModuleConfig contains the configuration for a module, found in the module's ftl.toml file. + * + * @generated from message xyz.block.ftl.v1.language.ModuleConfig + */ +export class ModuleConfig extends Message { + /** + * name of the module + * + * @generated from field: string name = 1; + */ + name = ""; + + /** + * absolute path to the module's directory + * + * @generated from field: string path = 2; + */ + path = ""; + + /** + * absolute path + * + * @generated from field: string deployDir = 3; + */ + deployDir = ""; + + /** + * @generated from field: optional string build = 4; + */ + build?: string; + + /** + * @generated from field: optional string generated_schema_dir = 5; + */ + generatedSchemaDir?: string; + + /** + * @generated from field: repeated string watch = 6; + */ + watch: string[] = []; + + /** + * LanguageConfig contains any metadata specific to a specific language. + * These are stored in the ftl.toml file under the same key as the language (eg: "go", "java") + * + * @generated from field: google.protobuf.Struct language_config = 7; + */ + languageConfig?: Struct; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.language.ModuleConfig"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "path", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "deployDir", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 4, name: "build", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 5, name: "generated_schema_dir", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 6, name: "watch", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + { no: 7, name: "language_config", kind: "message", T: Struct }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): ModuleConfig { + return new ModuleConfig().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): ModuleConfig { + return new ModuleConfig().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): ModuleConfig { + return new ModuleConfig().fromJsonString(jsonString, options); + } + + static equals(a: ModuleConfig | PlainMessage | undefined, b: ModuleConfig | PlainMessage | undefined): boolean { + return proto3.util.equals(ModuleConfig, a, b); + } +} + +/** + * ProjectConfig contains the configuration for a project, found in the ftl-project.toml file. + * + * @generated from message xyz.block.ftl.v1.language.ProjectConfig + */ +export class ProjectConfig extends Message { + /** + * @generated from field: string path = 1; + */ + path = ""; + + /** + * @generated from field: string name = 2; + */ + name = ""; + + /** + * @generated from field: bool no_git = 3; + */ + noGit = false; + + /** + * @generated from field: bool hermit = 4; + */ + hermit = false; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.language.ProjectConfig"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "path", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "no_git", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 4, name: "hermit", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): ProjectConfig { + return new ProjectConfig().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): ProjectConfig { + return new ProjectConfig().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): ProjectConfig { + return new ProjectConfig().fromJsonString(jsonString, options); + } + + static equals(a: ProjectConfig | PlainMessage | undefined, b: ProjectConfig | PlainMessage | undefined): boolean { + return proto3.util.equals(ProjectConfig, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.language.GetCreateModuleFlagsRequest + */ +export class GetCreateModuleFlagsRequest extends Message { + /** + * @generated from field: string language = 1; + */ + language = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.language.GetCreateModuleFlagsRequest"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "language", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): GetCreateModuleFlagsRequest { + return new GetCreateModuleFlagsRequest().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): GetCreateModuleFlagsRequest { + return new GetCreateModuleFlagsRequest().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): GetCreateModuleFlagsRequest { + return new GetCreateModuleFlagsRequest().fromJsonString(jsonString, options); + } + + static equals(a: GetCreateModuleFlagsRequest | PlainMessage | undefined, b: GetCreateModuleFlagsRequest | PlainMessage | undefined): boolean { + return proto3.util.equals(GetCreateModuleFlagsRequest, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.language.GetCreateModuleFlagsResponse + */ +export class GetCreateModuleFlagsResponse extends Message { + /** + * @generated from field: repeated xyz.block.ftl.v1.language.GetCreateModuleFlagsResponse.Flag flags = 1; + */ + flags: GetCreateModuleFlagsResponse_Flag[] = []; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.language.GetCreateModuleFlagsResponse"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "flags", kind: "message", T: GetCreateModuleFlagsResponse_Flag, repeated: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): GetCreateModuleFlagsResponse { + return new GetCreateModuleFlagsResponse().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): GetCreateModuleFlagsResponse { + return new GetCreateModuleFlagsResponse().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): GetCreateModuleFlagsResponse { + return new GetCreateModuleFlagsResponse().fromJsonString(jsonString, options); + } + + static equals(a: GetCreateModuleFlagsResponse | PlainMessage | undefined, b: GetCreateModuleFlagsResponse | PlainMessage | undefined): boolean { + return proto3.util.equals(GetCreateModuleFlagsResponse, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.language.GetCreateModuleFlagsResponse.Flag + */ +export class GetCreateModuleFlagsResponse_Flag extends Message { + /** + * @generated from field: string name = 1; + */ + name = ""; + + /** + * @generated from field: string help = 2; + */ + help = ""; + + /** + * @generated from field: optional string envar = 3; + */ + envar?: string; + + /** + * short must be a single character + * + * @generated from field: optional string short = 4; + */ + short?: string; + + /** + * @generated from field: optional string placeholder = 5; + */ + placeholder?: string; + + /** + * @generated from field: optional string default = 6; + */ + default?: string; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.language.GetCreateModuleFlagsResponse.Flag"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "help", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "envar", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 4, name: "short", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 5, name: "placeholder", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 6, name: "default", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): GetCreateModuleFlagsResponse_Flag { + return new GetCreateModuleFlagsResponse_Flag().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): GetCreateModuleFlagsResponse_Flag { + return new GetCreateModuleFlagsResponse_Flag().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): GetCreateModuleFlagsResponse_Flag { + return new GetCreateModuleFlagsResponse_Flag().fromJsonString(jsonString, options); + } + + static equals(a: GetCreateModuleFlagsResponse_Flag | PlainMessage | undefined, b: GetCreateModuleFlagsResponse_Flag | PlainMessage | undefined): boolean { + return proto3.util.equals(GetCreateModuleFlagsResponse_Flag, a, b); + } +} + +/** + * Request to create a new module. + * + * @generated from message xyz.block.ftl.v1.language.CreateModuleRequest + */ +export class CreateModuleRequest extends Message { + /** + * @generated from field: string name = 1; + */ + name = ""; + + /** + * The root path for the module, which does not yet exist. + * The plugin should create the directory. + * + * @generated from field: string path = 2; + */ + path = ""; + + /** + * The project configuration + * + * @generated from field: xyz.block.ftl.v1.language.ProjectConfig project_config = 3; + */ + projectConfig?: ProjectConfig; + + /** + * Flags contains any values set for those configured in the GetCreateModuleFlags call + * + * @generated from field: google.protobuf.Struct Flags = 4; + */ + Flags?: Struct; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.language.CreateModuleRequest"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "path", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 3, name: "project_config", kind: "message", T: ProjectConfig }, + { no: 4, name: "Flags", kind: "message", T: Struct }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): CreateModuleRequest { + return new CreateModuleRequest().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): CreateModuleRequest { + return new CreateModuleRequest().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): CreateModuleRequest { + return new CreateModuleRequest().fromJsonString(jsonString, options); + } + + static equals(a: CreateModuleRequest | PlainMessage | undefined, b: CreateModuleRequest | PlainMessage | undefined): boolean { + return proto3.util.equals(CreateModuleRequest, a, b); + } +} + +/** + * Response to a create module request. + * + * @generated from message xyz.block.ftl.v1.language.CreateModuleResponse + */ +export class CreateModuleResponse extends Message { + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.language.CreateModuleResponse"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): CreateModuleResponse { + return new CreateModuleResponse().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): CreateModuleResponse { + return new CreateModuleResponse().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): CreateModuleResponse { + return new CreateModuleResponse().fromJsonString(jsonString, options); + } + + static equals(a: CreateModuleResponse | PlainMessage | undefined, b: CreateModuleResponse | PlainMessage | undefined): boolean { + return proto3.util.equals(CreateModuleResponse, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.language.ModuleConfigDefaultsRequest + */ +export class ModuleConfigDefaultsRequest extends Message { + /** + * @generated from field: string path = 1; + */ + path = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.language.ModuleConfigDefaultsRequest"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "path", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): ModuleConfigDefaultsRequest { + return new ModuleConfigDefaultsRequest().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): ModuleConfigDefaultsRequest { + return new ModuleConfigDefaultsRequest().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): ModuleConfigDefaultsRequest { + return new ModuleConfigDefaultsRequest().fromJsonString(jsonString, options); + } + + static equals(a: ModuleConfigDefaultsRequest | PlainMessage | undefined, b: ModuleConfigDefaultsRequest | PlainMessage | undefined): boolean { + return proto3.util.equals(ModuleConfigDefaultsRequest, a, b); + } +} + +/** + * ModuleConfigDefaultsResponse provides defaults for ModuleConfig. + * + * The result may be cached by FTL, so defaulting logic should not be changing due to normal module changes. + * For example, it is valid to return defaults based on which build tool is configured within the module directory, + * as that is not expected to change during normal operation. + * It is not recommended to read the module's toml file to determine defaults, as when the toml file is updated, + * the module defaults will not be recalculated. + * + * @generated from message xyz.block.ftl.v1.language.ModuleConfigDefaultsResponse + */ +export class ModuleConfigDefaultsResponse extends Message { + /** + * Default relative path to the directory containing all build artifacts for deployments + * + * @generated from field: string deployDir = 1; + */ + deployDir = ""; + + /** + * Default build command + * + * @generated from field: optional string build = 2; + */ + build?: string; + + /** + * Default relative path to the directory containing generated schema files + * + * @generated from field: optional string generated_schema_dir = 3; + */ + generatedSchemaDir?: string; + + /** + * Default patterns to watch for file changes + * + * @generated from field: repeated string watch = 4; + */ + watch: string[] = []; + + /** + * Default language specific configuration. + * These defaults are filled in by looking at each root key only. If the key is not present, the default is used. + * + * @generated from field: google.protobuf.Struct language_config = 5; + */ + languageConfig?: Struct; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.language.ModuleConfigDefaultsResponse"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "deployDir", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "build", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 3, name: "generated_schema_dir", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 4, name: "watch", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + { no: 5, name: "language_config", kind: "message", T: Struct }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): ModuleConfigDefaultsResponse { + return new ModuleConfigDefaultsResponse().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): ModuleConfigDefaultsResponse { + return new ModuleConfigDefaultsResponse().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): ModuleConfigDefaultsResponse { + return new ModuleConfigDefaultsResponse().fromJsonString(jsonString, options); + } + + static equals(a: ModuleConfigDefaultsResponse | PlainMessage | undefined, b: ModuleConfigDefaultsResponse | PlainMessage | undefined): boolean { + return proto3.util.equals(ModuleConfigDefaultsResponse, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.language.DependenciesRequest + */ +export class DependenciesRequest extends Message { + /** + * @generated from field: xyz.block.ftl.v1.language.ModuleConfig module_config = 1; + */ + moduleConfig?: ModuleConfig; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.language.DependenciesRequest"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "module_config", kind: "message", T: ModuleConfig }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): DependenciesRequest { + return new DependenciesRequest().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): DependenciesRequest { + return new DependenciesRequest().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): DependenciesRequest { + return new DependenciesRequest().fromJsonString(jsonString, options); + } + + static equals(a: DependenciesRequest | PlainMessage | undefined, b: DependenciesRequest | PlainMessage | undefined): boolean { + return proto3.util.equals(DependenciesRequest, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.language.DependenciesResponse + */ +export class DependenciesResponse extends Message { + /** + * @generated from field: repeated string modules = 1; + */ + modules: string[] = []; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.language.DependenciesResponse"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "modules", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): DependenciesResponse { + return new DependenciesResponse().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): DependenciesResponse { + return new DependenciesResponse().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): DependenciesResponse { + return new DependenciesResponse().fromJsonString(jsonString, options); + } + + static equals(a: DependenciesResponse | PlainMessage | undefined, b: DependenciesResponse | PlainMessage | undefined): boolean { + return proto3.util.equals(DependenciesResponse, a, b); + } +} + +/** + * BuildContext contains contextual information needed to build. + * + * Plugins must include the build context's id when a build succeeds or fails. + * For automatic rebuilds, plugins must use the most recent build context they have received. + * + * @generated from message xyz.block.ftl.v1.language.BuildContext + */ +export class BuildContext extends Message { + /** + * @generated from field: string id = 1; + */ + id = ""; + + /** + * The configuration for the module + * + * @generated from field: xyz.block.ftl.v1.language.ModuleConfig module_config = 2; + */ + moduleConfig?: ModuleConfig; + + /** + * The FTL schema including all dependencies + * + * @generated from field: xyz.block.ftl.v1.schema.Schema schema = 3; + */ + schema?: Schema; + + /** + * The dependencies for the module + * + * @generated from field: repeated string dependencies = 4; + */ + dependencies: string[] = []; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.language.BuildContext"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "module_config", kind: "message", T: ModuleConfig }, + { no: 3, name: "schema", kind: "message", T: Schema }, + { no: 4, name: "dependencies", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): BuildContext { + return new BuildContext().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): BuildContext { + return new BuildContext().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): BuildContext { + return new BuildContext().fromJsonString(jsonString, options); + } + + static equals(a: BuildContext | PlainMessage | undefined, b: BuildContext | PlainMessage | undefined): boolean { + return proto3.util.equals(BuildContext, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.language.BuildContextUpdatedRequest + */ +export class BuildContextUpdatedRequest extends Message { + /** + * @generated from field: xyz.block.ftl.v1.language.BuildContext buildContext = 1; + */ + buildContext?: BuildContext; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.language.BuildContextUpdatedRequest"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "buildContext", kind: "message", T: BuildContext }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): BuildContextUpdatedRequest { + return new BuildContextUpdatedRequest().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): BuildContextUpdatedRequest { + return new BuildContextUpdatedRequest().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): BuildContextUpdatedRequest { + return new BuildContextUpdatedRequest().fromJsonString(jsonString, options); + } + + static equals(a: BuildContextUpdatedRequest | PlainMessage | undefined, b: BuildContextUpdatedRequest | PlainMessage | undefined): boolean { + return proto3.util.equals(BuildContextUpdatedRequest, a, b); + } +} + +/** + * @generated from message xyz.block.ftl.v1.language.BuildContextUpdatedResponse + */ +export class BuildContextUpdatedResponse extends Message { + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.language.BuildContextUpdatedResponse"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): BuildContextUpdatedResponse { + return new BuildContextUpdatedResponse().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): BuildContextUpdatedResponse { + return new BuildContextUpdatedResponse().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): BuildContextUpdatedResponse { + return new BuildContextUpdatedResponse().fromJsonString(jsonString, options); + } + + static equals(a: BuildContextUpdatedResponse | PlainMessage | undefined, b: BuildContextUpdatedResponse | PlainMessage | undefined): boolean { + return proto3.util.equals(BuildContextUpdatedResponse, a, b); + } +} + +/** + * Error contains information about an error that occurred during a build. + * Errors do not always cause a build failure. Use lesser levels to help guide the user. + * * @generated from message xyz.block.ftl.v1.language.Error */ export class Error extends Message { @@ -17,19 +726,14 @@ export class Error extends Message { msg = ""; /** - * @generated from field: xyz.block.ftl.v1.schema.Position pos = 2; - */ - pos?: Position; - - /** - * @generated from field: int64 endColumn = 3; + * @generated from field: xyz.block.ftl.v1.language.Error.ErrorLevel level = 4; */ - endColumn = protoInt64.zero; + level = Error_ErrorLevel.INFO; /** - * @generated from field: xyz.block.ftl.v1.language.Error.ErrorLevel level = 4; + * @generated from field: xyz.block.ftl.v1.language.Position pos = 5; */ - level = Error_ErrorLevel.INFO; + pos?: Position; constructor(data?: PartialMessage) { super(); @@ -40,9 +744,8 @@ export class Error extends Message { static readonly typeName = "xyz.block.ftl.v1.language.Error"; static readonly fields: FieldList = proto3.util.newFieldList(() => [ { no: 1, name: "msg", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "pos", kind: "message", T: Position }, - { no: 3, name: "endColumn", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, { no: 4, name: "level", kind: "enum", T: proto3.getEnumType(Error_ErrorLevel) }, + { no: 5, name: "pos", kind: "message", T: Position }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): Error { @@ -88,6 +791,61 @@ proto3.util.setEnumType(Error_ErrorLevel, "xyz.block.ftl.v1.language.Error.Error { no: 2, name: "ERROR" }, ]); +/** + * @generated from message xyz.block.ftl.v1.language.Position + */ +export class Position extends Message { + /** + * @generated from field: string filename = 1; + */ + filename = ""; + + /** + * @generated from field: int64 line = 2; + */ + line = protoInt64.zero; + + /** + * @generated from field: int64 startColumn = 3; + */ + startColumn = protoInt64.zero; + + /** + * @generated from field: int64 endColumn = 4; + */ + endColumn = protoInt64.zero; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.language.Position"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "filename", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "line", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, + { no: 3, name: "startColumn", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, + { no: 4, name: "endColumn", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): Position { + return new Position().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): Position { + return new Position().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): Position { + return new Position().fromJsonString(jsonString, options); + } + + static equals(a: Position | PlainMessage | undefined, b: Position | PlainMessage | undefined): boolean { + return proto3.util.equals(Position, a, b); + } +} + /** * @generated from message xyz.block.ftl.v1.language.ErrorList */ @@ -125,3 +883,399 @@ export class ErrorList extends Message { } } +/** + * Request to build a module. + * + * @generated from message xyz.block.ftl.v1.language.BuildRequest + */ +export class BuildRequest extends Message { + /** + * The root path for the FTL project + * + * @generated from field: string project_path = 1; + */ + projectPath = ""; + + /** + * Indicates whether to watch for file changes and automatically rebuild + * + * @generated from field: bool rebuild_automatically = 2; + */ + rebuildAutomatically = false; + + /** + * @generated from field: xyz.block.ftl.v1.language.BuildContext build_context = 3; + */ + buildContext?: BuildContext; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.language.BuildRequest"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "project_path", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "rebuild_automatically", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 3, name: "build_context", kind: "message", T: BuildContext }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): BuildRequest { + return new BuildRequest().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): BuildRequest { + return new BuildRequest().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): BuildRequest { + return new BuildRequest().fromJsonString(jsonString, options); + } + + static equals(a: BuildRequest | PlainMessage | undefined, b: BuildRequest | PlainMessage | undefined): boolean { + return proto3.util.equals(BuildRequest, a, b); + } +} + +/** + * AutoRebuildStarted should be sent when the plugin decides to start rebuilding automatically. + * + * It is not required to send this event, though it helps inform the user that their changes are not yet built. + * FTL may ignore this event if it does not match FTL's current build context and state. + * If the plugin decides to cancel the build because another build started, no failure or cancellation event needs + * to be sent. + * + * @generated from message xyz.block.ftl.v1.language.AutoRebuildStarted + */ +export class AutoRebuildStarted extends Message { + /** + * @generated from field: string context_id = 1; + */ + contextId = ""; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.language.AutoRebuildStarted"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "context_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): AutoRebuildStarted { + return new AutoRebuildStarted().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): AutoRebuildStarted { + return new AutoRebuildStarted().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): AutoRebuildStarted { + return new AutoRebuildStarted().fromJsonString(jsonString, options); + } + + static equals(a: AutoRebuildStarted | PlainMessage | undefined, b: AutoRebuildStarted | PlainMessage | undefined): boolean { + return proto3.util.equals(AutoRebuildStarted, a, b); + } +} + +/** + * BuildSuccess should be sent when a build succeeds. + * + * FTL may ignore this event if it does not match FTL's current build context and state. + * + * @generated from message xyz.block.ftl.v1.language.BuildSuccess + */ +export class BuildSuccess extends Message { + /** + * The id of build context used while building. + * + * @generated from field: string context_id = 1; + */ + contextId = ""; + + /** + * Indicates whether the build was automatically started by the plugin, rather than due to a Build rpc call. + * + * @generated from field: bool is_automatic_rebuild = 2; + */ + isAutomaticRebuild = false; + + /** + * Module schema for the built module + * + * @generated from field: xyz.block.ftl.v1.schema.Module module = 3; + */ + module?: Module; + + /** + * Paths for files/directories to be deployed + * + * @generated from field: repeated string deploy = 4; + */ + deploy: string[] = []; + + /** + * Name of the docker image to use for the runner + * + * @generated from field: string docker_image = 5; + */ + dockerImage = ""; + + /** + * Errors contains any errors that occurred during the build + * No errors can have a level of ERROR, instead a BuildFailure should be sent + * Instead this is useful for INFO and WARN level errors. + * + * @generated from field: xyz.block.ftl.v1.language.ErrorList errors = 6; + */ + errors?: ErrorList; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.language.BuildSuccess"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "context_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "is_automatic_rebuild", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 3, name: "module", kind: "message", T: Module }, + { no: 4, name: "deploy", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + { no: 5, name: "docker_image", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 6, name: "errors", kind: "message", T: ErrorList }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): BuildSuccess { + return new BuildSuccess().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): BuildSuccess { + return new BuildSuccess().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): BuildSuccess { + return new BuildSuccess().fromJsonString(jsonString, options); + } + + static equals(a: BuildSuccess | PlainMessage | undefined, b: BuildSuccess | PlainMessage | undefined): boolean { + return proto3.util.equals(BuildSuccess, a, b); + } +} + +/** + * BuildFailure should be sent when a build fails. + * + * FTL may ignore this event if it does not match FTL's current build context and state. + * + * @generated from message xyz.block.ftl.v1.language.BuildFailure + */ +export class BuildFailure extends Message { + /** + * The id of build context used while building. + * + * @generated from field: string context_id = 1; + */ + contextId = ""; + + /** + * Indicates whether the build was automatically started by the plugin, rather than due to a Build rpc call. + * + * @generated from field: bool is_automatic_rebuild = 2; + */ + isAutomaticRebuild = false; + + /** + * Errors contains any errors that occurred during the build + * + * @generated from field: xyz.block.ftl.v1.language.ErrorList errors = 3; + */ + errors?: ErrorList; + + /** + * Indicates the plugin determined that the dependencies in the BuildContext are out of date. + * If a Build stream is being kept open for automatic rebuilds, FTL will call GetDependencies, followed by + * BuildContextUpdated. + * + * @generated from field: bool invalidate_dependencies = 4; + */ + invalidateDependencies = false; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.language.BuildFailure"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "context_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "is_automatic_rebuild", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + { no: 3, name: "errors", kind: "message", T: ErrorList }, + { no: 4, name: "invalidate_dependencies", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): BuildFailure { + return new BuildFailure().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): BuildFailure { + return new BuildFailure().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): BuildFailure { + return new BuildFailure().fromJsonString(jsonString, options); + } + + static equals(a: BuildFailure | PlainMessage | undefined, b: BuildFailure | PlainMessage | undefined): boolean { + return proto3.util.equals(BuildFailure, a, b); + } +} + +/** + * Log message from the language service. + * + * @generated from message xyz.block.ftl.v1.language.LogMessage + */ +export class LogMessage extends Message { + /** + * @generated from field: string message = 1; + */ + message = ""; + + /** + * @generated from field: xyz.block.ftl.v1.language.LogMessage.LogLevel level = 2; + */ + level = LogMessage_LogLevel.DEBUG; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.language.LogMessage"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "message", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "level", kind: "enum", T: proto3.getEnumType(LogMessage_LogLevel) }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): LogMessage { + return new LogMessage().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): LogMessage { + return new LogMessage().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): LogMessage { + return new LogMessage().fromJsonString(jsonString, options); + } + + static equals(a: LogMessage | PlainMessage | undefined, b: LogMessage | PlainMessage | undefined): boolean { + return proto3.util.equals(LogMessage, a, b); + } +} + +/** + * @generated from enum xyz.block.ftl.v1.language.LogMessage.LogLevel + */ +export enum LogMessage_LogLevel { + /** + * @generated from enum value: DEBUG = 0; + */ + DEBUG = 0, + + /** + * @generated from enum value: INFO = 1; + */ + INFO = 1, + + /** + * @generated from enum value: WARN = 2; + */ + WARN = 2, + + /** + * @generated from enum value: ERROR = 3; + */ + ERROR = 3, +} +// Retrieve enum metadata with: proto3.getEnumType(LogMessage_LogLevel) +proto3.util.setEnumType(LogMessage_LogLevel, "xyz.block.ftl.v1.language.LogMessage.LogLevel", [ + { no: 0, name: "DEBUG" }, + { no: 1, name: "INFO" }, + { no: 2, name: "WARN" }, + { no: 3, name: "ERROR" }, +]); + +/** + * Every type of message that can be streamed from the language plugin for a build. + * + * @generated from message xyz.block.ftl.v1.language.BuildEvent + */ +export class BuildEvent extends Message { + /** + * @generated from oneof xyz.block.ftl.v1.language.BuildEvent.event + */ + event: { + /** + * @generated from field: xyz.block.ftl.v1.language.AutoRebuildStarted auto_rebuild_started = 2; + */ + value: AutoRebuildStarted; + case: "autoRebuildStarted"; + } | { + /** + * @generated from field: xyz.block.ftl.v1.language.BuildSuccess build_success = 3; + */ + value: BuildSuccess; + case: "buildSuccess"; + } | { + /** + * @generated from field: xyz.block.ftl.v1.language.BuildFailure build_failure = 4; + */ + value: BuildFailure; + case: "buildFailure"; + } | { + /** + * @generated from field: xyz.block.ftl.v1.language.LogMessage log_message = 5; + */ + value: LogMessage; + case: "logMessage"; + } | { case: undefined; value?: undefined } = { case: undefined }; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "xyz.block.ftl.v1.language.BuildEvent"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 2, name: "auto_rebuild_started", kind: "message", T: AutoRebuildStarted, oneof: "event" }, + { no: 3, name: "build_success", kind: "message", T: BuildSuccess, oneof: "event" }, + { no: 4, name: "build_failure", kind: "message", T: BuildFailure, oneof: "event" }, + { no: 5, name: "log_message", kind: "message", T: LogMessage, oneof: "event" }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): BuildEvent { + return new BuildEvent().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): BuildEvent { + return new BuildEvent().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): BuildEvent { + return new BuildEvent().fromJsonString(jsonString, options); + } + + static equals(a: BuildEvent | PlainMessage | undefined, b: BuildEvent | PlainMessage | undefined): boolean { + return proto3.util.equals(BuildEvent, a, b); + } +} +