pod.pb.go 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343
  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/pod.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. // Pod represents a Kubernetes pod (allocated resource grouping)
  22. type Pod struct {
  23. state protoimpl.MessageState `protogen:"open.v1"`
  24. // Identification
  25. ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"`
  26. NamespaceID string `protobuf:"bytes,2,opt,name=namespaceID,proto3" json:"namespaceID,omitempty"`
  27. ControllerID string `protobuf:"bytes,3,opt,name=controllerID,proto3" json:"controllerID,omitempty"`
  28. NodeID string `protobuf:"bytes,4,opt,name=nodeID,proto3" json:"nodeID,omitempty"`
  29. // Properties
  30. Name string `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"`
  31. Labels map[string]string `protobuf:"bytes,6,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
  32. Annotations map[string]string `protobuf:"bytes,7,rep,name=annotations,proto3" json:"annotations,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
  33. // Resource lifecycle (only when different from cluster window)
  34. CreationTime *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=creationTime,proto3,oneof" json:"creationTime,omitempty"`
  35. DeletionTime *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=deletionTime,proto3,oneof" json:"deletionTime,omitempty"`
  36. // Usage metrics
  37. // CPU usage in core-hours
  38. CpuCoreHours float32 `protobuf:"fixed32,10,opt,name=cpuCoreHours,proto3" json:"cpuCoreHours,omitempty"`
  39. // CPU request average in cores
  40. CpuCoreRequestAverage float32 `protobuf:"fixed32,11,opt,name=cpuCoreRequestAverage,proto3" json:"cpuCoreRequestAverage,omitempty"`
  41. // CPU usage average in cores
  42. CpuCoreUsageAverage float32 `protobuf:"fixed32,12,opt,name=cpuCoreUsageAverage,proto3" json:"cpuCoreUsageAverage,omitempty"`
  43. // CPU usage max in cores
  44. CpuCoreUsageMax float32 `protobuf:"fixed32,13,opt,name=cpuCoreUsageMax,proto3" json:"cpuCoreUsageMax,omitempty"`
  45. // RAM usage in byte-hours
  46. RamByteHours int64 `protobuf:"varint,14,opt,name=ramByteHours,proto3" json:"ramByteHours,omitempty"`
  47. // RAM request average in bytes
  48. RamBytesRequestAverage int64 `protobuf:"varint,15,opt,name=ramBytesRequestAverage,proto3" json:"ramBytesRequestAverage,omitempty"`
  49. // RAM usage average in bytes
  50. RamBytesUsageAverage int64 `protobuf:"varint,16,opt,name=ramBytesUsageAverage,proto3" json:"ramBytesUsageAverage,omitempty"`
  51. // RAM usage max in bytes
  52. RamBytesUsageMax int64 `protobuf:"varint,17,opt,name=ramBytesUsageMax,proto3" json:"ramBytesUsageMax,omitempty"`
  53. // Storage usage in byte-hours
  54. StorageByteHours int64 `protobuf:"varint,18,opt,name=storageByteHours,proto3" json:"storageByteHours,omitempty"`
  55. // Network transfer bytes sent
  56. NetworkTransferBytes int64 `protobuf:"varint,19,opt,name=networkTransferBytes,proto3" json:"networkTransferBytes,omitempty"`
  57. // Network bytes received
  58. NetworkReceiveBytes int64 `protobuf:"varint,20,opt,name=networkReceiveBytes,proto3" json:"networkReceiveBytes,omitempty"`
  59. // Diagnostic information about this resource
  60. Diagnostic *DiagnosticResult `protobuf:"bytes,99,opt,name=diagnostic,proto3,oneof" json:"diagnostic,omitempty"`
  61. unknownFields protoimpl.UnknownFields
  62. sizeCache protoimpl.SizeCache
  63. }
  64. func (x *Pod) Reset() {
  65. *x = Pod{}
  66. mi := &file_kubemodel_pod_proto_msgTypes[0]
  67. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  68. ms.StoreMessageInfo(mi)
  69. }
  70. func (x *Pod) String() string {
  71. return protoimpl.X.MessageStringOf(x)
  72. }
  73. func (*Pod) ProtoMessage() {}
  74. func (x *Pod) ProtoReflect() protoreflect.Message {
  75. mi := &file_kubemodel_pod_proto_msgTypes[0]
  76. if x != nil {
  77. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  78. if ms.LoadMessageInfo() == nil {
  79. ms.StoreMessageInfo(mi)
  80. }
  81. return ms
  82. }
  83. return mi.MessageOf(x)
  84. }
  85. // Deprecated: Use Pod.ProtoReflect.Descriptor instead.
  86. func (*Pod) Descriptor() ([]byte, []int) {
  87. return file_kubemodel_pod_proto_rawDescGZIP(), []int{0}
  88. }
  89. func (x *Pod) GetID() string {
  90. if x != nil {
  91. return x.ID
  92. }
  93. return ""
  94. }
  95. func (x *Pod) GetNamespaceID() string {
  96. if x != nil {
  97. return x.NamespaceID
  98. }
  99. return ""
  100. }
  101. func (x *Pod) GetControllerID() string {
  102. if x != nil {
  103. return x.ControllerID
  104. }
  105. return ""
  106. }
  107. func (x *Pod) GetNodeID() string {
  108. if x != nil {
  109. return x.NodeID
  110. }
  111. return ""
  112. }
  113. func (x *Pod) GetName() string {
  114. if x != nil {
  115. return x.Name
  116. }
  117. return ""
  118. }
  119. func (x *Pod) GetLabels() map[string]string {
  120. if x != nil {
  121. return x.Labels
  122. }
  123. return nil
  124. }
  125. func (x *Pod) GetAnnotations() map[string]string {
  126. if x != nil {
  127. return x.Annotations
  128. }
  129. return nil
  130. }
  131. func (x *Pod) GetCreationTime() *timestamppb.Timestamp {
  132. if x != nil {
  133. return x.CreationTime
  134. }
  135. return nil
  136. }
  137. func (x *Pod) GetDeletionTime() *timestamppb.Timestamp {
  138. if x != nil {
  139. return x.DeletionTime
  140. }
  141. return nil
  142. }
  143. func (x *Pod) GetCpuCoreHours() float32 {
  144. if x != nil {
  145. return x.CpuCoreHours
  146. }
  147. return 0
  148. }
  149. func (x *Pod) GetCpuCoreRequestAverage() float32 {
  150. if x != nil {
  151. return x.CpuCoreRequestAverage
  152. }
  153. return 0
  154. }
  155. func (x *Pod) GetCpuCoreUsageAverage() float32 {
  156. if x != nil {
  157. return x.CpuCoreUsageAverage
  158. }
  159. return 0
  160. }
  161. func (x *Pod) GetCpuCoreUsageMax() float32 {
  162. if x != nil {
  163. return x.CpuCoreUsageMax
  164. }
  165. return 0
  166. }
  167. func (x *Pod) GetRamByteHours() int64 {
  168. if x != nil {
  169. return x.RamByteHours
  170. }
  171. return 0
  172. }
  173. func (x *Pod) GetRamBytesRequestAverage() int64 {
  174. if x != nil {
  175. return x.RamBytesRequestAverage
  176. }
  177. return 0
  178. }
  179. func (x *Pod) GetRamBytesUsageAverage() int64 {
  180. if x != nil {
  181. return x.RamBytesUsageAverage
  182. }
  183. return 0
  184. }
  185. func (x *Pod) GetRamBytesUsageMax() int64 {
  186. if x != nil {
  187. return x.RamBytesUsageMax
  188. }
  189. return 0
  190. }
  191. func (x *Pod) GetStorageByteHours() int64 {
  192. if x != nil {
  193. return x.StorageByteHours
  194. }
  195. return 0
  196. }
  197. func (x *Pod) GetNetworkTransferBytes() int64 {
  198. if x != nil {
  199. return x.NetworkTransferBytes
  200. }
  201. return 0
  202. }
  203. func (x *Pod) GetNetworkReceiveBytes() int64 {
  204. if x != nil {
  205. return x.NetworkReceiveBytes
  206. }
  207. return 0
  208. }
  209. func (x *Pod) GetDiagnostic() *DiagnosticResult {
  210. if x != nil {
  211. return x.Diagnostic
  212. }
  213. return nil
  214. }
  215. var File_kubemodel_pod_proto protoreflect.FileDescriptor
  216. const file_kubemodel_pod_proto_rawDesc = "" +
  217. "\n" +
  218. "\x13kubemodel/pod.proto\x12\tkubemodel\x1a\x1akubemodel/diagnostic.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xfa\b\n" +
  219. "\x03Pod\x12\x0e\n" +
  220. "\x02ID\x18\x01 \x01(\tR\x02ID\x12 \n" +
  221. "\vnamespaceID\x18\x02 \x01(\tR\vnamespaceID\x12\"\n" +
  222. "\fcontrollerID\x18\x03 \x01(\tR\fcontrollerID\x12\x16\n" +
  223. "\x06nodeID\x18\x04 \x01(\tR\x06nodeID\x12\x12\n" +
  224. "\x04name\x18\x05 \x01(\tR\x04name\x122\n" +
  225. "\x06labels\x18\x06 \x03(\v2\x1a.kubemodel.Pod.LabelsEntryR\x06labels\x12A\n" +
  226. "\vannotations\x18\a \x03(\v2\x1f.kubemodel.Pod.AnnotationsEntryR\vannotations\x12C\n" +
  227. "\fcreationTime\x18\b \x01(\v2\x1a.google.protobuf.TimestampH\x00R\fcreationTime\x88\x01\x01\x12C\n" +
  228. "\fdeletionTime\x18\t \x01(\v2\x1a.google.protobuf.TimestampH\x01R\fdeletionTime\x88\x01\x01\x12\"\n" +
  229. "\fcpuCoreHours\x18\n" +
  230. " \x01(\x02R\fcpuCoreHours\x124\n" +
  231. "\x15cpuCoreRequestAverage\x18\v \x01(\x02R\x15cpuCoreRequestAverage\x120\n" +
  232. "\x13cpuCoreUsageAverage\x18\f \x01(\x02R\x13cpuCoreUsageAverage\x12(\n" +
  233. "\x0fcpuCoreUsageMax\x18\r \x01(\x02R\x0fcpuCoreUsageMax\x12\"\n" +
  234. "\framByteHours\x18\x0e \x01(\x03R\framByteHours\x126\n" +
  235. "\x16ramBytesRequestAverage\x18\x0f \x01(\x03R\x16ramBytesRequestAverage\x122\n" +
  236. "\x14ramBytesUsageAverage\x18\x10 \x01(\x03R\x14ramBytesUsageAverage\x12*\n" +
  237. "\x10ramBytesUsageMax\x18\x11 \x01(\x03R\x10ramBytesUsageMax\x12*\n" +
  238. "\x10storageByteHours\x18\x12 \x01(\x03R\x10storageByteHours\x122\n" +
  239. "\x14networkTransferBytes\x18\x13 \x01(\x03R\x14networkTransferBytes\x120\n" +
  240. "\x13networkReceiveBytes\x18\x14 \x01(\x03R\x13networkReceiveBytes\x12@\n" +
  241. "\n" +
  242. "diagnostic\x18c \x01(\v2\x1b.kubemodel.DiagnosticResultH\x02R\n" +
  243. "diagnostic\x88\x01\x01\x1a9\n" +
  244. "\vLabelsEntry\x12\x10\n" +
  245. "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
  246. "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\x1a>\n" +
  247. "\x10AnnotationsEntry\x12\x10\n" +
  248. "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
  249. "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01B\x0f\n" +
  250. "\r_creationTimeB\x0f\n" +
  251. "\r_deletionTimeB\r\n" +
  252. "\v_diagnosticB:Z8github.com/opencost/opencost/core/pkg/model/pb/kubemodelb\x06proto3"
  253. var (
  254. file_kubemodel_pod_proto_rawDescOnce sync.Once
  255. file_kubemodel_pod_proto_rawDescData []byte
  256. )
  257. func file_kubemodel_pod_proto_rawDescGZIP() []byte {
  258. file_kubemodel_pod_proto_rawDescOnce.Do(func() {
  259. file_kubemodel_pod_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_kubemodel_pod_proto_rawDesc), len(file_kubemodel_pod_proto_rawDesc)))
  260. })
  261. return file_kubemodel_pod_proto_rawDescData
  262. }
  263. var file_kubemodel_pod_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
  264. var file_kubemodel_pod_proto_goTypes = []any{
  265. (*Pod)(nil), // 0: kubemodel.Pod
  266. nil, // 1: kubemodel.Pod.LabelsEntry
  267. nil, // 2: kubemodel.Pod.AnnotationsEntry
  268. (*timestamppb.Timestamp)(nil), // 3: google.protobuf.Timestamp
  269. (*DiagnosticResult)(nil), // 4: kubemodel.DiagnosticResult
  270. }
  271. var file_kubemodel_pod_proto_depIdxs = []int32{
  272. 1, // 0: kubemodel.Pod.labels:type_name -> kubemodel.Pod.LabelsEntry
  273. 2, // 1: kubemodel.Pod.annotations:type_name -> kubemodel.Pod.AnnotationsEntry
  274. 3, // 2: kubemodel.Pod.creationTime:type_name -> google.protobuf.Timestamp
  275. 3, // 3: kubemodel.Pod.deletionTime:type_name -> google.protobuf.Timestamp
  276. 4, // 4: kubemodel.Pod.diagnostic:type_name -> kubemodel.DiagnosticResult
  277. 5, // [5:5] is the sub-list for method output_type
  278. 5, // [5:5] is the sub-list for method input_type
  279. 5, // [5:5] is the sub-list for extension type_name
  280. 5, // [5:5] is the sub-list for extension extendee
  281. 0, // [0:5] is the sub-list for field type_name
  282. }
  283. func init() { file_kubemodel_pod_proto_init() }
  284. func file_kubemodel_pod_proto_init() {
  285. if File_kubemodel_pod_proto != nil {
  286. return
  287. }
  288. file_kubemodel_diagnostic_proto_init()
  289. file_kubemodel_pod_proto_msgTypes[0].OneofWrappers = []any{}
  290. type x struct{}
  291. out := protoimpl.TypeBuilder{
  292. File: protoimpl.DescBuilder{
  293. GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
  294. RawDescriptor: unsafe.Slice(unsafe.StringData(file_kubemodel_pod_proto_rawDesc), len(file_kubemodel_pod_proto_rawDesc)),
  295. NumEnums: 0,
  296. NumMessages: 3,
  297. NumExtensions: 0,
  298. NumServices: 0,
  299. },
  300. GoTypes: file_kubemodel_pod_proto_goTypes,
  301. DependencyIndexes: file_kubemodel_pod_proto_depIdxs,
  302. MessageInfos: file_kubemodel_pod_proto_msgTypes,
  303. }.Build()
  304. File_kubemodel_pod_proto = out.File
  305. file_kubemodel_pod_proto_goTypes = nil
  306. file_kubemodel_pod_proto_depIdxs = nil
  307. }