// 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/gogo/protobuf/gogoproto"
	proto "github.com/gogo/protobuf/proto"
	github_com_gogo_protobuf_types "github.com/gogo/protobuf/types"
	_ "github.com/grafana/mimir/pkg/mimirpb"
	github_com_grafana_mimir_pkg_mimirpb "github.com/grafana/mimir/pkg/mimirpb"
	rulespb "github.com/grafana/mimir/pkg/ruler/rulespb"
	grpc "google.golang.org/grpc"
	codes "google.golang.org/grpc/codes"
	status "google.golang.org/grpc/status"
	_ "google.golang.org/protobuf/types/known/durationpb"
	_ "google.golang.org/protobuf/types/known/timestamppb"
	io "io"
	math "math"
	math_bits "math/bits"
	reflect "reflect"
	strconv "strconv"
	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_RuleType int32

const (
	AnyRule       RulesRequest_RuleType = 0
	AlertingRule  RulesRequest_RuleType = 1
	RecordingRule RulesRequest_RuleType = 2
)

var RulesRequest_RuleType_name = map[int32]string{
	0: "AnyRule",
	1: "AlertingRule",
	2: "RecordingRule",
}

var RulesRequest_RuleType_value = map[string]int32{
	"AnyRule":       0,
	"AlertingRule":  1,
	"RecordingRule": 2,
}

func (RulesRequest_RuleType) EnumDescriptor() ([]byte, []int) {
	return fileDescriptor_9ecbec0a4cfddea6, []int{0, 0}
}

type RulesRequest struct {
	Filter        RulesRequest_RuleType `protobuf:"varint,1,opt,name=filter,proto3,enum=ruler.RulesRequest_RuleType" json:"filter,omitempty"`
	RuleName      []string              `protobuf:"bytes,2,rep,name=rule_name,json=ruleName,proto3" json:"rule_name,omitempty"`
	RuleGroup     []string              `protobuf:"bytes,3,rep,name=rule_group,json=ruleGroup,proto3" json:"rule_group,omitempty"`
	File          []string              `protobuf:"bytes,4,rep,name=file,proto3" json:"file,omitempty"`
	ExcludeAlerts bool                  `protobuf:"varint,5,opt,name=exclude_alerts,json=excludeAlerts,proto3" json:"exclude_alerts,omitempty"`
	MaxGroups     int32                 `protobuf:"varint,6,opt,name=max_groups,json=maxGroups,proto3" json:"max_groups,omitempty"`
	NextToken     string                `protobuf:"bytes,7,opt,name=next_token,json=nextToken,proto3" json:"next_token,omitempty"`
}

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

func (m *RulesRequest) GetFilter() RulesRequest_RuleType {
	if m != nil {
		return m.Filter
	}
	return AnyRule
}

func (m *RulesRequest) GetRuleName() []string {
	if m != nil {
		return m.RuleName
	}
	return nil
}

func (m *RulesRequest) GetRuleGroup() []string {
	if m != nil {
		return m.RuleGroup
	}
	return nil
}

func (m *RulesRequest) GetFile() []string {
	if m != nil {
		return m.File
	}
	return nil
}

func (m *RulesRequest) GetExcludeAlerts() bool {
	if m != nil {
		return m.ExcludeAlerts
	}
	return false
}

func (m *RulesRequest) GetMaxGroups() int32 {
	if m != nil {
		return m.MaxGroups
	}
	return 0
}

func (m *RulesRequest) GetNextToken() string {
	if m != nil {
		return m.NextToken
	}
	return ""
}

type RulesResponse struct {
	// Keep reference to buffer for unsafe references.
	github_com_grafana_mimir_pkg_mimirpb.BufferHolder

	Groups   []*GroupStateDesc `protobuf:"bytes,1,rep,name=groups,proto3" json:"groups,omitempty"`
	Warnings []string          `protobuf:"bytes,2,rep,name=warnings,proto3" json:"warnings,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
}

func (m *RulesResponse) GetWarnings() []string {
	if m != nil {
		return m.Warnings
	}
	return nil
}

// SyncRulesRequest is the message sent to request a ruler to re-synchronize the rules of 1+ tenants.
type SyncRulesRequest struct {
	// The user / tenant IDs for which the rules should be synced.
	UserIds []string `protobuf:"bytes,1,rep,name=user_ids,json=userIds,proto3" json:"user_ids,omitempty"`
}

func (m *SyncRulesRequest) Reset()      { *m = SyncRulesRequest{} }
func (*SyncRulesRequest) ProtoMessage() {}
func (*SyncRulesRequest) Descriptor() ([]byte, []int) {
	return fileDescriptor_9ecbec0a4cfddea6, []int{2}
}
func (m *SyncRulesRequest) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *SyncRulesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_SyncRulesRequest.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 *SyncRulesRequest) XXX_Merge(src proto.Message) {
	xxx_messageInfo_SyncRulesRequest.Merge(m, src)
}
func (m *SyncRulesRequest) XXX_Size() int {
	return m.Size()
}
func (m *SyncRulesRequest) XXX_DiscardUnknown() {
	xxx_messageInfo_SyncRulesRequest.DiscardUnknown(m)
}

var xxx_messageInfo_SyncRulesRequest proto.InternalMessageInfo

func (m *SyncRulesRequest) GetUserIds() []string {
	if m != nil {
		return m.UserIds
	}
	return nil
}

// SyncRulesResponse is the message received back for a SyncRulesRequest.
type SyncRulesResponse struct {
}

func (m *SyncRulesResponse) Reset()      { *m = SyncRulesResponse{} }
func (*SyncRulesResponse) ProtoMessage() {}
func (*SyncRulesResponse) Descriptor() ([]byte, []int) {
	return fileDescriptor_9ecbec0a4cfddea6, []int{3}
}
func (m *SyncRulesResponse) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *SyncRulesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_SyncRulesResponse.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 *SyncRulesResponse) XXX_Merge(src proto.Message) {
	xxx_messageInfo_SyncRulesResponse.Merge(m, src)
}
func (m *SyncRulesResponse) XXX_Size() int {
	return m.Size()
}
func (m *SyncRulesResponse) XXX_DiscardUnknown() {
	xxx_messageInfo_SyncRulesResponse.DiscardUnknown(m)
}

var xxx_messageInfo_SyncRulesResponse proto.InternalMessageInfo

// GroupStateDesc is a proto representation of a mimir rule group
type GroupStateDesc struct {
	Group               *rulespb.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{4}
}
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() *rulespb.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                *rulespb.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{5}
}
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() *rulespb.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_grafana_mimir_pkg_mimirpb.LabelAdapter `protobuf:"bytes,2,rep,name=labels,proto3,customtype=github.com/grafana/mimir/pkg/mimirpb.LabelAdapter" json:"labels"`
	Annotations     []github_com_grafana_mimir_pkg_mimirpb.LabelAdapter `protobuf:"bytes,3,rep,name=annotations,proto3,customtype=github.com/grafana/mimir/pkg/mimirpb.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"`
	KeepFiringSince time.Time                                           `protobuf:"bytes,10,opt,name=keep_firing_since,json=keepFiringSince,proto3,stdtime" json:"keep_firing_since"`
}

func (m *AlertStateDesc) Reset()      { *m = AlertStateDesc{} }
func (*AlertStateDesc) ProtoMessage() {}
func (*AlertStateDesc) Descriptor() ([]byte, []int) {
	return fileDescriptor_9ecbec0a4cfddea6, []int{6}
}
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 (m *AlertStateDesc) GetKeepFiringSince() time.Time {
	if m != nil {
		return m.KeepFiringSince
	}
	return time.Time{}
}

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

func (x RulesRequest_RuleType) String() string {
	s, ok := RulesRequest_RuleType_name[int32(x)]
	if ok {
		return s
	}
	return strconv.Itoa(int(x))
}
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
	}
	if this.Filter != that1.Filter {
		return false
	}
	if len(this.RuleName) != len(that1.RuleName) {
		return false
	}
	for i := range this.RuleName {
		if this.RuleName[i] != that1.RuleName[i] {
			return false
		}
	}
	if len(this.RuleGroup) != len(that1.RuleGroup) {
		return false
	}
	for i := range this.RuleGroup {
		if this.RuleGroup[i] != that1.RuleGroup[i] {
			return false
		}
	}
	if len(this.File) != len(that1.File) {
		return false
	}
	for i := range this.File {
		if this.File[i] != that1.File[i] {
			return false
		}
	}
	if this.ExcludeAlerts != that1.ExcludeAlerts {
		return false
	}
	if this.MaxGroups != that1.MaxGroups {
		return false
	}
	if this.NextToken != that1.NextToken {
		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
		}
	}
	if len(this.Warnings) != len(that1.Warnings) {
		return false
	}
	for i := range this.Warnings {
		if this.Warnings[i] != that1.Warnings[i] {
			return false
		}
	}
	return true
}
func (this *SyncRulesRequest) Equal(that interface{}) bool {
	if that == nil {
		return this == nil
	}

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

	that1, ok := that.(*SyncRulesResponse)
	if !ok {
		that2, ok := that.(SyncRulesResponse)
		if ok {
			that1 = &that2
		} else {
			return false
		}
	}
	if that1 == nil {
		return this == nil
	} else if this == nil {
		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
	}
	if !this.KeepFiringSince.Equal(that1.KeepFiringSince) {
		return false
	}
	return true
}
func (this *RulesRequest) GoString() string {
	if this == nil {
		return "nil"
	}
	s := make([]string, 0, 11)
	s = append(s, "&ruler.RulesRequest{")
	s = append(s, "Filter: "+fmt.Sprintf("%#v", this.Filter)+",\n")
	s = append(s, "RuleName: "+fmt.Sprintf("%#v", this.RuleName)+",\n")
	s = append(s, "RuleGroup: "+fmt.Sprintf("%#v", this.RuleGroup)+",\n")
	s = append(s, "File: "+fmt.Sprintf("%#v", this.File)+",\n")
	s = append(s, "ExcludeAlerts: "+fmt.Sprintf("%#v", this.ExcludeAlerts)+",\n")
	s = append(s, "MaxGroups: "+fmt.Sprintf("%#v", this.MaxGroups)+",\n")
	s = append(s, "NextToken: "+fmt.Sprintf("%#v", this.NextToken)+",\n")
	s = append(s, "}")
	return strings.Join(s, "")
}
func (this *RulesResponse) GoString() string {
	if this == nil {
		return "nil"
	}
	s := make([]string, 0, 6)
	s = append(s, "&ruler.RulesResponse{")
	if this.Groups != nil {
		s = append(s, "Groups: "+fmt.Sprintf("%#v", this.Groups)+",\n")
	}
	s = append(s, "Warnings: "+fmt.Sprintf("%#v", this.Warnings)+",\n")
	s = append(s, "}")
	return strings.Join(s, "")
}
func (this *SyncRulesRequest) GoString() string {
	if this == nil {
		return "nil"
	}
	s := make([]string, 0, 5)
	s = append(s, "&ruler.SyncRulesRequest{")
	s = append(s, "UserIds: "+fmt.Sprintf("%#v", this.UserIds)+",\n")
	s = append(s, "}")
	return strings.Join(s, "")
}
func (this *SyncRulesResponse) GoString() string {
	if this == nil {
		return "nil"
	}
	s := make([]string, 0, 4)
	s = append(s, "&ruler.SyncRulesResponse{")
	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, 14)
	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, "KeepFiringSince: "+fmt.Sprintf("%#v", this.KeepFiringSince)+",\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 returns the currently loaded on the ruler instance for the authenticated tenant.
	Rules(ctx context.Context, in *RulesRequest, opts ...grpc.CallOption) (*RulesResponse, error)
	// SyncRules requests a ruler to asynchronously re-synchronize the rules of 1+ tenants.
	SyncRules(ctx context.Context, in *SyncRulesRequest, opts ...grpc.CallOption) (*SyncRulesResponse, 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
}

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

// RulerServer is the server API for Ruler service.
type RulerServer interface {
	// Rules returns the currently loaded on the ruler instance for the authenticated tenant.
	Rules(context.Context, *RulesRequest) (*RulesResponse, error)
	// SyncRules requests a ruler to asynchronously re-synchronize the rules of 1+ tenants.
	SyncRules(context.Context, *SyncRulesRequest) (*SyncRulesResponse, 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 (*UnimplementedRulerServer) SyncRules(ctx context.Context, req *SyncRulesRequest) (*SyncRulesResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method SyncRules 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)
}

func _Ruler_SyncRules_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(SyncRulesRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(RulerServer).SyncRules(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/ruler.Ruler/SyncRules",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(RulerServer).SyncRules(ctx, req.(*SyncRulesRequest))
	}
	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,
		},
		{
			MethodName: "SyncRules",
			Handler:    _Ruler_SyncRules_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
	if len(m.NextToken) > 0 {
		i -= len(m.NextToken)
		copy(dAtA[i:], m.NextToken)
		i = encodeVarintRuler(dAtA, i, uint64(len(m.NextToken)))
		i--
		dAtA[i] = 0x3a
	}
	if m.MaxGroups != 0 {
		i = encodeVarintRuler(dAtA, i, uint64(m.MaxGroups))
		i--
		dAtA[i] = 0x30
	}
	if m.ExcludeAlerts {
		i--
		if m.ExcludeAlerts {
			dAtA[i] = 1
		} else {
			dAtA[i] = 0
		}
		i--
		dAtA[i] = 0x28
	}
	if len(m.File) > 0 {
		for iNdEx := len(m.File) - 1; iNdEx >= 0; iNdEx-- {
			i -= len(m.File[iNdEx])
			copy(dAtA[i:], m.File[iNdEx])
			i = encodeVarintRuler(dAtA, i, uint64(len(m.File[iNdEx])))
			i--
			dAtA[i] = 0x22
		}
	}
	if len(m.RuleGroup) > 0 {
		for iNdEx := len(m.RuleGroup) - 1; iNdEx >= 0; iNdEx-- {
			i -= len(m.RuleGroup[iNdEx])
			copy(dAtA[i:], m.RuleGroup[iNdEx])
			i = encodeVarintRuler(dAtA, i, uint64(len(m.RuleGroup[iNdEx])))
			i--
			dAtA[i] = 0x1a
		}
	}
	if len(m.RuleName) > 0 {
		for iNdEx := len(m.RuleName) - 1; iNdEx >= 0; iNdEx-- {
			i -= len(m.RuleName[iNdEx])
			copy(dAtA[i:], m.RuleName[iNdEx])
			i = encodeVarintRuler(dAtA, i, uint64(len(m.RuleName[iNdEx])))
			i--
			dAtA[i] = 0x12
		}
	}
	if m.Filter != 0 {
		i = encodeVarintRuler(dAtA, i, uint64(m.Filter))
		i--
		dAtA[i] = 0x8
	}
	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.Warnings) > 0 {
		for iNdEx := len(m.Warnings) - 1; iNdEx >= 0; iNdEx-- {
			i -= len(m.Warnings[iNdEx])
			copy(dAtA[i:], m.Warnings[iNdEx])
			i = encodeVarintRuler(dAtA, i, uint64(len(m.Warnings[iNdEx])))
			i--
			dAtA[i] = 0x12
		}
	}
	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 *SyncRulesRequest) 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 *SyncRulesRequest) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

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

func (m *SyncRulesResponse) 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 *SyncRulesResponse) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *SyncRulesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	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.KeepFiringSince, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.KeepFiringSince):])
	if err7 != nil {
		return 0, err7
	}
	i -= n7
	i = encodeVarintRuler(dAtA, i, uint64(n7))
	i--
	dAtA[i] = 0x52
	n8, err8 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.ValidUntil, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.ValidUntil):])
	if err8 != nil {
		return 0, err8
	}
	i -= n8
	i = encodeVarintRuler(dAtA, i, uint64(n8))
	i--
	dAtA[i] = 0x4a
	n9, err9 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.LastSentAt, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.LastSentAt):])
	if err9 != nil {
		return 0, err9
	}
	i -= n9
	i = encodeVarintRuler(dAtA, i, uint64(n9))
	i--
	dAtA[i] = 0x42
	n10, err10 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.ResolvedAt, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.ResolvedAt):])
	if err10 != nil {
		return 0, err10
	}
	i -= n10
	i = encodeVarintRuler(dAtA, i, uint64(n10))
	i--
	dAtA[i] = 0x3a
	n11, err11 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.FiredAt, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.FiredAt):])
	if err11 != nil {
		return 0, err11
	}
	i -= n11
	i = encodeVarintRuler(dAtA, i, uint64(n11))
	i--
	dAtA[i] = 0x32
	n12, err12 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.ActiveAt, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.ActiveAt):])
	if err12 != nil {
		return 0, err12
	}
	i -= n12
	i = encodeVarintRuler(dAtA, i, uint64(n12))
	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
	if m.Filter != 0 {
		n += 1 + sovRuler(uint64(m.Filter))
	}
	if len(m.RuleName) > 0 {
		for _, s := range m.RuleName {
			l = len(s)
			n += 1 + l + sovRuler(uint64(l))
		}
	}
	if len(m.RuleGroup) > 0 {
		for _, s := range m.RuleGroup {
			l = len(s)
			n += 1 + l + sovRuler(uint64(l))
		}
	}
	if len(m.File) > 0 {
		for _, s := range m.File {
			l = len(s)
			n += 1 + l + sovRuler(uint64(l))
		}
	}
	if m.ExcludeAlerts {
		n += 2
	}
	if m.MaxGroups != 0 {
		n += 1 + sovRuler(uint64(m.MaxGroups))
	}
	l = len(m.NextToken)
	if l > 0 {
		n += 1 + l + sovRuler(uint64(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))
		}
	}
	if len(m.Warnings) > 0 {
		for _, s := range m.Warnings {
			l = len(s)
			n += 1 + l + sovRuler(uint64(l))
		}
	}
	return n
}

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

func (m *SyncRulesResponse) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = 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))
	l = github_com_gogo_protobuf_types.SizeOfStdTime(m.KeepFiringSince)
	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{`,
		`Filter:` + fmt.Sprintf("%v", this.Filter) + `,`,
		`RuleName:` + fmt.Sprintf("%v", this.RuleName) + `,`,
		`RuleGroup:` + fmt.Sprintf("%v", this.RuleGroup) + `,`,
		`File:` + fmt.Sprintf("%v", this.File) + `,`,
		`ExcludeAlerts:` + fmt.Sprintf("%v", this.ExcludeAlerts) + `,`,
		`MaxGroups:` + fmt.Sprintf("%v", this.MaxGroups) + `,`,
		`NextToken:` + fmt.Sprintf("%v", this.NextToken) + `,`,
		`}`,
	}, "")
	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 + `,`,
		`Warnings:` + fmt.Sprintf("%v", this.Warnings) + `,`,
		`}`,
	}, "")
	return s
}
func (this *SyncRulesRequest) String() string {
	if this == nil {
		return "nil"
	}
	s := strings.Join([]string{`&SyncRulesRequest{`,
		`UserIds:` + fmt.Sprintf("%v", this.UserIds) + `,`,
		`}`,
	}, "")
	return s
}
func (this *SyncRulesResponse) String() string {
	if this == nil {
		return "nil"
	}
	s := strings.Join([]string{`&SyncRulesResponse{`,
		`}`,
	}, "")
	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", "rulespb.RuleGroupDesc", 1) + `,`,
		`ActiveRules:` + repeatedStringForActiveRules + `,`,
		`EvaluationTimestamp:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.EvaluationTimestamp), "Timestamp", "timestamppb.Timestamp", 1), `&`, ``, 1) + `,`,
		`EvaluationDuration:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.EvaluationDuration), "Duration", "durationpb.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", "rulespb.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", "timestamppb.Timestamp", 1), `&`, ``, 1) + `,`,
		`EvaluationDuration:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.EvaluationDuration), "Duration", "durationpb.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", "timestamppb.Timestamp", 1), `&`, ``, 1) + `,`,
		`FiredAt:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.FiredAt), "Timestamp", "timestamppb.Timestamp", 1), `&`, ``, 1) + `,`,
		`ResolvedAt:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ResolvedAt), "Timestamp", "timestamppb.Timestamp", 1), `&`, ``, 1) + `,`,
		`LastSentAt:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.LastSentAt), "Timestamp", "timestamppb.Timestamp", 1), `&`, ``, 1) + `,`,
		`ValidUntil:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ValidUntil), "Timestamp", "timestamppb.Timestamp", 1), `&`, ``, 1) + `,`,
		`KeepFiringSince:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.KeepFiringSince), "Timestamp", "timestamppb.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 {
		case 1:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field Filter", wireType)
			}
			m.Filter = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowRuler
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.Filter |= RulesRequest_RuleType(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field RuleName", 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.RuleName = append(m.RuleName, string(dAtA[iNdEx:postIndex]))
			iNdEx = postIndex
		case 3:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field RuleGroup", 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.RuleGroup = append(m.RuleGroup, string(dAtA[iNdEx:postIndex]))
			iNdEx = postIndex
		case 4:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field File", 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.File = append(m.File, string(dAtA[iNdEx:postIndex]))
			iNdEx = postIndex
		case 5:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field ExcludeAlerts", wireType)
			}
			var v int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowRuler
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				v |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			m.ExcludeAlerts = bool(v != 0)
		case 6:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field MaxGroups", wireType)
			}
			m.MaxGroups = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowRuler
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.MaxGroups |= int32(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 7:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field NextToken", 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.NextToken = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipRuler(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (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
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Warnings", 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.Warnings = append(m.Warnings, string(dAtA[iNdEx:postIndex]))
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipRuler(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthRuler
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *SyncRulesRequest) 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: SyncRulesRequest: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: SyncRulesRequest: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field UserIds", 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.UserIds = append(m.UserIds, string(dAtA[iNdEx:postIndex]))
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipRuler(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthRuler
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *SyncRulesResponse) 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: SyncRulesResponse: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: SyncRulesResponse: 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) || (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 = &rulespb.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) || (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 = &rulespb.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) || (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_grafana_mimir_pkg_mimirpb.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_grafana_mimir_pkg_mimirpb.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
		case 10:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field KeepFiringSince", 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.KeepFiringSince, 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) || (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
	depth := 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
				}
			}
		case 1:
			iNdEx += 8
		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
		case 3:
			depth++
		case 4:
			if depth == 0 {
				return 0, ErrUnexpectedEndOfGroupRuler
			}
			depth--
		case 5:
			iNdEx += 4
		default:
			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
		}
		if iNdEx < 0 {
			return 0, ErrInvalidLengthRuler
		}
		if depth == 0 {
			return iNdEx, nil
		}
	}
	return 0, io.ErrUnexpectedEOF
}

var (
	ErrInvalidLengthRuler        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowRuler          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupRuler = fmt.Errorf("proto: unexpected end of group")
)
