storage.pb.go 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418
  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/storage.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. // Volume represents a persistent volume (provisioned resource)
  22. type Volume struct {
  23. state protoimpl.MessageState `protogen:"open.v1"`
  24. // Identification
  25. ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"`
  26. ClusterID string `protobuf:"bytes,2,opt,name=clusterID,proto3" json:"clusterID,omitempty"`
  27. // Properties
  28. Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
  29. StorageClass string `protobuf:"bytes,4,opt,name=storageClass,proto3" json:"storageClass,omitempty"`
  30. Labels map[string]string `protobuf:"bytes,5,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
  31. Annotations map[string]string `protobuf:"bytes,6,rep,name=annotations,proto3" json:"annotations,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
  32. // Resource lifecycle (only when different from cluster window)
  33. CreationTime *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=creationTime,proto3,oneof" json:"creationTime,omitempty"`
  34. DeletionTime *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=deletionTime,proto3,oneof" json:"deletionTime,omitempty"`
  35. // Usage metrics
  36. // Storage capacity in bytes
  37. CapacityBytes int64 `protobuf:"varint,9,opt,name=capacityBytes,proto3" json:"capacityBytes,omitempty"`
  38. // Diagnostic information about this resource
  39. Diagnostic *DiagnosticResult `protobuf:"bytes,99,opt,name=diagnostic,proto3,oneof" json:"diagnostic,omitempty"`
  40. unknownFields protoimpl.UnknownFields
  41. sizeCache protoimpl.SizeCache
  42. }
  43. func (x *Volume) Reset() {
  44. *x = Volume{}
  45. mi := &file_kubemodel_storage_proto_msgTypes[0]
  46. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  47. ms.StoreMessageInfo(mi)
  48. }
  49. func (x *Volume) String() string {
  50. return protoimpl.X.MessageStringOf(x)
  51. }
  52. func (*Volume) ProtoMessage() {}
  53. func (x *Volume) ProtoReflect() protoreflect.Message {
  54. mi := &file_kubemodel_storage_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 Volume.ProtoReflect.Descriptor instead.
  65. func (*Volume) Descriptor() ([]byte, []int) {
  66. return file_kubemodel_storage_proto_rawDescGZIP(), []int{0}
  67. }
  68. func (x *Volume) GetID() string {
  69. if x != nil {
  70. return x.ID
  71. }
  72. return ""
  73. }
  74. func (x *Volume) GetClusterID() string {
  75. if x != nil {
  76. return x.ClusterID
  77. }
  78. return ""
  79. }
  80. func (x *Volume) GetName() string {
  81. if x != nil {
  82. return x.Name
  83. }
  84. return ""
  85. }
  86. func (x *Volume) GetStorageClass() string {
  87. if x != nil {
  88. return x.StorageClass
  89. }
  90. return ""
  91. }
  92. func (x *Volume) GetLabels() map[string]string {
  93. if x != nil {
  94. return x.Labels
  95. }
  96. return nil
  97. }
  98. func (x *Volume) GetAnnotations() map[string]string {
  99. if x != nil {
  100. return x.Annotations
  101. }
  102. return nil
  103. }
  104. func (x *Volume) GetCreationTime() *timestamppb.Timestamp {
  105. if x != nil {
  106. return x.CreationTime
  107. }
  108. return nil
  109. }
  110. func (x *Volume) GetDeletionTime() *timestamppb.Timestamp {
  111. if x != nil {
  112. return x.DeletionTime
  113. }
  114. return nil
  115. }
  116. func (x *Volume) GetCapacityBytes() int64 {
  117. if x != nil {
  118. return x.CapacityBytes
  119. }
  120. return 0
  121. }
  122. func (x *Volume) GetDiagnostic() *DiagnosticResult {
  123. if x != nil {
  124. return x.Diagnostic
  125. }
  126. return nil
  127. }
  128. // PersistentVolumeClaim represents a PVC (allocated resource) that refers to a Volume
  129. type PersistentVolumeClaim struct {
  130. state protoimpl.MessageState `protogen:"open.v1"`
  131. // Identification
  132. ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"`
  133. NamespaceID string `protobuf:"bytes,2,opt,name=namespaceID,proto3" json:"namespaceID,omitempty"`
  134. VolumeID *string `protobuf:"bytes,3,opt,name=volumeID,proto3,oneof" json:"volumeID,omitempty"`
  135. PodID *string `protobuf:"bytes,4,opt,name=podID,proto3,oneof" json:"podID,omitempty"`
  136. // Properties
  137. Name string `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"`
  138. StorageClass string `protobuf:"bytes,6,opt,name=storageClass,proto3" json:"storageClass,omitempty"`
  139. Labels map[string]string `protobuf:"bytes,7,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
  140. Annotations map[string]string `protobuf:"bytes,8,rep,name=annotations,proto3" json:"annotations,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
  141. // Resource lifecycle (only when different from cluster window)
  142. CreationTime *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=creationTime,proto3,oneof" json:"creationTime,omitempty"`
  143. DeletionTime *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=deletionTime,proto3,oneof" json:"deletionTime,omitempty"`
  144. // Usage metrics
  145. // Storage usage in byte-hours
  146. StorageByteHours int64 `protobuf:"varint,11,opt,name=storageByteHours,proto3" json:"storageByteHours,omitempty"`
  147. // Requested storage capacity in bytes
  148. RequestedBytes int64 `protobuf:"varint,12,opt,name=requestedBytes,proto3" json:"requestedBytes,omitempty"`
  149. // Diagnostic information about this resource
  150. Diagnostic *DiagnosticResult `protobuf:"bytes,99,opt,name=diagnostic,proto3,oneof" json:"diagnostic,omitempty"`
  151. unknownFields protoimpl.UnknownFields
  152. sizeCache protoimpl.SizeCache
  153. }
  154. func (x *PersistentVolumeClaim) Reset() {
  155. *x = PersistentVolumeClaim{}
  156. mi := &file_kubemodel_storage_proto_msgTypes[1]
  157. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  158. ms.StoreMessageInfo(mi)
  159. }
  160. func (x *PersistentVolumeClaim) String() string {
  161. return protoimpl.X.MessageStringOf(x)
  162. }
  163. func (*PersistentVolumeClaim) ProtoMessage() {}
  164. func (x *PersistentVolumeClaim) ProtoReflect() protoreflect.Message {
  165. mi := &file_kubemodel_storage_proto_msgTypes[1]
  166. if x != nil {
  167. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  168. if ms.LoadMessageInfo() == nil {
  169. ms.StoreMessageInfo(mi)
  170. }
  171. return ms
  172. }
  173. return mi.MessageOf(x)
  174. }
  175. // Deprecated: Use PersistentVolumeClaim.ProtoReflect.Descriptor instead.
  176. func (*PersistentVolumeClaim) Descriptor() ([]byte, []int) {
  177. return file_kubemodel_storage_proto_rawDescGZIP(), []int{1}
  178. }
  179. func (x *PersistentVolumeClaim) GetID() string {
  180. if x != nil {
  181. return x.ID
  182. }
  183. return ""
  184. }
  185. func (x *PersistentVolumeClaim) GetNamespaceID() string {
  186. if x != nil {
  187. return x.NamespaceID
  188. }
  189. return ""
  190. }
  191. func (x *PersistentVolumeClaim) GetVolumeID() string {
  192. if x != nil && x.VolumeID != nil {
  193. return *x.VolumeID
  194. }
  195. return ""
  196. }
  197. func (x *PersistentVolumeClaim) GetPodID() string {
  198. if x != nil && x.PodID != nil {
  199. return *x.PodID
  200. }
  201. return ""
  202. }
  203. func (x *PersistentVolumeClaim) GetName() string {
  204. if x != nil {
  205. return x.Name
  206. }
  207. return ""
  208. }
  209. func (x *PersistentVolumeClaim) GetStorageClass() string {
  210. if x != nil {
  211. return x.StorageClass
  212. }
  213. return ""
  214. }
  215. func (x *PersistentVolumeClaim) GetLabels() map[string]string {
  216. if x != nil {
  217. return x.Labels
  218. }
  219. return nil
  220. }
  221. func (x *PersistentVolumeClaim) GetAnnotations() map[string]string {
  222. if x != nil {
  223. return x.Annotations
  224. }
  225. return nil
  226. }
  227. func (x *PersistentVolumeClaim) GetCreationTime() *timestamppb.Timestamp {
  228. if x != nil {
  229. return x.CreationTime
  230. }
  231. return nil
  232. }
  233. func (x *PersistentVolumeClaim) GetDeletionTime() *timestamppb.Timestamp {
  234. if x != nil {
  235. return x.DeletionTime
  236. }
  237. return nil
  238. }
  239. func (x *PersistentVolumeClaim) GetStorageByteHours() int64 {
  240. if x != nil {
  241. return x.StorageByteHours
  242. }
  243. return 0
  244. }
  245. func (x *PersistentVolumeClaim) GetRequestedBytes() int64 {
  246. if x != nil {
  247. return x.RequestedBytes
  248. }
  249. return 0
  250. }
  251. func (x *PersistentVolumeClaim) GetDiagnostic() *DiagnosticResult {
  252. if x != nil {
  253. return x.Diagnostic
  254. }
  255. return nil
  256. }
  257. var File_kubemodel_storage_proto protoreflect.FileDescriptor
  258. const file_kubemodel_storage_proto_rawDesc = "" +
  259. "\n" +
  260. "\x17kubemodel/storage.proto\x12\tkubemodel\x1a\x1akubemodel/diagnostic.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x89\x05\n" +
  261. "\x06Volume\x12\x0e\n" +
  262. "\x02ID\x18\x01 \x01(\tR\x02ID\x12\x1c\n" +
  263. "\tclusterID\x18\x02 \x01(\tR\tclusterID\x12\x12\n" +
  264. "\x04name\x18\x03 \x01(\tR\x04name\x12\"\n" +
  265. "\fstorageClass\x18\x04 \x01(\tR\fstorageClass\x125\n" +
  266. "\x06labels\x18\x05 \x03(\v2\x1d.kubemodel.Volume.LabelsEntryR\x06labels\x12D\n" +
  267. "\vannotations\x18\x06 \x03(\v2\".kubemodel.Volume.AnnotationsEntryR\vannotations\x12C\n" +
  268. "\fcreationTime\x18\a \x01(\v2\x1a.google.protobuf.TimestampH\x00R\fcreationTime\x88\x01\x01\x12C\n" +
  269. "\fdeletionTime\x18\b \x01(\v2\x1a.google.protobuf.TimestampH\x01R\fdeletionTime\x88\x01\x01\x12$\n" +
  270. "\rcapacityBytes\x18\t \x01(\x03R\rcapacityBytes\x12@\n" +
  271. "\n" +
  272. "diagnostic\x18c \x01(\v2\x1b.kubemodel.DiagnosticResultH\x02R\n" +
  273. "diagnostic\x88\x01\x01\x1a9\n" +
  274. "\vLabelsEntry\x12\x10\n" +
  275. "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
  276. "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\x1a>\n" +
  277. "\x10AnnotationsEntry\x12\x10\n" +
  278. "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
  279. "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01B\x0f\n" +
  280. "\r_creationTimeB\x0f\n" +
  281. "\r_deletionTimeB\r\n" +
  282. "\v_diagnostic\"\xbb\x06\n" +
  283. "\x15PersistentVolumeClaim\x12\x0e\n" +
  284. "\x02ID\x18\x01 \x01(\tR\x02ID\x12 \n" +
  285. "\vnamespaceID\x18\x02 \x01(\tR\vnamespaceID\x12\x1f\n" +
  286. "\bvolumeID\x18\x03 \x01(\tH\x00R\bvolumeID\x88\x01\x01\x12\x19\n" +
  287. "\x05podID\x18\x04 \x01(\tH\x01R\x05podID\x88\x01\x01\x12\x12\n" +
  288. "\x04name\x18\x05 \x01(\tR\x04name\x12\"\n" +
  289. "\fstorageClass\x18\x06 \x01(\tR\fstorageClass\x12D\n" +
  290. "\x06labels\x18\a \x03(\v2,.kubemodel.PersistentVolumeClaim.LabelsEntryR\x06labels\x12S\n" +
  291. "\vannotations\x18\b \x03(\v21.kubemodel.PersistentVolumeClaim.AnnotationsEntryR\vannotations\x12C\n" +
  292. "\fcreationTime\x18\t \x01(\v2\x1a.google.protobuf.TimestampH\x02R\fcreationTime\x88\x01\x01\x12C\n" +
  293. "\fdeletionTime\x18\n" +
  294. " \x01(\v2\x1a.google.protobuf.TimestampH\x03R\fdeletionTime\x88\x01\x01\x12*\n" +
  295. "\x10storageByteHours\x18\v \x01(\x03R\x10storageByteHours\x12&\n" +
  296. "\x0erequestedBytes\x18\f \x01(\x03R\x0erequestedBytes\x12@\n" +
  297. "\n" +
  298. "diagnostic\x18c \x01(\v2\x1b.kubemodel.DiagnosticResultH\x04R\n" +
  299. "diagnostic\x88\x01\x01\x1a9\n" +
  300. "\vLabelsEntry\x12\x10\n" +
  301. "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
  302. "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\x1a>\n" +
  303. "\x10AnnotationsEntry\x12\x10\n" +
  304. "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
  305. "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01B\v\n" +
  306. "\t_volumeIDB\b\n" +
  307. "\x06_podIDB\x0f\n" +
  308. "\r_creationTimeB\x0f\n" +
  309. "\r_deletionTimeB\r\n" +
  310. "\v_diagnosticB:Z8github.com/opencost/opencost/core/pkg/model/pb/kubemodelb\x06proto3"
  311. var (
  312. file_kubemodel_storage_proto_rawDescOnce sync.Once
  313. file_kubemodel_storage_proto_rawDescData []byte
  314. )
  315. func file_kubemodel_storage_proto_rawDescGZIP() []byte {
  316. file_kubemodel_storage_proto_rawDescOnce.Do(func() {
  317. file_kubemodel_storage_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_kubemodel_storage_proto_rawDesc), len(file_kubemodel_storage_proto_rawDesc)))
  318. })
  319. return file_kubemodel_storage_proto_rawDescData
  320. }
  321. var file_kubemodel_storage_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
  322. var file_kubemodel_storage_proto_goTypes = []any{
  323. (*Volume)(nil), // 0: kubemodel.Volume
  324. (*PersistentVolumeClaim)(nil), // 1: kubemodel.PersistentVolumeClaim
  325. nil, // 2: kubemodel.Volume.LabelsEntry
  326. nil, // 3: kubemodel.Volume.AnnotationsEntry
  327. nil, // 4: kubemodel.PersistentVolumeClaim.LabelsEntry
  328. nil, // 5: kubemodel.PersistentVolumeClaim.AnnotationsEntry
  329. (*timestamppb.Timestamp)(nil), // 6: google.protobuf.Timestamp
  330. (*DiagnosticResult)(nil), // 7: kubemodel.DiagnosticResult
  331. }
  332. var file_kubemodel_storage_proto_depIdxs = []int32{
  333. 2, // 0: kubemodel.Volume.labels:type_name -> kubemodel.Volume.LabelsEntry
  334. 3, // 1: kubemodel.Volume.annotations:type_name -> kubemodel.Volume.AnnotationsEntry
  335. 6, // 2: kubemodel.Volume.creationTime:type_name -> google.protobuf.Timestamp
  336. 6, // 3: kubemodel.Volume.deletionTime:type_name -> google.protobuf.Timestamp
  337. 7, // 4: kubemodel.Volume.diagnostic:type_name -> kubemodel.DiagnosticResult
  338. 4, // 5: kubemodel.PersistentVolumeClaim.labels:type_name -> kubemodel.PersistentVolumeClaim.LabelsEntry
  339. 5, // 6: kubemodel.PersistentVolumeClaim.annotations:type_name -> kubemodel.PersistentVolumeClaim.AnnotationsEntry
  340. 6, // 7: kubemodel.PersistentVolumeClaim.creationTime:type_name -> google.protobuf.Timestamp
  341. 6, // 8: kubemodel.PersistentVolumeClaim.deletionTime:type_name -> google.protobuf.Timestamp
  342. 7, // 9: kubemodel.PersistentVolumeClaim.diagnostic:type_name -> kubemodel.DiagnosticResult
  343. 10, // [10:10] is the sub-list for method output_type
  344. 10, // [10:10] is the sub-list for method input_type
  345. 10, // [10:10] is the sub-list for extension type_name
  346. 10, // [10:10] is the sub-list for extension extendee
  347. 0, // [0:10] is the sub-list for field type_name
  348. }
  349. func init() { file_kubemodel_storage_proto_init() }
  350. func file_kubemodel_storage_proto_init() {
  351. if File_kubemodel_storage_proto != nil {
  352. return
  353. }
  354. file_kubemodel_diagnostic_proto_init()
  355. file_kubemodel_storage_proto_msgTypes[0].OneofWrappers = []any{}
  356. file_kubemodel_storage_proto_msgTypes[1].OneofWrappers = []any{}
  357. type x struct{}
  358. out := protoimpl.TypeBuilder{
  359. File: protoimpl.DescBuilder{
  360. GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
  361. RawDescriptor: unsafe.Slice(unsafe.StringData(file_kubemodel_storage_proto_rawDesc), len(file_kubemodel_storage_proto_rawDesc)),
  362. NumEnums: 0,
  363. NumMessages: 6,
  364. NumExtensions: 0,
  365. NumServices: 0,
  366. },
  367. GoTypes: file_kubemodel_storage_proto_goTypes,
  368. DependencyIndexes: file_kubemodel_storage_proto_depIdxs,
  369. MessageInfos: file_kubemodel_storage_proto_msgTypes,
  370. }.Build()
  371. File_kubemodel_storage_proto = out.File
  372. file_kubemodel_storage_proto_goTypes = nil
  373. file_kubemodel_storage_proto_depIdxs = nil
  374. }