window.pb.go 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  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: protos/model/window.proto
  6. package pb
  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. // Window defines a unit of time by a resolution and a start time
  22. type Window struct {
  23. state protoimpl.MessageState `protogen:"open.v1"`
  24. // resolution in "1h" or "1d" format
  25. Resolution string `protobuf:"bytes,1,opt,name=resolution,proto3" json:"resolution,omitempty"`
  26. // the start time of the window described
  27. Start *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=start,proto3" json:"start,omitempty"`
  28. unknownFields protoimpl.UnknownFields
  29. sizeCache protoimpl.SizeCache
  30. }
  31. func (x *Window) Reset() {
  32. *x = Window{}
  33. mi := &file_protos_model_window_proto_msgTypes[0]
  34. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  35. ms.StoreMessageInfo(mi)
  36. }
  37. func (x *Window) String() string {
  38. return protoimpl.X.MessageStringOf(x)
  39. }
  40. func (*Window) ProtoMessage() {}
  41. func (x *Window) ProtoReflect() protoreflect.Message {
  42. mi := &file_protos_model_window_proto_msgTypes[0]
  43. if x != nil {
  44. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  45. if ms.LoadMessageInfo() == nil {
  46. ms.StoreMessageInfo(mi)
  47. }
  48. return ms
  49. }
  50. return mi.MessageOf(x)
  51. }
  52. // Deprecated: Use Window.ProtoReflect.Descriptor instead.
  53. func (*Window) Descriptor() ([]byte, []int) {
  54. return file_protos_model_window_proto_rawDescGZIP(), []int{0}
  55. }
  56. func (x *Window) GetResolution() string {
  57. if x != nil {
  58. return x.Resolution
  59. }
  60. return ""
  61. }
  62. func (x *Window) GetStart() *timestamppb.Timestamp {
  63. if x != nil {
  64. return x.Start
  65. }
  66. return nil
  67. }
  68. var File_protos_model_window_proto protoreflect.FileDescriptor
  69. const file_protos_model_window_proto_rawDesc = "" +
  70. "\n" +
  71. "\x19protos/model/window.proto\x12\x05model\x1a\x1fgoogle/protobuf/timestamp.proto\"Z\n" +
  72. "\x06Window\x12\x1e\n" +
  73. "\n" +
  74. "resolution\x18\x01 \x01(\tR\n" +
  75. "resolution\x120\n" +
  76. "\x05start\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampR\x05startB0Z.github.com/opencost/opencost/core/pkg/model/pbb\x06proto3"
  77. var (
  78. file_protos_model_window_proto_rawDescOnce sync.Once
  79. file_protos_model_window_proto_rawDescData []byte
  80. )
  81. func file_protos_model_window_proto_rawDescGZIP() []byte {
  82. file_protos_model_window_proto_rawDescOnce.Do(func() {
  83. file_protos_model_window_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_protos_model_window_proto_rawDesc), len(file_protos_model_window_proto_rawDesc)))
  84. })
  85. return file_protos_model_window_proto_rawDescData
  86. }
  87. var file_protos_model_window_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
  88. var file_protos_model_window_proto_goTypes = []any{
  89. (*Window)(nil), // 0: model.Window
  90. (*timestamppb.Timestamp)(nil), // 1: google.protobuf.Timestamp
  91. }
  92. var file_protos_model_window_proto_depIdxs = []int32{
  93. 1, // 0: model.Window.start:type_name -> google.protobuf.Timestamp
  94. 1, // [1:1] is the sub-list for method output_type
  95. 1, // [1:1] is the sub-list for method input_type
  96. 1, // [1:1] is the sub-list for extension type_name
  97. 1, // [1:1] is the sub-list for extension extendee
  98. 0, // [0:1] is the sub-list for field type_name
  99. }
  100. func init() { file_protos_model_window_proto_init() }
  101. func file_protos_model_window_proto_init() {
  102. if File_protos_model_window_proto != nil {
  103. return
  104. }
  105. type x struct{}
  106. out := protoimpl.TypeBuilder{
  107. File: protoimpl.DescBuilder{
  108. GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
  109. RawDescriptor: unsafe.Slice(unsafe.StringData(file_protos_model_window_proto_rawDesc), len(file_protos_model_window_proto_rawDesc)),
  110. NumEnums: 0,
  111. NumMessages: 1,
  112. NumExtensions: 0,
  113. NumServices: 0,
  114. },
  115. GoTypes: file_protos_model_window_proto_goTypes,
  116. DependencyIndexes: file_protos_model_window_proto_depIdxs,
  117. MessageInfos: file_protos_model_window_proto_msgTypes,
  118. }.Build()
  119. File_protos_model_window_proto = out.File
  120. file_protos_model_window_proto_goTypes = nil
  121. file_protos_model_window_proto_depIdxs = nil
  122. }