go.chromium.org/luci@v0.0.0-20240309015107-7cdc2e660f33/server/quota/quotapb/policy.pb.go (about)

     1  // Copyright 2022 The LUCI Authors. All rights reserved.
     2  // Use of this source code is governed under the Apache License, Version 2.0
     3  // that can be found in the LICENSE file.
     4  
     5  // Code generated by protoc-gen-go. DO NOT EDIT.
     6  // versions:
     7  // 	protoc-gen-go v1.31.0
     8  // 	protoc        v3.21.7
     9  // source: go.chromium.org/luci/server/quota/quotapb/policy.proto
    10  
    11  package quotapb
    12  
    13  import (
    14  	_ "github.com/envoyproxy/protoc-gen-validate/validate"
    15  	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
    16  	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
    17  	durationpb "google.golang.org/protobuf/types/known/durationpb"
    18  	reflect "reflect"
    19  	sync "sync"
    20  )
    21  
    22  const (
    23  	// Verify that this generated code is sufficiently up-to-date.
    24  	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
    25  	// Verify that runtime/protoimpl is sufficiently up-to-date.
    26  	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
    27  )
    28  
    29  type Policy_Options int32
    30  
    31  const (
    32  	Policy_NO_OPTIONS Policy_Options = 0
    33  	// Indicates that this Policy covers a resource type which represents an
    34  	// absolute quantity (e.g. number of builds in flight, current amount of
    35  	// storage used, etc.). Accounts flagged with this option cannot be manually
    36  	// manipulated via the Admin API, even with `quota.accounts.write`
    37  	// permission. Applications which need to expose 'reset' functionality for
    38  	// these should expose their own endpoints for this (or, ideally, don't
    39  	// allow these Accounts to get out of sync with reality in the first place
    40  	// :))
    41  	Policy_ABSOLUTE_RESOURCE Policy_Options = 1
    42  )
    43  
    44  // Enum value maps for Policy_Options.
    45  var (
    46  	Policy_Options_name = map[int32]string{
    47  		0: "NO_OPTIONS",
    48  		1: "ABSOLUTE_RESOURCE",
    49  	}
    50  	Policy_Options_value = map[string]int32{
    51  		"NO_OPTIONS":        0,
    52  		"ABSOLUTE_RESOURCE": 1,
    53  	}
    54  )
    55  
    56  func (x Policy_Options) Enum() *Policy_Options {
    57  	p := new(Policy_Options)
    58  	*p = x
    59  	return p
    60  }
    61  
    62  func (x Policy_Options) String() string {
    63  	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
    64  }
    65  
    66  func (Policy_Options) Descriptor() protoreflect.EnumDescriptor {
    67  	return file_go_chromium_org_luci_server_quota_quotapb_policy_proto_enumTypes[0].Descriptor()
    68  }
    69  
    70  func (Policy_Options) Type() protoreflect.EnumType {
    71  	return &file_go_chromium_org_luci_server_quota_quotapb_policy_proto_enumTypes[0]
    72  }
    73  
    74  func (x Policy_Options) Number() protoreflect.EnumNumber {
    75  	return protoreflect.EnumNumber(x)
    76  }
    77  
    78  // Deprecated: Use Policy_Options.Descriptor instead.
    79  func (Policy_Options) EnumDescriptor() ([]byte, []int) {
    80  	return file_go_chromium_org_luci_server_quota_quotapb_policy_proto_rawDescGZIP(), []int{0, 0}
    81  }
    82  
    83  // A Policy represents a single quota policy.
    84  //
    85  // A single Policy will typically be used to govern many Accounts.
    86  //
    87  // Policies are always loaded into the database within a PolicyConfig.
    88  type Policy struct {
    89  	state         protoimpl.MessageState
    90  	sizeCache     protoimpl.SizeCache
    91  	unknownFields protoimpl.UnknownFields
    92  
    93  	// The number of resources to assign to an Account when first accessed under
    94  	// this Policy.
    95  	//
    96  	// Must be <= `limit`.
    97  	Default uint64 `protobuf:"varint,1,opt,name=default,proto3" json:"default,omitempty"`
    98  	// The maximum balance of Accounts managed under this Policy.
    99  	//
   100  	// Operations with a positive delta will be capped to this value, unless they
   101  	// specify `POLICY_HARD_LIMIT`, in which case exceeding this limit will be an
   102  	// error.
   103  	//
   104  	// If this policy has a positive refill, accounts with this policy will
   105  	// gradually fill to this limit over time (but will never refill past it).
   106  	//
   107  	// NOTE: When assigning a new Policy to an existing Account it's possible for
   108  	// an Account balance to exceed this value.
   109  	//
   110  	// For example, say an Account had a balance of 100 under a Policy with
   111  	// a limit of 100, but then you set a new Policy with a limit of 50. In this
   112  	// case, the Account balance remains at 100. However, the Account would not
   113  	// gain any additional refill under the new Policy until it was brought below
   114  	// 50 (the new limit).
   115  	//
   116  	// This is done because applications using the quota library may not have full
   117  	// consistency with their Policy choice (e.g. they may choose a Policy based
   118  	// on group membership, which is volatile, or some application nodes may have
   119  	// gotten configuration to use a new Policy version while others haven't).
   120  	Limit  uint64         `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"`
   121  	Refill *Policy_Refill `protobuf:"bytes,3,opt,name=refill,proto3" json:"refill,omitempty"`
   122  	// Bitwise-OR of Options values.
   123  	Options int32 `protobuf:"varint,4,opt,name=options,proto3" json:"options,omitempty"`
   124  	// The amount of time that Accounts created with this Policy should persist
   125  	// after being written. Each Op on the Account refreshes the timeout.
   126  	//
   127  	// This could be used to create temporary quota Accounts based on e.g. IP
   128  	// address which automatically garbage collect after a certain time.
   129  	//
   130  	// A value of 0 means an 'infinite' Account lifetime (the default).
   131  	// It's recommended to pick some very large value for this rather than 0, to
   132  	// allow Redis to prune old Accounts when it needs to do garbage collection.
   133  	Lifetime *durationpb.Duration `protobuf:"bytes,5,opt,name=lifetime,proto3" json:"lifetime,omitempty"`
   134  }
   135  
   136  func (x *Policy) Reset() {
   137  	*x = Policy{}
   138  	if protoimpl.UnsafeEnabled {
   139  		mi := &file_go_chromium_org_luci_server_quota_quotapb_policy_proto_msgTypes[0]
   140  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   141  		ms.StoreMessageInfo(mi)
   142  	}
   143  }
   144  
   145  func (x *Policy) String() string {
   146  	return protoimpl.X.MessageStringOf(x)
   147  }
   148  
   149  func (*Policy) ProtoMessage() {}
   150  
   151  func (x *Policy) ProtoReflect() protoreflect.Message {
   152  	mi := &file_go_chromium_org_luci_server_quota_quotapb_policy_proto_msgTypes[0]
   153  	if protoimpl.UnsafeEnabled && x != nil {
   154  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   155  		if ms.LoadMessageInfo() == nil {
   156  			ms.StoreMessageInfo(mi)
   157  		}
   158  		return ms
   159  	}
   160  	return mi.MessageOf(x)
   161  }
   162  
   163  // Deprecated: Use Policy.ProtoReflect.Descriptor instead.
   164  func (*Policy) Descriptor() ([]byte, []int) {
   165  	return file_go_chromium_org_luci_server_quota_quotapb_policy_proto_rawDescGZIP(), []int{0}
   166  }
   167  
   168  func (x *Policy) GetDefault() uint64 {
   169  	if x != nil {
   170  		return x.Default
   171  	}
   172  	return 0
   173  }
   174  
   175  func (x *Policy) GetLimit() uint64 {
   176  	if x != nil {
   177  		return x.Limit
   178  	}
   179  	return 0
   180  }
   181  
   182  func (x *Policy) GetRefill() *Policy_Refill {
   183  	if x != nil {
   184  		return x.Refill
   185  	}
   186  	return nil
   187  }
   188  
   189  func (x *Policy) GetOptions() int32 {
   190  	if x != nil {
   191  		return x.Options
   192  	}
   193  	return 0
   194  }
   195  
   196  func (x *Policy) GetLifetime() *durationpb.Duration {
   197  	if x != nil {
   198  		return x.Lifetime
   199  	}
   200  	return nil
   201  }
   202  
   203  // Refill describes how Accounts under this Policy refill (or drain) over
   204  // time.
   205  //
   206  // The Refill process mimics a cron, starting at UTC midnight + offset, waking
   207  // up every `interval` seconds to add `units` to the Account balance (up to
   208  // `limit`). This refill operation only happens when an Account is actually
   209  // interacted with, however.
   210  type Policy_Refill struct {
   211  	state         protoimpl.MessageState
   212  	sizeCache     protoimpl.SizeCache
   213  	unknownFields protoimpl.UnknownFields
   214  
   215  	// The number of units to add to the Account banance every `interval`.
   216  	//
   217  	// The refill process is discrete; From T0..T0+interval, none of
   218  	// these units will appear in the Account balance. At T0+interval, all
   219  	// the units will be added.
   220  	//
   221  	// Note that it's permitted to have a negative refill `units` to have
   222  	// Account balances drain back to 0 over time.
   223  	//
   224  	// It's not permitted for the units to be 0 (just omit the Refill message
   225  	// entirely in that case).
   226  	Units int64 `protobuf:"varint,1,opt,name=units,proto3" json:"units,omitempty"`
   227  	// The number of seconds between refill events, synchronized to UTC midnight
   228  	// + `offset`.
   229  	//
   230  	// If this is 0 and `units` is positive, the Account will be treated as if
   231  	// it always has `limit` quota.
   232  	//
   233  	// It is an error for this to be 0 with negative `units`. To achieve this,
   234  	// just make a Policy with a limit of 0 and no Refill.
   235  	//
   236  	// Refill events occur synchronized to "midnight" in UTC. So if you set this
   237  	// to 60, then each minute-after-UTC-midnight, the Account will gain
   238  	// `units`. This synchronization makes quota Account refill more
   239  	// predictable.
   240  	//
   241  	// The offset from UTC is currently configed on the Policy (i.e. to support
   242  	// policies which are synched with different time zones), but this
   243  	// presumably could instead be configured on a per-Account basis, if it were
   244  	// needed.
   245  	//
   246  	// This MUST evenly divide 24h (86400). For example, an interval of 71 is
   247  	// NOT OK because it would divide the day into 1216.9 intervals, meaning
   248  	// that the refresh 'cycle' could not correctly reset at midnight every day.
   249  	// An interval of 72 IS ok though, because it evenly divides the day into
   250  	// 1200 refresh periods.
   251  	Interval uint32 `protobuf:"varint,2,opt,name=interval,proto3" json:"interval,omitempty"`
   252  	// An offset from UTC midnight. This will be used to establish when the
   253  	// associated Accounts 'start their day', and can be used to implement
   254  	// a rudimentary timezone alignment for quota Accounts.
   255  	Offset uint32 `protobuf:"varint,3,opt,name=offset,proto3" json:"offset,omitempty"`
   256  }
   257  
   258  func (x *Policy_Refill) Reset() {
   259  	*x = Policy_Refill{}
   260  	if protoimpl.UnsafeEnabled {
   261  		mi := &file_go_chromium_org_luci_server_quota_quotapb_policy_proto_msgTypes[1]
   262  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   263  		ms.StoreMessageInfo(mi)
   264  	}
   265  }
   266  
   267  func (x *Policy_Refill) String() string {
   268  	return protoimpl.X.MessageStringOf(x)
   269  }
   270  
   271  func (*Policy_Refill) ProtoMessage() {}
   272  
   273  func (x *Policy_Refill) ProtoReflect() protoreflect.Message {
   274  	mi := &file_go_chromium_org_luci_server_quota_quotapb_policy_proto_msgTypes[1]
   275  	if protoimpl.UnsafeEnabled && x != nil {
   276  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   277  		if ms.LoadMessageInfo() == nil {
   278  			ms.StoreMessageInfo(mi)
   279  		}
   280  		return ms
   281  	}
   282  	return mi.MessageOf(x)
   283  }
   284  
   285  // Deprecated: Use Policy_Refill.ProtoReflect.Descriptor instead.
   286  func (*Policy_Refill) Descriptor() ([]byte, []int) {
   287  	return file_go_chromium_org_luci_server_quota_quotapb_policy_proto_rawDescGZIP(), []int{0, 0}
   288  }
   289  
   290  func (x *Policy_Refill) GetUnits() int64 {
   291  	if x != nil {
   292  		return x.Units
   293  	}
   294  	return 0
   295  }
   296  
   297  func (x *Policy_Refill) GetInterval() uint32 {
   298  	if x != nil {
   299  		return x.Interval
   300  	}
   301  	return 0
   302  }
   303  
   304  func (x *Policy_Refill) GetOffset() uint32 {
   305  	if x != nil {
   306  		return x.Offset
   307  	}
   308  	return 0
   309  }
   310  
   311  var File_go_chromium_org_luci_server_quota_quotapb_policy_proto protoreflect.FileDescriptor
   312  
   313  var file_go_chromium_org_luci_server_quota_quotapb_policy_proto_rawDesc = []byte{
   314  	0x0a, 0x36, 0x67, 0x6f, 0x2e, 0x63, 0x68, 0x72, 0x6f, 0x6d, 0x69, 0x75, 0x6d, 0x2e, 0x6f, 0x72,
   315  	0x67, 0x2f, 0x6c, 0x75, 0x63, 0x69, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x71, 0x75,
   316  	0x6f, 0x74, 0x61, 0x2f, 0x71, 0x75, 0x6f, 0x74, 0x61, 0x70, 0x62, 0x2f, 0x70, 0x6f, 0x6c, 0x69,
   317  	0x63, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x29, 0x67, 0x6f, 0x2e, 0x63, 0x68, 0x72,
   318  	0x6f, 0x6d, 0x69, 0x75, 0x6d, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x6c, 0x75, 0x63, 0x69, 0x2e, 0x73,
   319  	0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x71, 0x75, 0x6f, 0x74, 0x61, 0x2e, 0x71, 0x75, 0x6f, 0x74,
   320  	0x61, 0x70, 0x62, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61,
   321  	0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f,
   322  	0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75,
   323  	0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb5, 0x03, 0x0a,
   324  	0x06, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x28, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75,
   325  	0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x32, 0x09, 0x18,
   326  	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x52, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c,
   327  	0x74, 0x12, 0x24, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04,
   328  	0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x32, 0x09, 0x18, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f,
   329  	0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x50, 0x0a, 0x06, 0x72, 0x65, 0x66, 0x69, 0x6c,
   330  	0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x67, 0x6f, 0x2e, 0x63, 0x68, 0x72,
   331  	0x6f, 0x6d, 0x69, 0x75, 0x6d, 0x2e, 0x6f, 0x72, 0x67, 0x2e, 0x6c, 0x75, 0x63, 0x69, 0x2e, 0x73,
   332  	0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x71, 0x75, 0x6f, 0x74, 0x61, 0x2e, 0x71, 0x75, 0x6f, 0x74,
   333  	0x61, 0x70, 0x62, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x52, 0x65, 0x66, 0x69, 0x6c,
   334  	0x6c, 0x52, 0x06, 0x72, 0x65, 0x66, 0x69, 0x6c, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x6f, 0x70, 0x74,
   335  	0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69,
   336  	0x6f, 0x6e, 0x73, 0x12, 0x35, 0x0a, 0x08, 0x6c, 0x69, 0x66, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x18,
   337  	0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
   338  	0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
   339  	0x52, 0x08, 0x6c, 0x69, 0x66, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x1a, 0x85, 0x01, 0x0a, 0x06, 0x52,
   340  	0x65, 0x66, 0x69, 0x6c, 0x6c, 0x12, 0x31, 0x0a, 0x05, 0x75, 0x6e, 0x69, 0x74, 0x73, 0x18, 0x01,
   341  	0x20, 0x01, 0x28, 0x03, 0x42, 0x1b, 0xfa, 0x42, 0x18, 0x22, 0x16, 0x18, 0xff, 0xff, 0xff, 0xff,
   342  	0xff, 0xff, 0xff, 0x0f, 0x28, 0x81, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xf0, 0xff, 0x01, 0x38,
   343  	0x00, 0x52, 0x05, 0x75, 0x6e, 0x69, 0x74, 0x73, 0x12, 0x25, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65,
   344  	0x72, 0x76, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x2a,
   345  	0x04, 0x18, 0x80, 0xa3, 0x05, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12,
   346  	0x21, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x42,
   347  	0x09, 0xfa, 0x42, 0x06, 0x2a, 0x04, 0x18, 0x80, 0xa3, 0x05, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73,
   348  	0x65, 0x74, 0x22, 0x30, 0x0a, 0x07, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x0e, 0x0a,
   349  	0x0a, 0x4e, 0x4f, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x10, 0x00, 0x12, 0x15, 0x0a,
   350  	0x11, 0x41, 0x42, 0x53, 0x4f, 0x4c, 0x55, 0x54, 0x45, 0x5f, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52,
   351  	0x43, 0x45, 0x10, 0x01, 0x42, 0x2b, 0x5a, 0x29, 0x67, 0x6f, 0x2e, 0x63, 0x68, 0x72, 0x6f, 0x6d,
   352  	0x69, 0x75, 0x6d, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x6c, 0x75, 0x63, 0x69, 0x2f, 0x73, 0x65, 0x72,
   353  	0x76, 0x65, 0x72, 0x2f, 0x71, 0x75, 0x6f, 0x74, 0x61, 0x2f, 0x71, 0x75, 0x6f, 0x74, 0x61, 0x70,
   354  	0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
   355  }
   356  
   357  var (
   358  	file_go_chromium_org_luci_server_quota_quotapb_policy_proto_rawDescOnce sync.Once
   359  	file_go_chromium_org_luci_server_quota_quotapb_policy_proto_rawDescData = file_go_chromium_org_luci_server_quota_quotapb_policy_proto_rawDesc
   360  )
   361  
   362  func file_go_chromium_org_luci_server_quota_quotapb_policy_proto_rawDescGZIP() []byte {
   363  	file_go_chromium_org_luci_server_quota_quotapb_policy_proto_rawDescOnce.Do(func() {
   364  		file_go_chromium_org_luci_server_quota_quotapb_policy_proto_rawDescData = protoimpl.X.CompressGZIP(file_go_chromium_org_luci_server_quota_quotapb_policy_proto_rawDescData)
   365  	})
   366  	return file_go_chromium_org_luci_server_quota_quotapb_policy_proto_rawDescData
   367  }
   368  
   369  var file_go_chromium_org_luci_server_quota_quotapb_policy_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
   370  var file_go_chromium_org_luci_server_quota_quotapb_policy_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
   371  var file_go_chromium_org_luci_server_quota_quotapb_policy_proto_goTypes = []interface{}{
   372  	(Policy_Options)(0),         // 0: go.chromium.org.luci.server.quota.quotapb.Policy.Options
   373  	(*Policy)(nil),              // 1: go.chromium.org.luci.server.quota.quotapb.Policy
   374  	(*Policy_Refill)(nil),       // 2: go.chromium.org.luci.server.quota.quotapb.Policy.Refill
   375  	(*durationpb.Duration)(nil), // 3: google.protobuf.Duration
   376  }
   377  var file_go_chromium_org_luci_server_quota_quotapb_policy_proto_depIdxs = []int32{
   378  	2, // 0: go.chromium.org.luci.server.quota.quotapb.Policy.refill:type_name -> go.chromium.org.luci.server.quota.quotapb.Policy.Refill
   379  	3, // 1: go.chromium.org.luci.server.quota.quotapb.Policy.lifetime:type_name -> google.protobuf.Duration
   380  	2, // [2:2] is the sub-list for method output_type
   381  	2, // [2:2] is the sub-list for method input_type
   382  	2, // [2:2] is the sub-list for extension type_name
   383  	2, // [2:2] is the sub-list for extension extendee
   384  	0, // [0:2] is the sub-list for field type_name
   385  }
   386  
   387  func init() { file_go_chromium_org_luci_server_quota_quotapb_policy_proto_init() }
   388  func file_go_chromium_org_luci_server_quota_quotapb_policy_proto_init() {
   389  	if File_go_chromium_org_luci_server_quota_quotapb_policy_proto != nil {
   390  		return
   391  	}
   392  	if !protoimpl.UnsafeEnabled {
   393  		file_go_chromium_org_luci_server_quota_quotapb_policy_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
   394  			switch v := v.(*Policy); i {
   395  			case 0:
   396  				return &v.state
   397  			case 1:
   398  				return &v.sizeCache
   399  			case 2:
   400  				return &v.unknownFields
   401  			default:
   402  				return nil
   403  			}
   404  		}
   405  		file_go_chromium_org_luci_server_quota_quotapb_policy_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
   406  			switch v := v.(*Policy_Refill); i {
   407  			case 0:
   408  				return &v.state
   409  			case 1:
   410  				return &v.sizeCache
   411  			case 2:
   412  				return &v.unknownFields
   413  			default:
   414  				return nil
   415  			}
   416  		}
   417  	}
   418  	type x struct{}
   419  	out := protoimpl.TypeBuilder{
   420  		File: protoimpl.DescBuilder{
   421  			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
   422  			RawDescriptor: file_go_chromium_org_luci_server_quota_quotapb_policy_proto_rawDesc,
   423  			NumEnums:      1,
   424  			NumMessages:   2,
   425  			NumExtensions: 0,
   426  			NumServices:   0,
   427  		},
   428  		GoTypes:           file_go_chromium_org_luci_server_quota_quotapb_policy_proto_goTypes,
   429  		DependencyIndexes: file_go_chromium_org_luci_server_quota_quotapb_policy_proto_depIdxs,
   430  		EnumInfos:         file_go_chromium_org_luci_server_quota_quotapb_policy_proto_enumTypes,
   431  		MessageInfos:      file_go_chromium_org_luci_server_quota_quotapb_policy_proto_msgTypes,
   432  	}.Build()
   433  	File_go_chromium_org_luci_server_quota_quotapb_policy_proto = out.File
   434  	file_go_chromium_org_luci_server_quota_quotapb_policy_proto_rawDesc = nil
   435  	file_go_chromium_org_luci_server_quota_quotapb_policy_proto_goTypes = nil
   436  	file_go_chromium_org_luci_server_quota_quotapb_policy_proto_depIdxs = nil
   437  }