// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: ruler.proto

package ruler

import (
	context "context"
	encoding_binary "encoding/binary"
	fmt "fmt"
	_ "github.com/cortexproject/cortex/pkg/ingester/client"
	github_com_cortexproject_cortex_pkg_ingester_client "github.com/cortexproject/cortex/pkg/ingester/client"
	rules "github.com/cortexproject/cortex/pkg/ruler/rules"
	_ "github.com/gogo/protobuf/gogoproto"
	proto "github.com/gogo/protobuf/proto"
	github_com_gogo_protobuf_types "github.com/gogo/protobuf/types"
	_ "github.com/golang/protobuf/ptypes/duration"
	_ "github.com/golang/protobuf/ptypes/timestamp"
	grpc "google.golang.org/grpc"
	codes "google.golang.org/grpc/codes"
	status "google.golang.org/grpc/status"
	io "io"
	math "math"
	math_bits "math/bits"
	reflect "reflect"
	strings "strings"
	time "time"
)

// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
var _ = time.Kitchen

// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package

type RulesRequest struct {
}

func (m *RulesRequest) Reset()      { *m = RulesRequest{} }
func (*RulesRequest) ProtoMessage() {}
func (*RulesRequest) Descriptor() ([]byte, []int) {
	return fileDescriptor_9ecbec0a4cfddea6, []int{0}
}
func (m *RulesRequest) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *RulesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_RulesRequest.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalToSizedBuffer(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (m *RulesRequest) XXX_Merge(src proto.Message) {
	xxx_messageInfo_RulesRequest.Merge(m, src)
}
func (m *RulesRequest) XXX_Size() int {
	return m.Size()
}
func (m *RulesRequest) XXX_DiscardUnknown() {
	xxx_messageInfo_RulesRequest.DiscardUnknown(m)
}

var xxx_messageInfo_RulesRequest proto.InternalMessageInfo

type RulesResponse struct {
	Groups []*GroupStateDesc `protobuf:"bytes,1,rep,name=groups,proto3" json:"groups,omitempty"`
}

func (m *RulesResponse) Reset()      { *m = RulesResponse{} }
func (*RulesResponse) ProtoMessage() {}
func (*RulesResponse) Descriptor() ([]byte, []int) {
	return fileDescriptor_9ecbec0a4cfddea6, []int{1}
}
func (m *RulesResponse) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *RulesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_RulesResponse.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalToSizedBuffer(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (m *RulesResponse) XXX_Merge(src proto.Message) {
	xxx_messageInfo_RulesResponse.Merge(m, src)
}
func (m *RulesResponse) XXX_Size() int {
	return m.Size()
}
func (m *RulesResponse) XXX_DiscardUnknown() {
	xxx_messageInfo_RulesResponse.DiscardUnknown(m)
}

var xxx_messageInfo_RulesResponse proto.InternalMessageInfo

func (m *RulesResponse) GetGroups() []*GroupStateDesc {
	if m != nil {
		return m.Groups
	}
	return nil
}

// GroupStateDesc is a proto representation of a cortex rule group
type GroupStateDesc struct {
	Group               *rules.RuleGroupDesc `protobuf:"bytes,1,opt,name=group,proto3" json:"group,omitempty"`
	ActiveRules         []*RuleStateDesc     `protobuf:"bytes,2,rep,name=active_rules,json=activeRules,proto3" json:"active_rules,omitempty"`
	EvaluationTimestamp time.Time            `protobuf:"bytes,3,opt,name=evaluationTimestamp,proto3,stdtime" json:"evaluationTimestamp"`
	EvaluationDuration  time.Duration        `protobuf:"bytes,4,opt,name=evaluationDuration,proto3,stdduration" json:"evaluationDuration"`
}

func (m *GroupStateDesc) Reset()      { *m = GroupStateDesc{} }
func (*GroupStateDesc) ProtoMessage() {}
func (*GroupStateDesc) Descriptor() ([]byte, []int) {
	return fileDescriptor_9ecbec0a4cfddea6, []int{2}
}
func (m *GroupStateDesc) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *GroupStateDesc) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_GroupStateDesc.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalToSizedBuffer(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (m *GroupStateDesc) XXX_Merge(src proto.Message) {
	xxx_messageInfo_GroupStateDesc.Merge(m, src)
}
func (m *GroupStateDesc) XXX_Size() int {
	return m.Size()
}
func (m *GroupStateDesc) XXX_DiscardUnknown() {
	xxx_messageInfo_GroupStateDesc.DiscardUnknown(m)
}

var xxx_messageInfo_GroupStateDesc proto.InternalMessageInfo

func (m *GroupStateDesc) GetGroup() *rules.RuleGroupDesc {
	if m != nil {
		return m.Group
	}
	return nil
}

func (m *GroupStateDesc) GetActiveRules() []*RuleStateDesc {
	if m != nil {
		return m.ActiveRules
	}
	return nil
}

func (m *GroupStateDesc) GetEvaluationTimestamp() time.Time {
	if m != nil {
		return m.EvaluationTimestamp
	}
	return time.Time{}
}

func (m *GroupStateDesc) GetEvaluationDuration() time.Duration {
	if m != nil {
		return m.EvaluationDuration
	}
	return 0
}

// RuleStateDesc is a proto representation of a Prometheus Rule
type RuleStateDesc struct {
	Rule                *rules.RuleDesc   `protobuf:"bytes,1,opt,name=rule,proto3" json:"rule,omitempty"`
	State               string            `protobuf:"bytes,2,opt,name=state,proto3" json:"state,omitempty"`
	Health              string            `protobuf:"bytes,3,opt,name=health,proto3" json:"health,omitempty"`
	LastError           string            `protobuf:"bytes,4,opt,name=lastError,proto3" json:"lastError,omitempty"`
	Alerts              []*AlertStateDesc `protobuf:"bytes,5,rep,name=alerts,proto3" json:"alerts,omitempty"`
	EvaluationTimestamp time.Time         `protobuf:"bytes,6,opt,name=evaluationTimestamp,proto3,stdtime" json:"evaluationTimestamp"`
	EvaluationDuration  time.Duration     `protobuf:"bytes,7,opt,name=evaluationDuration,proto3,stdduration" json:"evaluationDuration"`
}

func (m *RuleStateDesc) Reset()      { *m = RuleStateDesc{} }
func (*RuleStateDesc) ProtoMessage() {}
func (*RuleStateDesc) Descriptor() ([]byte, []int) {
	return fileDescriptor_9ecbec0a4cfddea6, []int{3}
}
func (m *RuleStateDesc) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *RuleStateDesc) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_RuleStateDesc.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalToSizedBuffer(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (m *RuleStateDesc) XXX_Merge(src proto.Message) {
	xxx_messageInfo_RuleStateDesc.Merge(m, src)
}
func (m *RuleStateDesc) XXX_Size() int {
	return m.Size()
}
func (m *RuleStateDesc) XXX_DiscardUnknown() {
	xxx_messageInfo_RuleStateDesc.DiscardUnknown(m)
}

var xxx_messageInfo_RuleStateDesc proto.InternalMessageInfo

func (m *RuleStateDesc) GetRule() *rules.RuleDesc {
	if m != nil {
		return m.Rule
	}
	return nil
}

func (m *RuleStateDesc) GetState() string {
	if m != nil {
		return m.State
	}
	return ""
}

func (m *RuleStateDesc) GetHealth() string {
	if m != nil {
		return m.Health
	}
	return ""
}

func (m *RuleStateDesc) GetLastError() string {
	if m != nil {
		return m.LastError
	}
	return ""
}

func (m *RuleStateDesc) GetAlerts() []*AlertStateDesc {
	if m != nil {
		return m.Alerts
	}
	return nil
}

func (m *RuleStateDesc) GetEvaluationTimestamp() time.Time {
	if m != nil {
		return m.EvaluationTimestamp
	}
	return time.Time{}
}

func (m *RuleStateDesc) GetEvaluationDuration() time.Duration {
	if m != nil {
		return m.EvaluationDuration
	}
	return 0
}

type AlertStateDesc struct {
	State       string                                                             `protobuf:"bytes,1,opt,name=state,proto3" json:"state,omitempty"`
	Labels      []github_com_cortexproject_cortex_pkg_ingester_client.LabelAdapter `protobuf:"bytes,2,rep,name=labels,proto3,customtype=github.com/cortexproject/cortex/pkg/ingester/client.LabelAdapter" json:"labels"`
	Annotations []github_com_cortexproject_cortex_pkg_ingester_client.LabelAdapter `protobuf:"bytes,3,rep,name=annotations,proto3,customtype=github.com/cortexproject/cortex/pkg/ingester/client.LabelAdapter" json:"annotations"`
	Value       float64                                                            `protobuf:"fixed64,4,opt,name=value,proto3" json:"value,omitempty"`
	ActiveAt    time.Time                                                          `protobuf:"bytes,5,opt,name=active_at,json=activeAt,proto3,stdtime" json:"active_at"`
	FiredAt     time.Time                                                          `protobuf:"bytes,6,opt,name=fired_at,json=firedAt,proto3,stdtime" json:"fired_at"`
	ResolvedAt  time.Time                                                          `protobuf:"bytes,7,opt,name=resolved_at,json=resolvedAt,proto3,stdtime" json:"resolved_at"`
	LastSentAt  time.Time                                                          `protobuf:"bytes,8,opt,name=last_sent_at,json=lastSentAt,proto3,stdtime" json:"last_sent_at"`
	ValidUntil  time.Time                                                          `protobuf:"bytes,9,opt,name=valid_until,json=validUntil,proto3,stdtime" json:"valid_until"`
}

func (m *AlertStateDesc) Reset()      { *m = AlertStateDesc{} }
func (*AlertStateDesc) ProtoMessage() {}
func (*AlertStateDesc) Descriptor() ([]byte, []int) {
	return fileDescriptor_9ecbec0a4cfddea6, []int{4}
}
func (m *AlertStateDesc) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *AlertStateDesc) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_AlertStateDesc.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalToSizedBuffer(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (m *AlertStateDesc) XXX_Merge(src proto.Message) {
	xxx_messageInfo_AlertStateDesc.Merge(m, src)
}
func (m *AlertStateDesc) XXX_Size() int {
	return m.Size()
}
func (m *AlertStateDesc) XXX_DiscardUnknown() {
	xxx_messageInfo_AlertStateDesc.DiscardUnknown(m)
}

var xxx_messageInfo_AlertStateDesc proto.InternalMessageInfo

func (m *AlertStateDesc) GetState() string {
	if m != nil {
		return m.State
	}
	return ""
}

func (m *AlertStateDesc) GetValue() float64 {
	if m != nil {
		return m.Value
	}
	return 0
}

func (m *AlertStateDesc) GetActiveAt() time.Time {
	if m != nil {
		return m.ActiveAt
	}
	return time.Time{}
}

func (m *AlertStateDesc) GetFiredAt() time.Time {
	if m != nil {
		return m.FiredAt
	}
	return time.Time{}
}

func (m *AlertStateDesc) GetResolvedAt() time.Time {
	if m != nil {
		return m.ResolvedAt
	}
	return time.Time{}
}

func (m *AlertStateDesc) GetLastSentAt() time.Time {
	if m != nil {
		return m.LastSentAt
	}
	return time.Time{}
}

func (m *AlertStateDesc) GetValidUntil() time.Time {
	if m != nil {
		return m.ValidUntil
	}
	return time.Time{}
}

func init() {
	proto.RegisterType((*RulesRequest)(nil), "ruler.RulesRequest")
	proto.RegisterType((*RulesResponse)(nil), "ruler.RulesResponse")
	proto.RegisterType((*GroupStateDesc)(nil), "ruler.GroupStateDesc")
	proto.RegisterType((*RuleStateDesc)(nil), "ruler.RuleStateDesc")
	proto.RegisterType((*AlertStateDesc)(nil), "ruler.AlertStateDesc")
}

func init() { proto.RegisterFile("ruler.proto", fileDescriptor_9ecbec0a4cfddea6) }

var fileDescriptor_9ecbec0a4cfddea6 = []byte{
	// 686 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x54, 0x3d, 0x6f, 0xd3, 0x4e,
	0x1c, 0xf6, 0xa5, 0x75, 0x9a, 0x5c, 0xfa, 0xef, 0x5f, 0x5c, 0x03, 0x32, 0x11, 0xba, 0x54, 0x61,
	0xa9, 0x90, 0xea, 0x48, 0xa5, 0x12, 0x03, 0xe2, 0x25, 0x55, 0x0b, 0x0c, 0x0c, 0xc8, 0x05, 0xd6,
	0xea, 0x92, 0x5c, 0x5d, 0x83, 0xeb, 0x33, 0x77, 0xe7, 0x88, 0x05, 0x89, 0x99, 0xa9, 0x23, 0x33,
	0x13, 0x1f, 0xa5, 0x63, 0xc7, 0x0a, 0xa1, 0x42, 0xdd, 0x85, 0xb1, 0x1f, 0x01, 0xdd, 0x8b, 0x89,
	0x03, 0x45, 0x22, 0xa0, 0x2e, 0x96, 0x7f, 0x2f, 0xcf, 0xf3, 0xdc, 0x3d, 0xbf, 0xbb, 0x83, 0x0d,
	0x9e, 0xc5, 0x94, 0xfb, 0x29, 0x67, 0x92, 0x21, 0x57, 0x07, 0xad, 0x95, 0x30, 0x92, 0xbb, 0x59,
	0xdf, 0x1f, 0xb0, 0xbd, 0x6e, 0xc8, 0x42, 0xd6, 0xd5, 0xd5, 0x7e, 0xb6, 0xa3, 0x23, 0x1d, 0xe8,
	0x3f, 0x83, 0x6a, 0xe1, 0x90, 0xb1, 0x30, 0xa6, 0xe3, 0xae, 0x61, 0xc6, 0x89, 0x8c, 0x58, 0x62,
	0xeb, 0xed, 0x9f, 0xeb, 0x32, 0xda, 0xa3, 0x42, 0x92, 0xbd, 0xd4, 0x36, 0xdc, 0x2f, 0xe9, 0x0d,
	0x18, 0x97, 0xf4, 0x75, 0xca, 0xd9, 0x0b, 0x3a, 0x90, 0x36, 0xea, 0xa6, 0x2f, 0xc3, 0x6e, 0x94,
	0x84, 0x54, 0x48, 0xca, 0xbb, 0x83, 0x38, 0xa2, 0x49, 0x51, 0xb2, 0x0c, 0xb7, 0xff, 0x84, 0x41,
	0x6f, 0x4e, 0x7f, 0x85, 0xf9, 0x1a, 0x70, 0x67, 0x01, 0xce, 0x07, 0x2a, 0x0c, 0xe8, 0xab, 0x8c,
	0x0a, 0xd9, 0xb9, 0x0b, 0xff, 0xb3, 0xb1, 0x48, 0x59, 0x22, 0x28, 0x5a, 0x81, 0xd5, 0x90, 0xb3,
	0x2c, 0x15, 0x1e, 0x58, 0x9a, 0x59, 0x6e, 0xac, 0x5e, 0xf6, 0x8d, 0x69, 0x0f, 0x55, 0x72, 0x4b,
	0x12, 0x49, 0x37, 0xa8, 0x18, 0x04, 0xb6, 0xa9, 0xf3, 0xa1, 0x02, 0x17, 0x26, 0x4b, 0xe8, 0x06,
	0x74, 0x75, 0xd1, 0x03, 0x4b, 0x60, 0xb9, 0xb1, 0xda, 0xf4, 0x8d, 0xbe, 0x92, 0xd1, 0x9d, 0x1a,
	0x6f, 0x5a, 0xd0, 0x2d, 0x38, 0x4f, 0x06, 0x32, 0x1a, 0xd1, 0x6d, 0xdd, 0xe4, 0x55, 0xb4, 0x66,
	0xd3, 0x6a, 0x2a, 0xc8, 0x58, 0xb2, 0x61, 0x3a, 0xf5, 0x72, 0xd1, 0x73, 0xb8, 0x48, 0x47, 0x24,
	0xce, 0xb4, 0xf7, 0x4f, 0x0b, 0x8f, 0xbd, 0x19, 0x2d, 0xd9, 0xf2, 0xcd, 0x14, 0xfc, 0x62, 0x0a,
	0xfe, 0x8f, 0x8e, 0xf5, 0xda, 0xc1, 0x71, 0xdb, 0xd9, 0xff, 0xd2, 0x06, 0xc1, 0x79, 0x04, 0x68,
	0x0b, 0xa2, 0x71, 0x7a, 0xc3, 0xce, 0xd6, 0x9b, 0xd5, 0xb4, 0x57, 0x7f, 0xa1, 0x2d, 0x1a, 0x0c,
	0xeb, 0x7b, 0xc5, 0x7a, 0x0e, 0xbc, 0xf3, 0xb9, 0x62, 0x5c, 0x1e, 0x7b, 0x74, 0x1d, 0xce, 0xaa,
	0x2d, 0x5a, 0x8b, 0xfe, 0x2f, 0x59, 0xa4, 0xb7, 0xaa, 0x8b, 0xa8, 0x09, 0x5d, 0xa1, 0x10, 0x5e,
	0x65, 0x09, 0x2c, 0xd7, 0x03, 0x13, 0xa0, 0x2b, 0xb0, 0xba, 0x4b, 0x49, 0x2c, 0x77, 0xf5, 0x66,
	0xeb, 0x81, 0x8d, 0xd0, 0x35, 0x58, 0x8f, 0x89, 0x90, 0x9b, 0x9c, 0x33, 0xae, 0x17, 0x5c, 0x0f,
	0xc6, 0x09, 0x35, 0x56, 0x12, 0x53, 0x2e, 0x85, 0xe7, 0x4e, 0x8c, 0xb5, 0xa7, 0x92, 0xa5, 0xb1,
	0x9a, 0xa6, 0xdf, 0xd9, 0x5b, 0xbd, 0x18, 0x7b, 0xe7, 0xfe, 0xcd, 0xde, 0x77, 0x2e, 0x5c, 0x98,
	0xdc, 0xc7, 0xd8, 0x3a, 0x50, 0xb6, 0x4e, 0xc0, 0x6a, 0x4c, 0xfa, 0x34, 0x2e, 0xce, 0xd9, 0x25,
	0xdf, 0x5e, 0xac, 0xc7, 0x2a, 0xfb, 0x84, 0x44, 0x7c, 0xfd, 0x91, 0x52, 0xfa, 0x74, 0xdc, 0xfe,
	0x9b, 0x6b, 0x6a, 0x68, 0x7a, 0x43, 0x92, 0x4a, 0xca, 0x03, 0x2b, 0x85, 0xde, 0xc0, 0x06, 0x49,
	0x12, 0x26, 0xf5, 0x5a, 0x85, 0x37, 0x73, 0xf1, 0xca, 0x65, 0x3d, 0xe5, 0x84, 0x72, 0x8c, 0xea,
	0x23, 0x01, 0x02, 0x13, 0xa0, 0x1e, 0xac, 0xdb, 0x7b, 0x47, 0xa4, 0xe7, 0x4e, 0x31, 0xd5, 0x9a,
	0x81, 0xf5, 0x24, 0xba, 0x07, 0x6b, 0x3b, 0x11, 0xa7, 0x43, 0xc5, 0x30, 0xcd, 0xb9, 0x98, 0xd3,
	0xa8, 0x9e, 0x44, 0x9b, 0xb0, 0xc1, 0xa9, 0x60, 0xf1, 0xc8, 0x70, 0xcc, 0x4d, 0xc1, 0x01, 0x0b,
	0x60, 0x4f, 0xa2, 0x07, 0x70, 0x5e, 0x1d, 0xf3, 0x6d, 0x41, 0x13, 0xa9, 0x78, 0x6a, 0xd3, 0xf0,
	0x28, 0xe4, 0x16, 0x4d, 0xa4, 0x59, 0xce, 0x88, 0xc4, 0xd1, 0x70, 0x3b, 0x4b, 0x64, 0x14, 0x7b,
	0xf5, 0x69, 0x68, 0x34, 0xf0, 0x99, 0xc2, 0xad, 0xde, 0x81, 0xae, 0xba, 0xc6, 0x1c, 0xad, 0x99,
	0x1f, 0x81, 0x16, 0x4b, 0xaf, 0x59, 0xf1, 0xee, 0xb6, 0x9a, 0x93, 0x49, 0xf3, 0xf8, 0x76, 0x9c,
	0xf5, 0xb5, 0xc3, 0x13, 0xec, 0x1c, 0x9d, 0x60, 0xe7, 0xec, 0x04, 0x83, 0xb7, 0x39, 0x06, 0x1f,
	0x73, 0x0c, 0x0e, 0x72, 0x0c, 0x0e, 0x73, 0x0c, 0xbe, 0xe6, 0x18, 0x7c, 0xcb, 0xb1, 0x73, 0x96,
	0x63, 0xb0, 0x7f, 0x8a, 0x9d, 0xc3, 0x53, 0xec, 0x1c, 0x9d, 0x62, 0xa7, 0x5f, 0xd5, 0xcb, 0xbb,
	0xf9, 0x3d, 0x00, 0x00, 0xff, 0xff, 0x22, 0x68, 0xe6, 0xe5, 0xe1, 0x06, 0x00, 0x00,
}

func (this *RulesRequest) Equal(that interface{}) bool {
	if that == nil {
		return this == nil
	}

	that1, ok := that.(*RulesRequest)
	if !ok {
		that2, ok := that.(RulesRequest)
		if ok {
			that1 = &that2
		} else {
			return false
		}
	}
	if that1 == nil {
		return this == nil
	} else if this == nil {
		return false
	}
	return true
}
func (this *RulesResponse) Equal(that interface{}) bool {
	if that == nil {
		return this == nil
	}

	that1, ok := that.(*RulesResponse)
	if !ok {
		that2, ok := that.(RulesResponse)
		if ok {
			that1 = &that2
		} else {
			return false
		}
	}
	if that1 == nil {
		return this == nil
	} else if this == nil {
		return false
	}
	if len(this.Groups) != len(that1.Groups) {
		return false
	}
	for i := range this.Groups {
		if !this.Groups[i].Equal(that1.Groups[i]) {
			return false
		}
	}
	return true
}
func (this *GroupStateDesc) Equal(that interface{}) bool {
	if that == nil {
		return this == nil
	}

	that1, ok := that.(*GroupStateDesc)
	if !ok {
		that2, ok := that.(GroupStateDesc)
		if ok {
			that1 = &that2
		} else {
			return false
		}
	}
	if that1 == nil {
		return this == nil
	} else if this == nil {
		return false
	}
	if !this.Group.Equal(that1.Group) {
		return false
	}
	if len(this.ActiveRules) != len(that1.ActiveRules) {
		return false
	}
	for i := range this.ActiveRules {
		if !this.ActiveRules[i].Equal(that1.ActiveRules[i]) {
			return false
		}
	}
	if !this.EvaluationTimestamp.Equal(that1.EvaluationTimestamp) {
		return false
	}
	if this.EvaluationDuration != that1.EvaluationDuration {
		return false
	}
	return true
}
func (this *RuleStateDesc) Equal(that interface{}) bool {
	if that == nil {
		return this == nil
	}

	that1, ok := that.(*RuleStateDesc)
	if !ok {
		that2, ok := that.(RuleStateDesc)
		if ok {
			that1 = &that2
		} else {
			return false
		}
	}
	if that1 == nil {
		return this == nil
	} else if this == nil {
		return false
	}
	if !this.Rule.Equal(that1.Rule) {
		return false
	}
	if this.State != that1.State {
		return false
	}
	if this.Health != that1.Health {
		return false
	}
	if this.LastError != that1.LastError {
		return false
	}
	if len(this.Alerts) != len(that1.Alerts) {
		return false
	}
	for i := range this.Alerts {
		if !this.Alerts[i].Equal(that1.Alerts[i]) {
			return false
		}
	}
	if !this.EvaluationTimestamp.Equal(that1.EvaluationTimestamp) {
		return false
	}
	if this.EvaluationDuration != that1.EvaluationDuration {
		return false
	}
	return true
}
func (this *AlertStateDesc) Equal(that interface{}) bool {
	if that == nil {
		return this == nil
	}

	that1, ok := that.(*AlertStateDesc)
	if !ok {
		that2, ok := that.(AlertStateDesc)
		if ok {
			that1 = &that2
		} else {
			return false
		}
	}
	if that1 == nil {
		return this == nil
	} else if this == nil {
		return false
	}
	if this.State != that1.State {
		return false
	}
	if len(this.Labels) != len(that1.Labels) {
		return false
	}
	for i := range this.Labels {
		if !this.Labels[i].Equal(that1.Labels[i]) {
			return false
		}
	}
	if len(this.Annotations) != len(that1.Annotations) {
		return false
	}
	for i := range this.Annotations {
		if !this.Annotations[i].Equal(that1.Annotations[i]) {
			return false
		}
	}
	if this.Value != that1.Value {
		return false
	}
	if !this.ActiveAt.Equal(that1.ActiveAt) {
		return false
	}
	if !this.FiredAt.Equal(that1.FiredAt) {
		return false
	}
	if !this.ResolvedAt.Equal(that1.ResolvedAt) {
		return false
	}
	if !this.LastSentAt.Equal(that1.LastSentAt) {
		return false
	}
	if !this.ValidUntil.Equal(that1.ValidUntil) {
		return false
	}
	return true
}
func (this *RulesRequest) GoString() string {
	if this == nil {
		return "nil"
	}
	s := make([]string, 0, 4)
	s = append(s, "&ruler.RulesRequest{")
	s = append(s, "}")
	return strings.Join(s, "")
}
func (this *RulesResponse) GoString() string {
	if this == nil {
		return "nil"
	}
	s := make([]string, 0, 5)
	s = append(s, "&ruler.RulesResponse{")
	if this.Groups != nil {
		s = append(s, "Groups: "+fmt.Sprintf("%#v", this.Groups)+",\n")
	}
	s = append(s, "}")
	return strings.Join(s, "")
}
func (this *GroupStateDesc) GoString() string {
	if this == nil {
		return "nil"
	}
	s := make([]string, 0, 8)
	s = append(s, "&ruler.GroupStateDesc{")
	if this.Group != nil {
		s = append(s, "Group: "+fmt.Sprintf("%#v", this.Group)+",\n")
	}
	if this.ActiveRules != nil {
		s = append(s, "ActiveRules: "+fmt.Sprintf("%#v", this.ActiveRules)+",\n")
	}
	s = append(s, "EvaluationTimestamp: "+fmt.Sprintf("%#v", this.EvaluationTimestamp)+",\n")
	s = append(s, "EvaluationDuration: "+fmt.Sprintf("%#v", this.EvaluationDuration)+",\n")
	s = append(s, "}")
	return strings.Join(s, "")
}
func (this *RuleStateDesc) GoString() string {
	if this == nil {
		return "nil"
	}
	s := make([]string, 0, 11)
	s = append(s, "&ruler.RuleStateDesc{")
	if this.Rule != nil {
		s = append(s, "Rule: "+fmt.Sprintf("%#v", this.Rule)+",\n")
	}
	s = append(s, "State: "+fmt.Sprintf("%#v", this.State)+",\n")
	s = append(s, "Health: "+fmt.Sprintf("%#v", this.Health)+",\n")
	s = append(s, "LastError: "+fmt.Sprintf("%#v", this.LastError)+",\n")
	if this.Alerts != nil {
		s = append(s, "Alerts: "+fmt.Sprintf("%#v", this.Alerts)+",\n")
	}
	s = append(s, "EvaluationTimestamp: "+fmt.Sprintf("%#v", this.EvaluationTimestamp)+",\n")
	s = append(s, "EvaluationDuration: "+fmt.Sprintf("%#v", this.EvaluationDuration)+",\n")
	s = append(s, "}")
	return strings.Join(s, "")
}
func (this *AlertStateDesc) GoString() string {
	if this == nil {
		return "nil"
	}
	s := make([]string, 0, 13)
	s = append(s, "&ruler.AlertStateDesc{")
	s = append(s, "State: "+fmt.Sprintf("%#v", this.State)+",\n")
	s = append(s, "Labels: "+fmt.Sprintf("%#v", this.Labels)+",\n")
	s = append(s, "Annotations: "+fmt.Sprintf("%#v", this.Annotations)+",\n")
	s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n")
	s = append(s, "ActiveAt: "+fmt.Sprintf("%#v", this.ActiveAt)+",\n")
	s = append(s, "FiredAt: "+fmt.Sprintf("%#v", this.FiredAt)+",\n")
	s = append(s, "ResolvedAt: "+fmt.Sprintf("%#v", this.ResolvedAt)+",\n")
	s = append(s, "LastSentAt: "+fmt.Sprintf("%#v", this.LastSentAt)+",\n")
	s = append(s, "ValidUntil: "+fmt.Sprintf("%#v", this.ValidUntil)+",\n")
	s = append(s, "}")
	return strings.Join(s, "")
}
func valueToGoStringRuler(v interface{}, typ string) string {
	rv := reflect.ValueOf(v)
	if rv.IsNil() {
		return "nil"
	}
	pv := reflect.Indirect(rv).Interface()
	return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv)
}

// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn

// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4

// RulerClient is the client API for Ruler service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type RulerClient interface {
	Rules(ctx context.Context, in *RulesRequest, opts ...grpc.CallOption) (*RulesResponse, error)
}

type rulerClient struct {
	cc *grpc.ClientConn
}

func NewRulerClient(cc *grpc.ClientConn) RulerClient {
	return &rulerClient{cc}
}

func (c *rulerClient) Rules(ctx context.Context, in *RulesRequest, opts ...grpc.CallOption) (*RulesResponse, error) {
	out := new(RulesResponse)
	err := c.cc.Invoke(ctx, "/ruler.Ruler/Rules", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// RulerServer is the server API for Ruler service.
type RulerServer interface {
	Rules(context.Context, *RulesRequest) (*RulesResponse, error)
}

// UnimplementedRulerServer can be embedded to have forward compatible implementations.
type UnimplementedRulerServer struct {
}

func (*UnimplementedRulerServer) Rules(ctx context.Context, req *RulesRequest) (*RulesResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Rules not implemented")
}

func RegisterRulerServer(s *grpc.Server, srv RulerServer) {
	s.RegisterService(&_Ruler_serviceDesc, srv)
}

func _Ruler_Rules_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(RulesRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(RulerServer).Rules(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/ruler.Ruler/Rules",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(RulerServer).Rules(ctx, req.(*RulesRequest))
	}
	return interceptor(ctx, in, info, handler)
}

var _Ruler_serviceDesc = grpc.ServiceDesc{
	ServiceName: "ruler.Ruler",
	HandlerType: (*RulerServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Rules",
			Handler:    _Ruler_Rules_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "ruler.proto",
}

func (m *RulesRequest) Marshal() (dAtA []byte, err error) {
	size := m.Size()
	dAtA = make([]byte, size)
	n, err := m.MarshalToSizedBuffer(dAtA[:size])
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *RulesRequest) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *RulesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	return len(dAtA) - i, nil
}

func (m *RulesResponse) Marshal() (dAtA []byte, err error) {
	size := m.Size()
	dAtA = make([]byte, size)
	n, err := m.MarshalToSizedBuffer(dAtA[:size])
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *RulesResponse) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *RulesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if len(m.Groups) > 0 {
		for iNdEx := len(m.Groups) - 1; iNdEx >= 0; iNdEx-- {
			{
				size, err := m.Groups[iNdEx].MarshalToSizedBuffer(dAtA[:i])
				if err != nil {
					return 0, err
				}
				i -= size
				i = encodeVarintRuler(dAtA, i, uint64(size))
			}
			i--
			dAtA[i] = 0xa
		}
	}
	return len(dAtA) - i, nil
}

func (m *GroupStateDesc) Marshal() (dAtA []byte, err error) {
	size := m.Size()
	dAtA = make([]byte, size)
	n, err := m.MarshalToSizedBuffer(dAtA[:size])
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *GroupStateDesc) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *GroupStateDesc) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	n1, err1 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.EvaluationDuration, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.EvaluationDuration):])
	if err1 != nil {
		return 0, err1
	}
	i -= n1
	i = encodeVarintRuler(dAtA, i, uint64(n1))
	i--
	dAtA[i] = 0x22
	n2, err2 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.EvaluationTimestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.EvaluationTimestamp):])
	if err2 != nil {
		return 0, err2
	}
	i -= n2
	i = encodeVarintRuler(dAtA, i, uint64(n2))
	i--
	dAtA[i] = 0x1a
	if len(m.ActiveRules) > 0 {
		for iNdEx := len(m.ActiveRules) - 1; iNdEx >= 0; iNdEx-- {
			{
				size, err := m.ActiveRules[iNdEx].MarshalToSizedBuffer(dAtA[:i])
				if err != nil {
					return 0, err
				}
				i -= size
				i = encodeVarintRuler(dAtA, i, uint64(size))
			}
			i--
			dAtA[i] = 0x12
		}
	}
	if m.Group != nil {
		{
			size, err := m.Group.MarshalToSizedBuffer(dAtA[:i])
			if err != nil {
				return 0, err
			}
			i -= size
			i = encodeVarintRuler(dAtA, i, uint64(size))
		}
		i--
		dAtA[i] = 0xa
	}
	return len(dAtA) - i, nil
}

func (m *RuleStateDesc) Marshal() (dAtA []byte, err error) {
	size := m.Size()
	dAtA = make([]byte, size)
	n, err := m.MarshalToSizedBuffer(dAtA[:size])
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *RuleStateDesc) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *RuleStateDesc) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	n4, err4 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.EvaluationDuration, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.EvaluationDuration):])
	if err4 != nil {
		return 0, err4
	}
	i -= n4
	i = encodeVarintRuler(dAtA, i, uint64(n4))
	i--
	dAtA[i] = 0x3a
	n5, err5 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.EvaluationTimestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.EvaluationTimestamp):])
	if err5 != nil {
		return 0, err5
	}
	i -= n5
	i = encodeVarintRuler(dAtA, i, uint64(n5))
	i--
	dAtA[i] = 0x32
	if len(m.Alerts) > 0 {
		for iNdEx := len(m.Alerts) - 1; iNdEx >= 0; iNdEx-- {
			{
				size, err := m.Alerts[iNdEx].MarshalToSizedBuffer(dAtA[:i])
				if err != nil {
					return 0, err
				}
				i -= size
				i = encodeVarintRuler(dAtA, i, uint64(size))
			}
			i--
			dAtA[i] = 0x2a
		}
	}
	if len(m.LastError) > 0 {
		i -= len(m.LastError)
		copy(dAtA[i:], m.LastError)
		i = encodeVarintRuler(dAtA, i, uint64(len(m.LastError)))
		i--
		dAtA[i] = 0x22
	}
	if len(m.Health) > 0 {
		i -= len(m.Health)
		copy(dAtA[i:], m.Health)
		i = encodeVarintRuler(dAtA, i, uint64(len(m.Health)))
		i--
		dAtA[i] = 0x1a
	}
	if len(m.State) > 0 {
		i -= len(m.State)
		copy(dAtA[i:], m.State)
		i = encodeVarintRuler(dAtA, i, uint64(len(m.State)))
		i--
		dAtA[i] = 0x12
	}
	if m.Rule != nil {
		{
			size, err := m.Rule.MarshalToSizedBuffer(dAtA[:i])
			if err != nil {
				return 0, err
			}
			i -= size
			i = encodeVarintRuler(dAtA, i, uint64(size))
		}
		i--
		dAtA[i] = 0xa
	}
	return len(dAtA) - i, nil
}

func (m *AlertStateDesc) Marshal() (dAtA []byte, err error) {
	size := m.Size()
	dAtA = make([]byte, size)
	n, err := m.MarshalToSizedBuffer(dAtA[:size])
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *AlertStateDesc) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *AlertStateDesc) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	n7, err7 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.ValidUntil, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.ValidUntil):])
	if err7 != nil {
		return 0, err7
	}
	i -= n7
	i = encodeVarintRuler(dAtA, i, uint64(n7))
	i--
	dAtA[i] = 0x4a
	n8, err8 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.LastSentAt, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.LastSentAt):])
	if err8 != nil {
		return 0, err8
	}
	i -= n8
	i = encodeVarintRuler(dAtA, i, uint64(n8))
	i--
	dAtA[i] = 0x42
	n9, err9 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.ResolvedAt, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.ResolvedAt):])
	if err9 != nil {
		return 0, err9
	}
	i -= n9
	i = encodeVarintRuler(dAtA, i, uint64(n9))
	i--
	dAtA[i] = 0x3a
	n10, err10 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.FiredAt, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.FiredAt):])
	if err10 != nil {
		return 0, err10
	}
	i -= n10
	i = encodeVarintRuler(dAtA, i, uint64(n10))
	i--
	dAtA[i] = 0x32
	n11, err11 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.ActiveAt, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.ActiveAt):])
	if err11 != nil {
		return 0, err11
	}
	i -= n11
	i = encodeVarintRuler(dAtA, i, uint64(n11))
	i--
	dAtA[i] = 0x2a
	if m.Value != 0 {
		i -= 8
		encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Value))))
		i--
		dAtA[i] = 0x21
	}
	if len(m.Annotations) > 0 {
		for iNdEx := len(m.Annotations) - 1; iNdEx >= 0; iNdEx-- {
			{
				size := m.Annotations[iNdEx].Size()
				i -= size
				if _, err := m.Annotations[iNdEx].MarshalTo(dAtA[i:]); err != nil {
					return 0, err
				}
				i = encodeVarintRuler(dAtA, i, uint64(size))
			}
			i--
			dAtA[i] = 0x1a
		}
	}
	if len(m.Labels) > 0 {
		for iNdEx := len(m.Labels) - 1; iNdEx >= 0; iNdEx-- {
			{
				size := m.Labels[iNdEx].Size()
				i -= size
				if _, err := m.Labels[iNdEx].MarshalTo(dAtA[i:]); err != nil {
					return 0, err
				}
				i = encodeVarintRuler(dAtA, i, uint64(size))
			}
			i--
			dAtA[i] = 0x12
		}
	}
	if len(m.State) > 0 {
		i -= len(m.State)
		copy(dAtA[i:], m.State)
		i = encodeVarintRuler(dAtA, i, uint64(len(m.State)))
		i--
		dAtA[i] = 0xa
	}
	return len(dAtA) - i, nil
}

func encodeVarintRuler(dAtA []byte, offset int, v uint64) int {
	offset -= sovRuler(v)
	base := offset
	for v >= 1<<7 {
		dAtA[offset] = uint8(v&0x7f | 0x80)
		v >>= 7
		offset++
	}
	dAtA[offset] = uint8(v)
	return base
}
func (m *RulesRequest) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	return n
}

func (m *RulesResponse) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if len(m.Groups) > 0 {
		for _, e := range m.Groups {
			l = e.Size()
			n += 1 + l + sovRuler(uint64(l))
		}
	}
	return n
}

func (m *GroupStateDesc) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.Group != nil {
		l = m.Group.Size()
		n += 1 + l + sovRuler(uint64(l))
	}
	if len(m.ActiveRules) > 0 {
		for _, e := range m.ActiveRules {
			l = e.Size()
			n += 1 + l + sovRuler(uint64(l))
		}
	}
	l = github_com_gogo_protobuf_types.SizeOfStdTime(m.EvaluationTimestamp)
	n += 1 + l + sovRuler(uint64(l))
	l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.EvaluationDuration)
	n += 1 + l + sovRuler(uint64(l))
	return n
}

func (m *RuleStateDesc) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.Rule != nil {
		l = m.Rule.Size()
		n += 1 + l + sovRuler(uint64(l))
	}
	l = len(m.State)
	if l > 0 {
		n += 1 + l + sovRuler(uint64(l))
	}
	l = len(m.Health)
	if l > 0 {
		n += 1 + l + sovRuler(uint64(l))
	}
	l = len(m.LastError)
	if l > 0 {
		n += 1 + l + sovRuler(uint64(l))
	}
	if len(m.Alerts) > 0 {
		for _, e := range m.Alerts {
			l = e.Size()
			n += 1 + l + sovRuler(uint64(l))
		}
	}
	l = github_com_gogo_protobuf_types.SizeOfStdTime(m.EvaluationTimestamp)
	n += 1 + l + sovRuler(uint64(l))
	l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.EvaluationDuration)
	n += 1 + l + sovRuler(uint64(l))
	return n
}

func (m *AlertStateDesc) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = len(m.State)
	if l > 0 {
		n += 1 + l + sovRuler(uint64(l))
	}
	if len(m.Labels) > 0 {
		for _, e := range m.Labels {
			l = e.Size()
			n += 1 + l + sovRuler(uint64(l))
		}
	}
	if len(m.Annotations) > 0 {
		for _, e := range m.Annotations {
			l = e.Size()
			n += 1 + l + sovRuler(uint64(l))
		}
	}
	if m.Value != 0 {
		n += 9
	}
	l = github_com_gogo_protobuf_types.SizeOfStdTime(m.ActiveAt)
	n += 1 + l + sovRuler(uint64(l))
	l = github_com_gogo_protobuf_types.SizeOfStdTime(m.FiredAt)
	n += 1 + l + sovRuler(uint64(l))
	l = github_com_gogo_protobuf_types.SizeOfStdTime(m.ResolvedAt)
	n += 1 + l + sovRuler(uint64(l))
	l = github_com_gogo_protobuf_types.SizeOfStdTime(m.LastSentAt)
	n += 1 + l + sovRuler(uint64(l))
	l = github_com_gogo_protobuf_types.SizeOfStdTime(m.ValidUntil)
	n += 1 + l + sovRuler(uint64(l))
	return n
}

func sovRuler(x uint64) (n int) {
	return (math_bits.Len64(x|1) + 6) / 7
}
func sozRuler(x uint64) (n int) {
	return sovRuler(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (this *RulesRequest) String() string {
	if this == nil {
		return "nil"
	}
	s := strings.Join([]string{`&RulesRequest{`,
		`}`,
	}, "")
	return s
}
func (this *RulesResponse) String() string {
	if this == nil {
		return "nil"
	}
	repeatedStringForGroups := "[]*GroupStateDesc{"
	for _, f := range this.Groups {
		repeatedStringForGroups += strings.Replace(f.String(), "GroupStateDesc", "GroupStateDesc", 1) + ","
	}
	repeatedStringForGroups += "}"
	s := strings.Join([]string{`&RulesResponse{`,
		`Groups:` + repeatedStringForGroups + `,`,
		`}`,
	}, "")
	return s
}
func (this *GroupStateDesc) String() string {
	if this == nil {
		return "nil"
	}
	repeatedStringForActiveRules := "[]*RuleStateDesc{"
	for _, f := range this.ActiveRules {
		repeatedStringForActiveRules += strings.Replace(f.String(), "RuleStateDesc", "RuleStateDesc", 1) + ","
	}
	repeatedStringForActiveRules += "}"
	s := strings.Join([]string{`&GroupStateDesc{`,
		`Group:` + strings.Replace(fmt.Sprintf("%v", this.Group), "RuleGroupDesc", "rules.RuleGroupDesc", 1) + `,`,
		`ActiveRules:` + repeatedStringForActiveRules + `,`,
		`EvaluationTimestamp:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.EvaluationTimestamp), "Timestamp", "timestamp.Timestamp", 1), `&`, ``, 1) + `,`,
		`EvaluationDuration:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.EvaluationDuration), "Duration", "duration.Duration", 1), `&`, ``, 1) + `,`,
		`}`,
	}, "")
	return s
}
func (this *RuleStateDesc) String() string {
	if this == nil {
		return "nil"
	}
	repeatedStringForAlerts := "[]*AlertStateDesc{"
	for _, f := range this.Alerts {
		repeatedStringForAlerts += strings.Replace(f.String(), "AlertStateDesc", "AlertStateDesc", 1) + ","
	}
	repeatedStringForAlerts += "}"
	s := strings.Join([]string{`&RuleStateDesc{`,
		`Rule:` + strings.Replace(fmt.Sprintf("%v", this.Rule), "RuleDesc", "rules.RuleDesc", 1) + `,`,
		`State:` + fmt.Sprintf("%v", this.State) + `,`,
		`Health:` + fmt.Sprintf("%v", this.Health) + `,`,
		`LastError:` + fmt.Sprintf("%v", this.LastError) + `,`,
		`Alerts:` + repeatedStringForAlerts + `,`,
		`EvaluationTimestamp:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.EvaluationTimestamp), "Timestamp", "timestamp.Timestamp", 1), `&`, ``, 1) + `,`,
		`EvaluationDuration:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.EvaluationDuration), "Duration", "duration.Duration", 1), `&`, ``, 1) + `,`,
		`}`,
	}, "")
	return s
}
func (this *AlertStateDesc) String() string {
	if this == nil {
		return "nil"
	}
	s := strings.Join([]string{`&AlertStateDesc{`,
		`State:` + fmt.Sprintf("%v", this.State) + `,`,
		`Labels:` + fmt.Sprintf("%v", this.Labels) + `,`,
		`Annotations:` + fmt.Sprintf("%v", this.Annotations) + `,`,
		`Value:` + fmt.Sprintf("%v", this.Value) + `,`,
		`ActiveAt:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ActiveAt), "Timestamp", "timestamp.Timestamp", 1), `&`, ``, 1) + `,`,
		`FiredAt:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.FiredAt), "Timestamp", "timestamp.Timestamp", 1), `&`, ``, 1) + `,`,
		`ResolvedAt:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ResolvedAt), "Timestamp", "timestamp.Timestamp", 1), `&`, ``, 1) + `,`,
		`LastSentAt:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.LastSentAt), "Timestamp", "timestamp.Timestamp", 1), `&`, ``, 1) + `,`,
		`ValidUntil:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ValidUntil), "Timestamp", "timestamp.Timestamp", 1), `&`, ``, 1) + `,`,
		`}`,
	}, "")
	return s
}
func valueToStringRuler(v interface{}) string {
	rv := reflect.ValueOf(v)
	if rv.IsNil() {
		return "nil"
	}
	pv := reflect.Indirect(rv).Interface()
	return fmt.Sprintf("*%v", pv)
}
func (m *RulesRequest) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowRuler
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: RulesRequest: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: RulesRequest: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		default:
			iNdEx = preIndex
			skippy, err := skipRuler(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if skippy < 0 {
				return ErrInvalidLengthRuler
			}
			if (iNdEx + skippy) < 0 {
				return ErrInvalidLengthRuler
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *RulesResponse) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowRuler
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: RulesResponse: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: RulesResponse: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Groups", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowRuler
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthRuler
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthRuler
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Groups = append(m.Groups, &GroupStateDesc{})
			if err := m.Groups[len(m.Groups)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipRuler(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if skippy < 0 {
				return ErrInvalidLengthRuler
			}
			if (iNdEx + skippy) < 0 {
				return ErrInvalidLengthRuler
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *GroupStateDesc) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowRuler
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: GroupStateDesc: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: GroupStateDesc: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Group", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowRuler
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthRuler
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthRuler
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if m.Group == nil {
				m.Group = &rules.RuleGroupDesc{}
			}
			if err := m.Group.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field ActiveRules", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowRuler
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthRuler
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthRuler
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.ActiveRules = append(m.ActiveRules, &RuleStateDesc{})
			if err := m.ActiveRules[len(m.ActiveRules)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		case 3:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field EvaluationTimestamp", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowRuler
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthRuler
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthRuler
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.EvaluationTimestamp, dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		case 4:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field EvaluationDuration", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowRuler
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthRuler
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthRuler
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(&m.EvaluationDuration, dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipRuler(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if skippy < 0 {
				return ErrInvalidLengthRuler
			}
			if (iNdEx + skippy) < 0 {
				return ErrInvalidLengthRuler
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *RuleStateDesc) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowRuler
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: RuleStateDesc: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: RuleStateDesc: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Rule", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowRuler
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthRuler
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthRuler
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if m.Rule == nil {
				m.Rule = &rules.RuleDesc{}
			}
			if err := m.Rule.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field State", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowRuler
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				stringLen |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			intStringLen := int(stringLen)
			if intStringLen < 0 {
				return ErrInvalidLengthRuler
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthRuler
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.State = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 3:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Health", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowRuler
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				stringLen |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			intStringLen := int(stringLen)
			if intStringLen < 0 {
				return ErrInvalidLengthRuler
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthRuler
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Health = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 4:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field LastError", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowRuler
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				stringLen |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			intStringLen := int(stringLen)
			if intStringLen < 0 {
				return ErrInvalidLengthRuler
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthRuler
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.LastError = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 5:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Alerts", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowRuler
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthRuler
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthRuler
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Alerts = append(m.Alerts, &AlertStateDesc{})
			if err := m.Alerts[len(m.Alerts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		case 6:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field EvaluationTimestamp", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowRuler
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthRuler
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthRuler
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.EvaluationTimestamp, dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		case 7:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field EvaluationDuration", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowRuler
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthRuler
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthRuler
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(&m.EvaluationDuration, dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipRuler(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if skippy < 0 {
				return ErrInvalidLengthRuler
			}
			if (iNdEx + skippy) < 0 {
				return ErrInvalidLengthRuler
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *AlertStateDesc) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowRuler
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: AlertStateDesc: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: AlertStateDesc: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field State", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowRuler
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				stringLen |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			intStringLen := int(stringLen)
			if intStringLen < 0 {
				return ErrInvalidLengthRuler
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthRuler
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.State = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowRuler
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthRuler
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthRuler
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Labels = append(m.Labels, github_com_cortexproject_cortex_pkg_ingester_client.LabelAdapter{})
			if err := m.Labels[len(m.Labels)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		case 3:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Annotations", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowRuler
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthRuler
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthRuler
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Annotations = append(m.Annotations, github_com_cortexproject_cortex_pkg_ingester_client.LabelAdapter{})
			if err := m.Annotations[len(m.Annotations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		case 4:
			if wireType != 1 {
				return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
			}
			var v uint64
			if (iNdEx + 8) > l {
				return io.ErrUnexpectedEOF
			}
			v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:]))
			iNdEx += 8
			m.Value = float64(math.Float64frombits(v))
		case 5:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field ActiveAt", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowRuler
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthRuler
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthRuler
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.ActiveAt, dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		case 6:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field FiredAt", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowRuler
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthRuler
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthRuler
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.FiredAt, dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		case 7:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field ResolvedAt", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowRuler
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthRuler
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthRuler
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.ResolvedAt, dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		case 8:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field LastSentAt", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowRuler
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthRuler
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthRuler
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.LastSentAt, dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		case 9:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field ValidUntil", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowRuler
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthRuler
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthRuler
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.ValidUntil, dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipRuler(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if skippy < 0 {
				return ErrInvalidLengthRuler
			}
			if (iNdEx + skippy) < 0 {
				return ErrInvalidLengthRuler
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func skipRuler(dAtA []byte) (n int, err error) {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return 0, ErrIntOverflowRuler
			}
			if iNdEx >= l {
				return 0, io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= (uint64(b) & 0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		wireType := int(wire & 0x7)
		switch wireType {
		case 0:
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return 0, ErrIntOverflowRuler
				}
				if iNdEx >= l {
					return 0, io.ErrUnexpectedEOF
				}
				iNdEx++
				if dAtA[iNdEx-1] < 0x80 {
					break
				}
			}
			return iNdEx, nil
		case 1:
			iNdEx += 8
			return iNdEx, nil
		case 2:
			var length int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return 0, ErrIntOverflowRuler
				}
				if iNdEx >= l {
					return 0, io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				length |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if length < 0 {
				return 0, ErrInvalidLengthRuler
			}
			iNdEx += length
			if iNdEx < 0 {
				return 0, ErrInvalidLengthRuler
			}
			return iNdEx, nil
		case 3:
			for {
				var innerWire uint64
				var start int = iNdEx
				for shift := uint(0); ; shift += 7 {
					if shift >= 64 {
						return 0, ErrIntOverflowRuler
					}
					if iNdEx >= l {
						return 0, io.ErrUnexpectedEOF
					}
					b := dAtA[iNdEx]
					iNdEx++
					innerWire |= (uint64(b) & 0x7F) << shift
					if b < 0x80 {
						break
					}
				}
				innerWireType := int(innerWire & 0x7)
				if innerWireType == 4 {
					break
				}
				next, err := skipRuler(dAtA[start:])
				if err != nil {
					return 0, err
				}
				iNdEx = start + next
				if iNdEx < 0 {
					return 0, ErrInvalidLengthRuler
				}
			}
			return iNdEx, nil
		case 4:
			return iNdEx, nil
		case 5:
			iNdEx += 4
			return iNdEx, nil
		default:
			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
		}
	}
	panic("unreachable")
}

var (
	ErrInvalidLengthRuler = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowRuler   = fmt.Errorf("proto: integer overflow")
)
