container.pb.go 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258
  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/container.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. // Container represents a container within a pod (allocated resource)
  22. type Container struct {
  23. state protoimpl.MessageState `protogen:"open.v1"`
  24. // Identification
  25. PodID string `protobuf:"bytes,1,opt,name=podID,proto3" json:"podID,omitempty"`
  26. // Properties
  27. Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
  28. // Resource lifecycle (only when different from cluster window)
  29. CreationTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=creationTime,proto3,oneof" json:"creationTime,omitempty"`
  30. DeletionTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=deletionTime,proto3,oneof" json:"deletionTime,omitempty"`
  31. // Usage metrics
  32. // CPU usage in core-hours
  33. CpuCoreHours float32 `protobuf:"fixed32,5,opt,name=cpuCoreHours,proto3" json:"cpuCoreHours,omitempty"`
  34. // CPU request average in cores
  35. CpuCoreRequestAverage float32 `protobuf:"fixed32,6,opt,name=cpuCoreRequestAverage,proto3" json:"cpuCoreRequestAverage,omitempty"`
  36. // CPU usage average in cores
  37. CpuCoreUsageAverage float32 `protobuf:"fixed32,7,opt,name=cpuCoreUsageAverage,proto3" json:"cpuCoreUsageAverage,omitempty"`
  38. // CPU usage max in cores
  39. CpuCoreUsageMax float32 `protobuf:"fixed32,8,opt,name=cpuCoreUsageMax,proto3" json:"cpuCoreUsageMax,omitempty"`
  40. // RAM usage in byte-hours
  41. RamByteHours int64 `protobuf:"varint,9,opt,name=ramByteHours,proto3" json:"ramByteHours,omitempty"`
  42. // RAM request average in bytes
  43. RamBytesRequestAverage int64 `protobuf:"varint,10,opt,name=ramBytesRequestAverage,proto3" json:"ramBytesRequestAverage,omitempty"`
  44. // RAM usage average in bytes
  45. RamBytesUsageAverage int64 `protobuf:"varint,11,opt,name=ramBytesUsageAverage,proto3" json:"ramBytesUsageAverage,omitempty"`
  46. // RAM usage max in bytes
  47. RamBytesUsageMax int64 `protobuf:"varint,12,opt,name=ramBytesUsageMax,proto3" json:"ramBytesUsageMax,omitempty"`
  48. // Diagnostic information about this resource
  49. Diagnostic *DiagnosticResult `protobuf:"bytes,99,opt,name=diagnostic,proto3,oneof" json:"diagnostic,omitempty"`
  50. unknownFields protoimpl.UnknownFields
  51. sizeCache protoimpl.SizeCache
  52. }
  53. func (x *Container) Reset() {
  54. *x = Container{}
  55. mi := &file_kubemodel_container_proto_msgTypes[0]
  56. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  57. ms.StoreMessageInfo(mi)
  58. }
  59. func (x *Container) String() string {
  60. return protoimpl.X.MessageStringOf(x)
  61. }
  62. func (*Container) ProtoMessage() {}
  63. func (x *Container) ProtoReflect() protoreflect.Message {
  64. mi := &file_kubemodel_container_proto_msgTypes[0]
  65. if x != nil {
  66. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  67. if ms.LoadMessageInfo() == nil {
  68. ms.StoreMessageInfo(mi)
  69. }
  70. return ms
  71. }
  72. return mi.MessageOf(x)
  73. }
  74. // Deprecated: Use Container.ProtoReflect.Descriptor instead.
  75. func (*Container) Descriptor() ([]byte, []int) {
  76. return file_kubemodel_container_proto_rawDescGZIP(), []int{0}
  77. }
  78. func (x *Container) GetPodID() string {
  79. if x != nil {
  80. return x.PodID
  81. }
  82. return ""
  83. }
  84. func (x *Container) GetName() string {
  85. if x != nil {
  86. return x.Name
  87. }
  88. return ""
  89. }
  90. func (x *Container) GetCreationTime() *timestamppb.Timestamp {
  91. if x != nil {
  92. return x.CreationTime
  93. }
  94. return nil
  95. }
  96. func (x *Container) GetDeletionTime() *timestamppb.Timestamp {
  97. if x != nil {
  98. return x.DeletionTime
  99. }
  100. return nil
  101. }
  102. func (x *Container) GetCpuCoreHours() float32 {
  103. if x != nil {
  104. return x.CpuCoreHours
  105. }
  106. return 0
  107. }
  108. func (x *Container) GetCpuCoreRequestAverage() float32 {
  109. if x != nil {
  110. return x.CpuCoreRequestAverage
  111. }
  112. return 0
  113. }
  114. func (x *Container) GetCpuCoreUsageAverage() float32 {
  115. if x != nil {
  116. return x.CpuCoreUsageAverage
  117. }
  118. return 0
  119. }
  120. func (x *Container) GetCpuCoreUsageMax() float32 {
  121. if x != nil {
  122. return x.CpuCoreUsageMax
  123. }
  124. return 0
  125. }
  126. func (x *Container) GetRamByteHours() int64 {
  127. if x != nil {
  128. return x.RamByteHours
  129. }
  130. return 0
  131. }
  132. func (x *Container) GetRamBytesRequestAverage() int64 {
  133. if x != nil {
  134. return x.RamBytesRequestAverage
  135. }
  136. return 0
  137. }
  138. func (x *Container) GetRamBytesUsageAverage() int64 {
  139. if x != nil {
  140. return x.RamBytesUsageAverage
  141. }
  142. return 0
  143. }
  144. func (x *Container) GetRamBytesUsageMax() int64 {
  145. if x != nil {
  146. return x.RamBytesUsageMax
  147. }
  148. return 0
  149. }
  150. func (x *Container) GetDiagnostic() *DiagnosticResult {
  151. if x != nil {
  152. return x.Diagnostic
  153. }
  154. return nil
  155. }
  156. var File_kubemodel_container_proto protoreflect.FileDescriptor
  157. const file_kubemodel_container_proto_rawDesc = "" +
  158. "\n" +
  159. "\x19kubemodel/container.proto\x12\tkubemodel\x1a\x1akubemodel/diagnostic.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa4\x05\n" +
  160. "\tContainer\x12\x14\n" +
  161. "\x05podID\x18\x01 \x01(\tR\x05podID\x12\x12\n" +
  162. "\x04name\x18\x02 \x01(\tR\x04name\x12C\n" +
  163. "\fcreationTime\x18\x03 \x01(\v2\x1a.google.protobuf.TimestampH\x00R\fcreationTime\x88\x01\x01\x12C\n" +
  164. "\fdeletionTime\x18\x04 \x01(\v2\x1a.google.protobuf.TimestampH\x01R\fdeletionTime\x88\x01\x01\x12\"\n" +
  165. "\fcpuCoreHours\x18\x05 \x01(\x02R\fcpuCoreHours\x124\n" +
  166. "\x15cpuCoreRequestAverage\x18\x06 \x01(\x02R\x15cpuCoreRequestAverage\x120\n" +
  167. "\x13cpuCoreUsageAverage\x18\a \x01(\x02R\x13cpuCoreUsageAverage\x12(\n" +
  168. "\x0fcpuCoreUsageMax\x18\b \x01(\x02R\x0fcpuCoreUsageMax\x12\"\n" +
  169. "\framByteHours\x18\t \x01(\x03R\framByteHours\x126\n" +
  170. "\x16ramBytesRequestAverage\x18\n" +
  171. " \x01(\x03R\x16ramBytesRequestAverage\x122\n" +
  172. "\x14ramBytesUsageAverage\x18\v \x01(\x03R\x14ramBytesUsageAverage\x12*\n" +
  173. "\x10ramBytesUsageMax\x18\f \x01(\x03R\x10ramBytesUsageMax\x12@\n" +
  174. "\n" +
  175. "diagnostic\x18c \x01(\v2\x1b.kubemodel.DiagnosticResultH\x02R\n" +
  176. "diagnostic\x88\x01\x01B\x0f\n" +
  177. "\r_creationTimeB\x0f\n" +
  178. "\r_deletionTimeB\r\n" +
  179. "\v_diagnosticB:Z8github.com/opencost/opencost/core/pkg/model/pb/kubemodelb\x06proto3"
  180. var (
  181. file_kubemodel_container_proto_rawDescOnce sync.Once
  182. file_kubemodel_container_proto_rawDescData []byte
  183. )
  184. func file_kubemodel_container_proto_rawDescGZIP() []byte {
  185. file_kubemodel_container_proto_rawDescOnce.Do(func() {
  186. file_kubemodel_container_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_kubemodel_container_proto_rawDesc), len(file_kubemodel_container_proto_rawDesc)))
  187. })
  188. return file_kubemodel_container_proto_rawDescData
  189. }
  190. var file_kubemodel_container_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
  191. var file_kubemodel_container_proto_goTypes = []any{
  192. (*Container)(nil), // 0: kubemodel.Container
  193. (*timestamppb.Timestamp)(nil), // 1: google.protobuf.Timestamp
  194. (*DiagnosticResult)(nil), // 2: kubemodel.DiagnosticResult
  195. }
  196. var file_kubemodel_container_proto_depIdxs = []int32{
  197. 1, // 0: kubemodel.Container.creationTime:type_name -> google.protobuf.Timestamp
  198. 1, // 1: kubemodel.Container.deletionTime:type_name -> google.protobuf.Timestamp
  199. 2, // 2: kubemodel.Container.diagnostic:type_name -> kubemodel.DiagnosticResult
  200. 3, // [3:3] is the sub-list for method output_type
  201. 3, // [3:3] is the sub-list for method input_type
  202. 3, // [3:3] is the sub-list for extension type_name
  203. 3, // [3:3] is the sub-list for extension extendee
  204. 0, // [0:3] is the sub-list for field type_name
  205. }
  206. func init() { file_kubemodel_container_proto_init() }
  207. func file_kubemodel_container_proto_init() {
  208. if File_kubemodel_container_proto != nil {
  209. return
  210. }
  211. file_kubemodel_diagnostic_proto_init()
  212. file_kubemodel_container_proto_msgTypes[0].OneofWrappers = []any{}
  213. type x struct{}
  214. out := protoimpl.TypeBuilder{
  215. File: protoimpl.DescBuilder{
  216. GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
  217. RawDescriptor: unsafe.Slice(unsafe.StringData(file_kubemodel_container_proto_rawDesc), len(file_kubemodel_container_proto_rawDesc)),
  218. NumEnums: 0,
  219. NumMessages: 1,
  220. NumExtensions: 0,
  221. NumServices: 0,
  222. },
  223. GoTypes: file_kubemodel_container_proto_goTypes,
  224. DependencyIndexes: file_kubemodel_container_proto_depIdxs,
  225. MessageInfos: file_kubemodel_container_proto_msgTypes,
  226. }.Build()
  227. File_kubemodel_container_proto = out.File
  228. file_kubemodel_container_proto_goTypes = nil
  229. file_kubemodel_container_proto_depIdxs = nil
  230. }