diagnostic.pb.go 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266
  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // versions:
  3. // protoc-gen-go v1.36.9
  4. // protoc v6.32.1
  5. // source: kubemodel/diagnostic.proto
  6. package kubemodel
  7. import (
  8. protoreflect "google.golang.org/protobuf/reflect/protoreflect"
  9. protoimpl "google.golang.org/protobuf/runtime/protoimpl"
  10. timestamppb "google.golang.org/protobuf/types/known/timestamppb"
  11. reflect "reflect"
  12. sync "sync"
  13. unsafe "unsafe"
  14. )
  15. const (
  16. // Verify that this generated code is sufficiently up-to-date.
  17. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
  18. // Verify that runtime/protoimpl is sufficiently up-to-date.
  19. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
  20. )
  21. // DiagnosticResult represents the result of a diagnostic run
  22. // This matches the JSON structure from core/pkg/diagnostics/diagnostics.go
  23. type DiagnosticResult struct {
  24. state protoimpl.MessageState `protogen:"open.v1"`
  25. // Unique Identifier for the diagnostic run result
  26. Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
  27. // Name of the diagnostic that ran
  28. Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
  29. // Description of the diagnostic run, human readable description
  30. Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
  31. // Category of the diagnostic run, used to group similar diagnostics
  32. Category string `protobuf:"bytes,4,opt,name=category,proto3" json:"category,omitempty"`
  33. // Timestamp when the diagnostic run was executed
  34. Timestamp *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
  35. // Error message if the diagnostic run failed (optional)
  36. Error string `protobuf:"bytes,6,opt,name=error,proto3" json:"error,omitempty"`
  37. // Additional custom information about the diagnostic run
  38. // Using string values to match map[string]any from JSON
  39. Details map[string]string `protobuf:"bytes,7,rep,name=details,proto3" json:"details,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
  40. unknownFields protoimpl.UnknownFields
  41. sizeCache protoimpl.SizeCache
  42. }
  43. func (x *DiagnosticResult) Reset() {
  44. *x = DiagnosticResult{}
  45. mi := &file_kubemodel_diagnostic_proto_msgTypes[0]
  46. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  47. ms.StoreMessageInfo(mi)
  48. }
  49. func (x *DiagnosticResult) String() string {
  50. return protoimpl.X.MessageStringOf(x)
  51. }
  52. func (*DiagnosticResult) ProtoMessage() {}
  53. func (x *DiagnosticResult) ProtoReflect() protoreflect.Message {
  54. mi := &file_kubemodel_diagnostic_proto_msgTypes[0]
  55. if x != nil {
  56. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  57. if ms.LoadMessageInfo() == nil {
  58. ms.StoreMessageInfo(mi)
  59. }
  60. return ms
  61. }
  62. return mi.MessageOf(x)
  63. }
  64. // Deprecated: Use DiagnosticResult.ProtoReflect.Descriptor instead.
  65. func (*DiagnosticResult) Descriptor() ([]byte, []int) {
  66. return file_kubemodel_diagnostic_proto_rawDescGZIP(), []int{0}
  67. }
  68. func (x *DiagnosticResult) GetId() string {
  69. if x != nil {
  70. return x.Id
  71. }
  72. return ""
  73. }
  74. func (x *DiagnosticResult) GetName() string {
  75. if x != nil {
  76. return x.Name
  77. }
  78. return ""
  79. }
  80. func (x *DiagnosticResult) GetDescription() string {
  81. if x != nil {
  82. return x.Description
  83. }
  84. return ""
  85. }
  86. func (x *DiagnosticResult) GetCategory() string {
  87. if x != nil {
  88. return x.Category
  89. }
  90. return ""
  91. }
  92. func (x *DiagnosticResult) GetTimestamp() *timestamppb.Timestamp {
  93. if x != nil {
  94. return x.Timestamp
  95. }
  96. return nil
  97. }
  98. func (x *DiagnosticResult) GetError() string {
  99. if x != nil {
  100. return x.Error
  101. }
  102. return ""
  103. }
  104. func (x *DiagnosticResult) GetDetails() map[string]string {
  105. if x != nil {
  106. return x.Details
  107. }
  108. return nil
  109. }
  110. // DiagnosticsRunReport contains the start time and all diagnostic results
  111. // This matches the JSON structure from core/pkg/diagnostics/diagnostics.go
  112. type DiagnosticsRunReport struct {
  113. state protoimpl.MessageState `protogen:"open.v1"`
  114. // Application name that the diagnostics run belongs to
  115. Application string `protobuf:"bytes,1,opt,name=application,proto3" json:"application,omitempty"`
  116. // Time when the full diagnostics run started
  117. StartTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=startTime,proto3" json:"startTime,omitempty"`
  118. // All results of the diagnostics run
  119. Results []*DiagnosticResult `protobuf:"bytes,3,rep,name=results,proto3" json:"results,omitempty"`
  120. unknownFields protoimpl.UnknownFields
  121. sizeCache protoimpl.SizeCache
  122. }
  123. func (x *DiagnosticsRunReport) Reset() {
  124. *x = DiagnosticsRunReport{}
  125. mi := &file_kubemodel_diagnostic_proto_msgTypes[1]
  126. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  127. ms.StoreMessageInfo(mi)
  128. }
  129. func (x *DiagnosticsRunReport) String() string {
  130. return protoimpl.X.MessageStringOf(x)
  131. }
  132. func (*DiagnosticsRunReport) ProtoMessage() {}
  133. func (x *DiagnosticsRunReport) ProtoReflect() protoreflect.Message {
  134. mi := &file_kubemodel_diagnostic_proto_msgTypes[1]
  135. if x != nil {
  136. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  137. if ms.LoadMessageInfo() == nil {
  138. ms.StoreMessageInfo(mi)
  139. }
  140. return ms
  141. }
  142. return mi.MessageOf(x)
  143. }
  144. // Deprecated: Use DiagnosticsRunReport.ProtoReflect.Descriptor instead.
  145. func (*DiagnosticsRunReport) Descriptor() ([]byte, []int) {
  146. return file_kubemodel_diagnostic_proto_rawDescGZIP(), []int{1}
  147. }
  148. func (x *DiagnosticsRunReport) GetApplication() string {
  149. if x != nil {
  150. return x.Application
  151. }
  152. return ""
  153. }
  154. func (x *DiagnosticsRunReport) GetStartTime() *timestamppb.Timestamp {
  155. if x != nil {
  156. return x.StartTime
  157. }
  158. return nil
  159. }
  160. func (x *DiagnosticsRunReport) GetResults() []*DiagnosticResult {
  161. if x != nil {
  162. return x.Results
  163. }
  164. return nil
  165. }
  166. var File_kubemodel_diagnostic_proto protoreflect.FileDescriptor
  167. const file_kubemodel_diagnostic_proto_rawDesc = "" +
  168. "\n" +
  169. "\x1akubemodel/diagnostic.proto\x12\tkubemodel\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc4\x02\n" +
  170. "\x10DiagnosticResult\x12\x0e\n" +
  171. "\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n" +
  172. "\x04name\x18\x02 \x01(\tR\x04name\x12 \n" +
  173. "\vdescription\x18\x03 \x01(\tR\vdescription\x12\x1a\n" +
  174. "\bcategory\x18\x04 \x01(\tR\bcategory\x128\n" +
  175. "\ttimestamp\x18\x05 \x01(\v2\x1a.google.protobuf.TimestampR\ttimestamp\x12\x14\n" +
  176. "\x05error\x18\x06 \x01(\tR\x05error\x12B\n" +
  177. "\adetails\x18\a \x03(\v2(.kubemodel.DiagnosticResult.DetailsEntryR\adetails\x1a:\n" +
  178. "\fDetailsEntry\x12\x10\n" +
  179. "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
  180. "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\xa9\x01\n" +
  181. "\x14DiagnosticsRunReport\x12 \n" +
  182. "\vapplication\x18\x01 \x01(\tR\vapplication\x128\n" +
  183. "\tstartTime\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampR\tstartTime\x125\n" +
  184. "\aresults\x18\x03 \x03(\v2\x1b.kubemodel.DiagnosticResultR\aresultsB:Z8github.com/opencost/opencost/core/pkg/model/pb/kubemodelb\x06proto3"
  185. var (
  186. file_kubemodel_diagnostic_proto_rawDescOnce sync.Once
  187. file_kubemodel_diagnostic_proto_rawDescData []byte
  188. )
  189. func file_kubemodel_diagnostic_proto_rawDescGZIP() []byte {
  190. file_kubemodel_diagnostic_proto_rawDescOnce.Do(func() {
  191. file_kubemodel_diagnostic_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_kubemodel_diagnostic_proto_rawDesc), len(file_kubemodel_diagnostic_proto_rawDesc)))
  192. })
  193. return file_kubemodel_diagnostic_proto_rawDescData
  194. }
  195. var file_kubemodel_diagnostic_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
  196. var file_kubemodel_diagnostic_proto_goTypes = []any{
  197. (*DiagnosticResult)(nil), // 0: kubemodel.DiagnosticResult
  198. (*DiagnosticsRunReport)(nil), // 1: kubemodel.DiagnosticsRunReport
  199. nil, // 2: kubemodel.DiagnosticResult.DetailsEntry
  200. (*timestamppb.Timestamp)(nil), // 3: google.protobuf.Timestamp
  201. }
  202. var file_kubemodel_diagnostic_proto_depIdxs = []int32{
  203. 3, // 0: kubemodel.DiagnosticResult.timestamp:type_name -> google.protobuf.Timestamp
  204. 2, // 1: kubemodel.DiagnosticResult.details:type_name -> kubemodel.DiagnosticResult.DetailsEntry
  205. 3, // 2: kubemodel.DiagnosticsRunReport.startTime:type_name -> google.protobuf.Timestamp
  206. 0, // 3: kubemodel.DiagnosticsRunReport.results:type_name -> kubemodel.DiagnosticResult
  207. 4, // [4:4] is the sub-list for method output_type
  208. 4, // [4:4] is the sub-list for method input_type
  209. 4, // [4:4] is the sub-list for extension type_name
  210. 4, // [4:4] is the sub-list for extension extendee
  211. 0, // [0:4] is the sub-list for field type_name
  212. }
  213. func init() { file_kubemodel_diagnostic_proto_init() }
  214. func file_kubemodel_diagnostic_proto_init() {
  215. if File_kubemodel_diagnostic_proto != nil {
  216. return
  217. }
  218. type x struct{}
  219. out := protoimpl.TypeBuilder{
  220. File: protoimpl.DescBuilder{
  221. GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
  222. RawDescriptor: unsafe.Slice(unsafe.StringData(file_kubemodel_diagnostic_proto_rawDesc), len(file_kubemodel_diagnostic_proto_rawDesc)),
  223. NumEnums: 0,
  224. NumMessages: 3,
  225. NumExtensions: 0,
  226. NumServices: 0,
  227. },
  228. GoTypes: file_kubemodel_diagnostic_proto_goTypes,
  229. DependencyIndexes: file_kubemodel_diagnostic_proto_depIdxs,
  230. MessageInfos: file_kubemodel_diagnostic_proto_msgTypes,
  231. }.Build()
  232. File_kubemodel_diagnostic_proto = out.File
  233. file_kubemodel_diagnostic_proto_goTypes = nil
  234. file_kubemodel_diagnostic_proto_depIdxs = nil
  235. }