github.com/m3db/m3@v1.5.0/src/metrics/generated/proto/rulepb/rule.pb.go (about)

     1  // Code generated by protoc-gen-gogo. DO NOT EDIT.
     2  // source: github.com/m3db/m3/src/metrics/generated/proto/rulepb/rule.proto
     3  
     4  // Copyright (c) 2021 Uber Technologies, Inc.
     5  //
     6  // Permission is hereby granted, free of charge, to any person obtaining a copy
     7  // of this software and associated documentation files (the "Software"), to deal
     8  // in the Software without restriction, including without limitation the rights
     9  // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    10  // copies of the Software, and to permit persons to whom the Software is
    11  // furnished to do so, subject to the following conditions:
    12  //
    13  // The above copyright notice and this permission notice shall be included in
    14  // all copies or substantial portions of the Software.
    15  //
    16  // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    17  // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    18  // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    19  // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    20  // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    21  // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
    22  // THE SOFTWARE.
    23  
    24  package rulepb
    25  
    26  import proto "github.com/gogo/protobuf/proto"
    27  import fmt "fmt"
    28  import math "math"
    29  import aggregationpb "github.com/m3db/m3/src/metrics/generated/proto/aggregationpb"
    30  import pipelinepb "github.com/m3db/m3/src/metrics/generated/proto/pipelinepb"
    31  import policypb "github.com/m3db/m3/src/metrics/generated/proto/policypb"
    32  import metricpb "github.com/m3db/m3/src/metrics/generated/proto/metricpb"
    33  
    34  import io "io"
    35  
    36  // Reference imports to suppress errors if they are not otherwise used.
    37  var _ = proto.Marshal
    38  var _ = fmt.Errorf
    39  var _ = math.Inf
    40  
    41  type MappingRuleSnapshot struct {
    42  	Name         string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
    43  	Tombstoned   bool   `protobuf:"varint,2,opt,name=tombstoned,proto3" json:"tombstoned,omitempty"`
    44  	CutoverNanos int64  `protobuf:"varint,3,opt,name=cutover_nanos,json=cutoverNanos,proto3" json:"cutover_nanos,omitempty"`
    45  	Filter       string `protobuf:"bytes,4,opt,name=filter,proto3" json:"filter,omitempty"`
    46  	// TODO(xichen): remove this and mark the field number reserved once all mapping rules are updated in KV.
    47  	Policies           []*policypb.Policy              `protobuf:"bytes,5,rep,name=policies" json:"policies,omitempty"`
    48  	LastUpdatedAtNanos int64                           `protobuf:"varint,6,opt,name=last_updated_at_nanos,json=lastUpdatedAtNanos,proto3" json:"last_updated_at_nanos,omitempty"`
    49  	LastUpdatedBy      string                          `protobuf:"bytes,7,opt,name=last_updated_by,json=lastUpdatedBy,proto3" json:"last_updated_by,omitempty"`
    50  	AggregationTypes   []aggregationpb.AggregationType `protobuf:"varint,8,rep,packed,name=aggregation_types,json=aggregationTypes,enum=aggregationpb.AggregationType" json:"aggregation_types,omitempty"`
    51  	StoragePolicies    []*policypb.StoragePolicy       `protobuf:"bytes,9,rep,name=storage_policies,json=storagePolicies" json:"storage_policies,omitempty"`
    52  	DropPolicy         policypb.DropPolicy             `protobuf:"varint,10,opt,name=drop_policy,json=dropPolicy,proto3,enum=policypb.DropPolicy" json:"drop_policy,omitempty"`
    53  	Tags               []*metricpb.Tag                 `protobuf:"bytes,11,rep,name=tags" json:"tags,omitempty"`
    54  }
    55  
    56  func (m *MappingRuleSnapshot) Reset()                    { *m = MappingRuleSnapshot{} }
    57  func (m *MappingRuleSnapshot) String() string            { return proto.CompactTextString(m) }
    58  func (*MappingRuleSnapshot) ProtoMessage()               {}
    59  func (*MappingRuleSnapshot) Descriptor() ([]byte, []int) { return fileDescriptorRule, []int{0} }
    60  
    61  func (m *MappingRuleSnapshot) GetName() string {
    62  	if m != nil {
    63  		return m.Name
    64  	}
    65  	return ""
    66  }
    67  
    68  func (m *MappingRuleSnapshot) GetTombstoned() bool {
    69  	if m != nil {
    70  		return m.Tombstoned
    71  	}
    72  	return false
    73  }
    74  
    75  func (m *MappingRuleSnapshot) GetCutoverNanos() int64 {
    76  	if m != nil {
    77  		return m.CutoverNanos
    78  	}
    79  	return 0
    80  }
    81  
    82  func (m *MappingRuleSnapshot) GetFilter() string {
    83  	if m != nil {
    84  		return m.Filter
    85  	}
    86  	return ""
    87  }
    88  
    89  func (m *MappingRuleSnapshot) GetPolicies() []*policypb.Policy {
    90  	if m != nil {
    91  		return m.Policies
    92  	}
    93  	return nil
    94  }
    95  
    96  func (m *MappingRuleSnapshot) GetLastUpdatedAtNanos() int64 {
    97  	if m != nil {
    98  		return m.LastUpdatedAtNanos
    99  	}
   100  	return 0
   101  }
   102  
   103  func (m *MappingRuleSnapshot) GetLastUpdatedBy() string {
   104  	if m != nil {
   105  		return m.LastUpdatedBy
   106  	}
   107  	return ""
   108  }
   109  
   110  func (m *MappingRuleSnapshot) GetAggregationTypes() []aggregationpb.AggregationType {
   111  	if m != nil {
   112  		return m.AggregationTypes
   113  	}
   114  	return nil
   115  }
   116  
   117  func (m *MappingRuleSnapshot) GetStoragePolicies() []*policypb.StoragePolicy {
   118  	if m != nil {
   119  		return m.StoragePolicies
   120  	}
   121  	return nil
   122  }
   123  
   124  func (m *MappingRuleSnapshot) GetDropPolicy() policypb.DropPolicy {
   125  	if m != nil {
   126  		return m.DropPolicy
   127  	}
   128  	return policypb.DropPolicy_NONE
   129  }
   130  
   131  func (m *MappingRuleSnapshot) GetTags() []*metricpb.Tag {
   132  	if m != nil {
   133  		return m.Tags
   134  	}
   135  	return nil
   136  }
   137  
   138  type MappingRule struct {
   139  	Uuid      string                 `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"`
   140  	Snapshots []*MappingRuleSnapshot `protobuf:"bytes,2,rep,name=snapshots" json:"snapshots,omitempty"`
   141  }
   142  
   143  func (m *MappingRule) Reset()                    { *m = MappingRule{} }
   144  func (m *MappingRule) String() string            { return proto.CompactTextString(m) }
   145  func (*MappingRule) ProtoMessage()               {}
   146  func (*MappingRule) Descriptor() ([]byte, []int) { return fileDescriptorRule, []int{1} }
   147  
   148  func (m *MappingRule) GetUuid() string {
   149  	if m != nil {
   150  		return m.Uuid
   151  	}
   152  	return ""
   153  }
   154  
   155  func (m *MappingRule) GetSnapshots() []*MappingRuleSnapshot {
   156  	if m != nil {
   157  		return m.Snapshots
   158  	}
   159  	return nil
   160  }
   161  
   162  // TODO(xichen): remove this once all rules are updated in KV.
   163  type RollupTarget struct {
   164  	Name     string             `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
   165  	Tags     []string           `protobuf:"bytes,2,rep,name=tags" json:"tags,omitempty"`
   166  	Policies []*policypb.Policy `protobuf:"bytes,3,rep,name=policies" json:"policies,omitempty"`
   167  }
   168  
   169  func (m *RollupTarget) Reset()                    { *m = RollupTarget{} }
   170  func (m *RollupTarget) String() string            { return proto.CompactTextString(m) }
   171  func (*RollupTarget) ProtoMessage()               {}
   172  func (*RollupTarget) Descriptor() ([]byte, []int) { return fileDescriptorRule, []int{2} }
   173  
   174  func (m *RollupTarget) GetName() string {
   175  	if m != nil {
   176  		return m.Name
   177  	}
   178  	return ""
   179  }
   180  
   181  func (m *RollupTarget) GetTags() []string {
   182  	if m != nil {
   183  		return m.Tags
   184  	}
   185  	return nil
   186  }
   187  
   188  func (m *RollupTarget) GetPolicies() []*policypb.Policy {
   189  	if m != nil {
   190  		return m.Policies
   191  	}
   192  	return nil
   193  }
   194  
   195  // TODO(xichen): rename this once all rules are updated in KV.
   196  type RollupTargetV2 struct {
   197  	Pipeline        *pipelinepb.Pipeline      `protobuf:"bytes,1,opt,name=pipeline" json:"pipeline,omitempty"`
   198  	StoragePolicies []*policypb.StoragePolicy `protobuf:"bytes,2,rep,name=storage_policies,json=storagePolicies" json:"storage_policies,omitempty"`
   199  	ResendEnabled   bool                      `protobuf:"varint,3,opt,name=resend_enabled,json=resendEnabled,proto3" json:"resend_enabled,omitempty"`
   200  }
   201  
   202  func (m *RollupTargetV2) Reset()                    { *m = RollupTargetV2{} }
   203  func (m *RollupTargetV2) String() string            { return proto.CompactTextString(m) }
   204  func (*RollupTargetV2) ProtoMessage()               {}
   205  func (*RollupTargetV2) Descriptor() ([]byte, []int) { return fileDescriptorRule, []int{3} }
   206  
   207  func (m *RollupTargetV2) GetPipeline() *pipelinepb.Pipeline {
   208  	if m != nil {
   209  		return m.Pipeline
   210  	}
   211  	return nil
   212  }
   213  
   214  func (m *RollupTargetV2) GetStoragePolicies() []*policypb.StoragePolicy {
   215  	if m != nil {
   216  		return m.StoragePolicies
   217  	}
   218  	return nil
   219  }
   220  
   221  func (m *RollupTargetV2) GetResendEnabled() bool {
   222  	if m != nil {
   223  		return m.ResendEnabled
   224  	}
   225  	return false
   226  }
   227  
   228  type RollupRuleSnapshot struct {
   229  	Name         string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
   230  	Tombstoned   bool   `protobuf:"varint,2,opt,name=tombstoned,proto3" json:"tombstoned,omitempty"`
   231  	CutoverNanos int64  `protobuf:"varint,3,opt,name=cutover_nanos,json=cutoverNanos,proto3" json:"cutover_nanos,omitempty"`
   232  	Filter       string `protobuf:"bytes,4,opt,name=filter,proto3" json:"filter,omitempty"`
   233  	// TODO(xichen): remove this and mark the field number reserved once all rollup rules are updated in KV.
   234  	Targets            []*RollupTarget `protobuf:"bytes,5,rep,name=targets" json:"targets,omitempty"`
   235  	LastUpdatedAtNanos int64           `protobuf:"varint,6,opt,name=last_updated_at_nanos,json=lastUpdatedAtNanos,proto3" json:"last_updated_at_nanos,omitempty"`
   236  	LastUpdatedBy      string          `protobuf:"bytes,7,opt,name=last_updated_by,json=lastUpdatedBy,proto3" json:"last_updated_by,omitempty"`
   237  	// TODO(xichen): rename this once all rules are updated in KV.
   238  	TargetsV2    []*RollupTargetV2 `protobuf:"bytes,8,rep,name=targets_v2,json=targetsV2" json:"targets_v2,omitempty"`
   239  	KeepOriginal bool              `protobuf:"varint,9,opt,name=keep_original,json=keepOriginal,proto3" json:"keep_original,omitempty"`
   240  	Tags         []*metricpb.Tag   `protobuf:"bytes,10,rep,name=tags" json:"tags,omitempty"`
   241  }
   242  
   243  func (m *RollupRuleSnapshot) Reset()                    { *m = RollupRuleSnapshot{} }
   244  func (m *RollupRuleSnapshot) String() string            { return proto.CompactTextString(m) }
   245  func (*RollupRuleSnapshot) ProtoMessage()               {}
   246  func (*RollupRuleSnapshot) Descriptor() ([]byte, []int) { return fileDescriptorRule, []int{4} }
   247  
   248  func (m *RollupRuleSnapshot) GetName() string {
   249  	if m != nil {
   250  		return m.Name
   251  	}
   252  	return ""
   253  }
   254  
   255  func (m *RollupRuleSnapshot) GetTombstoned() bool {
   256  	if m != nil {
   257  		return m.Tombstoned
   258  	}
   259  	return false
   260  }
   261  
   262  func (m *RollupRuleSnapshot) GetCutoverNanos() int64 {
   263  	if m != nil {
   264  		return m.CutoverNanos
   265  	}
   266  	return 0
   267  }
   268  
   269  func (m *RollupRuleSnapshot) GetFilter() string {
   270  	if m != nil {
   271  		return m.Filter
   272  	}
   273  	return ""
   274  }
   275  
   276  func (m *RollupRuleSnapshot) GetTargets() []*RollupTarget {
   277  	if m != nil {
   278  		return m.Targets
   279  	}
   280  	return nil
   281  }
   282  
   283  func (m *RollupRuleSnapshot) GetLastUpdatedAtNanos() int64 {
   284  	if m != nil {
   285  		return m.LastUpdatedAtNanos
   286  	}
   287  	return 0
   288  }
   289  
   290  func (m *RollupRuleSnapshot) GetLastUpdatedBy() string {
   291  	if m != nil {
   292  		return m.LastUpdatedBy
   293  	}
   294  	return ""
   295  }
   296  
   297  func (m *RollupRuleSnapshot) GetTargetsV2() []*RollupTargetV2 {
   298  	if m != nil {
   299  		return m.TargetsV2
   300  	}
   301  	return nil
   302  }
   303  
   304  func (m *RollupRuleSnapshot) GetKeepOriginal() bool {
   305  	if m != nil {
   306  		return m.KeepOriginal
   307  	}
   308  	return false
   309  }
   310  
   311  func (m *RollupRuleSnapshot) GetTags() []*metricpb.Tag {
   312  	if m != nil {
   313  		return m.Tags
   314  	}
   315  	return nil
   316  }
   317  
   318  type RollupRule struct {
   319  	Uuid      string                `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"`
   320  	Snapshots []*RollupRuleSnapshot `protobuf:"bytes,2,rep,name=snapshots" json:"snapshots,omitempty"`
   321  }
   322  
   323  func (m *RollupRule) Reset()                    { *m = RollupRule{} }
   324  func (m *RollupRule) String() string            { return proto.CompactTextString(m) }
   325  func (*RollupRule) ProtoMessage()               {}
   326  func (*RollupRule) Descriptor() ([]byte, []int) { return fileDescriptorRule, []int{5} }
   327  
   328  func (m *RollupRule) GetUuid() string {
   329  	if m != nil {
   330  		return m.Uuid
   331  	}
   332  	return ""
   333  }
   334  
   335  func (m *RollupRule) GetSnapshots() []*RollupRuleSnapshot {
   336  	if m != nil {
   337  		return m.Snapshots
   338  	}
   339  	return nil
   340  }
   341  
   342  type RuleSet struct {
   343  	Uuid               string         `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"`
   344  	Namespace          string         `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"`
   345  	CreatedAtNanos     int64          `protobuf:"varint,3,opt,name=created_at_nanos,json=createdAtNanos,proto3" json:"created_at_nanos,omitempty"`
   346  	LastUpdatedAtNanos int64          `protobuf:"varint,4,opt,name=last_updated_at_nanos,json=lastUpdatedAtNanos,proto3" json:"last_updated_at_nanos,omitempty"`
   347  	Tombstoned         bool           `protobuf:"varint,5,opt,name=tombstoned,proto3" json:"tombstoned,omitempty"`
   348  	CutoverNanos       int64          `protobuf:"varint,6,opt,name=cutover_nanos,json=cutoverNanos,proto3" json:"cutover_nanos,omitempty"`
   349  	MappingRules       []*MappingRule `protobuf:"bytes,7,rep,name=mapping_rules,json=mappingRules" json:"mapping_rules,omitempty"`
   350  	RollupRules        []*RollupRule  `protobuf:"bytes,8,rep,name=rollup_rules,json=rollupRules" json:"rollup_rules,omitempty"`
   351  	LastUpdatedBy      string         `protobuf:"bytes,9,opt,name=last_updated_by,json=lastUpdatedBy,proto3" json:"last_updated_by,omitempty"`
   352  }
   353  
   354  func (m *RuleSet) Reset()                    { *m = RuleSet{} }
   355  func (m *RuleSet) String() string            { return proto.CompactTextString(m) }
   356  func (*RuleSet) ProtoMessage()               {}
   357  func (*RuleSet) Descriptor() ([]byte, []int) { return fileDescriptorRule, []int{6} }
   358  
   359  func (m *RuleSet) GetUuid() string {
   360  	if m != nil {
   361  		return m.Uuid
   362  	}
   363  	return ""
   364  }
   365  
   366  func (m *RuleSet) GetNamespace() string {
   367  	if m != nil {
   368  		return m.Namespace
   369  	}
   370  	return ""
   371  }
   372  
   373  func (m *RuleSet) GetCreatedAtNanos() int64 {
   374  	if m != nil {
   375  		return m.CreatedAtNanos
   376  	}
   377  	return 0
   378  }
   379  
   380  func (m *RuleSet) GetLastUpdatedAtNanos() int64 {
   381  	if m != nil {
   382  		return m.LastUpdatedAtNanos
   383  	}
   384  	return 0
   385  }
   386  
   387  func (m *RuleSet) GetTombstoned() bool {
   388  	if m != nil {
   389  		return m.Tombstoned
   390  	}
   391  	return false
   392  }
   393  
   394  func (m *RuleSet) GetCutoverNanos() int64 {
   395  	if m != nil {
   396  		return m.CutoverNanos
   397  	}
   398  	return 0
   399  }
   400  
   401  func (m *RuleSet) GetMappingRules() []*MappingRule {
   402  	if m != nil {
   403  		return m.MappingRules
   404  	}
   405  	return nil
   406  }
   407  
   408  func (m *RuleSet) GetRollupRules() []*RollupRule {
   409  	if m != nil {
   410  		return m.RollupRules
   411  	}
   412  	return nil
   413  }
   414  
   415  func (m *RuleSet) GetLastUpdatedBy() string {
   416  	if m != nil {
   417  		return m.LastUpdatedBy
   418  	}
   419  	return ""
   420  }
   421  
   422  func init() {
   423  	proto.RegisterType((*MappingRuleSnapshot)(nil), "rulepb.MappingRuleSnapshot")
   424  	proto.RegisterType((*MappingRule)(nil), "rulepb.MappingRule")
   425  	proto.RegisterType((*RollupTarget)(nil), "rulepb.RollupTarget")
   426  	proto.RegisterType((*RollupTargetV2)(nil), "rulepb.RollupTargetV2")
   427  	proto.RegisterType((*RollupRuleSnapshot)(nil), "rulepb.RollupRuleSnapshot")
   428  	proto.RegisterType((*RollupRule)(nil), "rulepb.RollupRule")
   429  	proto.RegisterType((*RuleSet)(nil), "rulepb.RuleSet")
   430  }
   431  func (m *MappingRuleSnapshot) Marshal() (dAtA []byte, err error) {
   432  	size := m.Size()
   433  	dAtA = make([]byte, size)
   434  	n, err := m.MarshalTo(dAtA)
   435  	if err != nil {
   436  		return nil, err
   437  	}
   438  	return dAtA[:n], nil
   439  }
   440  
   441  func (m *MappingRuleSnapshot) MarshalTo(dAtA []byte) (int, error) {
   442  	var i int
   443  	_ = i
   444  	var l int
   445  	_ = l
   446  	if len(m.Name) > 0 {
   447  		dAtA[i] = 0xa
   448  		i++
   449  		i = encodeVarintRule(dAtA, i, uint64(len(m.Name)))
   450  		i += copy(dAtA[i:], m.Name)
   451  	}
   452  	if m.Tombstoned {
   453  		dAtA[i] = 0x10
   454  		i++
   455  		if m.Tombstoned {
   456  			dAtA[i] = 1
   457  		} else {
   458  			dAtA[i] = 0
   459  		}
   460  		i++
   461  	}
   462  	if m.CutoverNanos != 0 {
   463  		dAtA[i] = 0x18
   464  		i++
   465  		i = encodeVarintRule(dAtA, i, uint64(m.CutoverNanos))
   466  	}
   467  	if len(m.Filter) > 0 {
   468  		dAtA[i] = 0x22
   469  		i++
   470  		i = encodeVarintRule(dAtA, i, uint64(len(m.Filter)))
   471  		i += copy(dAtA[i:], m.Filter)
   472  	}
   473  	if len(m.Policies) > 0 {
   474  		for _, msg := range m.Policies {
   475  			dAtA[i] = 0x2a
   476  			i++
   477  			i = encodeVarintRule(dAtA, i, uint64(msg.Size()))
   478  			n, err := msg.MarshalTo(dAtA[i:])
   479  			if err != nil {
   480  				return 0, err
   481  			}
   482  			i += n
   483  		}
   484  	}
   485  	if m.LastUpdatedAtNanos != 0 {
   486  		dAtA[i] = 0x30
   487  		i++
   488  		i = encodeVarintRule(dAtA, i, uint64(m.LastUpdatedAtNanos))
   489  	}
   490  	if len(m.LastUpdatedBy) > 0 {
   491  		dAtA[i] = 0x3a
   492  		i++
   493  		i = encodeVarintRule(dAtA, i, uint64(len(m.LastUpdatedBy)))
   494  		i += copy(dAtA[i:], m.LastUpdatedBy)
   495  	}
   496  	if len(m.AggregationTypes) > 0 {
   497  		dAtA2 := make([]byte, len(m.AggregationTypes)*10)
   498  		var j1 int
   499  		for _, num := range m.AggregationTypes {
   500  			for num >= 1<<7 {
   501  				dAtA2[j1] = uint8(uint64(num)&0x7f | 0x80)
   502  				num >>= 7
   503  				j1++
   504  			}
   505  			dAtA2[j1] = uint8(num)
   506  			j1++
   507  		}
   508  		dAtA[i] = 0x42
   509  		i++
   510  		i = encodeVarintRule(dAtA, i, uint64(j1))
   511  		i += copy(dAtA[i:], dAtA2[:j1])
   512  	}
   513  	if len(m.StoragePolicies) > 0 {
   514  		for _, msg := range m.StoragePolicies {
   515  			dAtA[i] = 0x4a
   516  			i++
   517  			i = encodeVarintRule(dAtA, i, uint64(msg.Size()))
   518  			n, err := msg.MarshalTo(dAtA[i:])
   519  			if err != nil {
   520  				return 0, err
   521  			}
   522  			i += n
   523  		}
   524  	}
   525  	if m.DropPolicy != 0 {
   526  		dAtA[i] = 0x50
   527  		i++
   528  		i = encodeVarintRule(dAtA, i, uint64(m.DropPolicy))
   529  	}
   530  	if len(m.Tags) > 0 {
   531  		for _, msg := range m.Tags {
   532  			dAtA[i] = 0x5a
   533  			i++
   534  			i = encodeVarintRule(dAtA, i, uint64(msg.Size()))
   535  			n, err := msg.MarshalTo(dAtA[i:])
   536  			if err != nil {
   537  				return 0, err
   538  			}
   539  			i += n
   540  		}
   541  	}
   542  	return i, nil
   543  }
   544  
   545  func (m *MappingRule) Marshal() (dAtA []byte, err error) {
   546  	size := m.Size()
   547  	dAtA = make([]byte, size)
   548  	n, err := m.MarshalTo(dAtA)
   549  	if err != nil {
   550  		return nil, err
   551  	}
   552  	return dAtA[:n], nil
   553  }
   554  
   555  func (m *MappingRule) MarshalTo(dAtA []byte) (int, error) {
   556  	var i int
   557  	_ = i
   558  	var l int
   559  	_ = l
   560  	if len(m.Uuid) > 0 {
   561  		dAtA[i] = 0xa
   562  		i++
   563  		i = encodeVarintRule(dAtA, i, uint64(len(m.Uuid)))
   564  		i += copy(dAtA[i:], m.Uuid)
   565  	}
   566  	if len(m.Snapshots) > 0 {
   567  		for _, msg := range m.Snapshots {
   568  			dAtA[i] = 0x12
   569  			i++
   570  			i = encodeVarintRule(dAtA, i, uint64(msg.Size()))
   571  			n, err := msg.MarshalTo(dAtA[i:])
   572  			if err != nil {
   573  				return 0, err
   574  			}
   575  			i += n
   576  		}
   577  	}
   578  	return i, nil
   579  }
   580  
   581  func (m *RollupTarget) Marshal() (dAtA []byte, err error) {
   582  	size := m.Size()
   583  	dAtA = make([]byte, size)
   584  	n, err := m.MarshalTo(dAtA)
   585  	if err != nil {
   586  		return nil, err
   587  	}
   588  	return dAtA[:n], nil
   589  }
   590  
   591  func (m *RollupTarget) MarshalTo(dAtA []byte) (int, error) {
   592  	var i int
   593  	_ = i
   594  	var l int
   595  	_ = l
   596  	if len(m.Name) > 0 {
   597  		dAtA[i] = 0xa
   598  		i++
   599  		i = encodeVarintRule(dAtA, i, uint64(len(m.Name)))
   600  		i += copy(dAtA[i:], m.Name)
   601  	}
   602  	if len(m.Tags) > 0 {
   603  		for _, s := range m.Tags {
   604  			dAtA[i] = 0x12
   605  			i++
   606  			l = len(s)
   607  			for l >= 1<<7 {
   608  				dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
   609  				l >>= 7
   610  				i++
   611  			}
   612  			dAtA[i] = uint8(l)
   613  			i++
   614  			i += copy(dAtA[i:], s)
   615  		}
   616  	}
   617  	if len(m.Policies) > 0 {
   618  		for _, msg := range m.Policies {
   619  			dAtA[i] = 0x1a
   620  			i++
   621  			i = encodeVarintRule(dAtA, i, uint64(msg.Size()))
   622  			n, err := msg.MarshalTo(dAtA[i:])
   623  			if err != nil {
   624  				return 0, err
   625  			}
   626  			i += n
   627  		}
   628  	}
   629  	return i, nil
   630  }
   631  
   632  func (m *RollupTargetV2) Marshal() (dAtA []byte, err error) {
   633  	size := m.Size()
   634  	dAtA = make([]byte, size)
   635  	n, err := m.MarshalTo(dAtA)
   636  	if err != nil {
   637  		return nil, err
   638  	}
   639  	return dAtA[:n], nil
   640  }
   641  
   642  func (m *RollupTargetV2) MarshalTo(dAtA []byte) (int, error) {
   643  	var i int
   644  	_ = i
   645  	var l int
   646  	_ = l
   647  	if m.Pipeline != nil {
   648  		dAtA[i] = 0xa
   649  		i++
   650  		i = encodeVarintRule(dAtA, i, uint64(m.Pipeline.Size()))
   651  		n3, err := m.Pipeline.MarshalTo(dAtA[i:])
   652  		if err != nil {
   653  			return 0, err
   654  		}
   655  		i += n3
   656  	}
   657  	if len(m.StoragePolicies) > 0 {
   658  		for _, msg := range m.StoragePolicies {
   659  			dAtA[i] = 0x12
   660  			i++
   661  			i = encodeVarintRule(dAtA, i, uint64(msg.Size()))
   662  			n, err := msg.MarshalTo(dAtA[i:])
   663  			if err != nil {
   664  				return 0, err
   665  			}
   666  			i += n
   667  		}
   668  	}
   669  	if m.ResendEnabled {
   670  		dAtA[i] = 0x18
   671  		i++
   672  		if m.ResendEnabled {
   673  			dAtA[i] = 1
   674  		} else {
   675  			dAtA[i] = 0
   676  		}
   677  		i++
   678  	}
   679  	return i, nil
   680  }
   681  
   682  func (m *RollupRuleSnapshot) Marshal() (dAtA []byte, err error) {
   683  	size := m.Size()
   684  	dAtA = make([]byte, size)
   685  	n, err := m.MarshalTo(dAtA)
   686  	if err != nil {
   687  		return nil, err
   688  	}
   689  	return dAtA[:n], nil
   690  }
   691  
   692  func (m *RollupRuleSnapshot) MarshalTo(dAtA []byte) (int, error) {
   693  	var i int
   694  	_ = i
   695  	var l int
   696  	_ = l
   697  	if len(m.Name) > 0 {
   698  		dAtA[i] = 0xa
   699  		i++
   700  		i = encodeVarintRule(dAtA, i, uint64(len(m.Name)))
   701  		i += copy(dAtA[i:], m.Name)
   702  	}
   703  	if m.Tombstoned {
   704  		dAtA[i] = 0x10
   705  		i++
   706  		if m.Tombstoned {
   707  			dAtA[i] = 1
   708  		} else {
   709  			dAtA[i] = 0
   710  		}
   711  		i++
   712  	}
   713  	if m.CutoverNanos != 0 {
   714  		dAtA[i] = 0x18
   715  		i++
   716  		i = encodeVarintRule(dAtA, i, uint64(m.CutoverNanos))
   717  	}
   718  	if len(m.Filter) > 0 {
   719  		dAtA[i] = 0x22
   720  		i++
   721  		i = encodeVarintRule(dAtA, i, uint64(len(m.Filter)))
   722  		i += copy(dAtA[i:], m.Filter)
   723  	}
   724  	if len(m.Targets) > 0 {
   725  		for _, msg := range m.Targets {
   726  			dAtA[i] = 0x2a
   727  			i++
   728  			i = encodeVarintRule(dAtA, i, uint64(msg.Size()))
   729  			n, err := msg.MarshalTo(dAtA[i:])
   730  			if err != nil {
   731  				return 0, err
   732  			}
   733  			i += n
   734  		}
   735  	}
   736  	if m.LastUpdatedAtNanos != 0 {
   737  		dAtA[i] = 0x30
   738  		i++
   739  		i = encodeVarintRule(dAtA, i, uint64(m.LastUpdatedAtNanos))
   740  	}
   741  	if len(m.LastUpdatedBy) > 0 {
   742  		dAtA[i] = 0x3a
   743  		i++
   744  		i = encodeVarintRule(dAtA, i, uint64(len(m.LastUpdatedBy)))
   745  		i += copy(dAtA[i:], m.LastUpdatedBy)
   746  	}
   747  	if len(m.TargetsV2) > 0 {
   748  		for _, msg := range m.TargetsV2 {
   749  			dAtA[i] = 0x42
   750  			i++
   751  			i = encodeVarintRule(dAtA, i, uint64(msg.Size()))
   752  			n, err := msg.MarshalTo(dAtA[i:])
   753  			if err != nil {
   754  				return 0, err
   755  			}
   756  			i += n
   757  		}
   758  	}
   759  	if m.KeepOriginal {
   760  		dAtA[i] = 0x48
   761  		i++
   762  		if m.KeepOriginal {
   763  			dAtA[i] = 1
   764  		} else {
   765  			dAtA[i] = 0
   766  		}
   767  		i++
   768  	}
   769  	if len(m.Tags) > 0 {
   770  		for _, msg := range m.Tags {
   771  			dAtA[i] = 0x52
   772  			i++
   773  			i = encodeVarintRule(dAtA, i, uint64(msg.Size()))
   774  			n, err := msg.MarshalTo(dAtA[i:])
   775  			if err != nil {
   776  				return 0, err
   777  			}
   778  			i += n
   779  		}
   780  	}
   781  	return i, nil
   782  }
   783  
   784  func (m *RollupRule) Marshal() (dAtA []byte, err error) {
   785  	size := m.Size()
   786  	dAtA = make([]byte, size)
   787  	n, err := m.MarshalTo(dAtA)
   788  	if err != nil {
   789  		return nil, err
   790  	}
   791  	return dAtA[:n], nil
   792  }
   793  
   794  func (m *RollupRule) MarshalTo(dAtA []byte) (int, error) {
   795  	var i int
   796  	_ = i
   797  	var l int
   798  	_ = l
   799  	if len(m.Uuid) > 0 {
   800  		dAtA[i] = 0xa
   801  		i++
   802  		i = encodeVarintRule(dAtA, i, uint64(len(m.Uuid)))
   803  		i += copy(dAtA[i:], m.Uuid)
   804  	}
   805  	if len(m.Snapshots) > 0 {
   806  		for _, msg := range m.Snapshots {
   807  			dAtA[i] = 0x12
   808  			i++
   809  			i = encodeVarintRule(dAtA, i, uint64(msg.Size()))
   810  			n, err := msg.MarshalTo(dAtA[i:])
   811  			if err != nil {
   812  				return 0, err
   813  			}
   814  			i += n
   815  		}
   816  	}
   817  	return i, nil
   818  }
   819  
   820  func (m *RuleSet) Marshal() (dAtA []byte, err error) {
   821  	size := m.Size()
   822  	dAtA = make([]byte, size)
   823  	n, err := m.MarshalTo(dAtA)
   824  	if err != nil {
   825  		return nil, err
   826  	}
   827  	return dAtA[:n], nil
   828  }
   829  
   830  func (m *RuleSet) MarshalTo(dAtA []byte) (int, error) {
   831  	var i int
   832  	_ = i
   833  	var l int
   834  	_ = l
   835  	if len(m.Uuid) > 0 {
   836  		dAtA[i] = 0xa
   837  		i++
   838  		i = encodeVarintRule(dAtA, i, uint64(len(m.Uuid)))
   839  		i += copy(dAtA[i:], m.Uuid)
   840  	}
   841  	if len(m.Namespace) > 0 {
   842  		dAtA[i] = 0x12
   843  		i++
   844  		i = encodeVarintRule(dAtA, i, uint64(len(m.Namespace)))
   845  		i += copy(dAtA[i:], m.Namespace)
   846  	}
   847  	if m.CreatedAtNanos != 0 {
   848  		dAtA[i] = 0x18
   849  		i++
   850  		i = encodeVarintRule(dAtA, i, uint64(m.CreatedAtNanos))
   851  	}
   852  	if m.LastUpdatedAtNanos != 0 {
   853  		dAtA[i] = 0x20
   854  		i++
   855  		i = encodeVarintRule(dAtA, i, uint64(m.LastUpdatedAtNanos))
   856  	}
   857  	if m.Tombstoned {
   858  		dAtA[i] = 0x28
   859  		i++
   860  		if m.Tombstoned {
   861  			dAtA[i] = 1
   862  		} else {
   863  			dAtA[i] = 0
   864  		}
   865  		i++
   866  	}
   867  	if m.CutoverNanos != 0 {
   868  		dAtA[i] = 0x30
   869  		i++
   870  		i = encodeVarintRule(dAtA, i, uint64(m.CutoverNanos))
   871  	}
   872  	if len(m.MappingRules) > 0 {
   873  		for _, msg := range m.MappingRules {
   874  			dAtA[i] = 0x3a
   875  			i++
   876  			i = encodeVarintRule(dAtA, i, uint64(msg.Size()))
   877  			n, err := msg.MarshalTo(dAtA[i:])
   878  			if err != nil {
   879  				return 0, err
   880  			}
   881  			i += n
   882  		}
   883  	}
   884  	if len(m.RollupRules) > 0 {
   885  		for _, msg := range m.RollupRules {
   886  			dAtA[i] = 0x42
   887  			i++
   888  			i = encodeVarintRule(dAtA, i, uint64(msg.Size()))
   889  			n, err := msg.MarshalTo(dAtA[i:])
   890  			if err != nil {
   891  				return 0, err
   892  			}
   893  			i += n
   894  		}
   895  	}
   896  	if len(m.LastUpdatedBy) > 0 {
   897  		dAtA[i] = 0x4a
   898  		i++
   899  		i = encodeVarintRule(dAtA, i, uint64(len(m.LastUpdatedBy)))
   900  		i += copy(dAtA[i:], m.LastUpdatedBy)
   901  	}
   902  	return i, nil
   903  }
   904  
   905  func encodeVarintRule(dAtA []byte, offset int, v uint64) int {
   906  	for v >= 1<<7 {
   907  		dAtA[offset] = uint8(v&0x7f | 0x80)
   908  		v >>= 7
   909  		offset++
   910  	}
   911  	dAtA[offset] = uint8(v)
   912  	return offset + 1
   913  }
   914  func (m *MappingRuleSnapshot) Size() (n int) {
   915  	var l int
   916  	_ = l
   917  	l = len(m.Name)
   918  	if l > 0 {
   919  		n += 1 + l + sovRule(uint64(l))
   920  	}
   921  	if m.Tombstoned {
   922  		n += 2
   923  	}
   924  	if m.CutoverNanos != 0 {
   925  		n += 1 + sovRule(uint64(m.CutoverNanos))
   926  	}
   927  	l = len(m.Filter)
   928  	if l > 0 {
   929  		n += 1 + l + sovRule(uint64(l))
   930  	}
   931  	if len(m.Policies) > 0 {
   932  		for _, e := range m.Policies {
   933  			l = e.Size()
   934  			n += 1 + l + sovRule(uint64(l))
   935  		}
   936  	}
   937  	if m.LastUpdatedAtNanos != 0 {
   938  		n += 1 + sovRule(uint64(m.LastUpdatedAtNanos))
   939  	}
   940  	l = len(m.LastUpdatedBy)
   941  	if l > 0 {
   942  		n += 1 + l + sovRule(uint64(l))
   943  	}
   944  	if len(m.AggregationTypes) > 0 {
   945  		l = 0
   946  		for _, e := range m.AggregationTypes {
   947  			l += sovRule(uint64(e))
   948  		}
   949  		n += 1 + sovRule(uint64(l)) + l
   950  	}
   951  	if len(m.StoragePolicies) > 0 {
   952  		for _, e := range m.StoragePolicies {
   953  			l = e.Size()
   954  			n += 1 + l + sovRule(uint64(l))
   955  		}
   956  	}
   957  	if m.DropPolicy != 0 {
   958  		n += 1 + sovRule(uint64(m.DropPolicy))
   959  	}
   960  	if len(m.Tags) > 0 {
   961  		for _, e := range m.Tags {
   962  			l = e.Size()
   963  			n += 1 + l + sovRule(uint64(l))
   964  		}
   965  	}
   966  	return n
   967  }
   968  
   969  func (m *MappingRule) Size() (n int) {
   970  	var l int
   971  	_ = l
   972  	l = len(m.Uuid)
   973  	if l > 0 {
   974  		n += 1 + l + sovRule(uint64(l))
   975  	}
   976  	if len(m.Snapshots) > 0 {
   977  		for _, e := range m.Snapshots {
   978  			l = e.Size()
   979  			n += 1 + l + sovRule(uint64(l))
   980  		}
   981  	}
   982  	return n
   983  }
   984  
   985  func (m *RollupTarget) Size() (n int) {
   986  	var l int
   987  	_ = l
   988  	l = len(m.Name)
   989  	if l > 0 {
   990  		n += 1 + l + sovRule(uint64(l))
   991  	}
   992  	if len(m.Tags) > 0 {
   993  		for _, s := range m.Tags {
   994  			l = len(s)
   995  			n += 1 + l + sovRule(uint64(l))
   996  		}
   997  	}
   998  	if len(m.Policies) > 0 {
   999  		for _, e := range m.Policies {
  1000  			l = e.Size()
  1001  			n += 1 + l + sovRule(uint64(l))
  1002  		}
  1003  	}
  1004  	return n
  1005  }
  1006  
  1007  func (m *RollupTargetV2) Size() (n int) {
  1008  	var l int
  1009  	_ = l
  1010  	if m.Pipeline != nil {
  1011  		l = m.Pipeline.Size()
  1012  		n += 1 + l + sovRule(uint64(l))
  1013  	}
  1014  	if len(m.StoragePolicies) > 0 {
  1015  		for _, e := range m.StoragePolicies {
  1016  			l = e.Size()
  1017  			n += 1 + l + sovRule(uint64(l))
  1018  		}
  1019  	}
  1020  	if m.ResendEnabled {
  1021  		n += 2
  1022  	}
  1023  	return n
  1024  }
  1025  
  1026  func (m *RollupRuleSnapshot) Size() (n int) {
  1027  	var l int
  1028  	_ = l
  1029  	l = len(m.Name)
  1030  	if l > 0 {
  1031  		n += 1 + l + sovRule(uint64(l))
  1032  	}
  1033  	if m.Tombstoned {
  1034  		n += 2
  1035  	}
  1036  	if m.CutoverNanos != 0 {
  1037  		n += 1 + sovRule(uint64(m.CutoverNanos))
  1038  	}
  1039  	l = len(m.Filter)
  1040  	if l > 0 {
  1041  		n += 1 + l + sovRule(uint64(l))
  1042  	}
  1043  	if len(m.Targets) > 0 {
  1044  		for _, e := range m.Targets {
  1045  			l = e.Size()
  1046  			n += 1 + l + sovRule(uint64(l))
  1047  		}
  1048  	}
  1049  	if m.LastUpdatedAtNanos != 0 {
  1050  		n += 1 + sovRule(uint64(m.LastUpdatedAtNanos))
  1051  	}
  1052  	l = len(m.LastUpdatedBy)
  1053  	if l > 0 {
  1054  		n += 1 + l + sovRule(uint64(l))
  1055  	}
  1056  	if len(m.TargetsV2) > 0 {
  1057  		for _, e := range m.TargetsV2 {
  1058  			l = e.Size()
  1059  			n += 1 + l + sovRule(uint64(l))
  1060  		}
  1061  	}
  1062  	if m.KeepOriginal {
  1063  		n += 2
  1064  	}
  1065  	if len(m.Tags) > 0 {
  1066  		for _, e := range m.Tags {
  1067  			l = e.Size()
  1068  			n += 1 + l + sovRule(uint64(l))
  1069  		}
  1070  	}
  1071  	return n
  1072  }
  1073  
  1074  func (m *RollupRule) Size() (n int) {
  1075  	var l int
  1076  	_ = l
  1077  	l = len(m.Uuid)
  1078  	if l > 0 {
  1079  		n += 1 + l + sovRule(uint64(l))
  1080  	}
  1081  	if len(m.Snapshots) > 0 {
  1082  		for _, e := range m.Snapshots {
  1083  			l = e.Size()
  1084  			n += 1 + l + sovRule(uint64(l))
  1085  		}
  1086  	}
  1087  	return n
  1088  }
  1089  
  1090  func (m *RuleSet) Size() (n int) {
  1091  	var l int
  1092  	_ = l
  1093  	l = len(m.Uuid)
  1094  	if l > 0 {
  1095  		n += 1 + l + sovRule(uint64(l))
  1096  	}
  1097  	l = len(m.Namespace)
  1098  	if l > 0 {
  1099  		n += 1 + l + sovRule(uint64(l))
  1100  	}
  1101  	if m.CreatedAtNanos != 0 {
  1102  		n += 1 + sovRule(uint64(m.CreatedAtNanos))
  1103  	}
  1104  	if m.LastUpdatedAtNanos != 0 {
  1105  		n += 1 + sovRule(uint64(m.LastUpdatedAtNanos))
  1106  	}
  1107  	if m.Tombstoned {
  1108  		n += 2
  1109  	}
  1110  	if m.CutoverNanos != 0 {
  1111  		n += 1 + sovRule(uint64(m.CutoverNanos))
  1112  	}
  1113  	if len(m.MappingRules) > 0 {
  1114  		for _, e := range m.MappingRules {
  1115  			l = e.Size()
  1116  			n += 1 + l + sovRule(uint64(l))
  1117  		}
  1118  	}
  1119  	if len(m.RollupRules) > 0 {
  1120  		for _, e := range m.RollupRules {
  1121  			l = e.Size()
  1122  			n += 1 + l + sovRule(uint64(l))
  1123  		}
  1124  	}
  1125  	l = len(m.LastUpdatedBy)
  1126  	if l > 0 {
  1127  		n += 1 + l + sovRule(uint64(l))
  1128  	}
  1129  	return n
  1130  }
  1131  
  1132  func sovRule(x uint64) (n int) {
  1133  	for {
  1134  		n++
  1135  		x >>= 7
  1136  		if x == 0 {
  1137  			break
  1138  		}
  1139  	}
  1140  	return n
  1141  }
  1142  func sozRule(x uint64) (n int) {
  1143  	return sovRule(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  1144  }
  1145  func (m *MappingRuleSnapshot) Unmarshal(dAtA []byte) error {
  1146  	l := len(dAtA)
  1147  	iNdEx := 0
  1148  	for iNdEx < l {
  1149  		preIndex := iNdEx
  1150  		var wire uint64
  1151  		for shift := uint(0); ; shift += 7 {
  1152  			if shift >= 64 {
  1153  				return ErrIntOverflowRule
  1154  			}
  1155  			if iNdEx >= l {
  1156  				return io.ErrUnexpectedEOF
  1157  			}
  1158  			b := dAtA[iNdEx]
  1159  			iNdEx++
  1160  			wire |= (uint64(b) & 0x7F) << shift
  1161  			if b < 0x80 {
  1162  				break
  1163  			}
  1164  		}
  1165  		fieldNum := int32(wire >> 3)
  1166  		wireType := int(wire & 0x7)
  1167  		if wireType == 4 {
  1168  			return fmt.Errorf("proto: MappingRuleSnapshot: wiretype end group for non-group")
  1169  		}
  1170  		if fieldNum <= 0 {
  1171  			return fmt.Errorf("proto: MappingRuleSnapshot: illegal tag %d (wire type %d)", fieldNum, wire)
  1172  		}
  1173  		switch fieldNum {
  1174  		case 1:
  1175  			if wireType != 2 {
  1176  				return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
  1177  			}
  1178  			var stringLen uint64
  1179  			for shift := uint(0); ; shift += 7 {
  1180  				if shift >= 64 {
  1181  					return ErrIntOverflowRule
  1182  				}
  1183  				if iNdEx >= l {
  1184  					return io.ErrUnexpectedEOF
  1185  				}
  1186  				b := dAtA[iNdEx]
  1187  				iNdEx++
  1188  				stringLen |= (uint64(b) & 0x7F) << shift
  1189  				if b < 0x80 {
  1190  					break
  1191  				}
  1192  			}
  1193  			intStringLen := int(stringLen)
  1194  			if intStringLen < 0 {
  1195  				return ErrInvalidLengthRule
  1196  			}
  1197  			postIndex := iNdEx + intStringLen
  1198  			if postIndex > l {
  1199  				return io.ErrUnexpectedEOF
  1200  			}
  1201  			m.Name = string(dAtA[iNdEx:postIndex])
  1202  			iNdEx = postIndex
  1203  		case 2:
  1204  			if wireType != 0 {
  1205  				return fmt.Errorf("proto: wrong wireType = %d for field Tombstoned", wireType)
  1206  			}
  1207  			var v int
  1208  			for shift := uint(0); ; shift += 7 {
  1209  				if shift >= 64 {
  1210  					return ErrIntOverflowRule
  1211  				}
  1212  				if iNdEx >= l {
  1213  					return io.ErrUnexpectedEOF
  1214  				}
  1215  				b := dAtA[iNdEx]
  1216  				iNdEx++
  1217  				v |= (int(b) & 0x7F) << shift
  1218  				if b < 0x80 {
  1219  					break
  1220  				}
  1221  			}
  1222  			m.Tombstoned = bool(v != 0)
  1223  		case 3:
  1224  			if wireType != 0 {
  1225  				return fmt.Errorf("proto: wrong wireType = %d for field CutoverNanos", wireType)
  1226  			}
  1227  			m.CutoverNanos = 0
  1228  			for shift := uint(0); ; shift += 7 {
  1229  				if shift >= 64 {
  1230  					return ErrIntOverflowRule
  1231  				}
  1232  				if iNdEx >= l {
  1233  					return io.ErrUnexpectedEOF
  1234  				}
  1235  				b := dAtA[iNdEx]
  1236  				iNdEx++
  1237  				m.CutoverNanos |= (int64(b) & 0x7F) << shift
  1238  				if b < 0x80 {
  1239  					break
  1240  				}
  1241  			}
  1242  		case 4:
  1243  			if wireType != 2 {
  1244  				return fmt.Errorf("proto: wrong wireType = %d for field Filter", wireType)
  1245  			}
  1246  			var stringLen uint64
  1247  			for shift := uint(0); ; shift += 7 {
  1248  				if shift >= 64 {
  1249  					return ErrIntOverflowRule
  1250  				}
  1251  				if iNdEx >= l {
  1252  					return io.ErrUnexpectedEOF
  1253  				}
  1254  				b := dAtA[iNdEx]
  1255  				iNdEx++
  1256  				stringLen |= (uint64(b) & 0x7F) << shift
  1257  				if b < 0x80 {
  1258  					break
  1259  				}
  1260  			}
  1261  			intStringLen := int(stringLen)
  1262  			if intStringLen < 0 {
  1263  				return ErrInvalidLengthRule
  1264  			}
  1265  			postIndex := iNdEx + intStringLen
  1266  			if postIndex > l {
  1267  				return io.ErrUnexpectedEOF
  1268  			}
  1269  			m.Filter = string(dAtA[iNdEx:postIndex])
  1270  			iNdEx = postIndex
  1271  		case 5:
  1272  			if wireType != 2 {
  1273  				return fmt.Errorf("proto: wrong wireType = %d for field Policies", wireType)
  1274  			}
  1275  			var msglen int
  1276  			for shift := uint(0); ; shift += 7 {
  1277  				if shift >= 64 {
  1278  					return ErrIntOverflowRule
  1279  				}
  1280  				if iNdEx >= l {
  1281  					return io.ErrUnexpectedEOF
  1282  				}
  1283  				b := dAtA[iNdEx]
  1284  				iNdEx++
  1285  				msglen |= (int(b) & 0x7F) << shift
  1286  				if b < 0x80 {
  1287  					break
  1288  				}
  1289  			}
  1290  			if msglen < 0 {
  1291  				return ErrInvalidLengthRule
  1292  			}
  1293  			postIndex := iNdEx + msglen
  1294  			if postIndex > l {
  1295  				return io.ErrUnexpectedEOF
  1296  			}
  1297  			m.Policies = append(m.Policies, &policypb.Policy{})
  1298  			if err := m.Policies[len(m.Policies)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1299  				return err
  1300  			}
  1301  			iNdEx = postIndex
  1302  		case 6:
  1303  			if wireType != 0 {
  1304  				return fmt.Errorf("proto: wrong wireType = %d for field LastUpdatedAtNanos", wireType)
  1305  			}
  1306  			m.LastUpdatedAtNanos = 0
  1307  			for shift := uint(0); ; shift += 7 {
  1308  				if shift >= 64 {
  1309  					return ErrIntOverflowRule
  1310  				}
  1311  				if iNdEx >= l {
  1312  					return io.ErrUnexpectedEOF
  1313  				}
  1314  				b := dAtA[iNdEx]
  1315  				iNdEx++
  1316  				m.LastUpdatedAtNanos |= (int64(b) & 0x7F) << shift
  1317  				if b < 0x80 {
  1318  					break
  1319  				}
  1320  			}
  1321  		case 7:
  1322  			if wireType != 2 {
  1323  				return fmt.Errorf("proto: wrong wireType = %d for field LastUpdatedBy", wireType)
  1324  			}
  1325  			var stringLen uint64
  1326  			for shift := uint(0); ; shift += 7 {
  1327  				if shift >= 64 {
  1328  					return ErrIntOverflowRule
  1329  				}
  1330  				if iNdEx >= l {
  1331  					return io.ErrUnexpectedEOF
  1332  				}
  1333  				b := dAtA[iNdEx]
  1334  				iNdEx++
  1335  				stringLen |= (uint64(b) & 0x7F) << shift
  1336  				if b < 0x80 {
  1337  					break
  1338  				}
  1339  			}
  1340  			intStringLen := int(stringLen)
  1341  			if intStringLen < 0 {
  1342  				return ErrInvalidLengthRule
  1343  			}
  1344  			postIndex := iNdEx + intStringLen
  1345  			if postIndex > l {
  1346  				return io.ErrUnexpectedEOF
  1347  			}
  1348  			m.LastUpdatedBy = string(dAtA[iNdEx:postIndex])
  1349  			iNdEx = postIndex
  1350  		case 8:
  1351  			if wireType == 0 {
  1352  				var v aggregationpb.AggregationType
  1353  				for shift := uint(0); ; shift += 7 {
  1354  					if shift >= 64 {
  1355  						return ErrIntOverflowRule
  1356  					}
  1357  					if iNdEx >= l {
  1358  						return io.ErrUnexpectedEOF
  1359  					}
  1360  					b := dAtA[iNdEx]
  1361  					iNdEx++
  1362  					v |= (aggregationpb.AggregationType(b) & 0x7F) << shift
  1363  					if b < 0x80 {
  1364  						break
  1365  					}
  1366  				}
  1367  				m.AggregationTypes = append(m.AggregationTypes, v)
  1368  			} else if wireType == 2 {
  1369  				var packedLen int
  1370  				for shift := uint(0); ; shift += 7 {
  1371  					if shift >= 64 {
  1372  						return ErrIntOverflowRule
  1373  					}
  1374  					if iNdEx >= l {
  1375  						return io.ErrUnexpectedEOF
  1376  					}
  1377  					b := dAtA[iNdEx]
  1378  					iNdEx++
  1379  					packedLen |= (int(b) & 0x7F) << shift
  1380  					if b < 0x80 {
  1381  						break
  1382  					}
  1383  				}
  1384  				if packedLen < 0 {
  1385  					return ErrInvalidLengthRule
  1386  				}
  1387  				postIndex := iNdEx + packedLen
  1388  				if postIndex > l {
  1389  					return io.ErrUnexpectedEOF
  1390  				}
  1391  				for iNdEx < postIndex {
  1392  					var v aggregationpb.AggregationType
  1393  					for shift := uint(0); ; shift += 7 {
  1394  						if shift >= 64 {
  1395  							return ErrIntOverflowRule
  1396  						}
  1397  						if iNdEx >= l {
  1398  							return io.ErrUnexpectedEOF
  1399  						}
  1400  						b := dAtA[iNdEx]
  1401  						iNdEx++
  1402  						v |= (aggregationpb.AggregationType(b) & 0x7F) << shift
  1403  						if b < 0x80 {
  1404  							break
  1405  						}
  1406  					}
  1407  					m.AggregationTypes = append(m.AggregationTypes, v)
  1408  				}
  1409  			} else {
  1410  				return fmt.Errorf("proto: wrong wireType = %d for field AggregationTypes", wireType)
  1411  			}
  1412  		case 9:
  1413  			if wireType != 2 {
  1414  				return fmt.Errorf("proto: wrong wireType = %d for field StoragePolicies", wireType)
  1415  			}
  1416  			var msglen int
  1417  			for shift := uint(0); ; shift += 7 {
  1418  				if shift >= 64 {
  1419  					return ErrIntOverflowRule
  1420  				}
  1421  				if iNdEx >= l {
  1422  					return io.ErrUnexpectedEOF
  1423  				}
  1424  				b := dAtA[iNdEx]
  1425  				iNdEx++
  1426  				msglen |= (int(b) & 0x7F) << shift
  1427  				if b < 0x80 {
  1428  					break
  1429  				}
  1430  			}
  1431  			if msglen < 0 {
  1432  				return ErrInvalidLengthRule
  1433  			}
  1434  			postIndex := iNdEx + msglen
  1435  			if postIndex > l {
  1436  				return io.ErrUnexpectedEOF
  1437  			}
  1438  			m.StoragePolicies = append(m.StoragePolicies, &policypb.StoragePolicy{})
  1439  			if err := m.StoragePolicies[len(m.StoragePolicies)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1440  				return err
  1441  			}
  1442  			iNdEx = postIndex
  1443  		case 10:
  1444  			if wireType != 0 {
  1445  				return fmt.Errorf("proto: wrong wireType = %d for field DropPolicy", wireType)
  1446  			}
  1447  			m.DropPolicy = 0
  1448  			for shift := uint(0); ; shift += 7 {
  1449  				if shift >= 64 {
  1450  					return ErrIntOverflowRule
  1451  				}
  1452  				if iNdEx >= l {
  1453  					return io.ErrUnexpectedEOF
  1454  				}
  1455  				b := dAtA[iNdEx]
  1456  				iNdEx++
  1457  				m.DropPolicy |= (policypb.DropPolicy(b) & 0x7F) << shift
  1458  				if b < 0x80 {
  1459  					break
  1460  				}
  1461  			}
  1462  		case 11:
  1463  			if wireType != 2 {
  1464  				return fmt.Errorf("proto: wrong wireType = %d for field Tags", wireType)
  1465  			}
  1466  			var msglen int
  1467  			for shift := uint(0); ; shift += 7 {
  1468  				if shift >= 64 {
  1469  					return ErrIntOverflowRule
  1470  				}
  1471  				if iNdEx >= l {
  1472  					return io.ErrUnexpectedEOF
  1473  				}
  1474  				b := dAtA[iNdEx]
  1475  				iNdEx++
  1476  				msglen |= (int(b) & 0x7F) << shift
  1477  				if b < 0x80 {
  1478  					break
  1479  				}
  1480  			}
  1481  			if msglen < 0 {
  1482  				return ErrInvalidLengthRule
  1483  			}
  1484  			postIndex := iNdEx + msglen
  1485  			if postIndex > l {
  1486  				return io.ErrUnexpectedEOF
  1487  			}
  1488  			m.Tags = append(m.Tags, &metricpb.Tag{})
  1489  			if err := m.Tags[len(m.Tags)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1490  				return err
  1491  			}
  1492  			iNdEx = postIndex
  1493  		default:
  1494  			iNdEx = preIndex
  1495  			skippy, err := skipRule(dAtA[iNdEx:])
  1496  			if err != nil {
  1497  				return err
  1498  			}
  1499  			if skippy < 0 {
  1500  				return ErrInvalidLengthRule
  1501  			}
  1502  			if (iNdEx + skippy) > l {
  1503  				return io.ErrUnexpectedEOF
  1504  			}
  1505  			iNdEx += skippy
  1506  		}
  1507  	}
  1508  
  1509  	if iNdEx > l {
  1510  		return io.ErrUnexpectedEOF
  1511  	}
  1512  	return nil
  1513  }
  1514  func (m *MappingRule) Unmarshal(dAtA []byte) error {
  1515  	l := len(dAtA)
  1516  	iNdEx := 0
  1517  	for iNdEx < l {
  1518  		preIndex := iNdEx
  1519  		var wire uint64
  1520  		for shift := uint(0); ; shift += 7 {
  1521  			if shift >= 64 {
  1522  				return ErrIntOverflowRule
  1523  			}
  1524  			if iNdEx >= l {
  1525  				return io.ErrUnexpectedEOF
  1526  			}
  1527  			b := dAtA[iNdEx]
  1528  			iNdEx++
  1529  			wire |= (uint64(b) & 0x7F) << shift
  1530  			if b < 0x80 {
  1531  				break
  1532  			}
  1533  		}
  1534  		fieldNum := int32(wire >> 3)
  1535  		wireType := int(wire & 0x7)
  1536  		if wireType == 4 {
  1537  			return fmt.Errorf("proto: MappingRule: wiretype end group for non-group")
  1538  		}
  1539  		if fieldNum <= 0 {
  1540  			return fmt.Errorf("proto: MappingRule: illegal tag %d (wire type %d)", fieldNum, wire)
  1541  		}
  1542  		switch fieldNum {
  1543  		case 1:
  1544  			if wireType != 2 {
  1545  				return fmt.Errorf("proto: wrong wireType = %d for field Uuid", wireType)
  1546  			}
  1547  			var stringLen uint64
  1548  			for shift := uint(0); ; shift += 7 {
  1549  				if shift >= 64 {
  1550  					return ErrIntOverflowRule
  1551  				}
  1552  				if iNdEx >= l {
  1553  					return io.ErrUnexpectedEOF
  1554  				}
  1555  				b := dAtA[iNdEx]
  1556  				iNdEx++
  1557  				stringLen |= (uint64(b) & 0x7F) << shift
  1558  				if b < 0x80 {
  1559  					break
  1560  				}
  1561  			}
  1562  			intStringLen := int(stringLen)
  1563  			if intStringLen < 0 {
  1564  				return ErrInvalidLengthRule
  1565  			}
  1566  			postIndex := iNdEx + intStringLen
  1567  			if postIndex > l {
  1568  				return io.ErrUnexpectedEOF
  1569  			}
  1570  			m.Uuid = string(dAtA[iNdEx:postIndex])
  1571  			iNdEx = postIndex
  1572  		case 2:
  1573  			if wireType != 2 {
  1574  				return fmt.Errorf("proto: wrong wireType = %d for field Snapshots", wireType)
  1575  			}
  1576  			var msglen int
  1577  			for shift := uint(0); ; shift += 7 {
  1578  				if shift >= 64 {
  1579  					return ErrIntOverflowRule
  1580  				}
  1581  				if iNdEx >= l {
  1582  					return io.ErrUnexpectedEOF
  1583  				}
  1584  				b := dAtA[iNdEx]
  1585  				iNdEx++
  1586  				msglen |= (int(b) & 0x7F) << shift
  1587  				if b < 0x80 {
  1588  					break
  1589  				}
  1590  			}
  1591  			if msglen < 0 {
  1592  				return ErrInvalidLengthRule
  1593  			}
  1594  			postIndex := iNdEx + msglen
  1595  			if postIndex > l {
  1596  				return io.ErrUnexpectedEOF
  1597  			}
  1598  			m.Snapshots = append(m.Snapshots, &MappingRuleSnapshot{})
  1599  			if err := m.Snapshots[len(m.Snapshots)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1600  				return err
  1601  			}
  1602  			iNdEx = postIndex
  1603  		default:
  1604  			iNdEx = preIndex
  1605  			skippy, err := skipRule(dAtA[iNdEx:])
  1606  			if err != nil {
  1607  				return err
  1608  			}
  1609  			if skippy < 0 {
  1610  				return ErrInvalidLengthRule
  1611  			}
  1612  			if (iNdEx + skippy) > l {
  1613  				return io.ErrUnexpectedEOF
  1614  			}
  1615  			iNdEx += skippy
  1616  		}
  1617  	}
  1618  
  1619  	if iNdEx > l {
  1620  		return io.ErrUnexpectedEOF
  1621  	}
  1622  	return nil
  1623  }
  1624  func (m *RollupTarget) Unmarshal(dAtA []byte) error {
  1625  	l := len(dAtA)
  1626  	iNdEx := 0
  1627  	for iNdEx < l {
  1628  		preIndex := iNdEx
  1629  		var wire uint64
  1630  		for shift := uint(0); ; shift += 7 {
  1631  			if shift >= 64 {
  1632  				return ErrIntOverflowRule
  1633  			}
  1634  			if iNdEx >= l {
  1635  				return io.ErrUnexpectedEOF
  1636  			}
  1637  			b := dAtA[iNdEx]
  1638  			iNdEx++
  1639  			wire |= (uint64(b) & 0x7F) << shift
  1640  			if b < 0x80 {
  1641  				break
  1642  			}
  1643  		}
  1644  		fieldNum := int32(wire >> 3)
  1645  		wireType := int(wire & 0x7)
  1646  		if wireType == 4 {
  1647  			return fmt.Errorf("proto: RollupTarget: wiretype end group for non-group")
  1648  		}
  1649  		if fieldNum <= 0 {
  1650  			return fmt.Errorf("proto: RollupTarget: illegal tag %d (wire type %d)", fieldNum, wire)
  1651  		}
  1652  		switch fieldNum {
  1653  		case 1:
  1654  			if wireType != 2 {
  1655  				return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
  1656  			}
  1657  			var stringLen uint64
  1658  			for shift := uint(0); ; shift += 7 {
  1659  				if shift >= 64 {
  1660  					return ErrIntOverflowRule
  1661  				}
  1662  				if iNdEx >= l {
  1663  					return io.ErrUnexpectedEOF
  1664  				}
  1665  				b := dAtA[iNdEx]
  1666  				iNdEx++
  1667  				stringLen |= (uint64(b) & 0x7F) << shift
  1668  				if b < 0x80 {
  1669  					break
  1670  				}
  1671  			}
  1672  			intStringLen := int(stringLen)
  1673  			if intStringLen < 0 {
  1674  				return ErrInvalidLengthRule
  1675  			}
  1676  			postIndex := iNdEx + intStringLen
  1677  			if postIndex > l {
  1678  				return io.ErrUnexpectedEOF
  1679  			}
  1680  			m.Name = string(dAtA[iNdEx:postIndex])
  1681  			iNdEx = postIndex
  1682  		case 2:
  1683  			if wireType != 2 {
  1684  				return fmt.Errorf("proto: wrong wireType = %d for field Tags", wireType)
  1685  			}
  1686  			var stringLen uint64
  1687  			for shift := uint(0); ; shift += 7 {
  1688  				if shift >= 64 {
  1689  					return ErrIntOverflowRule
  1690  				}
  1691  				if iNdEx >= l {
  1692  					return io.ErrUnexpectedEOF
  1693  				}
  1694  				b := dAtA[iNdEx]
  1695  				iNdEx++
  1696  				stringLen |= (uint64(b) & 0x7F) << shift
  1697  				if b < 0x80 {
  1698  					break
  1699  				}
  1700  			}
  1701  			intStringLen := int(stringLen)
  1702  			if intStringLen < 0 {
  1703  				return ErrInvalidLengthRule
  1704  			}
  1705  			postIndex := iNdEx + intStringLen
  1706  			if postIndex > l {
  1707  				return io.ErrUnexpectedEOF
  1708  			}
  1709  			m.Tags = append(m.Tags, string(dAtA[iNdEx:postIndex]))
  1710  			iNdEx = postIndex
  1711  		case 3:
  1712  			if wireType != 2 {
  1713  				return fmt.Errorf("proto: wrong wireType = %d for field Policies", wireType)
  1714  			}
  1715  			var msglen int
  1716  			for shift := uint(0); ; shift += 7 {
  1717  				if shift >= 64 {
  1718  					return ErrIntOverflowRule
  1719  				}
  1720  				if iNdEx >= l {
  1721  					return io.ErrUnexpectedEOF
  1722  				}
  1723  				b := dAtA[iNdEx]
  1724  				iNdEx++
  1725  				msglen |= (int(b) & 0x7F) << shift
  1726  				if b < 0x80 {
  1727  					break
  1728  				}
  1729  			}
  1730  			if msglen < 0 {
  1731  				return ErrInvalidLengthRule
  1732  			}
  1733  			postIndex := iNdEx + msglen
  1734  			if postIndex > l {
  1735  				return io.ErrUnexpectedEOF
  1736  			}
  1737  			m.Policies = append(m.Policies, &policypb.Policy{})
  1738  			if err := m.Policies[len(m.Policies)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1739  				return err
  1740  			}
  1741  			iNdEx = postIndex
  1742  		default:
  1743  			iNdEx = preIndex
  1744  			skippy, err := skipRule(dAtA[iNdEx:])
  1745  			if err != nil {
  1746  				return err
  1747  			}
  1748  			if skippy < 0 {
  1749  				return ErrInvalidLengthRule
  1750  			}
  1751  			if (iNdEx + skippy) > l {
  1752  				return io.ErrUnexpectedEOF
  1753  			}
  1754  			iNdEx += skippy
  1755  		}
  1756  	}
  1757  
  1758  	if iNdEx > l {
  1759  		return io.ErrUnexpectedEOF
  1760  	}
  1761  	return nil
  1762  }
  1763  func (m *RollupTargetV2) Unmarshal(dAtA []byte) error {
  1764  	l := len(dAtA)
  1765  	iNdEx := 0
  1766  	for iNdEx < l {
  1767  		preIndex := iNdEx
  1768  		var wire uint64
  1769  		for shift := uint(0); ; shift += 7 {
  1770  			if shift >= 64 {
  1771  				return ErrIntOverflowRule
  1772  			}
  1773  			if iNdEx >= l {
  1774  				return io.ErrUnexpectedEOF
  1775  			}
  1776  			b := dAtA[iNdEx]
  1777  			iNdEx++
  1778  			wire |= (uint64(b) & 0x7F) << shift
  1779  			if b < 0x80 {
  1780  				break
  1781  			}
  1782  		}
  1783  		fieldNum := int32(wire >> 3)
  1784  		wireType := int(wire & 0x7)
  1785  		if wireType == 4 {
  1786  			return fmt.Errorf("proto: RollupTargetV2: wiretype end group for non-group")
  1787  		}
  1788  		if fieldNum <= 0 {
  1789  			return fmt.Errorf("proto: RollupTargetV2: illegal tag %d (wire type %d)", fieldNum, wire)
  1790  		}
  1791  		switch fieldNum {
  1792  		case 1:
  1793  			if wireType != 2 {
  1794  				return fmt.Errorf("proto: wrong wireType = %d for field Pipeline", wireType)
  1795  			}
  1796  			var msglen int
  1797  			for shift := uint(0); ; shift += 7 {
  1798  				if shift >= 64 {
  1799  					return ErrIntOverflowRule
  1800  				}
  1801  				if iNdEx >= l {
  1802  					return io.ErrUnexpectedEOF
  1803  				}
  1804  				b := dAtA[iNdEx]
  1805  				iNdEx++
  1806  				msglen |= (int(b) & 0x7F) << shift
  1807  				if b < 0x80 {
  1808  					break
  1809  				}
  1810  			}
  1811  			if msglen < 0 {
  1812  				return ErrInvalidLengthRule
  1813  			}
  1814  			postIndex := iNdEx + msglen
  1815  			if postIndex > l {
  1816  				return io.ErrUnexpectedEOF
  1817  			}
  1818  			if m.Pipeline == nil {
  1819  				m.Pipeline = &pipelinepb.Pipeline{}
  1820  			}
  1821  			if err := m.Pipeline.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1822  				return err
  1823  			}
  1824  			iNdEx = postIndex
  1825  		case 2:
  1826  			if wireType != 2 {
  1827  				return fmt.Errorf("proto: wrong wireType = %d for field StoragePolicies", wireType)
  1828  			}
  1829  			var msglen int
  1830  			for shift := uint(0); ; shift += 7 {
  1831  				if shift >= 64 {
  1832  					return ErrIntOverflowRule
  1833  				}
  1834  				if iNdEx >= l {
  1835  					return io.ErrUnexpectedEOF
  1836  				}
  1837  				b := dAtA[iNdEx]
  1838  				iNdEx++
  1839  				msglen |= (int(b) & 0x7F) << shift
  1840  				if b < 0x80 {
  1841  					break
  1842  				}
  1843  			}
  1844  			if msglen < 0 {
  1845  				return ErrInvalidLengthRule
  1846  			}
  1847  			postIndex := iNdEx + msglen
  1848  			if postIndex > l {
  1849  				return io.ErrUnexpectedEOF
  1850  			}
  1851  			m.StoragePolicies = append(m.StoragePolicies, &policypb.StoragePolicy{})
  1852  			if err := m.StoragePolicies[len(m.StoragePolicies)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1853  				return err
  1854  			}
  1855  			iNdEx = postIndex
  1856  		case 3:
  1857  			if wireType != 0 {
  1858  				return fmt.Errorf("proto: wrong wireType = %d for field ResendEnabled", wireType)
  1859  			}
  1860  			var v int
  1861  			for shift := uint(0); ; shift += 7 {
  1862  				if shift >= 64 {
  1863  					return ErrIntOverflowRule
  1864  				}
  1865  				if iNdEx >= l {
  1866  					return io.ErrUnexpectedEOF
  1867  				}
  1868  				b := dAtA[iNdEx]
  1869  				iNdEx++
  1870  				v |= (int(b) & 0x7F) << shift
  1871  				if b < 0x80 {
  1872  					break
  1873  				}
  1874  			}
  1875  			m.ResendEnabled = bool(v != 0)
  1876  		default:
  1877  			iNdEx = preIndex
  1878  			skippy, err := skipRule(dAtA[iNdEx:])
  1879  			if err != nil {
  1880  				return err
  1881  			}
  1882  			if skippy < 0 {
  1883  				return ErrInvalidLengthRule
  1884  			}
  1885  			if (iNdEx + skippy) > l {
  1886  				return io.ErrUnexpectedEOF
  1887  			}
  1888  			iNdEx += skippy
  1889  		}
  1890  	}
  1891  
  1892  	if iNdEx > l {
  1893  		return io.ErrUnexpectedEOF
  1894  	}
  1895  	return nil
  1896  }
  1897  func (m *RollupRuleSnapshot) Unmarshal(dAtA []byte) error {
  1898  	l := len(dAtA)
  1899  	iNdEx := 0
  1900  	for iNdEx < l {
  1901  		preIndex := iNdEx
  1902  		var wire uint64
  1903  		for shift := uint(0); ; shift += 7 {
  1904  			if shift >= 64 {
  1905  				return ErrIntOverflowRule
  1906  			}
  1907  			if iNdEx >= l {
  1908  				return io.ErrUnexpectedEOF
  1909  			}
  1910  			b := dAtA[iNdEx]
  1911  			iNdEx++
  1912  			wire |= (uint64(b) & 0x7F) << shift
  1913  			if b < 0x80 {
  1914  				break
  1915  			}
  1916  		}
  1917  		fieldNum := int32(wire >> 3)
  1918  		wireType := int(wire & 0x7)
  1919  		if wireType == 4 {
  1920  			return fmt.Errorf("proto: RollupRuleSnapshot: wiretype end group for non-group")
  1921  		}
  1922  		if fieldNum <= 0 {
  1923  			return fmt.Errorf("proto: RollupRuleSnapshot: illegal tag %d (wire type %d)", fieldNum, wire)
  1924  		}
  1925  		switch fieldNum {
  1926  		case 1:
  1927  			if wireType != 2 {
  1928  				return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
  1929  			}
  1930  			var stringLen uint64
  1931  			for shift := uint(0); ; shift += 7 {
  1932  				if shift >= 64 {
  1933  					return ErrIntOverflowRule
  1934  				}
  1935  				if iNdEx >= l {
  1936  					return io.ErrUnexpectedEOF
  1937  				}
  1938  				b := dAtA[iNdEx]
  1939  				iNdEx++
  1940  				stringLen |= (uint64(b) & 0x7F) << shift
  1941  				if b < 0x80 {
  1942  					break
  1943  				}
  1944  			}
  1945  			intStringLen := int(stringLen)
  1946  			if intStringLen < 0 {
  1947  				return ErrInvalidLengthRule
  1948  			}
  1949  			postIndex := iNdEx + intStringLen
  1950  			if postIndex > l {
  1951  				return io.ErrUnexpectedEOF
  1952  			}
  1953  			m.Name = string(dAtA[iNdEx:postIndex])
  1954  			iNdEx = postIndex
  1955  		case 2:
  1956  			if wireType != 0 {
  1957  				return fmt.Errorf("proto: wrong wireType = %d for field Tombstoned", wireType)
  1958  			}
  1959  			var v int
  1960  			for shift := uint(0); ; shift += 7 {
  1961  				if shift >= 64 {
  1962  					return ErrIntOverflowRule
  1963  				}
  1964  				if iNdEx >= l {
  1965  					return io.ErrUnexpectedEOF
  1966  				}
  1967  				b := dAtA[iNdEx]
  1968  				iNdEx++
  1969  				v |= (int(b) & 0x7F) << shift
  1970  				if b < 0x80 {
  1971  					break
  1972  				}
  1973  			}
  1974  			m.Tombstoned = bool(v != 0)
  1975  		case 3:
  1976  			if wireType != 0 {
  1977  				return fmt.Errorf("proto: wrong wireType = %d for field CutoverNanos", wireType)
  1978  			}
  1979  			m.CutoverNanos = 0
  1980  			for shift := uint(0); ; shift += 7 {
  1981  				if shift >= 64 {
  1982  					return ErrIntOverflowRule
  1983  				}
  1984  				if iNdEx >= l {
  1985  					return io.ErrUnexpectedEOF
  1986  				}
  1987  				b := dAtA[iNdEx]
  1988  				iNdEx++
  1989  				m.CutoverNanos |= (int64(b) & 0x7F) << shift
  1990  				if b < 0x80 {
  1991  					break
  1992  				}
  1993  			}
  1994  		case 4:
  1995  			if wireType != 2 {
  1996  				return fmt.Errorf("proto: wrong wireType = %d for field Filter", wireType)
  1997  			}
  1998  			var stringLen uint64
  1999  			for shift := uint(0); ; shift += 7 {
  2000  				if shift >= 64 {
  2001  					return ErrIntOverflowRule
  2002  				}
  2003  				if iNdEx >= l {
  2004  					return io.ErrUnexpectedEOF
  2005  				}
  2006  				b := dAtA[iNdEx]
  2007  				iNdEx++
  2008  				stringLen |= (uint64(b) & 0x7F) << shift
  2009  				if b < 0x80 {
  2010  					break
  2011  				}
  2012  			}
  2013  			intStringLen := int(stringLen)
  2014  			if intStringLen < 0 {
  2015  				return ErrInvalidLengthRule
  2016  			}
  2017  			postIndex := iNdEx + intStringLen
  2018  			if postIndex > l {
  2019  				return io.ErrUnexpectedEOF
  2020  			}
  2021  			m.Filter = string(dAtA[iNdEx:postIndex])
  2022  			iNdEx = postIndex
  2023  		case 5:
  2024  			if wireType != 2 {
  2025  				return fmt.Errorf("proto: wrong wireType = %d for field Targets", wireType)
  2026  			}
  2027  			var msglen int
  2028  			for shift := uint(0); ; shift += 7 {
  2029  				if shift >= 64 {
  2030  					return ErrIntOverflowRule
  2031  				}
  2032  				if iNdEx >= l {
  2033  					return io.ErrUnexpectedEOF
  2034  				}
  2035  				b := dAtA[iNdEx]
  2036  				iNdEx++
  2037  				msglen |= (int(b) & 0x7F) << shift
  2038  				if b < 0x80 {
  2039  					break
  2040  				}
  2041  			}
  2042  			if msglen < 0 {
  2043  				return ErrInvalidLengthRule
  2044  			}
  2045  			postIndex := iNdEx + msglen
  2046  			if postIndex > l {
  2047  				return io.ErrUnexpectedEOF
  2048  			}
  2049  			m.Targets = append(m.Targets, &RollupTarget{})
  2050  			if err := m.Targets[len(m.Targets)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2051  				return err
  2052  			}
  2053  			iNdEx = postIndex
  2054  		case 6:
  2055  			if wireType != 0 {
  2056  				return fmt.Errorf("proto: wrong wireType = %d for field LastUpdatedAtNanos", wireType)
  2057  			}
  2058  			m.LastUpdatedAtNanos = 0
  2059  			for shift := uint(0); ; shift += 7 {
  2060  				if shift >= 64 {
  2061  					return ErrIntOverflowRule
  2062  				}
  2063  				if iNdEx >= l {
  2064  					return io.ErrUnexpectedEOF
  2065  				}
  2066  				b := dAtA[iNdEx]
  2067  				iNdEx++
  2068  				m.LastUpdatedAtNanos |= (int64(b) & 0x7F) << shift
  2069  				if b < 0x80 {
  2070  					break
  2071  				}
  2072  			}
  2073  		case 7:
  2074  			if wireType != 2 {
  2075  				return fmt.Errorf("proto: wrong wireType = %d for field LastUpdatedBy", wireType)
  2076  			}
  2077  			var stringLen uint64
  2078  			for shift := uint(0); ; shift += 7 {
  2079  				if shift >= 64 {
  2080  					return ErrIntOverflowRule
  2081  				}
  2082  				if iNdEx >= l {
  2083  					return io.ErrUnexpectedEOF
  2084  				}
  2085  				b := dAtA[iNdEx]
  2086  				iNdEx++
  2087  				stringLen |= (uint64(b) & 0x7F) << shift
  2088  				if b < 0x80 {
  2089  					break
  2090  				}
  2091  			}
  2092  			intStringLen := int(stringLen)
  2093  			if intStringLen < 0 {
  2094  				return ErrInvalidLengthRule
  2095  			}
  2096  			postIndex := iNdEx + intStringLen
  2097  			if postIndex > l {
  2098  				return io.ErrUnexpectedEOF
  2099  			}
  2100  			m.LastUpdatedBy = string(dAtA[iNdEx:postIndex])
  2101  			iNdEx = postIndex
  2102  		case 8:
  2103  			if wireType != 2 {
  2104  				return fmt.Errorf("proto: wrong wireType = %d for field TargetsV2", wireType)
  2105  			}
  2106  			var msglen int
  2107  			for shift := uint(0); ; shift += 7 {
  2108  				if shift >= 64 {
  2109  					return ErrIntOverflowRule
  2110  				}
  2111  				if iNdEx >= l {
  2112  					return io.ErrUnexpectedEOF
  2113  				}
  2114  				b := dAtA[iNdEx]
  2115  				iNdEx++
  2116  				msglen |= (int(b) & 0x7F) << shift
  2117  				if b < 0x80 {
  2118  					break
  2119  				}
  2120  			}
  2121  			if msglen < 0 {
  2122  				return ErrInvalidLengthRule
  2123  			}
  2124  			postIndex := iNdEx + msglen
  2125  			if postIndex > l {
  2126  				return io.ErrUnexpectedEOF
  2127  			}
  2128  			m.TargetsV2 = append(m.TargetsV2, &RollupTargetV2{})
  2129  			if err := m.TargetsV2[len(m.TargetsV2)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2130  				return err
  2131  			}
  2132  			iNdEx = postIndex
  2133  		case 9:
  2134  			if wireType != 0 {
  2135  				return fmt.Errorf("proto: wrong wireType = %d for field KeepOriginal", wireType)
  2136  			}
  2137  			var v int
  2138  			for shift := uint(0); ; shift += 7 {
  2139  				if shift >= 64 {
  2140  					return ErrIntOverflowRule
  2141  				}
  2142  				if iNdEx >= l {
  2143  					return io.ErrUnexpectedEOF
  2144  				}
  2145  				b := dAtA[iNdEx]
  2146  				iNdEx++
  2147  				v |= (int(b) & 0x7F) << shift
  2148  				if b < 0x80 {
  2149  					break
  2150  				}
  2151  			}
  2152  			m.KeepOriginal = bool(v != 0)
  2153  		case 10:
  2154  			if wireType != 2 {
  2155  				return fmt.Errorf("proto: wrong wireType = %d for field Tags", wireType)
  2156  			}
  2157  			var msglen int
  2158  			for shift := uint(0); ; shift += 7 {
  2159  				if shift >= 64 {
  2160  					return ErrIntOverflowRule
  2161  				}
  2162  				if iNdEx >= l {
  2163  					return io.ErrUnexpectedEOF
  2164  				}
  2165  				b := dAtA[iNdEx]
  2166  				iNdEx++
  2167  				msglen |= (int(b) & 0x7F) << shift
  2168  				if b < 0x80 {
  2169  					break
  2170  				}
  2171  			}
  2172  			if msglen < 0 {
  2173  				return ErrInvalidLengthRule
  2174  			}
  2175  			postIndex := iNdEx + msglen
  2176  			if postIndex > l {
  2177  				return io.ErrUnexpectedEOF
  2178  			}
  2179  			m.Tags = append(m.Tags, &metricpb.Tag{})
  2180  			if err := m.Tags[len(m.Tags)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2181  				return err
  2182  			}
  2183  			iNdEx = postIndex
  2184  		default:
  2185  			iNdEx = preIndex
  2186  			skippy, err := skipRule(dAtA[iNdEx:])
  2187  			if err != nil {
  2188  				return err
  2189  			}
  2190  			if skippy < 0 {
  2191  				return ErrInvalidLengthRule
  2192  			}
  2193  			if (iNdEx + skippy) > l {
  2194  				return io.ErrUnexpectedEOF
  2195  			}
  2196  			iNdEx += skippy
  2197  		}
  2198  	}
  2199  
  2200  	if iNdEx > l {
  2201  		return io.ErrUnexpectedEOF
  2202  	}
  2203  	return nil
  2204  }
  2205  func (m *RollupRule) Unmarshal(dAtA []byte) error {
  2206  	l := len(dAtA)
  2207  	iNdEx := 0
  2208  	for iNdEx < l {
  2209  		preIndex := iNdEx
  2210  		var wire uint64
  2211  		for shift := uint(0); ; shift += 7 {
  2212  			if shift >= 64 {
  2213  				return ErrIntOverflowRule
  2214  			}
  2215  			if iNdEx >= l {
  2216  				return io.ErrUnexpectedEOF
  2217  			}
  2218  			b := dAtA[iNdEx]
  2219  			iNdEx++
  2220  			wire |= (uint64(b) & 0x7F) << shift
  2221  			if b < 0x80 {
  2222  				break
  2223  			}
  2224  		}
  2225  		fieldNum := int32(wire >> 3)
  2226  		wireType := int(wire & 0x7)
  2227  		if wireType == 4 {
  2228  			return fmt.Errorf("proto: RollupRule: wiretype end group for non-group")
  2229  		}
  2230  		if fieldNum <= 0 {
  2231  			return fmt.Errorf("proto: RollupRule: illegal tag %d (wire type %d)", fieldNum, wire)
  2232  		}
  2233  		switch fieldNum {
  2234  		case 1:
  2235  			if wireType != 2 {
  2236  				return fmt.Errorf("proto: wrong wireType = %d for field Uuid", wireType)
  2237  			}
  2238  			var stringLen uint64
  2239  			for shift := uint(0); ; shift += 7 {
  2240  				if shift >= 64 {
  2241  					return ErrIntOverflowRule
  2242  				}
  2243  				if iNdEx >= l {
  2244  					return io.ErrUnexpectedEOF
  2245  				}
  2246  				b := dAtA[iNdEx]
  2247  				iNdEx++
  2248  				stringLen |= (uint64(b) & 0x7F) << shift
  2249  				if b < 0x80 {
  2250  					break
  2251  				}
  2252  			}
  2253  			intStringLen := int(stringLen)
  2254  			if intStringLen < 0 {
  2255  				return ErrInvalidLengthRule
  2256  			}
  2257  			postIndex := iNdEx + intStringLen
  2258  			if postIndex > l {
  2259  				return io.ErrUnexpectedEOF
  2260  			}
  2261  			m.Uuid = string(dAtA[iNdEx:postIndex])
  2262  			iNdEx = postIndex
  2263  		case 2:
  2264  			if wireType != 2 {
  2265  				return fmt.Errorf("proto: wrong wireType = %d for field Snapshots", wireType)
  2266  			}
  2267  			var msglen int
  2268  			for shift := uint(0); ; shift += 7 {
  2269  				if shift >= 64 {
  2270  					return ErrIntOverflowRule
  2271  				}
  2272  				if iNdEx >= l {
  2273  					return io.ErrUnexpectedEOF
  2274  				}
  2275  				b := dAtA[iNdEx]
  2276  				iNdEx++
  2277  				msglen |= (int(b) & 0x7F) << shift
  2278  				if b < 0x80 {
  2279  					break
  2280  				}
  2281  			}
  2282  			if msglen < 0 {
  2283  				return ErrInvalidLengthRule
  2284  			}
  2285  			postIndex := iNdEx + msglen
  2286  			if postIndex > l {
  2287  				return io.ErrUnexpectedEOF
  2288  			}
  2289  			m.Snapshots = append(m.Snapshots, &RollupRuleSnapshot{})
  2290  			if err := m.Snapshots[len(m.Snapshots)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2291  				return err
  2292  			}
  2293  			iNdEx = postIndex
  2294  		default:
  2295  			iNdEx = preIndex
  2296  			skippy, err := skipRule(dAtA[iNdEx:])
  2297  			if err != nil {
  2298  				return err
  2299  			}
  2300  			if skippy < 0 {
  2301  				return ErrInvalidLengthRule
  2302  			}
  2303  			if (iNdEx + skippy) > l {
  2304  				return io.ErrUnexpectedEOF
  2305  			}
  2306  			iNdEx += skippy
  2307  		}
  2308  	}
  2309  
  2310  	if iNdEx > l {
  2311  		return io.ErrUnexpectedEOF
  2312  	}
  2313  	return nil
  2314  }
  2315  func (m *RuleSet) Unmarshal(dAtA []byte) error {
  2316  	l := len(dAtA)
  2317  	iNdEx := 0
  2318  	for iNdEx < l {
  2319  		preIndex := iNdEx
  2320  		var wire uint64
  2321  		for shift := uint(0); ; shift += 7 {
  2322  			if shift >= 64 {
  2323  				return ErrIntOverflowRule
  2324  			}
  2325  			if iNdEx >= l {
  2326  				return io.ErrUnexpectedEOF
  2327  			}
  2328  			b := dAtA[iNdEx]
  2329  			iNdEx++
  2330  			wire |= (uint64(b) & 0x7F) << shift
  2331  			if b < 0x80 {
  2332  				break
  2333  			}
  2334  		}
  2335  		fieldNum := int32(wire >> 3)
  2336  		wireType := int(wire & 0x7)
  2337  		if wireType == 4 {
  2338  			return fmt.Errorf("proto: RuleSet: wiretype end group for non-group")
  2339  		}
  2340  		if fieldNum <= 0 {
  2341  			return fmt.Errorf("proto: RuleSet: illegal tag %d (wire type %d)", fieldNum, wire)
  2342  		}
  2343  		switch fieldNum {
  2344  		case 1:
  2345  			if wireType != 2 {
  2346  				return fmt.Errorf("proto: wrong wireType = %d for field Uuid", wireType)
  2347  			}
  2348  			var stringLen uint64
  2349  			for shift := uint(0); ; shift += 7 {
  2350  				if shift >= 64 {
  2351  					return ErrIntOverflowRule
  2352  				}
  2353  				if iNdEx >= l {
  2354  					return io.ErrUnexpectedEOF
  2355  				}
  2356  				b := dAtA[iNdEx]
  2357  				iNdEx++
  2358  				stringLen |= (uint64(b) & 0x7F) << shift
  2359  				if b < 0x80 {
  2360  					break
  2361  				}
  2362  			}
  2363  			intStringLen := int(stringLen)
  2364  			if intStringLen < 0 {
  2365  				return ErrInvalidLengthRule
  2366  			}
  2367  			postIndex := iNdEx + intStringLen
  2368  			if postIndex > l {
  2369  				return io.ErrUnexpectedEOF
  2370  			}
  2371  			m.Uuid = string(dAtA[iNdEx:postIndex])
  2372  			iNdEx = postIndex
  2373  		case 2:
  2374  			if wireType != 2 {
  2375  				return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType)
  2376  			}
  2377  			var stringLen uint64
  2378  			for shift := uint(0); ; shift += 7 {
  2379  				if shift >= 64 {
  2380  					return ErrIntOverflowRule
  2381  				}
  2382  				if iNdEx >= l {
  2383  					return io.ErrUnexpectedEOF
  2384  				}
  2385  				b := dAtA[iNdEx]
  2386  				iNdEx++
  2387  				stringLen |= (uint64(b) & 0x7F) << shift
  2388  				if b < 0x80 {
  2389  					break
  2390  				}
  2391  			}
  2392  			intStringLen := int(stringLen)
  2393  			if intStringLen < 0 {
  2394  				return ErrInvalidLengthRule
  2395  			}
  2396  			postIndex := iNdEx + intStringLen
  2397  			if postIndex > l {
  2398  				return io.ErrUnexpectedEOF
  2399  			}
  2400  			m.Namespace = string(dAtA[iNdEx:postIndex])
  2401  			iNdEx = postIndex
  2402  		case 3:
  2403  			if wireType != 0 {
  2404  				return fmt.Errorf("proto: wrong wireType = %d for field CreatedAtNanos", wireType)
  2405  			}
  2406  			m.CreatedAtNanos = 0
  2407  			for shift := uint(0); ; shift += 7 {
  2408  				if shift >= 64 {
  2409  					return ErrIntOverflowRule
  2410  				}
  2411  				if iNdEx >= l {
  2412  					return io.ErrUnexpectedEOF
  2413  				}
  2414  				b := dAtA[iNdEx]
  2415  				iNdEx++
  2416  				m.CreatedAtNanos |= (int64(b) & 0x7F) << shift
  2417  				if b < 0x80 {
  2418  					break
  2419  				}
  2420  			}
  2421  		case 4:
  2422  			if wireType != 0 {
  2423  				return fmt.Errorf("proto: wrong wireType = %d for field LastUpdatedAtNanos", wireType)
  2424  			}
  2425  			m.LastUpdatedAtNanos = 0
  2426  			for shift := uint(0); ; shift += 7 {
  2427  				if shift >= 64 {
  2428  					return ErrIntOverflowRule
  2429  				}
  2430  				if iNdEx >= l {
  2431  					return io.ErrUnexpectedEOF
  2432  				}
  2433  				b := dAtA[iNdEx]
  2434  				iNdEx++
  2435  				m.LastUpdatedAtNanos |= (int64(b) & 0x7F) << shift
  2436  				if b < 0x80 {
  2437  					break
  2438  				}
  2439  			}
  2440  		case 5:
  2441  			if wireType != 0 {
  2442  				return fmt.Errorf("proto: wrong wireType = %d for field Tombstoned", wireType)
  2443  			}
  2444  			var v int
  2445  			for shift := uint(0); ; shift += 7 {
  2446  				if shift >= 64 {
  2447  					return ErrIntOverflowRule
  2448  				}
  2449  				if iNdEx >= l {
  2450  					return io.ErrUnexpectedEOF
  2451  				}
  2452  				b := dAtA[iNdEx]
  2453  				iNdEx++
  2454  				v |= (int(b) & 0x7F) << shift
  2455  				if b < 0x80 {
  2456  					break
  2457  				}
  2458  			}
  2459  			m.Tombstoned = bool(v != 0)
  2460  		case 6:
  2461  			if wireType != 0 {
  2462  				return fmt.Errorf("proto: wrong wireType = %d for field CutoverNanos", wireType)
  2463  			}
  2464  			m.CutoverNanos = 0
  2465  			for shift := uint(0); ; shift += 7 {
  2466  				if shift >= 64 {
  2467  					return ErrIntOverflowRule
  2468  				}
  2469  				if iNdEx >= l {
  2470  					return io.ErrUnexpectedEOF
  2471  				}
  2472  				b := dAtA[iNdEx]
  2473  				iNdEx++
  2474  				m.CutoverNanos |= (int64(b) & 0x7F) << shift
  2475  				if b < 0x80 {
  2476  					break
  2477  				}
  2478  			}
  2479  		case 7:
  2480  			if wireType != 2 {
  2481  				return fmt.Errorf("proto: wrong wireType = %d for field MappingRules", wireType)
  2482  			}
  2483  			var msglen int
  2484  			for shift := uint(0); ; shift += 7 {
  2485  				if shift >= 64 {
  2486  					return ErrIntOverflowRule
  2487  				}
  2488  				if iNdEx >= l {
  2489  					return io.ErrUnexpectedEOF
  2490  				}
  2491  				b := dAtA[iNdEx]
  2492  				iNdEx++
  2493  				msglen |= (int(b) & 0x7F) << shift
  2494  				if b < 0x80 {
  2495  					break
  2496  				}
  2497  			}
  2498  			if msglen < 0 {
  2499  				return ErrInvalidLengthRule
  2500  			}
  2501  			postIndex := iNdEx + msglen
  2502  			if postIndex > l {
  2503  				return io.ErrUnexpectedEOF
  2504  			}
  2505  			m.MappingRules = append(m.MappingRules, &MappingRule{})
  2506  			if err := m.MappingRules[len(m.MappingRules)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2507  				return err
  2508  			}
  2509  			iNdEx = postIndex
  2510  		case 8:
  2511  			if wireType != 2 {
  2512  				return fmt.Errorf("proto: wrong wireType = %d for field RollupRules", wireType)
  2513  			}
  2514  			var msglen int
  2515  			for shift := uint(0); ; shift += 7 {
  2516  				if shift >= 64 {
  2517  					return ErrIntOverflowRule
  2518  				}
  2519  				if iNdEx >= l {
  2520  					return io.ErrUnexpectedEOF
  2521  				}
  2522  				b := dAtA[iNdEx]
  2523  				iNdEx++
  2524  				msglen |= (int(b) & 0x7F) << shift
  2525  				if b < 0x80 {
  2526  					break
  2527  				}
  2528  			}
  2529  			if msglen < 0 {
  2530  				return ErrInvalidLengthRule
  2531  			}
  2532  			postIndex := iNdEx + msglen
  2533  			if postIndex > l {
  2534  				return io.ErrUnexpectedEOF
  2535  			}
  2536  			m.RollupRules = append(m.RollupRules, &RollupRule{})
  2537  			if err := m.RollupRules[len(m.RollupRules)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2538  				return err
  2539  			}
  2540  			iNdEx = postIndex
  2541  		case 9:
  2542  			if wireType != 2 {
  2543  				return fmt.Errorf("proto: wrong wireType = %d for field LastUpdatedBy", wireType)
  2544  			}
  2545  			var stringLen uint64
  2546  			for shift := uint(0); ; shift += 7 {
  2547  				if shift >= 64 {
  2548  					return ErrIntOverflowRule
  2549  				}
  2550  				if iNdEx >= l {
  2551  					return io.ErrUnexpectedEOF
  2552  				}
  2553  				b := dAtA[iNdEx]
  2554  				iNdEx++
  2555  				stringLen |= (uint64(b) & 0x7F) << shift
  2556  				if b < 0x80 {
  2557  					break
  2558  				}
  2559  			}
  2560  			intStringLen := int(stringLen)
  2561  			if intStringLen < 0 {
  2562  				return ErrInvalidLengthRule
  2563  			}
  2564  			postIndex := iNdEx + intStringLen
  2565  			if postIndex > l {
  2566  				return io.ErrUnexpectedEOF
  2567  			}
  2568  			m.LastUpdatedBy = string(dAtA[iNdEx:postIndex])
  2569  			iNdEx = postIndex
  2570  		default:
  2571  			iNdEx = preIndex
  2572  			skippy, err := skipRule(dAtA[iNdEx:])
  2573  			if err != nil {
  2574  				return err
  2575  			}
  2576  			if skippy < 0 {
  2577  				return ErrInvalidLengthRule
  2578  			}
  2579  			if (iNdEx + skippy) > l {
  2580  				return io.ErrUnexpectedEOF
  2581  			}
  2582  			iNdEx += skippy
  2583  		}
  2584  	}
  2585  
  2586  	if iNdEx > l {
  2587  		return io.ErrUnexpectedEOF
  2588  	}
  2589  	return nil
  2590  }
  2591  func skipRule(dAtA []byte) (n int, err error) {
  2592  	l := len(dAtA)
  2593  	iNdEx := 0
  2594  	for iNdEx < l {
  2595  		var wire uint64
  2596  		for shift := uint(0); ; shift += 7 {
  2597  			if shift >= 64 {
  2598  				return 0, ErrIntOverflowRule
  2599  			}
  2600  			if iNdEx >= l {
  2601  				return 0, io.ErrUnexpectedEOF
  2602  			}
  2603  			b := dAtA[iNdEx]
  2604  			iNdEx++
  2605  			wire |= (uint64(b) & 0x7F) << shift
  2606  			if b < 0x80 {
  2607  				break
  2608  			}
  2609  		}
  2610  		wireType := int(wire & 0x7)
  2611  		switch wireType {
  2612  		case 0:
  2613  			for shift := uint(0); ; shift += 7 {
  2614  				if shift >= 64 {
  2615  					return 0, ErrIntOverflowRule
  2616  				}
  2617  				if iNdEx >= l {
  2618  					return 0, io.ErrUnexpectedEOF
  2619  				}
  2620  				iNdEx++
  2621  				if dAtA[iNdEx-1] < 0x80 {
  2622  					break
  2623  				}
  2624  			}
  2625  			return iNdEx, nil
  2626  		case 1:
  2627  			iNdEx += 8
  2628  			return iNdEx, nil
  2629  		case 2:
  2630  			var length int
  2631  			for shift := uint(0); ; shift += 7 {
  2632  				if shift >= 64 {
  2633  					return 0, ErrIntOverflowRule
  2634  				}
  2635  				if iNdEx >= l {
  2636  					return 0, io.ErrUnexpectedEOF
  2637  				}
  2638  				b := dAtA[iNdEx]
  2639  				iNdEx++
  2640  				length |= (int(b) & 0x7F) << shift
  2641  				if b < 0x80 {
  2642  					break
  2643  				}
  2644  			}
  2645  			iNdEx += length
  2646  			if length < 0 {
  2647  				return 0, ErrInvalidLengthRule
  2648  			}
  2649  			return iNdEx, nil
  2650  		case 3:
  2651  			for {
  2652  				var innerWire uint64
  2653  				var start int = iNdEx
  2654  				for shift := uint(0); ; shift += 7 {
  2655  					if shift >= 64 {
  2656  						return 0, ErrIntOverflowRule
  2657  					}
  2658  					if iNdEx >= l {
  2659  						return 0, io.ErrUnexpectedEOF
  2660  					}
  2661  					b := dAtA[iNdEx]
  2662  					iNdEx++
  2663  					innerWire |= (uint64(b) & 0x7F) << shift
  2664  					if b < 0x80 {
  2665  						break
  2666  					}
  2667  				}
  2668  				innerWireType := int(innerWire & 0x7)
  2669  				if innerWireType == 4 {
  2670  					break
  2671  				}
  2672  				next, err := skipRule(dAtA[start:])
  2673  				if err != nil {
  2674  					return 0, err
  2675  				}
  2676  				iNdEx = start + next
  2677  			}
  2678  			return iNdEx, nil
  2679  		case 4:
  2680  			return iNdEx, nil
  2681  		case 5:
  2682  			iNdEx += 4
  2683  			return iNdEx, nil
  2684  		default:
  2685  			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  2686  		}
  2687  	}
  2688  	panic("unreachable")
  2689  }
  2690  
  2691  var (
  2692  	ErrInvalidLengthRule = fmt.Errorf("proto: negative length found during unmarshaling")
  2693  	ErrIntOverflowRule   = fmt.Errorf("proto: integer overflow")
  2694  )
  2695  
  2696  func init() {
  2697  	proto.RegisterFile("github.com/m3db/m3/src/metrics/generated/proto/rulepb/rule.proto", fileDescriptorRule)
  2698  }
  2699  
  2700  var fileDescriptorRule = []byte{
  2701  	// 775 bytes of a gzipped FileDescriptorProto
  2702  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x56, 0xcb, 0x6e, 0xf3, 0x44,
  2703  	0x14, 0xc6, 0x49, 0x9a, 0xc4, 0x27, 0x97, 0x86, 0x69, 0x29, 0x56, 0x41, 0x51, 0x08, 0x02, 0x65,
  2704  	0x81, 0x1c, 0x70, 0x55, 0xa9, 0xec, 0x68, 0x55, 0x04, 0x12, 0xa2, 0x54, 0xd3, 0xd2, 0x45, 0x85,
  2705  	0x64, 0x8d, 0xe3, 0xc1, 0xb5, 0xf0, 0x65, 0x34, 0x33, 0xae, 0x94, 0xa7, 0x80, 0x17, 0xe1, 0x3d,
  2706  	0x58, 0xf2, 0x08, 0xa8, 0xbc, 0x03, 0x0b, 0x56, 0xbf, 0x3c, 0x63, 0x27, 0x8e, 0xea, 0xa8, 0x4a,
  2707  	0xa5, 0x5f, 0xff, 0x2a, 0x67, 0xce, 0x9c, 0xf9, 0xce, 0xe5, 0xfb, 0x8e, 0x15, 0xf8, 0x26, 0x08,
  2708  	0xe5, 0x43, 0xe6, 0xd9, 0x8b, 0x34, 0x9e, 0xc7, 0x27, 0xbe, 0x37, 0x8f, 0x4f, 0xe6, 0x82, 0x2f,
  2709  	0xe6, 0x31, 0x95, 0x3c, 0x5c, 0x88, 0x79, 0x40, 0x13, 0xca, 0x89, 0xa4, 0xfe, 0x9c, 0xf1, 0x54,
  2710  	0xa6, 0x73, 0x9e, 0x45, 0x94, 0x79, 0xea, 0xc7, 0x56, 0x1e, 0xd4, 0xd6, 0xae, 0xe3, 0xab, 0x1d,
  2711  	0x91, 0x48, 0x10, 0x70, 0x1a, 0x10, 0x19, 0xa6, 0x09, 0xf3, 0xaa, 0x27, 0x8d, 0x7b, 0xfc, 0xfd,
  2712  	0x8e, 0x78, 0x2c, 0x64, 0x34, 0x0a, 0x93, 0xbc, 0xba, 0xd2, 0x2c, 0x90, 0x2e, 0x77, 0x45, 0x4a,
  2713  	0xa3, 0x70, 0xb1, 0xcc, 0x71, 0x94, 0xf1, 0x4a, 0x14, 0xed, 0x67, 0x5e, 0x61, 0x68, 0x94, 0xe9,
  2714  	0xff, 0x4d, 0x38, 0xf8, 0x91, 0x30, 0x16, 0x26, 0x01, 0xce, 0x22, 0x7a, 0x93, 0x10, 0x26, 0x1e,
  2715  	0x52, 0x89, 0x10, 0xb4, 0x12, 0x12, 0x53, 0xcb, 0x98, 0x18, 0x33, 0x13, 0x2b, 0x1b, 0x8d, 0x01,
  2716  	0x64, 0x1a, 0x7b, 0x42, 0xa6, 0x09, 0xf5, 0xad, 0xc6, 0xc4, 0x98, 0x75, 0x71, 0xc5, 0x83, 0x3e,
  2717  	0x85, 0xc1, 0x22, 0x93, 0xe9, 0x23, 0xe5, 0x6e, 0x42, 0x92, 0x54, 0x58, 0xcd, 0x89, 0x31, 0x6b,
  2718  	0xe2, 0x7e, 0xe1, 0xbc, 0xca, 0x7d, 0xe8, 0x08, 0xda, 0xbf, 0x86, 0x91, 0xa4, 0xdc, 0x6a, 0x29,
  2719  	0xe8, 0xe2, 0x84, 0xbe, 0x80, 0xae, 0x6a, 0x2f, 0xa4, 0xc2, 0xda, 0x9b, 0x34, 0x67, 0x3d, 0x67,
  2720  	0x64, 0x97, 0x8d, 0xdb, 0xd7, 0xca, 0xc0, 0xab, 0x08, 0xf4, 0x15, 0x7c, 0x10, 0x11, 0x21, 0xdd,
  2721  	0x8c, 0xf9, 0x79, 0x8b, 0x2e, 0x91, 0x45, 0xca, 0xb6, 0x4a, 0x89, 0xf2, 0xcb, 0x9f, 0xf5, 0xdd,
  2722  	0xb9, 0xd4, 0x89, 0x3f, 0x87, 0xfd, 0x8d, 0x27, 0xde, 0xd2, 0xea, 0xa8, 0x0a, 0x06, 0x95, 0xe0,
  2723  	0x8b, 0x25, 0xfa, 0x01, 0xde, 0xaf, 0x90, 0xef, 0xca, 0x25, 0xa3, 0xc2, 0xea, 0x4e, 0x9a, 0xb3,
  2724  	0xa1, 0x33, 0xb6, 0x37, 0x44, 0x62, 0x9f, 0xaf, 0x4f, 0xb7, 0x4b, 0x46, 0xf1, 0x88, 0x6c, 0x3a,
  2725  	0x04, 0xba, 0x80, 0x91, 0x90, 0x29, 0x27, 0x01, 0x75, 0x57, 0xdd, 0x99, 0xaa, 0xbb, 0x0f, 0xd7,
  2726  	0xdd, 0xdd, 0xe8, 0x88, 0xa2, 0xc9, 0x7d, 0x51, 0x39, 0xe6, 0xbd, 0x9e, 0x42, 0xcf, 0xe7, 0x29,
  2727  	0xd3, 0x00, 0x4b, 0x0b, 0x26, 0xc6, 0x6c, 0xe8, 0x1c, 0xae, 0x9f, 0x5f, 0xf2, 0x94, 0x15, 0x6f,
  2728  	0xc1, 0x5f, 0xd9, 0xe8, 0x13, 0x68, 0x49, 0x12, 0x08, 0xab, 0xa7, 0xd2, 0x0d, 0xec, 0x92, 0x7f,
  2729  	0xfb, 0x96, 0x04, 0x58, 0x5d, 0x4d, 0x7f, 0x81, 0x5e, 0x85, 0xfb, 0x9c, 0xf3, 0x2c, 0x0b, 0xfd,
  2730  	0x92, 0xf3, 0xdc, 0x46, 0x5f, 0x83, 0x29, 0x0a, 0x4d, 0x08, 0xab, 0xa1, 0xa0, 0x3e, 0xb2, 0xf5,
  2731  	0x86, 0xd9, 0x35, 0xba, 0xc1, 0xeb, 0xe8, 0xa9, 0x0f, 0x7d, 0x9c, 0x46, 0x51, 0xc6, 0x6e, 0x09,
  2732  	0x0f, 0x68, 0xbd, 0xa4, 0x50, 0x51, 0x64, 0x8e, 0x6c, 0xea, 0xaa, 0x36, 0x94, 0xd0, 0x7c, 0x49,
  2733  	0x09, 0xd3, 0x3f, 0x0d, 0x18, 0x56, 0xd3, 0xdc, 0x39, 0xe8, 0x4b, 0xe8, 0x96, 0x1b, 0xa7, 0x92,
  2734  	0xf5, 0xf2, 0x69, 0xad, 0xb6, 0xd1, 0xbe, 0x2e, 0x4c, 0xbc, 0x8a, 0xaa, 0xa5, 0xa9, 0xb1, 0x23,
  2735  	0x4d, 0x9f, 0xc1, 0x90, 0x53, 0x41, 0x13, 0xdf, 0xa5, 0x09, 0xf1, 0x22, 0xea, 0x2b, 0xf9, 0x77,
  2736  	0xf1, 0x40, 0x7b, 0xbf, 0xd5, 0xce, 0xe9, 0xef, 0x4d, 0x40, 0xba, 0xde, 0x77, 0xbb, 0x6f, 0x36,
  2737  	0x74, 0xa4, 0x1a, 0x58, 0xb9, 0x6e, 0x87, 0x25, 0xad, 0xd5, 0x69, 0xe2, 0x32, 0xe8, 0x6d, 0x6e,
  2738  	0xdc, 0x29, 0x40, 0x91, 0xc5, 0x7d, 0x74, 0xd4, 0xaa, 0xf5, 0x9c, 0xa3, 0xba, 0x6a, 0xee, 0x1c,
  2739  	0x6c, 0x16, 0x91, 0x77, 0x4e, 0xde, 0xfe, 0x6f, 0x94, 0x32, 0x37, 0xe5, 0x61, 0x10, 0x26, 0x24,
  2740  	0xb2, 0x4c, 0x35, 0xa1, 0x7e, 0xee, 0xfc, 0xa9, 0xf0, 0xad, 0xb6, 0x00, 0xb6, 0x6f, 0xc1, 0x3d,
  2741  	0xc0, 0x9a, 0x90, 0xda, 0x25, 0x38, 0x7b, 0xbe, 0x04, 0xc7, 0x9b, 0xf5, 0x6d, 0xdb, 0x81, 0xff,
  2742  	0x1a, 0xd0, 0x51, 0x77, 0x5a, 0xff, 0xcf, 0x90, 0x3f, 0x06, 0x33, 0xa7, 0x5a, 0x30, 0xb2, 0xa0,
  2743  	0x8a, 0x61, 0x13, 0xaf, 0x1d, 0x68, 0x06, 0xa3, 0x05, 0xa7, 0x9b, 0xe3, 0xd6, 0x1c, 0x0f, 0x0b,
  2744  	0x7f, 0x39, 0xea, 0xad, 0xec, 0xb4, 0xb6, 0xb2, 0xb3, 0xa9, 0xae, 0xbd, 0x97, 0xd5, 0xd5, 0xae,
  2745  	0x51, 0xd7, 0x19, 0x0c, 0x62, 0xfd, 0x15, 0x70, 0xf3, 0x79, 0x08, 0xab, 0xa3, 0xa6, 0x73, 0x50,
  2746  	0xf3, 0x89, 0xc0, 0xfd, 0x78, 0x7d, 0xc8, 0xbf, 0x6a, 0x7d, 0xae, 0x46, 0x57, 0x3c, 0xd4, 0xb4,
  2747  	0xa3, 0xe7, 0x63, 0xc5, 0x3d, 0xbe, 0xb2, 0x6b, 0x35, 0x65, 0xd6, 0x68, 0xea, 0xe2, 0xbb, 0xbf,
  2748  	0x9e, 0xc6, 0xc6, 0xdf, 0x4f, 0x63, 0xe3, 0x9f, 0xa7, 0xb1, 0xf1, 0xc7, 0xbf, 0xe3, 0xf7, 0xee,
  2749  	0x4f, 0x5f, 0xf5, 0xcf, 0xc2, 0x6b, 0xab, 0xd3, 0xc9, 0x9b, 0x00, 0x00, 0x00, 0xff, 0xff, 0x66,
  2750  	0x1c, 0x70, 0x44, 0x99, 0x08, 0x00, 0x00,
  2751  }