github.com/muhammadn/cortex@v1.9.1-0.20220510110439-46bb7000d03d/pkg/ruler/ruler.pb.go (about)

     1  // Code generated by protoc-gen-gogo. DO NOT EDIT.
     2  // source: ruler.proto
     3  
     4  package ruler
     5  
     6  import (
     7  	context "context"
     8  	encoding_binary "encoding/binary"
     9  	fmt "fmt"
    10  	_ "github.com/cortexproject/cortex/pkg/cortexpb"
    11  	github_com_cortexproject_cortex_pkg_cortexpb "github.com/cortexproject/cortex/pkg/cortexpb"
    12  	rulespb "github.com/cortexproject/cortex/pkg/ruler/rulespb"
    13  	_ "github.com/gogo/protobuf/gogoproto"
    14  	proto "github.com/gogo/protobuf/proto"
    15  	github_com_gogo_protobuf_types "github.com/gogo/protobuf/types"
    16  	_ "github.com/golang/protobuf/ptypes/duration"
    17  	_ "github.com/golang/protobuf/ptypes/timestamp"
    18  	grpc "google.golang.org/grpc"
    19  	codes "google.golang.org/grpc/codes"
    20  	status "google.golang.org/grpc/status"
    21  	io "io"
    22  	math "math"
    23  	math_bits "math/bits"
    24  	reflect "reflect"
    25  	strings "strings"
    26  	time "time"
    27  )
    28  
    29  // Reference imports to suppress errors if they are not otherwise used.
    30  var _ = proto.Marshal
    31  var _ = fmt.Errorf
    32  var _ = math.Inf
    33  var _ = time.Kitchen
    34  
    35  // This is a compile-time assertion to ensure that this generated file
    36  // is compatible with the proto package it is being compiled against.
    37  // A compilation error at this line likely means your copy of the
    38  // proto package needs to be updated.
    39  const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
    40  
    41  type RulesRequest struct {
    42  }
    43  
    44  func (m *RulesRequest) Reset()      { *m = RulesRequest{} }
    45  func (*RulesRequest) ProtoMessage() {}
    46  func (*RulesRequest) Descriptor() ([]byte, []int) {
    47  	return fileDescriptor_9ecbec0a4cfddea6, []int{0}
    48  }
    49  func (m *RulesRequest) XXX_Unmarshal(b []byte) error {
    50  	return m.Unmarshal(b)
    51  }
    52  func (m *RulesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    53  	if deterministic {
    54  		return xxx_messageInfo_RulesRequest.Marshal(b, m, deterministic)
    55  	} else {
    56  		b = b[:cap(b)]
    57  		n, err := m.MarshalToSizedBuffer(b)
    58  		if err != nil {
    59  			return nil, err
    60  		}
    61  		return b[:n], nil
    62  	}
    63  }
    64  func (m *RulesRequest) XXX_Merge(src proto.Message) {
    65  	xxx_messageInfo_RulesRequest.Merge(m, src)
    66  }
    67  func (m *RulesRequest) XXX_Size() int {
    68  	return m.Size()
    69  }
    70  func (m *RulesRequest) XXX_DiscardUnknown() {
    71  	xxx_messageInfo_RulesRequest.DiscardUnknown(m)
    72  }
    73  
    74  var xxx_messageInfo_RulesRequest proto.InternalMessageInfo
    75  
    76  type RulesResponse struct {
    77  	Groups []*GroupStateDesc `protobuf:"bytes,1,rep,name=groups,proto3" json:"groups,omitempty"`
    78  }
    79  
    80  func (m *RulesResponse) Reset()      { *m = RulesResponse{} }
    81  func (*RulesResponse) ProtoMessage() {}
    82  func (*RulesResponse) Descriptor() ([]byte, []int) {
    83  	return fileDescriptor_9ecbec0a4cfddea6, []int{1}
    84  }
    85  func (m *RulesResponse) XXX_Unmarshal(b []byte) error {
    86  	return m.Unmarshal(b)
    87  }
    88  func (m *RulesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    89  	if deterministic {
    90  		return xxx_messageInfo_RulesResponse.Marshal(b, m, deterministic)
    91  	} else {
    92  		b = b[:cap(b)]
    93  		n, err := m.MarshalToSizedBuffer(b)
    94  		if err != nil {
    95  			return nil, err
    96  		}
    97  		return b[:n], nil
    98  	}
    99  }
   100  func (m *RulesResponse) XXX_Merge(src proto.Message) {
   101  	xxx_messageInfo_RulesResponse.Merge(m, src)
   102  }
   103  func (m *RulesResponse) XXX_Size() int {
   104  	return m.Size()
   105  }
   106  func (m *RulesResponse) XXX_DiscardUnknown() {
   107  	xxx_messageInfo_RulesResponse.DiscardUnknown(m)
   108  }
   109  
   110  var xxx_messageInfo_RulesResponse proto.InternalMessageInfo
   111  
   112  func (m *RulesResponse) GetGroups() []*GroupStateDesc {
   113  	if m != nil {
   114  		return m.Groups
   115  	}
   116  	return nil
   117  }
   118  
   119  // GroupStateDesc is a proto representation of a cortex rule group
   120  type GroupStateDesc struct {
   121  	Group               *rulespb.RuleGroupDesc `protobuf:"bytes,1,opt,name=group,proto3" json:"group,omitempty"`
   122  	ActiveRules         []*RuleStateDesc       `protobuf:"bytes,2,rep,name=active_rules,json=activeRules,proto3" json:"active_rules,omitempty"`
   123  	EvaluationTimestamp time.Time              `protobuf:"bytes,3,opt,name=evaluationTimestamp,proto3,stdtime" json:"evaluationTimestamp"`
   124  	EvaluationDuration  time.Duration          `protobuf:"bytes,4,opt,name=evaluationDuration,proto3,stdduration" json:"evaluationDuration"`
   125  }
   126  
   127  func (m *GroupStateDesc) Reset()      { *m = GroupStateDesc{} }
   128  func (*GroupStateDesc) ProtoMessage() {}
   129  func (*GroupStateDesc) Descriptor() ([]byte, []int) {
   130  	return fileDescriptor_9ecbec0a4cfddea6, []int{2}
   131  }
   132  func (m *GroupStateDesc) XXX_Unmarshal(b []byte) error {
   133  	return m.Unmarshal(b)
   134  }
   135  func (m *GroupStateDesc) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   136  	if deterministic {
   137  		return xxx_messageInfo_GroupStateDesc.Marshal(b, m, deterministic)
   138  	} else {
   139  		b = b[:cap(b)]
   140  		n, err := m.MarshalToSizedBuffer(b)
   141  		if err != nil {
   142  			return nil, err
   143  		}
   144  		return b[:n], nil
   145  	}
   146  }
   147  func (m *GroupStateDesc) XXX_Merge(src proto.Message) {
   148  	xxx_messageInfo_GroupStateDesc.Merge(m, src)
   149  }
   150  func (m *GroupStateDesc) XXX_Size() int {
   151  	return m.Size()
   152  }
   153  func (m *GroupStateDesc) XXX_DiscardUnknown() {
   154  	xxx_messageInfo_GroupStateDesc.DiscardUnknown(m)
   155  }
   156  
   157  var xxx_messageInfo_GroupStateDesc proto.InternalMessageInfo
   158  
   159  func (m *GroupStateDesc) GetGroup() *rulespb.RuleGroupDesc {
   160  	if m != nil {
   161  		return m.Group
   162  	}
   163  	return nil
   164  }
   165  
   166  func (m *GroupStateDesc) GetActiveRules() []*RuleStateDesc {
   167  	if m != nil {
   168  		return m.ActiveRules
   169  	}
   170  	return nil
   171  }
   172  
   173  func (m *GroupStateDesc) GetEvaluationTimestamp() time.Time {
   174  	if m != nil {
   175  		return m.EvaluationTimestamp
   176  	}
   177  	return time.Time{}
   178  }
   179  
   180  func (m *GroupStateDesc) GetEvaluationDuration() time.Duration {
   181  	if m != nil {
   182  		return m.EvaluationDuration
   183  	}
   184  	return 0
   185  }
   186  
   187  // RuleStateDesc is a proto representation of a Prometheus Rule
   188  type RuleStateDesc struct {
   189  	Rule                *rulespb.RuleDesc `protobuf:"bytes,1,opt,name=rule,proto3" json:"rule,omitempty"`
   190  	State               string            `protobuf:"bytes,2,opt,name=state,proto3" json:"state,omitempty"`
   191  	Health              string            `protobuf:"bytes,3,opt,name=health,proto3" json:"health,omitempty"`
   192  	LastError           string            `protobuf:"bytes,4,opt,name=lastError,proto3" json:"lastError,omitempty"`
   193  	Alerts              []*AlertStateDesc `protobuf:"bytes,5,rep,name=alerts,proto3" json:"alerts,omitempty"`
   194  	EvaluationTimestamp time.Time         `protobuf:"bytes,6,opt,name=evaluationTimestamp,proto3,stdtime" json:"evaluationTimestamp"`
   195  	EvaluationDuration  time.Duration     `protobuf:"bytes,7,opt,name=evaluationDuration,proto3,stdduration" json:"evaluationDuration"`
   196  }
   197  
   198  func (m *RuleStateDesc) Reset()      { *m = RuleStateDesc{} }
   199  func (*RuleStateDesc) ProtoMessage() {}
   200  func (*RuleStateDesc) Descriptor() ([]byte, []int) {
   201  	return fileDescriptor_9ecbec0a4cfddea6, []int{3}
   202  }
   203  func (m *RuleStateDesc) XXX_Unmarshal(b []byte) error {
   204  	return m.Unmarshal(b)
   205  }
   206  func (m *RuleStateDesc) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   207  	if deterministic {
   208  		return xxx_messageInfo_RuleStateDesc.Marshal(b, m, deterministic)
   209  	} else {
   210  		b = b[:cap(b)]
   211  		n, err := m.MarshalToSizedBuffer(b)
   212  		if err != nil {
   213  			return nil, err
   214  		}
   215  		return b[:n], nil
   216  	}
   217  }
   218  func (m *RuleStateDesc) XXX_Merge(src proto.Message) {
   219  	xxx_messageInfo_RuleStateDesc.Merge(m, src)
   220  }
   221  func (m *RuleStateDesc) XXX_Size() int {
   222  	return m.Size()
   223  }
   224  func (m *RuleStateDesc) XXX_DiscardUnknown() {
   225  	xxx_messageInfo_RuleStateDesc.DiscardUnknown(m)
   226  }
   227  
   228  var xxx_messageInfo_RuleStateDesc proto.InternalMessageInfo
   229  
   230  func (m *RuleStateDesc) GetRule() *rulespb.RuleDesc {
   231  	if m != nil {
   232  		return m.Rule
   233  	}
   234  	return nil
   235  }
   236  
   237  func (m *RuleStateDesc) GetState() string {
   238  	if m != nil {
   239  		return m.State
   240  	}
   241  	return ""
   242  }
   243  
   244  func (m *RuleStateDesc) GetHealth() string {
   245  	if m != nil {
   246  		return m.Health
   247  	}
   248  	return ""
   249  }
   250  
   251  func (m *RuleStateDesc) GetLastError() string {
   252  	if m != nil {
   253  		return m.LastError
   254  	}
   255  	return ""
   256  }
   257  
   258  func (m *RuleStateDesc) GetAlerts() []*AlertStateDesc {
   259  	if m != nil {
   260  		return m.Alerts
   261  	}
   262  	return nil
   263  }
   264  
   265  func (m *RuleStateDesc) GetEvaluationTimestamp() time.Time {
   266  	if m != nil {
   267  		return m.EvaluationTimestamp
   268  	}
   269  	return time.Time{}
   270  }
   271  
   272  func (m *RuleStateDesc) GetEvaluationDuration() time.Duration {
   273  	if m != nil {
   274  		return m.EvaluationDuration
   275  	}
   276  	return 0
   277  }
   278  
   279  type AlertStateDesc struct {
   280  	State       string                                                      `protobuf:"bytes,1,opt,name=state,proto3" json:"state,omitempty"`
   281  	Labels      []github_com_cortexproject_cortex_pkg_cortexpb.LabelAdapter `protobuf:"bytes,2,rep,name=labels,proto3,customtype=github.com/cortexproject/cortex/pkg/cortexpb.LabelAdapter" json:"labels"`
   282  	Annotations []github_com_cortexproject_cortex_pkg_cortexpb.LabelAdapter `protobuf:"bytes,3,rep,name=annotations,proto3,customtype=github.com/cortexproject/cortex/pkg/cortexpb.LabelAdapter" json:"annotations"`
   283  	Value       float64                                                     `protobuf:"fixed64,4,opt,name=value,proto3" json:"value,omitempty"`
   284  	ActiveAt    time.Time                                                   `protobuf:"bytes,5,opt,name=active_at,json=activeAt,proto3,stdtime" json:"active_at"`
   285  	FiredAt     time.Time                                                   `protobuf:"bytes,6,opt,name=fired_at,json=firedAt,proto3,stdtime" json:"fired_at"`
   286  	ResolvedAt  time.Time                                                   `protobuf:"bytes,7,opt,name=resolved_at,json=resolvedAt,proto3,stdtime" json:"resolved_at"`
   287  	LastSentAt  time.Time                                                   `protobuf:"bytes,8,opt,name=last_sent_at,json=lastSentAt,proto3,stdtime" json:"last_sent_at"`
   288  	ValidUntil  time.Time                                                   `protobuf:"bytes,9,opt,name=valid_until,json=validUntil,proto3,stdtime" json:"valid_until"`
   289  }
   290  
   291  func (m *AlertStateDesc) Reset()      { *m = AlertStateDesc{} }
   292  func (*AlertStateDesc) ProtoMessage() {}
   293  func (*AlertStateDesc) Descriptor() ([]byte, []int) {
   294  	return fileDescriptor_9ecbec0a4cfddea6, []int{4}
   295  }
   296  func (m *AlertStateDesc) XXX_Unmarshal(b []byte) error {
   297  	return m.Unmarshal(b)
   298  }
   299  func (m *AlertStateDesc) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   300  	if deterministic {
   301  		return xxx_messageInfo_AlertStateDesc.Marshal(b, m, deterministic)
   302  	} else {
   303  		b = b[:cap(b)]
   304  		n, err := m.MarshalToSizedBuffer(b)
   305  		if err != nil {
   306  			return nil, err
   307  		}
   308  		return b[:n], nil
   309  	}
   310  }
   311  func (m *AlertStateDesc) XXX_Merge(src proto.Message) {
   312  	xxx_messageInfo_AlertStateDesc.Merge(m, src)
   313  }
   314  func (m *AlertStateDesc) XXX_Size() int {
   315  	return m.Size()
   316  }
   317  func (m *AlertStateDesc) XXX_DiscardUnknown() {
   318  	xxx_messageInfo_AlertStateDesc.DiscardUnknown(m)
   319  }
   320  
   321  var xxx_messageInfo_AlertStateDesc proto.InternalMessageInfo
   322  
   323  func (m *AlertStateDesc) GetState() string {
   324  	if m != nil {
   325  		return m.State
   326  	}
   327  	return ""
   328  }
   329  
   330  func (m *AlertStateDesc) GetValue() float64 {
   331  	if m != nil {
   332  		return m.Value
   333  	}
   334  	return 0
   335  }
   336  
   337  func (m *AlertStateDesc) GetActiveAt() time.Time {
   338  	if m != nil {
   339  		return m.ActiveAt
   340  	}
   341  	return time.Time{}
   342  }
   343  
   344  func (m *AlertStateDesc) GetFiredAt() time.Time {
   345  	if m != nil {
   346  		return m.FiredAt
   347  	}
   348  	return time.Time{}
   349  }
   350  
   351  func (m *AlertStateDesc) GetResolvedAt() time.Time {
   352  	if m != nil {
   353  		return m.ResolvedAt
   354  	}
   355  	return time.Time{}
   356  }
   357  
   358  func (m *AlertStateDesc) GetLastSentAt() time.Time {
   359  	if m != nil {
   360  		return m.LastSentAt
   361  	}
   362  	return time.Time{}
   363  }
   364  
   365  func (m *AlertStateDesc) GetValidUntil() time.Time {
   366  	if m != nil {
   367  		return m.ValidUntil
   368  	}
   369  	return time.Time{}
   370  }
   371  
   372  func init() {
   373  	proto.RegisterType((*RulesRequest)(nil), "ruler.RulesRequest")
   374  	proto.RegisterType((*RulesResponse)(nil), "ruler.RulesResponse")
   375  	proto.RegisterType((*GroupStateDesc)(nil), "ruler.GroupStateDesc")
   376  	proto.RegisterType((*RuleStateDesc)(nil), "ruler.RuleStateDesc")
   377  	proto.RegisterType((*AlertStateDesc)(nil), "ruler.AlertStateDesc")
   378  }
   379  
   380  func init() { proto.RegisterFile("ruler.proto", fileDescriptor_9ecbec0a4cfddea6) }
   381  
   382  var fileDescriptor_9ecbec0a4cfddea6 = []byte{
   383  	// 677 bytes of a gzipped FileDescriptorProto
   384  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x54, 0xcf, 0x4f, 0x13, 0x41,
   385  	0x14, 0xde, 0x29, 0x6c, 0x69, 0xa7, 0x88, 0xc9, 0x50, 0xcd, 0xda, 0x98, 0x29, 0xa9, 0x17, 0x62,
   386  	0xc2, 0x92, 0x20, 0x89, 0xf1, 0x80, 0x66, 0x09, 0xe8, 0xc5, 0x83, 0x59, 0xd4, 0x2b, 0x99, 0xb6,
   387  	0xc3, 0xb2, 0xba, 0xec, 0xac, 0x33, 0xb3, 0x0d, 0x47, 0xfe, 0x04, 0x8e, 0x9e, 0x3d, 0xf9, 0xa7,
   388  	0x70, 0xe4, 0x48, 0x8c, 0x41, 0x59, 0x2e, 0x1e, 0xf9, 0x13, 0xcc, 0xfc, 0x58, 0xdb, 0x2a, 0x26,
   389  	0x6e, 0x0c, 0x97, 0x76, 0xdf, 0xbc, 0xf7, 0x7d, 0xdf, 0xbc, 0xef, 0xcd, 0x0c, 0x6c, 0xf1, 0x3c,
   390  	0xa1, 0xdc, 0xcf, 0x38, 0x93, 0x0c, 0xb9, 0x3a, 0xe8, 0xac, 0x44, 0xb1, 0xdc, 0xcf, 0xfb, 0xfe,
   391  	0x80, 0x1d, 0xac, 0x46, 0x2c, 0x62, 0xab, 0x3a, 0xdb, 0xcf, 0xf7, 0x74, 0xa4, 0x03, 0xfd, 0x65,
   392  	0x50, 0x1d, 0x1c, 0x31, 0x16, 0x25, 0x74, 0x5c, 0x35, 0xcc, 0x39, 0x91, 0x31, 0x4b, 0x6d, 0xbe,
   393  	0xfb, 0x7b, 0x5e, 0xc6, 0x07, 0x54, 0x48, 0x72, 0x90, 0xd9, 0x82, 0x27, 0x13, 0x7a, 0x03, 0xc6,
   394  	0x25, 0x3d, 0xcc, 0x38, 0x7b, 0x47, 0x07, 0xd2, 0x46, 0xab, 0xd9, 0xfb, 0xa8, 0x4c, 0xf4, 0xed,
   395  	0x87, 0x85, 0x6e, 0xfc, 0x0b, 0x54, 0x77, 0xa5, 0x7f, 0x45, 0xd6, 0x37, 0xff, 0x06, 0xde, 0x5b,
   396  	0x80, 0xf3, 0xa1, 0x0a, 0x43, 0xfa, 0x21, 0xa7, 0x42, 0xf6, 0x9e, 0xc2, 0x5b, 0x36, 0x16, 0x19,
   397  	0x4b, 0x05, 0x45, 0x2b, 0xb0, 0x1e, 0x71, 0x96, 0x67, 0xc2, 0x03, 0x4b, 0x33, 0xcb, 0xad, 0xb5,
   398  	0x3b, 0xbe, 0xf1, 0xeb, 0x85, 0x5a, 0xdc, 0x91, 0x44, 0xd2, 0x2d, 0x2a, 0x06, 0xa1, 0x2d, 0xea,
   399  	0x7d, 0xaa, 0xc1, 0x85, 0xe9, 0x14, 0x7a, 0x08, 0x5d, 0x9d, 0xf4, 0xc0, 0x12, 0x58, 0x6e, 0xad,
   400  	0xb5, 0x7d, 0xa3, 0xaf, 0x64, 0x74, 0xa5, 0xc6, 0x9b, 0x12, 0xf4, 0x18, 0xce, 0x93, 0x81, 0x8c,
   401  	0x47, 0x74, 0x57, 0x17, 0x79, 0x35, 0xad, 0xd9, 0xb6, 0x9a, 0x0a, 0x32, 0x96, 0x6c, 0x99, 0x4a,
   402  	0xbd, 0x5d, 0xf4, 0x16, 0x2e, 0xd2, 0x11, 0x49, 0x72, 0x6d, 0xfb, 0xeb, 0xd2, 0x5e, 0x6f, 0x46,
   403  	0x4b, 0x76, 0x7c, 0x33, 0x00, 0xbf, 0x1c, 0x80, 0xff, 0xab, 0x62, 0xb3, 0x71, 0x72, 0xde, 0x75,
   404  	0x8e, 0xbf, 0x75, 0x41, 0x78, 0x1d, 0x01, 0xda, 0x81, 0x68, 0xbc, 0xbc, 0x65, 0xc7, 0xea, 0xcd,
   405  	0x6a, 0xda, 0x7b, 0x7f, 0xd0, 0x96, 0x05, 0x86, 0xf5, 0xa3, 0x62, 0xbd, 0x06, 0xde, 0xfb, 0x5a,
   406  	0x33, 0x2e, 0x8f, 0x3d, 0x7a, 0x00, 0x67, 0x55, 0x8b, 0xd6, 0xa2, 0xdb, 0x13, 0x16, 0xe9, 0x56,
   407  	0x75, 0x12, 0xb5, 0xa1, 0x2b, 0x14, 0xc2, 0xab, 0x2d, 0x81, 0xe5, 0x66, 0x68, 0x02, 0x74, 0x17,
   408  	0xd6, 0xf7, 0x29, 0x49, 0xe4, 0xbe, 0x6e, 0xb6, 0x19, 0xda, 0x08, 0xdd, 0x87, 0xcd, 0x84, 0x08,
   409  	0xb9, 0xcd, 0x39, 0xe3, 0x7a, 0xc3, 0xcd, 0x70, 0xbc, 0xa0, 0xc6, 0x4a, 0x12, 0xca, 0xa5, 0xf0,
   410  	0xdc, 0xa9, 0xb1, 0x06, 0x6a, 0x71, 0x62, 0xac, 0xa6, 0xe8, 0x6f, 0xf6, 0xd6, 0x6f, 0xc6, 0xde,
   411  	0xb9, 0xff, 0xb3, 0xf7, 0xc8, 0x85, 0x0b, 0xd3, 0x7d, 0x8c, 0xad, 0x03, 0x93, 0xd6, 0xa5, 0xb0,
   412  	0x9e, 0x90, 0x3e, 0x4d, 0xca, 0x73, 0xb6, 0xe8, 0x97, 0x77, 0xcc, 0x7f, 0xa9, 0xd6, 0x5f, 0x91,
   413  	0x98, 0x6f, 0x06, 0x4a, 0xeb, 0xcb, 0x79, 0xb7, 0xd2, 0x1d, 0x35, 0xf8, 0x60, 0x48, 0x32, 0x49,
   414  	0x79, 0x68, 0x55, 0xd0, 0x21, 0x6c, 0x91, 0x34, 0x65, 0x52, 0x6f, 0x53, 0x78, 0x33, 0x37, 0x2a,
   415  	0x3a, 0x29, 0xa5, 0xfa, 0x57, 0x3e, 0x51, 0x7d, 0x10, 0x40, 0x68, 0x02, 0x14, 0xc0, 0xa6, 0xbd,
   416  	0x6d, 0x44, 0x7a, 0x6e, 0x85, 0x59, 0x36, 0x0c, 0x2c, 0x90, 0xe8, 0x19, 0x6c, 0xec, 0xc5, 0x9c,
   417  	0x0e, 0x15, 0x43, 0x95, 0xd3, 0x30, 0xa7, 0x51, 0x81, 0x44, 0xdb, 0xb0, 0xc5, 0xa9, 0x60, 0xc9,
   418  	0xc8, 0x70, 0xcc, 0x55, 0xe0, 0x80, 0x25, 0x30, 0x90, 0xe8, 0x39, 0x9c, 0x57, 0x87, 0x7b, 0x57,
   419  	0xd0, 0x54, 0x2a, 0x9e, 0x46, 0x15, 0x1e, 0x85, 0xdc, 0xa1, 0xa9, 0x34, 0xdb, 0x19, 0x91, 0x24,
   420  	0x1e, 0xee, 0xe6, 0xa9, 0x8c, 0x13, 0xaf, 0x59, 0x85, 0x46, 0x03, 0xdf, 0x28, 0xdc, 0xda, 0x06,
   421  	0x74, 0xd5, 0xe5, 0xe5, 0x68, 0xdd, 0x7c, 0x08, 0xb4, 0x38, 0xf1, 0x86, 0x95, 0xaf, 0x6d, 0xa7,
   422  	0x3d, 0xbd, 0x68, 0x9e, 0xdc, 0x9e, 0xb3, 0xb9, 0x7e, 0x7a, 0x81, 0x9d, 0xb3, 0x0b, 0xec, 0x5c,
   423  	0x5d, 0x60, 0x70, 0x54, 0x60, 0xf0, 0xb9, 0xc0, 0xe0, 0xa4, 0xc0, 0xe0, 0xb4, 0xc0, 0xe0, 0x7b,
   424  	0x81, 0xc1, 0x8f, 0x02, 0x3b, 0x57, 0x05, 0x06, 0xc7, 0x97, 0xd8, 0x39, 0xbd, 0xc4, 0xce, 0xd9,
   425  	0x25, 0x76, 0xfa, 0x75, 0xbd, 0xbd, 0x47, 0x3f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x29, 0x57, 0x9d,
   426  	0xdd, 0xd2, 0x06, 0x00, 0x00,
   427  }
   428  
   429  func (this *RulesRequest) Equal(that interface{}) bool {
   430  	if that == nil {
   431  		return this == nil
   432  	}
   433  
   434  	that1, ok := that.(*RulesRequest)
   435  	if !ok {
   436  		that2, ok := that.(RulesRequest)
   437  		if ok {
   438  			that1 = &that2
   439  		} else {
   440  			return false
   441  		}
   442  	}
   443  	if that1 == nil {
   444  		return this == nil
   445  	} else if this == nil {
   446  		return false
   447  	}
   448  	return true
   449  }
   450  func (this *RulesResponse) Equal(that interface{}) bool {
   451  	if that == nil {
   452  		return this == nil
   453  	}
   454  
   455  	that1, ok := that.(*RulesResponse)
   456  	if !ok {
   457  		that2, ok := that.(RulesResponse)
   458  		if ok {
   459  			that1 = &that2
   460  		} else {
   461  			return false
   462  		}
   463  	}
   464  	if that1 == nil {
   465  		return this == nil
   466  	} else if this == nil {
   467  		return false
   468  	}
   469  	if len(this.Groups) != len(that1.Groups) {
   470  		return false
   471  	}
   472  	for i := range this.Groups {
   473  		if !this.Groups[i].Equal(that1.Groups[i]) {
   474  			return false
   475  		}
   476  	}
   477  	return true
   478  }
   479  func (this *GroupStateDesc) Equal(that interface{}) bool {
   480  	if that == nil {
   481  		return this == nil
   482  	}
   483  
   484  	that1, ok := that.(*GroupStateDesc)
   485  	if !ok {
   486  		that2, ok := that.(GroupStateDesc)
   487  		if ok {
   488  			that1 = &that2
   489  		} else {
   490  			return false
   491  		}
   492  	}
   493  	if that1 == nil {
   494  		return this == nil
   495  	} else if this == nil {
   496  		return false
   497  	}
   498  	if !this.Group.Equal(that1.Group) {
   499  		return false
   500  	}
   501  	if len(this.ActiveRules) != len(that1.ActiveRules) {
   502  		return false
   503  	}
   504  	for i := range this.ActiveRules {
   505  		if !this.ActiveRules[i].Equal(that1.ActiveRules[i]) {
   506  			return false
   507  		}
   508  	}
   509  	if !this.EvaluationTimestamp.Equal(that1.EvaluationTimestamp) {
   510  		return false
   511  	}
   512  	if this.EvaluationDuration != that1.EvaluationDuration {
   513  		return false
   514  	}
   515  	return true
   516  }
   517  func (this *RuleStateDesc) Equal(that interface{}) bool {
   518  	if that == nil {
   519  		return this == nil
   520  	}
   521  
   522  	that1, ok := that.(*RuleStateDesc)
   523  	if !ok {
   524  		that2, ok := that.(RuleStateDesc)
   525  		if ok {
   526  			that1 = &that2
   527  		} else {
   528  			return false
   529  		}
   530  	}
   531  	if that1 == nil {
   532  		return this == nil
   533  	} else if this == nil {
   534  		return false
   535  	}
   536  	if !this.Rule.Equal(that1.Rule) {
   537  		return false
   538  	}
   539  	if this.State != that1.State {
   540  		return false
   541  	}
   542  	if this.Health != that1.Health {
   543  		return false
   544  	}
   545  	if this.LastError != that1.LastError {
   546  		return false
   547  	}
   548  	if len(this.Alerts) != len(that1.Alerts) {
   549  		return false
   550  	}
   551  	for i := range this.Alerts {
   552  		if !this.Alerts[i].Equal(that1.Alerts[i]) {
   553  			return false
   554  		}
   555  	}
   556  	if !this.EvaluationTimestamp.Equal(that1.EvaluationTimestamp) {
   557  		return false
   558  	}
   559  	if this.EvaluationDuration != that1.EvaluationDuration {
   560  		return false
   561  	}
   562  	return true
   563  }
   564  func (this *AlertStateDesc) Equal(that interface{}) bool {
   565  	if that == nil {
   566  		return this == nil
   567  	}
   568  
   569  	that1, ok := that.(*AlertStateDesc)
   570  	if !ok {
   571  		that2, ok := that.(AlertStateDesc)
   572  		if ok {
   573  			that1 = &that2
   574  		} else {
   575  			return false
   576  		}
   577  	}
   578  	if that1 == nil {
   579  		return this == nil
   580  	} else if this == nil {
   581  		return false
   582  	}
   583  	if this.State != that1.State {
   584  		return false
   585  	}
   586  	if len(this.Labels) != len(that1.Labels) {
   587  		return false
   588  	}
   589  	for i := range this.Labels {
   590  		if !this.Labels[i].Equal(that1.Labels[i]) {
   591  			return false
   592  		}
   593  	}
   594  	if len(this.Annotations) != len(that1.Annotations) {
   595  		return false
   596  	}
   597  	for i := range this.Annotations {
   598  		if !this.Annotations[i].Equal(that1.Annotations[i]) {
   599  			return false
   600  		}
   601  	}
   602  	if this.Value != that1.Value {
   603  		return false
   604  	}
   605  	if !this.ActiveAt.Equal(that1.ActiveAt) {
   606  		return false
   607  	}
   608  	if !this.FiredAt.Equal(that1.FiredAt) {
   609  		return false
   610  	}
   611  	if !this.ResolvedAt.Equal(that1.ResolvedAt) {
   612  		return false
   613  	}
   614  	if !this.LastSentAt.Equal(that1.LastSentAt) {
   615  		return false
   616  	}
   617  	if !this.ValidUntil.Equal(that1.ValidUntil) {
   618  		return false
   619  	}
   620  	return true
   621  }
   622  func (this *RulesRequest) GoString() string {
   623  	if this == nil {
   624  		return "nil"
   625  	}
   626  	s := make([]string, 0, 4)
   627  	s = append(s, "&ruler.RulesRequest{")
   628  	s = append(s, "}")
   629  	return strings.Join(s, "")
   630  }
   631  func (this *RulesResponse) GoString() string {
   632  	if this == nil {
   633  		return "nil"
   634  	}
   635  	s := make([]string, 0, 5)
   636  	s = append(s, "&ruler.RulesResponse{")
   637  	if this.Groups != nil {
   638  		s = append(s, "Groups: "+fmt.Sprintf("%#v", this.Groups)+",\n")
   639  	}
   640  	s = append(s, "}")
   641  	return strings.Join(s, "")
   642  }
   643  func (this *GroupStateDesc) GoString() string {
   644  	if this == nil {
   645  		return "nil"
   646  	}
   647  	s := make([]string, 0, 8)
   648  	s = append(s, "&ruler.GroupStateDesc{")
   649  	if this.Group != nil {
   650  		s = append(s, "Group: "+fmt.Sprintf("%#v", this.Group)+",\n")
   651  	}
   652  	if this.ActiveRules != nil {
   653  		s = append(s, "ActiveRules: "+fmt.Sprintf("%#v", this.ActiveRules)+",\n")
   654  	}
   655  	s = append(s, "EvaluationTimestamp: "+fmt.Sprintf("%#v", this.EvaluationTimestamp)+",\n")
   656  	s = append(s, "EvaluationDuration: "+fmt.Sprintf("%#v", this.EvaluationDuration)+",\n")
   657  	s = append(s, "}")
   658  	return strings.Join(s, "")
   659  }
   660  func (this *RuleStateDesc) GoString() string {
   661  	if this == nil {
   662  		return "nil"
   663  	}
   664  	s := make([]string, 0, 11)
   665  	s = append(s, "&ruler.RuleStateDesc{")
   666  	if this.Rule != nil {
   667  		s = append(s, "Rule: "+fmt.Sprintf("%#v", this.Rule)+",\n")
   668  	}
   669  	s = append(s, "State: "+fmt.Sprintf("%#v", this.State)+",\n")
   670  	s = append(s, "Health: "+fmt.Sprintf("%#v", this.Health)+",\n")
   671  	s = append(s, "LastError: "+fmt.Sprintf("%#v", this.LastError)+",\n")
   672  	if this.Alerts != nil {
   673  		s = append(s, "Alerts: "+fmt.Sprintf("%#v", this.Alerts)+",\n")
   674  	}
   675  	s = append(s, "EvaluationTimestamp: "+fmt.Sprintf("%#v", this.EvaluationTimestamp)+",\n")
   676  	s = append(s, "EvaluationDuration: "+fmt.Sprintf("%#v", this.EvaluationDuration)+",\n")
   677  	s = append(s, "}")
   678  	return strings.Join(s, "")
   679  }
   680  func (this *AlertStateDesc) GoString() string {
   681  	if this == nil {
   682  		return "nil"
   683  	}
   684  	s := make([]string, 0, 13)
   685  	s = append(s, "&ruler.AlertStateDesc{")
   686  	s = append(s, "State: "+fmt.Sprintf("%#v", this.State)+",\n")
   687  	s = append(s, "Labels: "+fmt.Sprintf("%#v", this.Labels)+",\n")
   688  	s = append(s, "Annotations: "+fmt.Sprintf("%#v", this.Annotations)+",\n")
   689  	s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n")
   690  	s = append(s, "ActiveAt: "+fmt.Sprintf("%#v", this.ActiveAt)+",\n")
   691  	s = append(s, "FiredAt: "+fmt.Sprintf("%#v", this.FiredAt)+",\n")
   692  	s = append(s, "ResolvedAt: "+fmt.Sprintf("%#v", this.ResolvedAt)+",\n")
   693  	s = append(s, "LastSentAt: "+fmt.Sprintf("%#v", this.LastSentAt)+",\n")
   694  	s = append(s, "ValidUntil: "+fmt.Sprintf("%#v", this.ValidUntil)+",\n")
   695  	s = append(s, "}")
   696  	return strings.Join(s, "")
   697  }
   698  func valueToGoStringRuler(v interface{}, typ string) string {
   699  	rv := reflect.ValueOf(v)
   700  	if rv.IsNil() {
   701  		return "nil"
   702  	}
   703  	pv := reflect.Indirect(rv).Interface()
   704  	return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv)
   705  }
   706  
   707  // Reference imports to suppress errors if they are not otherwise used.
   708  var _ context.Context
   709  var _ grpc.ClientConn
   710  
   711  // This is a compile-time assertion to ensure that this generated file
   712  // is compatible with the grpc package it is being compiled against.
   713  const _ = grpc.SupportPackageIsVersion4
   714  
   715  // RulerClient is the client API for Ruler service.
   716  //
   717  // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
   718  type RulerClient interface {
   719  	Rules(ctx context.Context, in *RulesRequest, opts ...grpc.CallOption) (*RulesResponse, error)
   720  }
   721  
   722  type rulerClient struct {
   723  	cc *grpc.ClientConn
   724  }
   725  
   726  func NewRulerClient(cc *grpc.ClientConn) RulerClient {
   727  	return &rulerClient{cc}
   728  }
   729  
   730  func (c *rulerClient) Rules(ctx context.Context, in *RulesRequest, opts ...grpc.CallOption) (*RulesResponse, error) {
   731  	out := new(RulesResponse)
   732  	err := c.cc.Invoke(ctx, "/ruler.Ruler/Rules", in, out, opts...)
   733  	if err != nil {
   734  		return nil, err
   735  	}
   736  	return out, nil
   737  }
   738  
   739  // RulerServer is the server API for Ruler service.
   740  type RulerServer interface {
   741  	Rules(context.Context, *RulesRequest) (*RulesResponse, error)
   742  }
   743  
   744  // UnimplementedRulerServer can be embedded to have forward compatible implementations.
   745  type UnimplementedRulerServer struct {
   746  }
   747  
   748  func (*UnimplementedRulerServer) Rules(ctx context.Context, req *RulesRequest) (*RulesResponse, error) {
   749  	return nil, status.Errorf(codes.Unimplemented, "method Rules not implemented")
   750  }
   751  
   752  func RegisterRulerServer(s *grpc.Server, srv RulerServer) {
   753  	s.RegisterService(&_Ruler_serviceDesc, srv)
   754  }
   755  
   756  func _Ruler_Rules_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   757  	in := new(RulesRequest)
   758  	if err := dec(in); err != nil {
   759  		return nil, err
   760  	}
   761  	if interceptor == nil {
   762  		return srv.(RulerServer).Rules(ctx, in)
   763  	}
   764  	info := &grpc.UnaryServerInfo{
   765  		Server:     srv,
   766  		FullMethod: "/ruler.Ruler/Rules",
   767  	}
   768  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   769  		return srv.(RulerServer).Rules(ctx, req.(*RulesRequest))
   770  	}
   771  	return interceptor(ctx, in, info, handler)
   772  }
   773  
   774  var _Ruler_serviceDesc = grpc.ServiceDesc{
   775  	ServiceName: "ruler.Ruler",
   776  	HandlerType: (*RulerServer)(nil),
   777  	Methods: []grpc.MethodDesc{
   778  		{
   779  			MethodName: "Rules",
   780  			Handler:    _Ruler_Rules_Handler,
   781  		},
   782  	},
   783  	Streams:  []grpc.StreamDesc{},
   784  	Metadata: "ruler.proto",
   785  }
   786  
   787  func (m *RulesRequest) Marshal() (dAtA []byte, err error) {
   788  	size := m.Size()
   789  	dAtA = make([]byte, size)
   790  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   791  	if err != nil {
   792  		return nil, err
   793  	}
   794  	return dAtA[:n], nil
   795  }
   796  
   797  func (m *RulesRequest) MarshalTo(dAtA []byte) (int, error) {
   798  	size := m.Size()
   799  	return m.MarshalToSizedBuffer(dAtA[:size])
   800  }
   801  
   802  func (m *RulesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   803  	i := len(dAtA)
   804  	_ = i
   805  	var l int
   806  	_ = l
   807  	return len(dAtA) - i, nil
   808  }
   809  
   810  func (m *RulesResponse) Marshal() (dAtA []byte, err error) {
   811  	size := m.Size()
   812  	dAtA = make([]byte, size)
   813  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   814  	if err != nil {
   815  		return nil, err
   816  	}
   817  	return dAtA[:n], nil
   818  }
   819  
   820  func (m *RulesResponse) MarshalTo(dAtA []byte) (int, error) {
   821  	size := m.Size()
   822  	return m.MarshalToSizedBuffer(dAtA[:size])
   823  }
   824  
   825  func (m *RulesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   826  	i := len(dAtA)
   827  	_ = i
   828  	var l int
   829  	_ = l
   830  	if len(m.Groups) > 0 {
   831  		for iNdEx := len(m.Groups) - 1; iNdEx >= 0; iNdEx-- {
   832  			{
   833  				size, err := m.Groups[iNdEx].MarshalToSizedBuffer(dAtA[:i])
   834  				if err != nil {
   835  					return 0, err
   836  				}
   837  				i -= size
   838  				i = encodeVarintRuler(dAtA, i, uint64(size))
   839  			}
   840  			i--
   841  			dAtA[i] = 0xa
   842  		}
   843  	}
   844  	return len(dAtA) - i, nil
   845  }
   846  
   847  func (m *GroupStateDesc) Marshal() (dAtA []byte, err error) {
   848  	size := m.Size()
   849  	dAtA = make([]byte, size)
   850  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   851  	if err != nil {
   852  		return nil, err
   853  	}
   854  	return dAtA[:n], nil
   855  }
   856  
   857  func (m *GroupStateDesc) MarshalTo(dAtA []byte) (int, error) {
   858  	size := m.Size()
   859  	return m.MarshalToSizedBuffer(dAtA[:size])
   860  }
   861  
   862  func (m *GroupStateDesc) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   863  	i := len(dAtA)
   864  	_ = i
   865  	var l int
   866  	_ = l
   867  	n1, err1 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.EvaluationDuration, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.EvaluationDuration):])
   868  	if err1 != nil {
   869  		return 0, err1
   870  	}
   871  	i -= n1
   872  	i = encodeVarintRuler(dAtA, i, uint64(n1))
   873  	i--
   874  	dAtA[i] = 0x22
   875  	n2, err2 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.EvaluationTimestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.EvaluationTimestamp):])
   876  	if err2 != nil {
   877  		return 0, err2
   878  	}
   879  	i -= n2
   880  	i = encodeVarintRuler(dAtA, i, uint64(n2))
   881  	i--
   882  	dAtA[i] = 0x1a
   883  	if len(m.ActiveRules) > 0 {
   884  		for iNdEx := len(m.ActiveRules) - 1; iNdEx >= 0; iNdEx-- {
   885  			{
   886  				size, err := m.ActiveRules[iNdEx].MarshalToSizedBuffer(dAtA[:i])
   887  				if err != nil {
   888  					return 0, err
   889  				}
   890  				i -= size
   891  				i = encodeVarintRuler(dAtA, i, uint64(size))
   892  			}
   893  			i--
   894  			dAtA[i] = 0x12
   895  		}
   896  	}
   897  	if m.Group != nil {
   898  		{
   899  			size, err := m.Group.MarshalToSizedBuffer(dAtA[:i])
   900  			if err != nil {
   901  				return 0, err
   902  			}
   903  			i -= size
   904  			i = encodeVarintRuler(dAtA, i, uint64(size))
   905  		}
   906  		i--
   907  		dAtA[i] = 0xa
   908  	}
   909  	return len(dAtA) - i, nil
   910  }
   911  
   912  func (m *RuleStateDesc) Marshal() (dAtA []byte, err error) {
   913  	size := m.Size()
   914  	dAtA = make([]byte, size)
   915  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   916  	if err != nil {
   917  		return nil, err
   918  	}
   919  	return dAtA[:n], nil
   920  }
   921  
   922  func (m *RuleStateDesc) MarshalTo(dAtA []byte) (int, error) {
   923  	size := m.Size()
   924  	return m.MarshalToSizedBuffer(dAtA[:size])
   925  }
   926  
   927  func (m *RuleStateDesc) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   928  	i := len(dAtA)
   929  	_ = i
   930  	var l int
   931  	_ = l
   932  	n4, err4 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.EvaluationDuration, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.EvaluationDuration):])
   933  	if err4 != nil {
   934  		return 0, err4
   935  	}
   936  	i -= n4
   937  	i = encodeVarintRuler(dAtA, i, uint64(n4))
   938  	i--
   939  	dAtA[i] = 0x3a
   940  	n5, err5 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.EvaluationTimestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.EvaluationTimestamp):])
   941  	if err5 != nil {
   942  		return 0, err5
   943  	}
   944  	i -= n5
   945  	i = encodeVarintRuler(dAtA, i, uint64(n5))
   946  	i--
   947  	dAtA[i] = 0x32
   948  	if len(m.Alerts) > 0 {
   949  		for iNdEx := len(m.Alerts) - 1; iNdEx >= 0; iNdEx-- {
   950  			{
   951  				size, err := m.Alerts[iNdEx].MarshalToSizedBuffer(dAtA[:i])
   952  				if err != nil {
   953  					return 0, err
   954  				}
   955  				i -= size
   956  				i = encodeVarintRuler(dAtA, i, uint64(size))
   957  			}
   958  			i--
   959  			dAtA[i] = 0x2a
   960  		}
   961  	}
   962  	if len(m.LastError) > 0 {
   963  		i -= len(m.LastError)
   964  		copy(dAtA[i:], m.LastError)
   965  		i = encodeVarintRuler(dAtA, i, uint64(len(m.LastError)))
   966  		i--
   967  		dAtA[i] = 0x22
   968  	}
   969  	if len(m.Health) > 0 {
   970  		i -= len(m.Health)
   971  		copy(dAtA[i:], m.Health)
   972  		i = encodeVarintRuler(dAtA, i, uint64(len(m.Health)))
   973  		i--
   974  		dAtA[i] = 0x1a
   975  	}
   976  	if len(m.State) > 0 {
   977  		i -= len(m.State)
   978  		copy(dAtA[i:], m.State)
   979  		i = encodeVarintRuler(dAtA, i, uint64(len(m.State)))
   980  		i--
   981  		dAtA[i] = 0x12
   982  	}
   983  	if m.Rule != nil {
   984  		{
   985  			size, err := m.Rule.MarshalToSizedBuffer(dAtA[:i])
   986  			if err != nil {
   987  				return 0, err
   988  			}
   989  			i -= size
   990  			i = encodeVarintRuler(dAtA, i, uint64(size))
   991  		}
   992  		i--
   993  		dAtA[i] = 0xa
   994  	}
   995  	return len(dAtA) - i, nil
   996  }
   997  
   998  func (m *AlertStateDesc) Marshal() (dAtA []byte, err error) {
   999  	size := m.Size()
  1000  	dAtA = make([]byte, size)
  1001  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1002  	if err != nil {
  1003  		return nil, err
  1004  	}
  1005  	return dAtA[:n], nil
  1006  }
  1007  
  1008  func (m *AlertStateDesc) MarshalTo(dAtA []byte) (int, error) {
  1009  	size := m.Size()
  1010  	return m.MarshalToSizedBuffer(dAtA[:size])
  1011  }
  1012  
  1013  func (m *AlertStateDesc) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1014  	i := len(dAtA)
  1015  	_ = i
  1016  	var l int
  1017  	_ = l
  1018  	n7, err7 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.ValidUntil, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.ValidUntil):])
  1019  	if err7 != nil {
  1020  		return 0, err7
  1021  	}
  1022  	i -= n7
  1023  	i = encodeVarintRuler(dAtA, i, uint64(n7))
  1024  	i--
  1025  	dAtA[i] = 0x4a
  1026  	n8, err8 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.LastSentAt, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.LastSentAt):])
  1027  	if err8 != nil {
  1028  		return 0, err8
  1029  	}
  1030  	i -= n8
  1031  	i = encodeVarintRuler(dAtA, i, uint64(n8))
  1032  	i--
  1033  	dAtA[i] = 0x42
  1034  	n9, err9 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.ResolvedAt, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.ResolvedAt):])
  1035  	if err9 != nil {
  1036  		return 0, err9
  1037  	}
  1038  	i -= n9
  1039  	i = encodeVarintRuler(dAtA, i, uint64(n9))
  1040  	i--
  1041  	dAtA[i] = 0x3a
  1042  	n10, err10 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.FiredAt, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.FiredAt):])
  1043  	if err10 != nil {
  1044  		return 0, err10
  1045  	}
  1046  	i -= n10
  1047  	i = encodeVarintRuler(dAtA, i, uint64(n10))
  1048  	i--
  1049  	dAtA[i] = 0x32
  1050  	n11, err11 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.ActiveAt, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.ActiveAt):])
  1051  	if err11 != nil {
  1052  		return 0, err11
  1053  	}
  1054  	i -= n11
  1055  	i = encodeVarintRuler(dAtA, i, uint64(n11))
  1056  	i--
  1057  	dAtA[i] = 0x2a
  1058  	if m.Value != 0 {
  1059  		i -= 8
  1060  		encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Value))))
  1061  		i--
  1062  		dAtA[i] = 0x21
  1063  	}
  1064  	if len(m.Annotations) > 0 {
  1065  		for iNdEx := len(m.Annotations) - 1; iNdEx >= 0; iNdEx-- {
  1066  			{
  1067  				size := m.Annotations[iNdEx].Size()
  1068  				i -= size
  1069  				if _, err := m.Annotations[iNdEx].MarshalTo(dAtA[i:]); err != nil {
  1070  					return 0, err
  1071  				}
  1072  				i = encodeVarintRuler(dAtA, i, uint64(size))
  1073  			}
  1074  			i--
  1075  			dAtA[i] = 0x1a
  1076  		}
  1077  	}
  1078  	if len(m.Labels) > 0 {
  1079  		for iNdEx := len(m.Labels) - 1; iNdEx >= 0; iNdEx-- {
  1080  			{
  1081  				size := m.Labels[iNdEx].Size()
  1082  				i -= size
  1083  				if _, err := m.Labels[iNdEx].MarshalTo(dAtA[i:]); err != nil {
  1084  					return 0, err
  1085  				}
  1086  				i = encodeVarintRuler(dAtA, i, uint64(size))
  1087  			}
  1088  			i--
  1089  			dAtA[i] = 0x12
  1090  		}
  1091  	}
  1092  	if len(m.State) > 0 {
  1093  		i -= len(m.State)
  1094  		copy(dAtA[i:], m.State)
  1095  		i = encodeVarintRuler(dAtA, i, uint64(len(m.State)))
  1096  		i--
  1097  		dAtA[i] = 0xa
  1098  	}
  1099  	return len(dAtA) - i, nil
  1100  }
  1101  
  1102  func encodeVarintRuler(dAtA []byte, offset int, v uint64) int {
  1103  	offset -= sovRuler(v)
  1104  	base := offset
  1105  	for v >= 1<<7 {
  1106  		dAtA[offset] = uint8(v&0x7f | 0x80)
  1107  		v >>= 7
  1108  		offset++
  1109  	}
  1110  	dAtA[offset] = uint8(v)
  1111  	return base
  1112  }
  1113  func (m *RulesRequest) Size() (n int) {
  1114  	if m == nil {
  1115  		return 0
  1116  	}
  1117  	var l int
  1118  	_ = l
  1119  	return n
  1120  }
  1121  
  1122  func (m *RulesResponse) Size() (n int) {
  1123  	if m == nil {
  1124  		return 0
  1125  	}
  1126  	var l int
  1127  	_ = l
  1128  	if len(m.Groups) > 0 {
  1129  		for _, e := range m.Groups {
  1130  			l = e.Size()
  1131  			n += 1 + l + sovRuler(uint64(l))
  1132  		}
  1133  	}
  1134  	return n
  1135  }
  1136  
  1137  func (m *GroupStateDesc) Size() (n int) {
  1138  	if m == nil {
  1139  		return 0
  1140  	}
  1141  	var l int
  1142  	_ = l
  1143  	if m.Group != nil {
  1144  		l = m.Group.Size()
  1145  		n += 1 + l + sovRuler(uint64(l))
  1146  	}
  1147  	if len(m.ActiveRules) > 0 {
  1148  		for _, e := range m.ActiveRules {
  1149  			l = e.Size()
  1150  			n += 1 + l + sovRuler(uint64(l))
  1151  		}
  1152  	}
  1153  	l = github_com_gogo_protobuf_types.SizeOfStdTime(m.EvaluationTimestamp)
  1154  	n += 1 + l + sovRuler(uint64(l))
  1155  	l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.EvaluationDuration)
  1156  	n += 1 + l + sovRuler(uint64(l))
  1157  	return n
  1158  }
  1159  
  1160  func (m *RuleStateDesc) Size() (n int) {
  1161  	if m == nil {
  1162  		return 0
  1163  	}
  1164  	var l int
  1165  	_ = l
  1166  	if m.Rule != nil {
  1167  		l = m.Rule.Size()
  1168  		n += 1 + l + sovRuler(uint64(l))
  1169  	}
  1170  	l = len(m.State)
  1171  	if l > 0 {
  1172  		n += 1 + l + sovRuler(uint64(l))
  1173  	}
  1174  	l = len(m.Health)
  1175  	if l > 0 {
  1176  		n += 1 + l + sovRuler(uint64(l))
  1177  	}
  1178  	l = len(m.LastError)
  1179  	if l > 0 {
  1180  		n += 1 + l + sovRuler(uint64(l))
  1181  	}
  1182  	if len(m.Alerts) > 0 {
  1183  		for _, e := range m.Alerts {
  1184  			l = e.Size()
  1185  			n += 1 + l + sovRuler(uint64(l))
  1186  		}
  1187  	}
  1188  	l = github_com_gogo_protobuf_types.SizeOfStdTime(m.EvaluationTimestamp)
  1189  	n += 1 + l + sovRuler(uint64(l))
  1190  	l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.EvaluationDuration)
  1191  	n += 1 + l + sovRuler(uint64(l))
  1192  	return n
  1193  }
  1194  
  1195  func (m *AlertStateDesc) Size() (n int) {
  1196  	if m == nil {
  1197  		return 0
  1198  	}
  1199  	var l int
  1200  	_ = l
  1201  	l = len(m.State)
  1202  	if l > 0 {
  1203  		n += 1 + l + sovRuler(uint64(l))
  1204  	}
  1205  	if len(m.Labels) > 0 {
  1206  		for _, e := range m.Labels {
  1207  			l = e.Size()
  1208  			n += 1 + l + sovRuler(uint64(l))
  1209  		}
  1210  	}
  1211  	if len(m.Annotations) > 0 {
  1212  		for _, e := range m.Annotations {
  1213  			l = e.Size()
  1214  			n += 1 + l + sovRuler(uint64(l))
  1215  		}
  1216  	}
  1217  	if m.Value != 0 {
  1218  		n += 9
  1219  	}
  1220  	l = github_com_gogo_protobuf_types.SizeOfStdTime(m.ActiveAt)
  1221  	n += 1 + l + sovRuler(uint64(l))
  1222  	l = github_com_gogo_protobuf_types.SizeOfStdTime(m.FiredAt)
  1223  	n += 1 + l + sovRuler(uint64(l))
  1224  	l = github_com_gogo_protobuf_types.SizeOfStdTime(m.ResolvedAt)
  1225  	n += 1 + l + sovRuler(uint64(l))
  1226  	l = github_com_gogo_protobuf_types.SizeOfStdTime(m.LastSentAt)
  1227  	n += 1 + l + sovRuler(uint64(l))
  1228  	l = github_com_gogo_protobuf_types.SizeOfStdTime(m.ValidUntil)
  1229  	n += 1 + l + sovRuler(uint64(l))
  1230  	return n
  1231  }
  1232  
  1233  func sovRuler(x uint64) (n int) {
  1234  	return (math_bits.Len64(x|1) + 6) / 7
  1235  }
  1236  func sozRuler(x uint64) (n int) {
  1237  	return sovRuler(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  1238  }
  1239  func (this *RulesRequest) String() string {
  1240  	if this == nil {
  1241  		return "nil"
  1242  	}
  1243  	s := strings.Join([]string{`&RulesRequest{`,
  1244  		`}`,
  1245  	}, "")
  1246  	return s
  1247  }
  1248  func (this *RulesResponse) String() string {
  1249  	if this == nil {
  1250  		return "nil"
  1251  	}
  1252  	repeatedStringForGroups := "[]*GroupStateDesc{"
  1253  	for _, f := range this.Groups {
  1254  		repeatedStringForGroups += strings.Replace(f.String(), "GroupStateDesc", "GroupStateDesc", 1) + ","
  1255  	}
  1256  	repeatedStringForGroups += "}"
  1257  	s := strings.Join([]string{`&RulesResponse{`,
  1258  		`Groups:` + repeatedStringForGroups + `,`,
  1259  		`}`,
  1260  	}, "")
  1261  	return s
  1262  }
  1263  func (this *GroupStateDesc) String() string {
  1264  	if this == nil {
  1265  		return "nil"
  1266  	}
  1267  	repeatedStringForActiveRules := "[]*RuleStateDesc{"
  1268  	for _, f := range this.ActiveRules {
  1269  		repeatedStringForActiveRules += strings.Replace(f.String(), "RuleStateDesc", "RuleStateDesc", 1) + ","
  1270  	}
  1271  	repeatedStringForActiveRules += "}"
  1272  	s := strings.Join([]string{`&GroupStateDesc{`,
  1273  		`Group:` + strings.Replace(fmt.Sprintf("%v", this.Group), "RuleGroupDesc", "rulespb.RuleGroupDesc", 1) + `,`,
  1274  		`ActiveRules:` + repeatedStringForActiveRules + `,`,
  1275  		`EvaluationTimestamp:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.EvaluationTimestamp), "Timestamp", "timestamp.Timestamp", 1), `&`, ``, 1) + `,`,
  1276  		`EvaluationDuration:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.EvaluationDuration), "Duration", "duration.Duration", 1), `&`, ``, 1) + `,`,
  1277  		`}`,
  1278  	}, "")
  1279  	return s
  1280  }
  1281  func (this *RuleStateDesc) String() string {
  1282  	if this == nil {
  1283  		return "nil"
  1284  	}
  1285  	repeatedStringForAlerts := "[]*AlertStateDesc{"
  1286  	for _, f := range this.Alerts {
  1287  		repeatedStringForAlerts += strings.Replace(f.String(), "AlertStateDesc", "AlertStateDesc", 1) + ","
  1288  	}
  1289  	repeatedStringForAlerts += "}"
  1290  	s := strings.Join([]string{`&RuleStateDesc{`,
  1291  		`Rule:` + strings.Replace(fmt.Sprintf("%v", this.Rule), "RuleDesc", "rulespb.RuleDesc", 1) + `,`,
  1292  		`State:` + fmt.Sprintf("%v", this.State) + `,`,
  1293  		`Health:` + fmt.Sprintf("%v", this.Health) + `,`,
  1294  		`LastError:` + fmt.Sprintf("%v", this.LastError) + `,`,
  1295  		`Alerts:` + repeatedStringForAlerts + `,`,
  1296  		`EvaluationTimestamp:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.EvaluationTimestamp), "Timestamp", "timestamp.Timestamp", 1), `&`, ``, 1) + `,`,
  1297  		`EvaluationDuration:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.EvaluationDuration), "Duration", "duration.Duration", 1), `&`, ``, 1) + `,`,
  1298  		`}`,
  1299  	}, "")
  1300  	return s
  1301  }
  1302  func (this *AlertStateDesc) String() string {
  1303  	if this == nil {
  1304  		return "nil"
  1305  	}
  1306  	s := strings.Join([]string{`&AlertStateDesc{`,
  1307  		`State:` + fmt.Sprintf("%v", this.State) + `,`,
  1308  		`Labels:` + fmt.Sprintf("%v", this.Labels) + `,`,
  1309  		`Annotations:` + fmt.Sprintf("%v", this.Annotations) + `,`,
  1310  		`Value:` + fmt.Sprintf("%v", this.Value) + `,`,
  1311  		`ActiveAt:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ActiveAt), "Timestamp", "timestamp.Timestamp", 1), `&`, ``, 1) + `,`,
  1312  		`FiredAt:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.FiredAt), "Timestamp", "timestamp.Timestamp", 1), `&`, ``, 1) + `,`,
  1313  		`ResolvedAt:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ResolvedAt), "Timestamp", "timestamp.Timestamp", 1), `&`, ``, 1) + `,`,
  1314  		`LastSentAt:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.LastSentAt), "Timestamp", "timestamp.Timestamp", 1), `&`, ``, 1) + `,`,
  1315  		`ValidUntil:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ValidUntil), "Timestamp", "timestamp.Timestamp", 1), `&`, ``, 1) + `,`,
  1316  		`}`,
  1317  	}, "")
  1318  	return s
  1319  }
  1320  func valueToStringRuler(v interface{}) string {
  1321  	rv := reflect.ValueOf(v)
  1322  	if rv.IsNil() {
  1323  		return "nil"
  1324  	}
  1325  	pv := reflect.Indirect(rv).Interface()
  1326  	return fmt.Sprintf("*%v", pv)
  1327  }
  1328  func (m *RulesRequest) Unmarshal(dAtA []byte) error {
  1329  	l := len(dAtA)
  1330  	iNdEx := 0
  1331  	for iNdEx < l {
  1332  		preIndex := iNdEx
  1333  		var wire uint64
  1334  		for shift := uint(0); ; shift += 7 {
  1335  			if shift >= 64 {
  1336  				return ErrIntOverflowRuler
  1337  			}
  1338  			if iNdEx >= l {
  1339  				return io.ErrUnexpectedEOF
  1340  			}
  1341  			b := dAtA[iNdEx]
  1342  			iNdEx++
  1343  			wire |= uint64(b&0x7F) << shift
  1344  			if b < 0x80 {
  1345  				break
  1346  			}
  1347  		}
  1348  		fieldNum := int32(wire >> 3)
  1349  		wireType := int(wire & 0x7)
  1350  		if wireType == 4 {
  1351  			return fmt.Errorf("proto: RulesRequest: wiretype end group for non-group")
  1352  		}
  1353  		if fieldNum <= 0 {
  1354  			return fmt.Errorf("proto: RulesRequest: illegal tag %d (wire type %d)", fieldNum, wire)
  1355  		}
  1356  		switch fieldNum {
  1357  		default:
  1358  			iNdEx = preIndex
  1359  			skippy, err := skipRuler(dAtA[iNdEx:])
  1360  			if err != nil {
  1361  				return err
  1362  			}
  1363  			if skippy < 0 {
  1364  				return ErrInvalidLengthRuler
  1365  			}
  1366  			if (iNdEx + skippy) < 0 {
  1367  				return ErrInvalidLengthRuler
  1368  			}
  1369  			if (iNdEx + skippy) > l {
  1370  				return io.ErrUnexpectedEOF
  1371  			}
  1372  			iNdEx += skippy
  1373  		}
  1374  	}
  1375  
  1376  	if iNdEx > l {
  1377  		return io.ErrUnexpectedEOF
  1378  	}
  1379  	return nil
  1380  }
  1381  func (m *RulesResponse) Unmarshal(dAtA []byte) error {
  1382  	l := len(dAtA)
  1383  	iNdEx := 0
  1384  	for iNdEx < l {
  1385  		preIndex := iNdEx
  1386  		var wire uint64
  1387  		for shift := uint(0); ; shift += 7 {
  1388  			if shift >= 64 {
  1389  				return ErrIntOverflowRuler
  1390  			}
  1391  			if iNdEx >= l {
  1392  				return io.ErrUnexpectedEOF
  1393  			}
  1394  			b := dAtA[iNdEx]
  1395  			iNdEx++
  1396  			wire |= uint64(b&0x7F) << shift
  1397  			if b < 0x80 {
  1398  				break
  1399  			}
  1400  		}
  1401  		fieldNum := int32(wire >> 3)
  1402  		wireType := int(wire & 0x7)
  1403  		if wireType == 4 {
  1404  			return fmt.Errorf("proto: RulesResponse: wiretype end group for non-group")
  1405  		}
  1406  		if fieldNum <= 0 {
  1407  			return fmt.Errorf("proto: RulesResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  1408  		}
  1409  		switch fieldNum {
  1410  		case 1:
  1411  			if wireType != 2 {
  1412  				return fmt.Errorf("proto: wrong wireType = %d for field Groups", wireType)
  1413  			}
  1414  			var msglen int
  1415  			for shift := uint(0); ; shift += 7 {
  1416  				if shift >= 64 {
  1417  					return ErrIntOverflowRuler
  1418  				}
  1419  				if iNdEx >= l {
  1420  					return io.ErrUnexpectedEOF
  1421  				}
  1422  				b := dAtA[iNdEx]
  1423  				iNdEx++
  1424  				msglen |= int(b&0x7F) << shift
  1425  				if b < 0x80 {
  1426  					break
  1427  				}
  1428  			}
  1429  			if msglen < 0 {
  1430  				return ErrInvalidLengthRuler
  1431  			}
  1432  			postIndex := iNdEx + msglen
  1433  			if postIndex < 0 {
  1434  				return ErrInvalidLengthRuler
  1435  			}
  1436  			if postIndex > l {
  1437  				return io.ErrUnexpectedEOF
  1438  			}
  1439  			m.Groups = append(m.Groups, &GroupStateDesc{})
  1440  			if err := m.Groups[len(m.Groups)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1441  				return err
  1442  			}
  1443  			iNdEx = postIndex
  1444  		default:
  1445  			iNdEx = preIndex
  1446  			skippy, err := skipRuler(dAtA[iNdEx:])
  1447  			if err != nil {
  1448  				return err
  1449  			}
  1450  			if skippy < 0 {
  1451  				return ErrInvalidLengthRuler
  1452  			}
  1453  			if (iNdEx + skippy) < 0 {
  1454  				return ErrInvalidLengthRuler
  1455  			}
  1456  			if (iNdEx + skippy) > l {
  1457  				return io.ErrUnexpectedEOF
  1458  			}
  1459  			iNdEx += skippy
  1460  		}
  1461  	}
  1462  
  1463  	if iNdEx > l {
  1464  		return io.ErrUnexpectedEOF
  1465  	}
  1466  	return nil
  1467  }
  1468  func (m *GroupStateDesc) Unmarshal(dAtA []byte) error {
  1469  	l := len(dAtA)
  1470  	iNdEx := 0
  1471  	for iNdEx < l {
  1472  		preIndex := iNdEx
  1473  		var wire uint64
  1474  		for shift := uint(0); ; shift += 7 {
  1475  			if shift >= 64 {
  1476  				return ErrIntOverflowRuler
  1477  			}
  1478  			if iNdEx >= l {
  1479  				return io.ErrUnexpectedEOF
  1480  			}
  1481  			b := dAtA[iNdEx]
  1482  			iNdEx++
  1483  			wire |= uint64(b&0x7F) << shift
  1484  			if b < 0x80 {
  1485  				break
  1486  			}
  1487  		}
  1488  		fieldNum := int32(wire >> 3)
  1489  		wireType := int(wire & 0x7)
  1490  		if wireType == 4 {
  1491  			return fmt.Errorf("proto: GroupStateDesc: wiretype end group for non-group")
  1492  		}
  1493  		if fieldNum <= 0 {
  1494  			return fmt.Errorf("proto: GroupStateDesc: illegal tag %d (wire type %d)", fieldNum, wire)
  1495  		}
  1496  		switch fieldNum {
  1497  		case 1:
  1498  			if wireType != 2 {
  1499  				return fmt.Errorf("proto: wrong wireType = %d for field Group", wireType)
  1500  			}
  1501  			var msglen int
  1502  			for shift := uint(0); ; shift += 7 {
  1503  				if shift >= 64 {
  1504  					return ErrIntOverflowRuler
  1505  				}
  1506  				if iNdEx >= l {
  1507  					return io.ErrUnexpectedEOF
  1508  				}
  1509  				b := dAtA[iNdEx]
  1510  				iNdEx++
  1511  				msglen |= int(b&0x7F) << shift
  1512  				if b < 0x80 {
  1513  					break
  1514  				}
  1515  			}
  1516  			if msglen < 0 {
  1517  				return ErrInvalidLengthRuler
  1518  			}
  1519  			postIndex := iNdEx + msglen
  1520  			if postIndex < 0 {
  1521  				return ErrInvalidLengthRuler
  1522  			}
  1523  			if postIndex > l {
  1524  				return io.ErrUnexpectedEOF
  1525  			}
  1526  			if m.Group == nil {
  1527  				m.Group = &rulespb.RuleGroupDesc{}
  1528  			}
  1529  			if err := m.Group.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1530  				return err
  1531  			}
  1532  			iNdEx = postIndex
  1533  		case 2:
  1534  			if wireType != 2 {
  1535  				return fmt.Errorf("proto: wrong wireType = %d for field ActiveRules", wireType)
  1536  			}
  1537  			var msglen int
  1538  			for shift := uint(0); ; shift += 7 {
  1539  				if shift >= 64 {
  1540  					return ErrIntOverflowRuler
  1541  				}
  1542  				if iNdEx >= l {
  1543  					return io.ErrUnexpectedEOF
  1544  				}
  1545  				b := dAtA[iNdEx]
  1546  				iNdEx++
  1547  				msglen |= int(b&0x7F) << shift
  1548  				if b < 0x80 {
  1549  					break
  1550  				}
  1551  			}
  1552  			if msglen < 0 {
  1553  				return ErrInvalidLengthRuler
  1554  			}
  1555  			postIndex := iNdEx + msglen
  1556  			if postIndex < 0 {
  1557  				return ErrInvalidLengthRuler
  1558  			}
  1559  			if postIndex > l {
  1560  				return io.ErrUnexpectedEOF
  1561  			}
  1562  			m.ActiveRules = append(m.ActiveRules, &RuleStateDesc{})
  1563  			if err := m.ActiveRules[len(m.ActiveRules)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1564  				return err
  1565  			}
  1566  			iNdEx = postIndex
  1567  		case 3:
  1568  			if wireType != 2 {
  1569  				return fmt.Errorf("proto: wrong wireType = %d for field EvaluationTimestamp", wireType)
  1570  			}
  1571  			var msglen int
  1572  			for shift := uint(0); ; shift += 7 {
  1573  				if shift >= 64 {
  1574  					return ErrIntOverflowRuler
  1575  				}
  1576  				if iNdEx >= l {
  1577  					return io.ErrUnexpectedEOF
  1578  				}
  1579  				b := dAtA[iNdEx]
  1580  				iNdEx++
  1581  				msglen |= int(b&0x7F) << shift
  1582  				if b < 0x80 {
  1583  					break
  1584  				}
  1585  			}
  1586  			if msglen < 0 {
  1587  				return ErrInvalidLengthRuler
  1588  			}
  1589  			postIndex := iNdEx + msglen
  1590  			if postIndex < 0 {
  1591  				return ErrInvalidLengthRuler
  1592  			}
  1593  			if postIndex > l {
  1594  				return io.ErrUnexpectedEOF
  1595  			}
  1596  			if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.EvaluationTimestamp, dAtA[iNdEx:postIndex]); err != nil {
  1597  				return err
  1598  			}
  1599  			iNdEx = postIndex
  1600  		case 4:
  1601  			if wireType != 2 {
  1602  				return fmt.Errorf("proto: wrong wireType = %d for field EvaluationDuration", wireType)
  1603  			}
  1604  			var msglen int
  1605  			for shift := uint(0); ; shift += 7 {
  1606  				if shift >= 64 {
  1607  					return ErrIntOverflowRuler
  1608  				}
  1609  				if iNdEx >= l {
  1610  					return io.ErrUnexpectedEOF
  1611  				}
  1612  				b := dAtA[iNdEx]
  1613  				iNdEx++
  1614  				msglen |= int(b&0x7F) << shift
  1615  				if b < 0x80 {
  1616  					break
  1617  				}
  1618  			}
  1619  			if msglen < 0 {
  1620  				return ErrInvalidLengthRuler
  1621  			}
  1622  			postIndex := iNdEx + msglen
  1623  			if postIndex < 0 {
  1624  				return ErrInvalidLengthRuler
  1625  			}
  1626  			if postIndex > l {
  1627  				return io.ErrUnexpectedEOF
  1628  			}
  1629  			if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(&m.EvaluationDuration, dAtA[iNdEx:postIndex]); err != nil {
  1630  				return err
  1631  			}
  1632  			iNdEx = postIndex
  1633  		default:
  1634  			iNdEx = preIndex
  1635  			skippy, err := skipRuler(dAtA[iNdEx:])
  1636  			if err != nil {
  1637  				return err
  1638  			}
  1639  			if skippy < 0 {
  1640  				return ErrInvalidLengthRuler
  1641  			}
  1642  			if (iNdEx + skippy) < 0 {
  1643  				return ErrInvalidLengthRuler
  1644  			}
  1645  			if (iNdEx + skippy) > l {
  1646  				return io.ErrUnexpectedEOF
  1647  			}
  1648  			iNdEx += skippy
  1649  		}
  1650  	}
  1651  
  1652  	if iNdEx > l {
  1653  		return io.ErrUnexpectedEOF
  1654  	}
  1655  	return nil
  1656  }
  1657  func (m *RuleStateDesc) Unmarshal(dAtA []byte) error {
  1658  	l := len(dAtA)
  1659  	iNdEx := 0
  1660  	for iNdEx < l {
  1661  		preIndex := iNdEx
  1662  		var wire uint64
  1663  		for shift := uint(0); ; shift += 7 {
  1664  			if shift >= 64 {
  1665  				return ErrIntOverflowRuler
  1666  			}
  1667  			if iNdEx >= l {
  1668  				return io.ErrUnexpectedEOF
  1669  			}
  1670  			b := dAtA[iNdEx]
  1671  			iNdEx++
  1672  			wire |= uint64(b&0x7F) << shift
  1673  			if b < 0x80 {
  1674  				break
  1675  			}
  1676  		}
  1677  		fieldNum := int32(wire >> 3)
  1678  		wireType := int(wire & 0x7)
  1679  		if wireType == 4 {
  1680  			return fmt.Errorf("proto: RuleStateDesc: wiretype end group for non-group")
  1681  		}
  1682  		if fieldNum <= 0 {
  1683  			return fmt.Errorf("proto: RuleStateDesc: illegal tag %d (wire type %d)", fieldNum, wire)
  1684  		}
  1685  		switch fieldNum {
  1686  		case 1:
  1687  			if wireType != 2 {
  1688  				return fmt.Errorf("proto: wrong wireType = %d for field Rule", wireType)
  1689  			}
  1690  			var msglen int
  1691  			for shift := uint(0); ; shift += 7 {
  1692  				if shift >= 64 {
  1693  					return ErrIntOverflowRuler
  1694  				}
  1695  				if iNdEx >= l {
  1696  					return io.ErrUnexpectedEOF
  1697  				}
  1698  				b := dAtA[iNdEx]
  1699  				iNdEx++
  1700  				msglen |= int(b&0x7F) << shift
  1701  				if b < 0x80 {
  1702  					break
  1703  				}
  1704  			}
  1705  			if msglen < 0 {
  1706  				return ErrInvalidLengthRuler
  1707  			}
  1708  			postIndex := iNdEx + msglen
  1709  			if postIndex < 0 {
  1710  				return ErrInvalidLengthRuler
  1711  			}
  1712  			if postIndex > l {
  1713  				return io.ErrUnexpectedEOF
  1714  			}
  1715  			if m.Rule == nil {
  1716  				m.Rule = &rulespb.RuleDesc{}
  1717  			}
  1718  			if err := m.Rule.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1719  				return err
  1720  			}
  1721  			iNdEx = postIndex
  1722  		case 2:
  1723  			if wireType != 2 {
  1724  				return fmt.Errorf("proto: wrong wireType = %d for field State", wireType)
  1725  			}
  1726  			var stringLen uint64
  1727  			for shift := uint(0); ; shift += 7 {
  1728  				if shift >= 64 {
  1729  					return ErrIntOverflowRuler
  1730  				}
  1731  				if iNdEx >= l {
  1732  					return io.ErrUnexpectedEOF
  1733  				}
  1734  				b := dAtA[iNdEx]
  1735  				iNdEx++
  1736  				stringLen |= uint64(b&0x7F) << shift
  1737  				if b < 0x80 {
  1738  					break
  1739  				}
  1740  			}
  1741  			intStringLen := int(stringLen)
  1742  			if intStringLen < 0 {
  1743  				return ErrInvalidLengthRuler
  1744  			}
  1745  			postIndex := iNdEx + intStringLen
  1746  			if postIndex < 0 {
  1747  				return ErrInvalidLengthRuler
  1748  			}
  1749  			if postIndex > l {
  1750  				return io.ErrUnexpectedEOF
  1751  			}
  1752  			m.State = string(dAtA[iNdEx:postIndex])
  1753  			iNdEx = postIndex
  1754  		case 3:
  1755  			if wireType != 2 {
  1756  				return fmt.Errorf("proto: wrong wireType = %d for field Health", wireType)
  1757  			}
  1758  			var stringLen uint64
  1759  			for shift := uint(0); ; shift += 7 {
  1760  				if shift >= 64 {
  1761  					return ErrIntOverflowRuler
  1762  				}
  1763  				if iNdEx >= l {
  1764  					return io.ErrUnexpectedEOF
  1765  				}
  1766  				b := dAtA[iNdEx]
  1767  				iNdEx++
  1768  				stringLen |= uint64(b&0x7F) << shift
  1769  				if b < 0x80 {
  1770  					break
  1771  				}
  1772  			}
  1773  			intStringLen := int(stringLen)
  1774  			if intStringLen < 0 {
  1775  				return ErrInvalidLengthRuler
  1776  			}
  1777  			postIndex := iNdEx + intStringLen
  1778  			if postIndex < 0 {
  1779  				return ErrInvalidLengthRuler
  1780  			}
  1781  			if postIndex > l {
  1782  				return io.ErrUnexpectedEOF
  1783  			}
  1784  			m.Health = string(dAtA[iNdEx:postIndex])
  1785  			iNdEx = postIndex
  1786  		case 4:
  1787  			if wireType != 2 {
  1788  				return fmt.Errorf("proto: wrong wireType = %d for field LastError", wireType)
  1789  			}
  1790  			var stringLen uint64
  1791  			for shift := uint(0); ; shift += 7 {
  1792  				if shift >= 64 {
  1793  					return ErrIntOverflowRuler
  1794  				}
  1795  				if iNdEx >= l {
  1796  					return io.ErrUnexpectedEOF
  1797  				}
  1798  				b := dAtA[iNdEx]
  1799  				iNdEx++
  1800  				stringLen |= uint64(b&0x7F) << shift
  1801  				if b < 0x80 {
  1802  					break
  1803  				}
  1804  			}
  1805  			intStringLen := int(stringLen)
  1806  			if intStringLen < 0 {
  1807  				return ErrInvalidLengthRuler
  1808  			}
  1809  			postIndex := iNdEx + intStringLen
  1810  			if postIndex < 0 {
  1811  				return ErrInvalidLengthRuler
  1812  			}
  1813  			if postIndex > l {
  1814  				return io.ErrUnexpectedEOF
  1815  			}
  1816  			m.LastError = string(dAtA[iNdEx:postIndex])
  1817  			iNdEx = postIndex
  1818  		case 5:
  1819  			if wireType != 2 {
  1820  				return fmt.Errorf("proto: wrong wireType = %d for field Alerts", wireType)
  1821  			}
  1822  			var msglen int
  1823  			for shift := uint(0); ; shift += 7 {
  1824  				if shift >= 64 {
  1825  					return ErrIntOverflowRuler
  1826  				}
  1827  				if iNdEx >= l {
  1828  					return io.ErrUnexpectedEOF
  1829  				}
  1830  				b := dAtA[iNdEx]
  1831  				iNdEx++
  1832  				msglen |= int(b&0x7F) << shift
  1833  				if b < 0x80 {
  1834  					break
  1835  				}
  1836  			}
  1837  			if msglen < 0 {
  1838  				return ErrInvalidLengthRuler
  1839  			}
  1840  			postIndex := iNdEx + msglen
  1841  			if postIndex < 0 {
  1842  				return ErrInvalidLengthRuler
  1843  			}
  1844  			if postIndex > l {
  1845  				return io.ErrUnexpectedEOF
  1846  			}
  1847  			m.Alerts = append(m.Alerts, &AlertStateDesc{})
  1848  			if err := m.Alerts[len(m.Alerts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1849  				return err
  1850  			}
  1851  			iNdEx = postIndex
  1852  		case 6:
  1853  			if wireType != 2 {
  1854  				return fmt.Errorf("proto: wrong wireType = %d for field EvaluationTimestamp", wireType)
  1855  			}
  1856  			var msglen int
  1857  			for shift := uint(0); ; shift += 7 {
  1858  				if shift >= 64 {
  1859  					return ErrIntOverflowRuler
  1860  				}
  1861  				if iNdEx >= l {
  1862  					return io.ErrUnexpectedEOF
  1863  				}
  1864  				b := dAtA[iNdEx]
  1865  				iNdEx++
  1866  				msglen |= int(b&0x7F) << shift
  1867  				if b < 0x80 {
  1868  					break
  1869  				}
  1870  			}
  1871  			if msglen < 0 {
  1872  				return ErrInvalidLengthRuler
  1873  			}
  1874  			postIndex := iNdEx + msglen
  1875  			if postIndex < 0 {
  1876  				return ErrInvalidLengthRuler
  1877  			}
  1878  			if postIndex > l {
  1879  				return io.ErrUnexpectedEOF
  1880  			}
  1881  			if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.EvaluationTimestamp, dAtA[iNdEx:postIndex]); err != nil {
  1882  				return err
  1883  			}
  1884  			iNdEx = postIndex
  1885  		case 7:
  1886  			if wireType != 2 {
  1887  				return fmt.Errorf("proto: wrong wireType = %d for field EvaluationDuration", wireType)
  1888  			}
  1889  			var msglen int
  1890  			for shift := uint(0); ; shift += 7 {
  1891  				if shift >= 64 {
  1892  					return ErrIntOverflowRuler
  1893  				}
  1894  				if iNdEx >= l {
  1895  					return io.ErrUnexpectedEOF
  1896  				}
  1897  				b := dAtA[iNdEx]
  1898  				iNdEx++
  1899  				msglen |= int(b&0x7F) << shift
  1900  				if b < 0x80 {
  1901  					break
  1902  				}
  1903  			}
  1904  			if msglen < 0 {
  1905  				return ErrInvalidLengthRuler
  1906  			}
  1907  			postIndex := iNdEx + msglen
  1908  			if postIndex < 0 {
  1909  				return ErrInvalidLengthRuler
  1910  			}
  1911  			if postIndex > l {
  1912  				return io.ErrUnexpectedEOF
  1913  			}
  1914  			if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(&m.EvaluationDuration, dAtA[iNdEx:postIndex]); err != nil {
  1915  				return err
  1916  			}
  1917  			iNdEx = postIndex
  1918  		default:
  1919  			iNdEx = preIndex
  1920  			skippy, err := skipRuler(dAtA[iNdEx:])
  1921  			if err != nil {
  1922  				return err
  1923  			}
  1924  			if skippy < 0 {
  1925  				return ErrInvalidLengthRuler
  1926  			}
  1927  			if (iNdEx + skippy) < 0 {
  1928  				return ErrInvalidLengthRuler
  1929  			}
  1930  			if (iNdEx + skippy) > l {
  1931  				return io.ErrUnexpectedEOF
  1932  			}
  1933  			iNdEx += skippy
  1934  		}
  1935  	}
  1936  
  1937  	if iNdEx > l {
  1938  		return io.ErrUnexpectedEOF
  1939  	}
  1940  	return nil
  1941  }
  1942  func (m *AlertStateDesc) Unmarshal(dAtA []byte) error {
  1943  	l := len(dAtA)
  1944  	iNdEx := 0
  1945  	for iNdEx < l {
  1946  		preIndex := iNdEx
  1947  		var wire uint64
  1948  		for shift := uint(0); ; shift += 7 {
  1949  			if shift >= 64 {
  1950  				return ErrIntOverflowRuler
  1951  			}
  1952  			if iNdEx >= l {
  1953  				return io.ErrUnexpectedEOF
  1954  			}
  1955  			b := dAtA[iNdEx]
  1956  			iNdEx++
  1957  			wire |= uint64(b&0x7F) << shift
  1958  			if b < 0x80 {
  1959  				break
  1960  			}
  1961  		}
  1962  		fieldNum := int32(wire >> 3)
  1963  		wireType := int(wire & 0x7)
  1964  		if wireType == 4 {
  1965  			return fmt.Errorf("proto: AlertStateDesc: wiretype end group for non-group")
  1966  		}
  1967  		if fieldNum <= 0 {
  1968  			return fmt.Errorf("proto: AlertStateDesc: illegal tag %d (wire type %d)", fieldNum, wire)
  1969  		}
  1970  		switch fieldNum {
  1971  		case 1:
  1972  			if wireType != 2 {
  1973  				return fmt.Errorf("proto: wrong wireType = %d for field State", wireType)
  1974  			}
  1975  			var stringLen uint64
  1976  			for shift := uint(0); ; shift += 7 {
  1977  				if shift >= 64 {
  1978  					return ErrIntOverflowRuler
  1979  				}
  1980  				if iNdEx >= l {
  1981  					return io.ErrUnexpectedEOF
  1982  				}
  1983  				b := dAtA[iNdEx]
  1984  				iNdEx++
  1985  				stringLen |= uint64(b&0x7F) << shift
  1986  				if b < 0x80 {
  1987  					break
  1988  				}
  1989  			}
  1990  			intStringLen := int(stringLen)
  1991  			if intStringLen < 0 {
  1992  				return ErrInvalidLengthRuler
  1993  			}
  1994  			postIndex := iNdEx + intStringLen
  1995  			if postIndex < 0 {
  1996  				return ErrInvalidLengthRuler
  1997  			}
  1998  			if postIndex > l {
  1999  				return io.ErrUnexpectedEOF
  2000  			}
  2001  			m.State = string(dAtA[iNdEx:postIndex])
  2002  			iNdEx = postIndex
  2003  		case 2:
  2004  			if wireType != 2 {
  2005  				return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType)
  2006  			}
  2007  			var msglen int
  2008  			for shift := uint(0); ; shift += 7 {
  2009  				if shift >= 64 {
  2010  					return ErrIntOverflowRuler
  2011  				}
  2012  				if iNdEx >= l {
  2013  					return io.ErrUnexpectedEOF
  2014  				}
  2015  				b := dAtA[iNdEx]
  2016  				iNdEx++
  2017  				msglen |= int(b&0x7F) << shift
  2018  				if b < 0x80 {
  2019  					break
  2020  				}
  2021  			}
  2022  			if msglen < 0 {
  2023  				return ErrInvalidLengthRuler
  2024  			}
  2025  			postIndex := iNdEx + msglen
  2026  			if postIndex < 0 {
  2027  				return ErrInvalidLengthRuler
  2028  			}
  2029  			if postIndex > l {
  2030  				return io.ErrUnexpectedEOF
  2031  			}
  2032  			m.Labels = append(m.Labels, github_com_cortexproject_cortex_pkg_cortexpb.LabelAdapter{})
  2033  			if err := m.Labels[len(m.Labels)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2034  				return err
  2035  			}
  2036  			iNdEx = postIndex
  2037  		case 3:
  2038  			if wireType != 2 {
  2039  				return fmt.Errorf("proto: wrong wireType = %d for field Annotations", wireType)
  2040  			}
  2041  			var msglen int
  2042  			for shift := uint(0); ; shift += 7 {
  2043  				if shift >= 64 {
  2044  					return ErrIntOverflowRuler
  2045  				}
  2046  				if iNdEx >= l {
  2047  					return io.ErrUnexpectedEOF
  2048  				}
  2049  				b := dAtA[iNdEx]
  2050  				iNdEx++
  2051  				msglen |= int(b&0x7F) << shift
  2052  				if b < 0x80 {
  2053  					break
  2054  				}
  2055  			}
  2056  			if msglen < 0 {
  2057  				return ErrInvalidLengthRuler
  2058  			}
  2059  			postIndex := iNdEx + msglen
  2060  			if postIndex < 0 {
  2061  				return ErrInvalidLengthRuler
  2062  			}
  2063  			if postIndex > l {
  2064  				return io.ErrUnexpectedEOF
  2065  			}
  2066  			m.Annotations = append(m.Annotations, github_com_cortexproject_cortex_pkg_cortexpb.LabelAdapter{})
  2067  			if err := m.Annotations[len(m.Annotations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2068  				return err
  2069  			}
  2070  			iNdEx = postIndex
  2071  		case 4:
  2072  			if wireType != 1 {
  2073  				return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
  2074  			}
  2075  			var v uint64
  2076  			if (iNdEx + 8) > l {
  2077  				return io.ErrUnexpectedEOF
  2078  			}
  2079  			v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:]))
  2080  			iNdEx += 8
  2081  			m.Value = float64(math.Float64frombits(v))
  2082  		case 5:
  2083  			if wireType != 2 {
  2084  				return fmt.Errorf("proto: wrong wireType = %d for field ActiveAt", wireType)
  2085  			}
  2086  			var msglen int
  2087  			for shift := uint(0); ; shift += 7 {
  2088  				if shift >= 64 {
  2089  					return ErrIntOverflowRuler
  2090  				}
  2091  				if iNdEx >= l {
  2092  					return io.ErrUnexpectedEOF
  2093  				}
  2094  				b := dAtA[iNdEx]
  2095  				iNdEx++
  2096  				msglen |= int(b&0x7F) << shift
  2097  				if b < 0x80 {
  2098  					break
  2099  				}
  2100  			}
  2101  			if msglen < 0 {
  2102  				return ErrInvalidLengthRuler
  2103  			}
  2104  			postIndex := iNdEx + msglen
  2105  			if postIndex < 0 {
  2106  				return ErrInvalidLengthRuler
  2107  			}
  2108  			if postIndex > l {
  2109  				return io.ErrUnexpectedEOF
  2110  			}
  2111  			if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.ActiveAt, dAtA[iNdEx:postIndex]); err != nil {
  2112  				return err
  2113  			}
  2114  			iNdEx = postIndex
  2115  		case 6:
  2116  			if wireType != 2 {
  2117  				return fmt.Errorf("proto: wrong wireType = %d for field FiredAt", wireType)
  2118  			}
  2119  			var msglen int
  2120  			for shift := uint(0); ; shift += 7 {
  2121  				if shift >= 64 {
  2122  					return ErrIntOverflowRuler
  2123  				}
  2124  				if iNdEx >= l {
  2125  					return io.ErrUnexpectedEOF
  2126  				}
  2127  				b := dAtA[iNdEx]
  2128  				iNdEx++
  2129  				msglen |= int(b&0x7F) << shift
  2130  				if b < 0x80 {
  2131  					break
  2132  				}
  2133  			}
  2134  			if msglen < 0 {
  2135  				return ErrInvalidLengthRuler
  2136  			}
  2137  			postIndex := iNdEx + msglen
  2138  			if postIndex < 0 {
  2139  				return ErrInvalidLengthRuler
  2140  			}
  2141  			if postIndex > l {
  2142  				return io.ErrUnexpectedEOF
  2143  			}
  2144  			if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.FiredAt, dAtA[iNdEx:postIndex]); err != nil {
  2145  				return err
  2146  			}
  2147  			iNdEx = postIndex
  2148  		case 7:
  2149  			if wireType != 2 {
  2150  				return fmt.Errorf("proto: wrong wireType = %d for field ResolvedAt", wireType)
  2151  			}
  2152  			var msglen int
  2153  			for shift := uint(0); ; shift += 7 {
  2154  				if shift >= 64 {
  2155  					return ErrIntOverflowRuler
  2156  				}
  2157  				if iNdEx >= l {
  2158  					return io.ErrUnexpectedEOF
  2159  				}
  2160  				b := dAtA[iNdEx]
  2161  				iNdEx++
  2162  				msglen |= int(b&0x7F) << shift
  2163  				if b < 0x80 {
  2164  					break
  2165  				}
  2166  			}
  2167  			if msglen < 0 {
  2168  				return ErrInvalidLengthRuler
  2169  			}
  2170  			postIndex := iNdEx + msglen
  2171  			if postIndex < 0 {
  2172  				return ErrInvalidLengthRuler
  2173  			}
  2174  			if postIndex > l {
  2175  				return io.ErrUnexpectedEOF
  2176  			}
  2177  			if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.ResolvedAt, dAtA[iNdEx:postIndex]); err != nil {
  2178  				return err
  2179  			}
  2180  			iNdEx = postIndex
  2181  		case 8:
  2182  			if wireType != 2 {
  2183  				return fmt.Errorf("proto: wrong wireType = %d for field LastSentAt", wireType)
  2184  			}
  2185  			var msglen int
  2186  			for shift := uint(0); ; shift += 7 {
  2187  				if shift >= 64 {
  2188  					return ErrIntOverflowRuler
  2189  				}
  2190  				if iNdEx >= l {
  2191  					return io.ErrUnexpectedEOF
  2192  				}
  2193  				b := dAtA[iNdEx]
  2194  				iNdEx++
  2195  				msglen |= int(b&0x7F) << shift
  2196  				if b < 0x80 {
  2197  					break
  2198  				}
  2199  			}
  2200  			if msglen < 0 {
  2201  				return ErrInvalidLengthRuler
  2202  			}
  2203  			postIndex := iNdEx + msglen
  2204  			if postIndex < 0 {
  2205  				return ErrInvalidLengthRuler
  2206  			}
  2207  			if postIndex > l {
  2208  				return io.ErrUnexpectedEOF
  2209  			}
  2210  			if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.LastSentAt, dAtA[iNdEx:postIndex]); err != nil {
  2211  				return err
  2212  			}
  2213  			iNdEx = postIndex
  2214  		case 9:
  2215  			if wireType != 2 {
  2216  				return fmt.Errorf("proto: wrong wireType = %d for field ValidUntil", wireType)
  2217  			}
  2218  			var msglen int
  2219  			for shift := uint(0); ; shift += 7 {
  2220  				if shift >= 64 {
  2221  					return ErrIntOverflowRuler
  2222  				}
  2223  				if iNdEx >= l {
  2224  					return io.ErrUnexpectedEOF
  2225  				}
  2226  				b := dAtA[iNdEx]
  2227  				iNdEx++
  2228  				msglen |= int(b&0x7F) << shift
  2229  				if b < 0x80 {
  2230  					break
  2231  				}
  2232  			}
  2233  			if msglen < 0 {
  2234  				return ErrInvalidLengthRuler
  2235  			}
  2236  			postIndex := iNdEx + msglen
  2237  			if postIndex < 0 {
  2238  				return ErrInvalidLengthRuler
  2239  			}
  2240  			if postIndex > l {
  2241  				return io.ErrUnexpectedEOF
  2242  			}
  2243  			if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.ValidUntil, dAtA[iNdEx:postIndex]); err != nil {
  2244  				return err
  2245  			}
  2246  			iNdEx = postIndex
  2247  		default:
  2248  			iNdEx = preIndex
  2249  			skippy, err := skipRuler(dAtA[iNdEx:])
  2250  			if err != nil {
  2251  				return err
  2252  			}
  2253  			if skippy < 0 {
  2254  				return ErrInvalidLengthRuler
  2255  			}
  2256  			if (iNdEx + skippy) < 0 {
  2257  				return ErrInvalidLengthRuler
  2258  			}
  2259  			if (iNdEx + skippy) > l {
  2260  				return io.ErrUnexpectedEOF
  2261  			}
  2262  			iNdEx += skippy
  2263  		}
  2264  	}
  2265  
  2266  	if iNdEx > l {
  2267  		return io.ErrUnexpectedEOF
  2268  	}
  2269  	return nil
  2270  }
  2271  func skipRuler(dAtA []byte) (n int, err error) {
  2272  	l := len(dAtA)
  2273  	iNdEx := 0
  2274  	for iNdEx < l {
  2275  		var wire uint64
  2276  		for shift := uint(0); ; shift += 7 {
  2277  			if shift >= 64 {
  2278  				return 0, ErrIntOverflowRuler
  2279  			}
  2280  			if iNdEx >= l {
  2281  				return 0, io.ErrUnexpectedEOF
  2282  			}
  2283  			b := dAtA[iNdEx]
  2284  			iNdEx++
  2285  			wire |= (uint64(b) & 0x7F) << shift
  2286  			if b < 0x80 {
  2287  				break
  2288  			}
  2289  		}
  2290  		wireType := int(wire & 0x7)
  2291  		switch wireType {
  2292  		case 0:
  2293  			for shift := uint(0); ; shift += 7 {
  2294  				if shift >= 64 {
  2295  					return 0, ErrIntOverflowRuler
  2296  				}
  2297  				if iNdEx >= l {
  2298  					return 0, io.ErrUnexpectedEOF
  2299  				}
  2300  				iNdEx++
  2301  				if dAtA[iNdEx-1] < 0x80 {
  2302  					break
  2303  				}
  2304  			}
  2305  			return iNdEx, nil
  2306  		case 1:
  2307  			iNdEx += 8
  2308  			return iNdEx, nil
  2309  		case 2:
  2310  			var length int
  2311  			for shift := uint(0); ; shift += 7 {
  2312  				if shift >= 64 {
  2313  					return 0, ErrIntOverflowRuler
  2314  				}
  2315  				if iNdEx >= l {
  2316  					return 0, io.ErrUnexpectedEOF
  2317  				}
  2318  				b := dAtA[iNdEx]
  2319  				iNdEx++
  2320  				length |= (int(b) & 0x7F) << shift
  2321  				if b < 0x80 {
  2322  					break
  2323  				}
  2324  			}
  2325  			if length < 0 {
  2326  				return 0, ErrInvalidLengthRuler
  2327  			}
  2328  			iNdEx += length
  2329  			if iNdEx < 0 {
  2330  				return 0, ErrInvalidLengthRuler
  2331  			}
  2332  			return iNdEx, nil
  2333  		case 3:
  2334  			for {
  2335  				var innerWire uint64
  2336  				var start int = iNdEx
  2337  				for shift := uint(0); ; shift += 7 {
  2338  					if shift >= 64 {
  2339  						return 0, ErrIntOverflowRuler
  2340  					}
  2341  					if iNdEx >= l {
  2342  						return 0, io.ErrUnexpectedEOF
  2343  					}
  2344  					b := dAtA[iNdEx]
  2345  					iNdEx++
  2346  					innerWire |= (uint64(b) & 0x7F) << shift
  2347  					if b < 0x80 {
  2348  						break
  2349  					}
  2350  				}
  2351  				innerWireType := int(innerWire & 0x7)
  2352  				if innerWireType == 4 {
  2353  					break
  2354  				}
  2355  				next, err := skipRuler(dAtA[start:])
  2356  				if err != nil {
  2357  					return 0, err
  2358  				}
  2359  				iNdEx = start + next
  2360  				if iNdEx < 0 {
  2361  					return 0, ErrInvalidLengthRuler
  2362  				}
  2363  			}
  2364  			return iNdEx, nil
  2365  		case 4:
  2366  			return iNdEx, nil
  2367  		case 5:
  2368  			iNdEx += 4
  2369  			return iNdEx, nil
  2370  		default:
  2371  			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  2372  		}
  2373  	}
  2374  	panic("unreachable")
  2375  }
  2376  
  2377  var (
  2378  	ErrInvalidLengthRuler = fmt.Errorf("proto: negative length found during unmarshaling")
  2379  	ErrIntOverflowRuler   = fmt.Errorf("proto: integer overflow")
  2380  )