network.pb.go 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340
  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/network.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. // ServicePort represents a port exposed by a service
  22. type ServicePort struct {
  23. state protoimpl.MessageState `protogen:"open.v1"`
  24. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
  25. Protocol string `protobuf:"bytes,2,opt,name=protocol,proto3" json:"protocol,omitempty"`
  26. Port int32 `protobuf:"varint,3,opt,name=port,proto3" json:"port,omitempty"`
  27. TargetPort int32 `protobuf:"varint,4,opt,name=targetPort,proto3" json:"targetPort,omitempty"`
  28. NodePort int32 `protobuf:"varint,5,opt,name=nodePort,proto3" json:"nodePort,omitempty"`
  29. unknownFields protoimpl.UnknownFields
  30. sizeCache protoimpl.SizeCache
  31. }
  32. func (x *ServicePort) Reset() {
  33. *x = ServicePort{}
  34. mi := &file_kubemodel_network_proto_msgTypes[0]
  35. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  36. ms.StoreMessageInfo(mi)
  37. }
  38. func (x *ServicePort) String() string {
  39. return protoimpl.X.MessageStringOf(x)
  40. }
  41. func (*ServicePort) ProtoMessage() {}
  42. func (x *ServicePort) ProtoReflect() protoreflect.Message {
  43. mi := &file_kubemodel_network_proto_msgTypes[0]
  44. if x != nil {
  45. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  46. if ms.LoadMessageInfo() == nil {
  47. ms.StoreMessageInfo(mi)
  48. }
  49. return ms
  50. }
  51. return mi.MessageOf(x)
  52. }
  53. // Deprecated: Use ServicePort.ProtoReflect.Descriptor instead.
  54. func (*ServicePort) Descriptor() ([]byte, []int) {
  55. return file_kubemodel_network_proto_rawDescGZIP(), []int{0}
  56. }
  57. func (x *ServicePort) GetName() string {
  58. if x != nil {
  59. return x.Name
  60. }
  61. return ""
  62. }
  63. func (x *ServicePort) GetProtocol() string {
  64. if x != nil {
  65. return x.Protocol
  66. }
  67. return ""
  68. }
  69. func (x *ServicePort) GetPort() int32 {
  70. if x != nil {
  71. return x.Port
  72. }
  73. return 0
  74. }
  75. func (x *ServicePort) GetTargetPort() int32 {
  76. if x != nil {
  77. return x.TargetPort
  78. }
  79. return 0
  80. }
  81. func (x *ServicePort) GetNodePort() int32 {
  82. if x != nil {
  83. return x.NodePort
  84. }
  85. return 0
  86. }
  87. // Service represents a K8s Service (allocated resource)
  88. type Service struct {
  89. state protoimpl.MessageState `protogen:"open.v1"`
  90. // Identification
  91. ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"`
  92. ClusterID string `protobuf:"bytes,2,opt,name=clusterID,proto3" json:"clusterID,omitempty"`
  93. // Properties
  94. Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
  95. ServiceType string `protobuf:"bytes,4,opt,name=serviceType,proto3" json:"serviceType,omitempty"`
  96. Ports []*ServicePort `protobuf:"bytes,5,rep,name=ports,proto3" json:"ports,omitempty"`
  97. 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"`
  98. 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"`
  99. // Resource lifecycle (only when different from cluster window)
  100. CreationTime *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=creationTime,proto3,oneof" json:"creationTime,omitempty"`
  101. DeletionTime *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=deletionTime,proto3,oneof" json:"deletionTime,omitempty"`
  102. // Usage metrics
  103. // Network transfer bytes sent through this service
  104. NetworkTransferBytes int64 `protobuf:"varint,10,opt,name=networkTransferBytes,proto3" json:"networkTransferBytes,omitempty"`
  105. // Network bytes received through this service
  106. NetworkReceiveBytes int64 `protobuf:"varint,11,opt,name=networkReceiveBytes,proto3" json:"networkReceiveBytes,omitempty"`
  107. // Diagnostic information about this resource
  108. Diagnostic *DiagnosticResult `protobuf:"bytes,99,opt,name=diagnostic,proto3,oneof" json:"diagnostic,omitempty"`
  109. unknownFields protoimpl.UnknownFields
  110. sizeCache protoimpl.SizeCache
  111. }
  112. func (x *Service) Reset() {
  113. *x = Service{}
  114. mi := &file_kubemodel_network_proto_msgTypes[1]
  115. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  116. ms.StoreMessageInfo(mi)
  117. }
  118. func (x *Service) String() string {
  119. return protoimpl.X.MessageStringOf(x)
  120. }
  121. func (*Service) ProtoMessage() {}
  122. func (x *Service) ProtoReflect() protoreflect.Message {
  123. mi := &file_kubemodel_network_proto_msgTypes[1]
  124. if x != nil {
  125. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  126. if ms.LoadMessageInfo() == nil {
  127. ms.StoreMessageInfo(mi)
  128. }
  129. return ms
  130. }
  131. return mi.MessageOf(x)
  132. }
  133. // Deprecated: Use Service.ProtoReflect.Descriptor instead.
  134. func (*Service) Descriptor() ([]byte, []int) {
  135. return file_kubemodel_network_proto_rawDescGZIP(), []int{1}
  136. }
  137. func (x *Service) GetID() string {
  138. if x != nil {
  139. return x.ID
  140. }
  141. return ""
  142. }
  143. func (x *Service) GetClusterID() string {
  144. if x != nil {
  145. return x.ClusterID
  146. }
  147. return ""
  148. }
  149. func (x *Service) GetName() string {
  150. if x != nil {
  151. return x.Name
  152. }
  153. return ""
  154. }
  155. func (x *Service) GetServiceType() string {
  156. if x != nil {
  157. return x.ServiceType
  158. }
  159. return ""
  160. }
  161. func (x *Service) GetPorts() []*ServicePort {
  162. if x != nil {
  163. return x.Ports
  164. }
  165. return nil
  166. }
  167. func (x *Service) GetLabels() map[string]string {
  168. if x != nil {
  169. return x.Labels
  170. }
  171. return nil
  172. }
  173. func (x *Service) GetAnnotations() map[string]string {
  174. if x != nil {
  175. return x.Annotations
  176. }
  177. return nil
  178. }
  179. func (x *Service) GetCreationTime() *timestamppb.Timestamp {
  180. if x != nil {
  181. return x.CreationTime
  182. }
  183. return nil
  184. }
  185. func (x *Service) GetDeletionTime() *timestamppb.Timestamp {
  186. if x != nil {
  187. return x.DeletionTime
  188. }
  189. return nil
  190. }
  191. func (x *Service) GetNetworkTransferBytes() int64 {
  192. if x != nil {
  193. return x.NetworkTransferBytes
  194. }
  195. return 0
  196. }
  197. func (x *Service) GetNetworkReceiveBytes() int64 {
  198. if x != nil {
  199. return x.NetworkReceiveBytes
  200. }
  201. return 0
  202. }
  203. func (x *Service) GetDiagnostic() *DiagnosticResult {
  204. if x != nil {
  205. return x.Diagnostic
  206. }
  207. return nil
  208. }
  209. var File_kubemodel_network_proto protoreflect.FileDescriptor
  210. const file_kubemodel_network_proto_rawDesc = "" +
  211. "\n" +
  212. "\x17kubemodel/network.proto\x12\tkubemodel\x1a\x1akubemodel/diagnostic.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x8d\x01\n" +
  213. "\vServicePort\x12\x12\n" +
  214. "\x04name\x18\x01 \x01(\tR\x04name\x12\x1a\n" +
  215. "\bprotocol\x18\x02 \x01(\tR\bprotocol\x12\x12\n" +
  216. "\x04port\x18\x03 \x01(\x05R\x04port\x12\x1e\n" +
  217. "\n" +
  218. "targetPort\x18\x04 \x01(\x05R\n" +
  219. "targetPort\x12\x1a\n" +
  220. "\bnodePort\x18\x05 \x01(\x05R\bnodePort\"\xf8\x05\n" +
  221. "\aService\x12\x0e\n" +
  222. "\x02ID\x18\x01 \x01(\tR\x02ID\x12\x1c\n" +
  223. "\tclusterID\x18\x02 \x01(\tR\tclusterID\x12\x12\n" +
  224. "\x04name\x18\x03 \x01(\tR\x04name\x12 \n" +
  225. "\vserviceType\x18\x04 \x01(\tR\vserviceType\x12,\n" +
  226. "\x05ports\x18\x05 \x03(\v2\x16.kubemodel.ServicePortR\x05ports\x126\n" +
  227. "\x06labels\x18\x06 \x03(\v2\x1e.kubemodel.Service.LabelsEntryR\x06labels\x12E\n" +
  228. "\vannotations\x18\a \x03(\v2#.kubemodel.Service.AnnotationsEntryR\vannotations\x12C\n" +
  229. "\fcreationTime\x18\b \x01(\v2\x1a.google.protobuf.TimestampH\x00R\fcreationTime\x88\x01\x01\x12C\n" +
  230. "\fdeletionTime\x18\t \x01(\v2\x1a.google.protobuf.TimestampH\x01R\fdeletionTime\x88\x01\x01\x122\n" +
  231. "\x14networkTransferBytes\x18\n" +
  232. " \x01(\x03R\x14networkTransferBytes\x120\n" +
  233. "\x13networkReceiveBytes\x18\v \x01(\x03R\x13networkReceiveBytes\x12@\n" +
  234. "\n" +
  235. "diagnostic\x18c \x01(\v2\x1b.kubemodel.DiagnosticResultH\x02R\n" +
  236. "diagnostic\x88\x01\x01\x1a9\n" +
  237. "\vLabelsEntry\x12\x10\n" +
  238. "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
  239. "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\x1a>\n" +
  240. "\x10AnnotationsEntry\x12\x10\n" +
  241. "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
  242. "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01B\x0f\n" +
  243. "\r_creationTimeB\x0f\n" +
  244. "\r_deletionTimeB\r\n" +
  245. "\v_diagnosticB:Z8github.com/opencost/opencost/core/pkg/model/pb/kubemodelb\x06proto3"
  246. var (
  247. file_kubemodel_network_proto_rawDescOnce sync.Once
  248. file_kubemodel_network_proto_rawDescData []byte
  249. )
  250. func file_kubemodel_network_proto_rawDescGZIP() []byte {
  251. file_kubemodel_network_proto_rawDescOnce.Do(func() {
  252. file_kubemodel_network_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_kubemodel_network_proto_rawDesc), len(file_kubemodel_network_proto_rawDesc)))
  253. })
  254. return file_kubemodel_network_proto_rawDescData
  255. }
  256. var file_kubemodel_network_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
  257. var file_kubemodel_network_proto_goTypes = []any{
  258. (*ServicePort)(nil), // 0: kubemodel.ServicePort
  259. (*Service)(nil), // 1: kubemodel.Service
  260. nil, // 2: kubemodel.Service.LabelsEntry
  261. nil, // 3: kubemodel.Service.AnnotationsEntry
  262. (*timestamppb.Timestamp)(nil), // 4: google.protobuf.Timestamp
  263. (*DiagnosticResult)(nil), // 5: kubemodel.DiagnosticResult
  264. }
  265. var file_kubemodel_network_proto_depIdxs = []int32{
  266. 0, // 0: kubemodel.Service.ports:type_name -> kubemodel.ServicePort
  267. 2, // 1: kubemodel.Service.labels:type_name -> kubemodel.Service.LabelsEntry
  268. 3, // 2: kubemodel.Service.annotations:type_name -> kubemodel.Service.AnnotationsEntry
  269. 4, // 3: kubemodel.Service.creationTime:type_name -> google.protobuf.Timestamp
  270. 4, // 4: kubemodel.Service.deletionTime:type_name -> google.protobuf.Timestamp
  271. 5, // 5: kubemodel.Service.diagnostic:type_name -> kubemodel.DiagnosticResult
  272. 6, // [6:6] is the sub-list for method output_type
  273. 6, // [6:6] is the sub-list for method input_type
  274. 6, // [6:6] is the sub-list for extension type_name
  275. 6, // [6:6] is the sub-list for extension extendee
  276. 0, // [0:6] is the sub-list for field type_name
  277. }
  278. func init() { file_kubemodel_network_proto_init() }
  279. func file_kubemodel_network_proto_init() {
  280. if File_kubemodel_network_proto != nil {
  281. return
  282. }
  283. file_kubemodel_diagnostic_proto_init()
  284. file_kubemodel_network_proto_msgTypes[1].OneofWrappers = []any{}
  285. type x struct{}
  286. out := protoimpl.TypeBuilder{
  287. File: protoimpl.DescBuilder{
  288. GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
  289. RawDescriptor: unsafe.Slice(unsafe.StringData(file_kubemodel_network_proto_rawDesc), len(file_kubemodel_network_proto_rawDesc)),
  290. NumEnums: 0,
  291. NumMessages: 4,
  292. NumExtensions: 0,
  293. NumServices: 0,
  294. },
  295. GoTypes: file_kubemodel_network_proto_goTypes,
  296. DependencyIndexes: file_kubemodel_network_proto_depIdxs,
  297. MessageInfos: file_kubemodel_network_proto_msgTypes,
  298. }.Build()
  299. File_kubemodel_network_proto = out.File
  300. file_kubemodel_network_proto_goTypes = nil
  301. file_kubemodel_network_proto_depIdxs = nil
  302. }