labels.pb.go 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218
  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: model/labels.proto
  6. package pb
  7. import (
  8. protoreflect "google.golang.org/protobuf/reflect/protoreflect"
  9. protoimpl "google.golang.org/protobuf/runtime/protoimpl"
  10. reflect "reflect"
  11. sync "sync"
  12. unsafe "unsafe"
  13. )
  14. const (
  15. // Verify that this generated code is sufficiently up-to-date.
  16. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
  17. // Verify that runtime/protoimpl is sufficiently up-to-date.
  18. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
  19. )
  20. // LabelsResponse is a grouping of LabelSets for a specific window for a type of label grouped by their source.
  21. type LabelsResponse struct {
  22. state protoimpl.MessageState `protogen:"open.v1"`
  23. // The type of labels in the set (e.g. account_labels, namespace_labels)
  24. Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
  25. // type dependent identifier for the grouping of labels most likely the cluster id or the configuration key, used
  26. // as part of the export path
  27. GroupId string `protobuf:"bytes,2,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"`
  28. // The window for the label sets
  29. Window *Window `protobuf:"bytes,3,opt,name=window,proto3" json:"window,omitempty"`
  30. // Mapping of LabelSets for individual items by a unique identifier
  31. LabelSets map[string]*LabelSet `protobuf:"bytes,4,rep,name=label_sets,json=labelSets,proto3" json:"label_sets,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
  32. unknownFields protoimpl.UnknownFields
  33. sizeCache protoimpl.SizeCache
  34. }
  35. func (x *LabelsResponse) Reset() {
  36. *x = LabelsResponse{}
  37. mi := &file_model_labels_proto_msgTypes[0]
  38. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  39. ms.StoreMessageInfo(mi)
  40. }
  41. func (x *LabelsResponse) String() string {
  42. return protoimpl.X.MessageStringOf(x)
  43. }
  44. func (*LabelsResponse) ProtoMessage() {}
  45. func (x *LabelsResponse) ProtoReflect() protoreflect.Message {
  46. mi := &file_model_labels_proto_msgTypes[0]
  47. if x != nil {
  48. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  49. if ms.LoadMessageInfo() == nil {
  50. ms.StoreMessageInfo(mi)
  51. }
  52. return ms
  53. }
  54. return mi.MessageOf(x)
  55. }
  56. // Deprecated: Use LabelsResponse.ProtoReflect.Descriptor instead.
  57. func (*LabelsResponse) Descriptor() ([]byte, []int) {
  58. return file_model_labels_proto_rawDescGZIP(), []int{0}
  59. }
  60. func (x *LabelsResponse) GetType() string {
  61. if x != nil {
  62. return x.Type
  63. }
  64. return ""
  65. }
  66. func (x *LabelsResponse) GetGroupId() string {
  67. if x != nil {
  68. return x.GroupId
  69. }
  70. return ""
  71. }
  72. func (x *LabelsResponse) GetWindow() *Window {
  73. if x != nil {
  74. return x.Window
  75. }
  76. return nil
  77. }
  78. func (x *LabelsResponse) GetLabelSets() map[string]*LabelSet {
  79. if x != nil {
  80. return x.LabelSets
  81. }
  82. return nil
  83. }
  84. // LabelSet is an internal message meant to enable nesting maps
  85. type LabelSet struct {
  86. state protoimpl.MessageState `protogen:"open.v1"`
  87. Labels map[string]string `protobuf:"bytes,1,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
  88. unknownFields protoimpl.UnknownFields
  89. sizeCache protoimpl.SizeCache
  90. }
  91. func (x *LabelSet) Reset() {
  92. *x = LabelSet{}
  93. mi := &file_model_labels_proto_msgTypes[1]
  94. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  95. ms.StoreMessageInfo(mi)
  96. }
  97. func (x *LabelSet) String() string {
  98. return protoimpl.X.MessageStringOf(x)
  99. }
  100. func (*LabelSet) ProtoMessage() {}
  101. func (x *LabelSet) ProtoReflect() protoreflect.Message {
  102. mi := &file_model_labels_proto_msgTypes[1]
  103. if x != nil {
  104. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  105. if ms.LoadMessageInfo() == nil {
  106. ms.StoreMessageInfo(mi)
  107. }
  108. return ms
  109. }
  110. return mi.MessageOf(x)
  111. }
  112. // Deprecated: Use LabelSet.ProtoReflect.Descriptor instead.
  113. func (*LabelSet) Descriptor() ([]byte, []int) {
  114. return file_model_labels_proto_rawDescGZIP(), []int{1}
  115. }
  116. func (x *LabelSet) GetLabels() map[string]string {
  117. if x != nil {
  118. return x.Labels
  119. }
  120. return nil
  121. }
  122. var File_model_labels_proto protoreflect.FileDescriptor
  123. const file_model_labels_proto_rawDesc = "" +
  124. "\n" +
  125. "\x12model/labels.proto\x12\x05model\x1a\x12model/window.proto\"\xfa\x01\n" +
  126. "\x0eLabelsResponse\x12\x12\n" +
  127. "\x04type\x18\x01 \x01(\tR\x04type\x12\x19\n" +
  128. "\bgroup_id\x18\x02 \x01(\tR\agroupId\x12%\n" +
  129. "\x06window\x18\x03 \x01(\v2\r.model.WindowR\x06window\x12C\n" +
  130. "\n" +
  131. "label_sets\x18\x04 \x03(\v2$.model.LabelsResponse.LabelSetsEntryR\tlabelSets\x1aM\n" +
  132. "\x0eLabelSetsEntry\x12\x10\n" +
  133. "\x03key\x18\x01 \x01(\tR\x03key\x12%\n" +
  134. "\x05value\x18\x02 \x01(\v2\x0f.model.LabelSetR\x05value:\x028\x01\"z\n" +
  135. "\bLabelSet\x123\n" +
  136. "\x06labels\x18\x01 \x03(\v2\x1b.model.LabelSet.LabelsEntryR\x06labels\x1a9\n" +
  137. "\vLabelsEntry\x12\x10\n" +
  138. "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
  139. "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01B0Z.github.com/opencost/opencost/core/pkg/model/pbb\x06proto3"
  140. var (
  141. file_model_labels_proto_rawDescOnce sync.Once
  142. file_model_labels_proto_rawDescData []byte
  143. )
  144. func file_model_labels_proto_rawDescGZIP() []byte {
  145. file_model_labels_proto_rawDescOnce.Do(func() {
  146. file_model_labels_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_model_labels_proto_rawDesc), len(file_model_labels_proto_rawDesc)))
  147. })
  148. return file_model_labels_proto_rawDescData
  149. }
  150. var file_model_labels_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
  151. var file_model_labels_proto_goTypes = []any{
  152. (*LabelsResponse)(nil), // 0: model.LabelsResponse
  153. (*LabelSet)(nil), // 1: model.LabelSet
  154. nil, // 2: model.LabelsResponse.LabelSetsEntry
  155. nil, // 3: model.LabelSet.LabelsEntry
  156. (*Window)(nil), // 4: model.Window
  157. }
  158. var file_model_labels_proto_depIdxs = []int32{
  159. 4, // 0: model.LabelsResponse.window:type_name -> model.Window
  160. 2, // 1: model.LabelsResponse.label_sets:type_name -> model.LabelsResponse.LabelSetsEntry
  161. 3, // 2: model.LabelSet.labels:type_name -> model.LabelSet.LabelsEntry
  162. 1, // 3: model.LabelsResponse.LabelSetsEntry.value:type_name -> model.LabelSet
  163. 4, // [4:4] is the sub-list for method output_type
  164. 4, // [4:4] is the sub-list for method input_type
  165. 4, // [4:4] is the sub-list for extension type_name
  166. 4, // [4:4] is the sub-list for extension extendee
  167. 0, // [0:4] is the sub-list for field type_name
  168. }
  169. func init() { file_model_labels_proto_init() }
  170. func file_model_labels_proto_init() {
  171. if File_model_labels_proto != nil {
  172. return
  173. }
  174. file_model_window_proto_init()
  175. type x struct{}
  176. out := protoimpl.TypeBuilder{
  177. File: protoimpl.DescBuilder{
  178. GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
  179. RawDescriptor: unsafe.Slice(unsafe.StringData(file_model_labels_proto_rawDesc), len(file_model_labels_proto_rawDesc)),
  180. NumEnums: 0,
  181. NumMessages: 4,
  182. NumExtensions: 0,
  183. NumServices: 0,
  184. },
  185. GoTypes: file_model_labels_proto_goTypes,
  186. DependencyIndexes: file_model_labels_proto_depIdxs,
  187. MessageInfos: file_model_labels_proto_msgTypes,
  188. }.Build()
  189. File_model_labels_proto = out.File
  190. file_model_labels_proto_goTypes = nil
  191. file_model_labels_proto_depIdxs = nil
  192. }