| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418 |
- // Code generated by protoc-gen-go. DO NOT EDIT.
- // versions:
- // protoc-gen-go v1.36.9
- // protoc v6.32.1
- // source: kubemodel/storage.proto
- package kubemodel
- import (
- protoreflect "google.golang.org/protobuf/reflect/protoreflect"
- protoimpl "google.golang.org/protobuf/runtime/protoimpl"
- timestamppb "google.golang.org/protobuf/types/known/timestamppb"
- reflect "reflect"
- sync "sync"
- unsafe "unsafe"
- )
- const (
- // Verify that this generated code is sufficiently up-to-date.
- _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
- // Verify that runtime/protoimpl is sufficiently up-to-date.
- _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
- )
- // Volume represents a persistent volume (provisioned resource)
- type Volume struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- // Identification
- ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"`
- ClusterID string `protobuf:"bytes,2,opt,name=clusterID,proto3" json:"clusterID,omitempty"`
- // Properties
- Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
- StorageClass string `protobuf:"bytes,4,opt,name=storageClass,proto3" json:"storageClass,omitempty"`
- 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"`
- 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"`
- // Resource lifecycle (only when different from cluster window)
- CreationTime *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=creationTime,proto3,oneof" json:"creationTime,omitempty"`
- DeletionTime *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=deletionTime,proto3,oneof" json:"deletionTime,omitempty"`
- // Usage metrics
- // Storage capacity in bytes
- CapacityBytes int64 `protobuf:"varint,9,opt,name=capacityBytes,proto3" json:"capacityBytes,omitempty"`
- // Diagnostic information about this resource
- Diagnostic *DiagnosticResult `protobuf:"bytes,99,opt,name=diagnostic,proto3,oneof" json:"diagnostic,omitempty"`
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
- }
- func (x *Volume) Reset() {
- *x = Volume{}
- mi := &file_kubemodel_storage_proto_msgTypes[0]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
- func (x *Volume) String() string {
- return protoimpl.X.MessageStringOf(x)
- }
- func (*Volume) ProtoMessage() {}
- func (x *Volume) ProtoReflect() protoreflect.Message {
- mi := &file_kubemodel_storage_proto_msgTypes[0]
- if x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
- }
- // Deprecated: Use Volume.ProtoReflect.Descriptor instead.
- func (*Volume) Descriptor() ([]byte, []int) {
- return file_kubemodel_storage_proto_rawDescGZIP(), []int{0}
- }
- func (x *Volume) GetID() string {
- if x != nil {
- return x.ID
- }
- return ""
- }
- func (x *Volume) GetClusterID() string {
- if x != nil {
- return x.ClusterID
- }
- return ""
- }
- func (x *Volume) GetName() string {
- if x != nil {
- return x.Name
- }
- return ""
- }
- func (x *Volume) GetStorageClass() string {
- if x != nil {
- return x.StorageClass
- }
- return ""
- }
- func (x *Volume) GetLabels() map[string]string {
- if x != nil {
- return x.Labels
- }
- return nil
- }
- func (x *Volume) GetAnnotations() map[string]string {
- if x != nil {
- return x.Annotations
- }
- return nil
- }
- func (x *Volume) GetCreationTime() *timestamppb.Timestamp {
- if x != nil {
- return x.CreationTime
- }
- return nil
- }
- func (x *Volume) GetDeletionTime() *timestamppb.Timestamp {
- if x != nil {
- return x.DeletionTime
- }
- return nil
- }
- func (x *Volume) GetCapacityBytes() int64 {
- if x != nil {
- return x.CapacityBytes
- }
- return 0
- }
- func (x *Volume) GetDiagnostic() *DiagnosticResult {
- if x != nil {
- return x.Diagnostic
- }
- return nil
- }
- // PersistentVolumeClaim represents a PVC (allocated resource) that refers to a Volume
- type PersistentVolumeClaim struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- // Identification
- ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"`
- NamespaceID string `protobuf:"bytes,2,opt,name=namespaceID,proto3" json:"namespaceID,omitempty"`
- VolumeID *string `protobuf:"bytes,3,opt,name=volumeID,proto3,oneof" json:"volumeID,omitempty"`
- PodID *string `protobuf:"bytes,4,opt,name=podID,proto3,oneof" json:"podID,omitempty"`
- // Properties
- Name string `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"`
- StorageClass string `protobuf:"bytes,6,opt,name=storageClass,proto3" json:"storageClass,omitempty"`
- 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"`
- 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"`
- // Resource lifecycle (only when different from cluster window)
- CreationTime *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=creationTime,proto3,oneof" json:"creationTime,omitempty"`
- DeletionTime *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=deletionTime,proto3,oneof" json:"deletionTime,omitempty"`
- // Usage metrics
- // Storage usage in byte-hours
- StorageByteHours int64 `protobuf:"varint,11,opt,name=storageByteHours,proto3" json:"storageByteHours,omitempty"`
- // Requested storage capacity in bytes
- RequestedBytes int64 `protobuf:"varint,12,opt,name=requestedBytes,proto3" json:"requestedBytes,omitempty"`
- // Diagnostic information about this resource
- Diagnostic *DiagnosticResult `protobuf:"bytes,99,opt,name=diagnostic,proto3,oneof" json:"diagnostic,omitempty"`
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
- }
- func (x *PersistentVolumeClaim) Reset() {
- *x = PersistentVolumeClaim{}
- mi := &file_kubemodel_storage_proto_msgTypes[1]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
- func (x *PersistentVolumeClaim) String() string {
- return protoimpl.X.MessageStringOf(x)
- }
- func (*PersistentVolumeClaim) ProtoMessage() {}
- func (x *PersistentVolumeClaim) ProtoReflect() protoreflect.Message {
- mi := &file_kubemodel_storage_proto_msgTypes[1]
- if x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
- }
- // Deprecated: Use PersistentVolumeClaim.ProtoReflect.Descriptor instead.
- func (*PersistentVolumeClaim) Descriptor() ([]byte, []int) {
- return file_kubemodel_storage_proto_rawDescGZIP(), []int{1}
- }
- func (x *PersistentVolumeClaim) GetID() string {
- if x != nil {
- return x.ID
- }
- return ""
- }
- func (x *PersistentVolumeClaim) GetNamespaceID() string {
- if x != nil {
- return x.NamespaceID
- }
- return ""
- }
- func (x *PersistentVolumeClaim) GetVolumeID() string {
- if x != nil && x.VolumeID != nil {
- return *x.VolumeID
- }
- return ""
- }
- func (x *PersistentVolumeClaim) GetPodID() string {
- if x != nil && x.PodID != nil {
- return *x.PodID
- }
- return ""
- }
- func (x *PersistentVolumeClaim) GetName() string {
- if x != nil {
- return x.Name
- }
- return ""
- }
- func (x *PersistentVolumeClaim) GetStorageClass() string {
- if x != nil {
- return x.StorageClass
- }
- return ""
- }
- func (x *PersistentVolumeClaim) GetLabels() map[string]string {
- if x != nil {
- return x.Labels
- }
- return nil
- }
- func (x *PersistentVolumeClaim) GetAnnotations() map[string]string {
- if x != nil {
- return x.Annotations
- }
- return nil
- }
- func (x *PersistentVolumeClaim) GetCreationTime() *timestamppb.Timestamp {
- if x != nil {
- return x.CreationTime
- }
- return nil
- }
- func (x *PersistentVolumeClaim) GetDeletionTime() *timestamppb.Timestamp {
- if x != nil {
- return x.DeletionTime
- }
- return nil
- }
- func (x *PersistentVolumeClaim) GetStorageByteHours() int64 {
- if x != nil {
- return x.StorageByteHours
- }
- return 0
- }
- func (x *PersistentVolumeClaim) GetRequestedBytes() int64 {
- if x != nil {
- return x.RequestedBytes
- }
- return 0
- }
- func (x *PersistentVolumeClaim) GetDiagnostic() *DiagnosticResult {
- if x != nil {
- return x.Diagnostic
- }
- return nil
- }
- var File_kubemodel_storage_proto protoreflect.FileDescriptor
- const file_kubemodel_storage_proto_rawDesc = "" +
- "\n" +
- "\x17kubemodel/storage.proto\x12\tkubemodel\x1a\x1akubemodel/diagnostic.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x89\x05\n" +
- "\x06Volume\x12\x0e\n" +
- "\x02ID\x18\x01 \x01(\tR\x02ID\x12\x1c\n" +
- "\tclusterID\x18\x02 \x01(\tR\tclusterID\x12\x12\n" +
- "\x04name\x18\x03 \x01(\tR\x04name\x12\"\n" +
- "\fstorageClass\x18\x04 \x01(\tR\fstorageClass\x125\n" +
- "\x06labels\x18\x05 \x03(\v2\x1d.kubemodel.Volume.LabelsEntryR\x06labels\x12D\n" +
- "\vannotations\x18\x06 \x03(\v2\".kubemodel.Volume.AnnotationsEntryR\vannotations\x12C\n" +
- "\fcreationTime\x18\a \x01(\v2\x1a.google.protobuf.TimestampH\x00R\fcreationTime\x88\x01\x01\x12C\n" +
- "\fdeletionTime\x18\b \x01(\v2\x1a.google.protobuf.TimestampH\x01R\fdeletionTime\x88\x01\x01\x12$\n" +
- "\rcapacityBytes\x18\t \x01(\x03R\rcapacityBytes\x12@\n" +
- "\n" +
- "diagnostic\x18c \x01(\v2\x1b.kubemodel.DiagnosticResultH\x02R\n" +
- "diagnostic\x88\x01\x01\x1a9\n" +
- "\vLabelsEntry\x12\x10\n" +
- "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
- "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\x1a>\n" +
- "\x10AnnotationsEntry\x12\x10\n" +
- "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
- "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01B\x0f\n" +
- "\r_creationTimeB\x0f\n" +
- "\r_deletionTimeB\r\n" +
- "\v_diagnostic\"\xbb\x06\n" +
- "\x15PersistentVolumeClaim\x12\x0e\n" +
- "\x02ID\x18\x01 \x01(\tR\x02ID\x12 \n" +
- "\vnamespaceID\x18\x02 \x01(\tR\vnamespaceID\x12\x1f\n" +
- "\bvolumeID\x18\x03 \x01(\tH\x00R\bvolumeID\x88\x01\x01\x12\x19\n" +
- "\x05podID\x18\x04 \x01(\tH\x01R\x05podID\x88\x01\x01\x12\x12\n" +
- "\x04name\x18\x05 \x01(\tR\x04name\x12\"\n" +
- "\fstorageClass\x18\x06 \x01(\tR\fstorageClass\x12D\n" +
- "\x06labels\x18\a \x03(\v2,.kubemodel.PersistentVolumeClaim.LabelsEntryR\x06labels\x12S\n" +
- "\vannotations\x18\b \x03(\v21.kubemodel.PersistentVolumeClaim.AnnotationsEntryR\vannotations\x12C\n" +
- "\fcreationTime\x18\t \x01(\v2\x1a.google.protobuf.TimestampH\x02R\fcreationTime\x88\x01\x01\x12C\n" +
- "\fdeletionTime\x18\n" +
- " \x01(\v2\x1a.google.protobuf.TimestampH\x03R\fdeletionTime\x88\x01\x01\x12*\n" +
- "\x10storageByteHours\x18\v \x01(\x03R\x10storageByteHours\x12&\n" +
- "\x0erequestedBytes\x18\f \x01(\x03R\x0erequestedBytes\x12@\n" +
- "\n" +
- "diagnostic\x18c \x01(\v2\x1b.kubemodel.DiagnosticResultH\x04R\n" +
- "diagnostic\x88\x01\x01\x1a9\n" +
- "\vLabelsEntry\x12\x10\n" +
- "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
- "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\x1a>\n" +
- "\x10AnnotationsEntry\x12\x10\n" +
- "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
- "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01B\v\n" +
- "\t_volumeIDB\b\n" +
- "\x06_podIDB\x0f\n" +
- "\r_creationTimeB\x0f\n" +
- "\r_deletionTimeB\r\n" +
- "\v_diagnosticB:Z8github.com/opencost/opencost/core/pkg/model/pb/kubemodelb\x06proto3"
- var (
- file_kubemodel_storage_proto_rawDescOnce sync.Once
- file_kubemodel_storage_proto_rawDescData []byte
- )
- func file_kubemodel_storage_proto_rawDescGZIP() []byte {
- file_kubemodel_storage_proto_rawDescOnce.Do(func() {
- file_kubemodel_storage_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_kubemodel_storage_proto_rawDesc), len(file_kubemodel_storage_proto_rawDesc)))
- })
- return file_kubemodel_storage_proto_rawDescData
- }
- var file_kubemodel_storage_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
- var file_kubemodel_storage_proto_goTypes = []any{
- (*Volume)(nil), // 0: kubemodel.Volume
- (*PersistentVolumeClaim)(nil), // 1: kubemodel.PersistentVolumeClaim
- nil, // 2: kubemodel.Volume.LabelsEntry
- nil, // 3: kubemodel.Volume.AnnotationsEntry
- nil, // 4: kubemodel.PersistentVolumeClaim.LabelsEntry
- nil, // 5: kubemodel.PersistentVolumeClaim.AnnotationsEntry
- (*timestamppb.Timestamp)(nil), // 6: google.protobuf.Timestamp
- (*DiagnosticResult)(nil), // 7: kubemodel.DiagnosticResult
- }
- var file_kubemodel_storage_proto_depIdxs = []int32{
- 2, // 0: kubemodel.Volume.labels:type_name -> kubemodel.Volume.LabelsEntry
- 3, // 1: kubemodel.Volume.annotations:type_name -> kubemodel.Volume.AnnotationsEntry
- 6, // 2: kubemodel.Volume.creationTime:type_name -> google.protobuf.Timestamp
- 6, // 3: kubemodel.Volume.deletionTime:type_name -> google.protobuf.Timestamp
- 7, // 4: kubemodel.Volume.diagnostic:type_name -> kubemodel.DiagnosticResult
- 4, // 5: kubemodel.PersistentVolumeClaim.labels:type_name -> kubemodel.PersistentVolumeClaim.LabelsEntry
- 5, // 6: kubemodel.PersistentVolumeClaim.annotations:type_name -> kubemodel.PersistentVolumeClaim.AnnotationsEntry
- 6, // 7: kubemodel.PersistentVolumeClaim.creationTime:type_name -> google.protobuf.Timestamp
- 6, // 8: kubemodel.PersistentVolumeClaim.deletionTime:type_name -> google.protobuf.Timestamp
- 7, // 9: kubemodel.PersistentVolumeClaim.diagnostic:type_name -> kubemodel.DiagnosticResult
- 10, // [10:10] is the sub-list for method output_type
- 10, // [10:10] is the sub-list for method input_type
- 10, // [10:10] is the sub-list for extension type_name
- 10, // [10:10] is the sub-list for extension extendee
- 0, // [0:10] is the sub-list for field type_name
- }
- func init() { file_kubemodel_storage_proto_init() }
- func file_kubemodel_storage_proto_init() {
- if File_kubemodel_storage_proto != nil {
- return
- }
- file_kubemodel_diagnostic_proto_init()
- file_kubemodel_storage_proto_msgTypes[0].OneofWrappers = []any{}
- file_kubemodel_storage_proto_msgTypes[1].OneofWrappers = []any{}
- type x struct{}
- out := protoimpl.TypeBuilder{
- File: protoimpl.DescBuilder{
- GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
- RawDescriptor: unsafe.Slice(unsafe.StringData(file_kubemodel_storage_proto_rawDesc), len(file_kubemodel_storage_proto_rawDesc)),
- NumEnums: 0,
- NumMessages: 6,
- NumExtensions: 0,
- NumServices: 0,
- },
- GoTypes: file_kubemodel_storage_proto_goTypes,
- DependencyIndexes: file_kubemodel_storage_proto_depIdxs,
- MessageInfos: file_kubemodel_storage_proto_msgTypes,
- }.Build()
- File_kubemodel_storage_proto = out.File
- file_kubemodel_storage_proto_goTypes = nil
- file_kubemodel_storage_proto_depIdxs = nil
- }
|