github.com/hxx258456/ccgo@v0.0.5-0.20230213014102-48b35f46f66f/go-control-plane/envoy/type/v3/percent.pb.go (about)

     1  // Code generated by protoc-gen-go. DO NOT EDIT.
     2  // versions:
     3  // 	protoc-gen-go v1.25.0
     4  // 	protoc        v3.16.0
     5  // source: envoy/type/v3/percent.proto
     6  
     7  package envoy_type_v3
     8  
     9  import (
    10  	_ "github.com/cncf/xds/go/udpa/annotations"
    11  	_ "github.com/envoyproxy/protoc-gen-validate/validate"
    12  	proto "github.com/golang/protobuf/proto"
    13  	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
    14  	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
    15  	reflect "reflect"
    16  	sync "sync"
    17  )
    18  
    19  const (
    20  	// Verify that this generated code is sufficiently up-to-date.
    21  	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
    22  	// Verify that runtime/protoimpl is sufficiently up-to-date.
    23  	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
    24  )
    25  
    26  // This is a compile-time assertion that a sufficiently up-to-date version
    27  // of the legacy proto package is being used.
    28  const _ = proto.ProtoPackageIsVersion4
    29  
    30  // Fraction percentages support several fixed denominator values.
    31  type FractionalPercent_DenominatorType int32
    32  
    33  const (
    34  	// 100.
    35  	//
    36  	// **Example**: 1/100 = 1%.
    37  	FractionalPercent_HUNDRED FractionalPercent_DenominatorType = 0
    38  	// 10,000.
    39  	//
    40  	// **Example**: 1/10000 = 0.01%.
    41  	FractionalPercent_TEN_THOUSAND FractionalPercent_DenominatorType = 1
    42  	// 1,000,000.
    43  	//
    44  	// **Example**: 1/1000000 = 0.0001%.
    45  	FractionalPercent_MILLION FractionalPercent_DenominatorType = 2
    46  )
    47  
    48  // Enum value maps for FractionalPercent_DenominatorType.
    49  var (
    50  	FractionalPercent_DenominatorType_name = map[int32]string{
    51  		0: "HUNDRED",
    52  		1: "TEN_THOUSAND",
    53  		2: "MILLION",
    54  	}
    55  	FractionalPercent_DenominatorType_value = map[string]int32{
    56  		"HUNDRED":      0,
    57  		"TEN_THOUSAND": 1,
    58  		"MILLION":      2,
    59  	}
    60  )
    61  
    62  func (x FractionalPercent_DenominatorType) Enum() *FractionalPercent_DenominatorType {
    63  	p := new(FractionalPercent_DenominatorType)
    64  	*p = x
    65  	return p
    66  }
    67  
    68  func (x FractionalPercent_DenominatorType) String() string {
    69  	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
    70  }
    71  
    72  func (FractionalPercent_DenominatorType) Descriptor() protoreflect.EnumDescriptor {
    73  	return file_envoy_type_v3_percent_proto_enumTypes[0].Descriptor()
    74  }
    75  
    76  func (FractionalPercent_DenominatorType) Type() protoreflect.EnumType {
    77  	return &file_envoy_type_v3_percent_proto_enumTypes[0]
    78  }
    79  
    80  func (x FractionalPercent_DenominatorType) Number() protoreflect.EnumNumber {
    81  	return protoreflect.EnumNumber(x)
    82  }
    83  
    84  // Deprecated: Use FractionalPercent_DenominatorType.Descriptor instead.
    85  func (FractionalPercent_DenominatorType) EnumDescriptor() ([]byte, []int) {
    86  	return file_envoy_type_v3_percent_proto_rawDescGZIP(), []int{1, 0}
    87  }
    88  
    89  // Identifies a percentage, in the range [0.0, 100.0].
    90  type Percent struct {
    91  	state         protoimpl.MessageState
    92  	sizeCache     protoimpl.SizeCache
    93  	unknownFields protoimpl.UnknownFields
    94  
    95  	Value float64 `protobuf:"fixed64,1,opt,name=value,proto3" json:"value,omitempty"`
    96  }
    97  
    98  func (x *Percent) Reset() {
    99  	*x = Percent{}
   100  	if protoimpl.UnsafeEnabled {
   101  		mi := &file_envoy_type_v3_percent_proto_msgTypes[0]
   102  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   103  		ms.StoreMessageInfo(mi)
   104  	}
   105  }
   106  
   107  func (x *Percent) String() string {
   108  	return protoimpl.X.MessageStringOf(x)
   109  }
   110  
   111  func (*Percent) ProtoMessage() {}
   112  
   113  func (x *Percent) ProtoReflect() protoreflect.Message {
   114  	mi := &file_envoy_type_v3_percent_proto_msgTypes[0]
   115  	if protoimpl.UnsafeEnabled && x != nil {
   116  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   117  		if ms.LoadMessageInfo() == nil {
   118  			ms.StoreMessageInfo(mi)
   119  		}
   120  		return ms
   121  	}
   122  	return mi.MessageOf(x)
   123  }
   124  
   125  // Deprecated: Use Percent.ProtoReflect.Descriptor instead.
   126  func (*Percent) Descriptor() ([]byte, []int) {
   127  	return file_envoy_type_v3_percent_proto_rawDescGZIP(), []int{0}
   128  }
   129  
   130  func (x *Percent) GetValue() float64 {
   131  	if x != nil {
   132  		return x.Value
   133  	}
   134  	return 0
   135  }
   136  
   137  // A fractional percentage is used in cases in which for performance reasons performing floating
   138  // point to integer conversions during randomness calculations is undesirable. The message includes
   139  // both a numerator and denominator that together determine the final fractional value.
   140  //
   141  // * **Example**: 1/100 = 1%.
   142  // * **Example**: 3/10000 = 0.03%.
   143  type FractionalPercent struct {
   144  	state         protoimpl.MessageState
   145  	sizeCache     protoimpl.SizeCache
   146  	unknownFields protoimpl.UnknownFields
   147  
   148  	// Specifies the numerator. Defaults to 0.
   149  	Numerator uint32 `protobuf:"varint,1,opt,name=numerator,proto3" json:"numerator,omitempty"`
   150  	// Specifies the denominator. If the denominator specified is less than the numerator, the final
   151  	// fractional percentage is capped at 1 (100%).
   152  	Denominator FractionalPercent_DenominatorType `protobuf:"varint,2,opt,name=denominator,proto3,enum=envoy.type.v3.FractionalPercent_DenominatorType" json:"denominator,omitempty"`
   153  }
   154  
   155  func (x *FractionalPercent) Reset() {
   156  	*x = FractionalPercent{}
   157  	if protoimpl.UnsafeEnabled {
   158  		mi := &file_envoy_type_v3_percent_proto_msgTypes[1]
   159  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   160  		ms.StoreMessageInfo(mi)
   161  	}
   162  }
   163  
   164  func (x *FractionalPercent) String() string {
   165  	return protoimpl.X.MessageStringOf(x)
   166  }
   167  
   168  func (*FractionalPercent) ProtoMessage() {}
   169  
   170  func (x *FractionalPercent) ProtoReflect() protoreflect.Message {
   171  	mi := &file_envoy_type_v3_percent_proto_msgTypes[1]
   172  	if protoimpl.UnsafeEnabled && x != nil {
   173  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   174  		if ms.LoadMessageInfo() == nil {
   175  			ms.StoreMessageInfo(mi)
   176  		}
   177  		return ms
   178  	}
   179  	return mi.MessageOf(x)
   180  }
   181  
   182  // Deprecated: Use FractionalPercent.ProtoReflect.Descriptor instead.
   183  func (*FractionalPercent) Descriptor() ([]byte, []int) {
   184  	return file_envoy_type_v3_percent_proto_rawDescGZIP(), []int{1}
   185  }
   186  
   187  func (x *FractionalPercent) GetNumerator() uint32 {
   188  	if x != nil {
   189  		return x.Numerator
   190  	}
   191  	return 0
   192  }
   193  
   194  func (x *FractionalPercent) GetDenominator() FractionalPercent_DenominatorType {
   195  	if x != nil {
   196  		return x.Denominator
   197  	}
   198  	return FractionalPercent_HUNDRED
   199  }
   200  
   201  var File_envoy_type_v3_percent_proto protoreflect.FileDescriptor
   202  
   203  var file_envoy_type_v3_percent_proto_rawDesc = []byte{
   204  	0x0a, 0x1b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f,
   205  	0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x65,
   206  	0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x1a, 0x1d, 0x75, 0x64,
   207  	0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73,
   208  	0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70,
   209  	0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65,
   210  	0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17,
   211  	0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74,
   212  	0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x53, 0x0a, 0x07, 0x50, 0x65, 0x72, 0x63, 0x65,
   213  	0x6e, 0x74, 0x12, 0x2d, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
   214  	0x01, 0x42, 0x17, 0xfa, 0x42, 0x14, 0x12, 0x12, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x59,
   215  	0x40, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75,
   216  	0x65, 0x3a, 0x19, 0x9a, 0xc5, 0x88, 0x1e, 0x14, 0x0a, 0x12, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e,
   217  	0x74, 0x79, 0x70, 0x65, 0x2e, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x22, 0xf3, 0x01, 0x0a,
   218  	0x11, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x65, 0x72, 0x63, 0x65,
   219  	0x6e, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x75, 0x6d, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18,
   220  	0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x6e, 0x75, 0x6d, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72,
   221  	0x12, 0x5c, 0x0a, 0x0b, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x18,
   222  	0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x30, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79,
   223  	0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c,
   224  	0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x2e, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x69, 0x6e, 0x61,
   225  	0x74, 0x6f, 0x72, 0x54, 0x79, 0x70, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10,
   226  	0x01, 0x52, 0x0b, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x3d,
   227  	0x0a, 0x0f, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x54, 0x79, 0x70,
   228  	0x65, 0x12, 0x0b, 0x0a, 0x07, 0x48, 0x55, 0x4e, 0x44, 0x52, 0x45, 0x44, 0x10, 0x00, 0x12, 0x10,
   229  	0x0a, 0x0c, 0x54, 0x45, 0x4e, 0x5f, 0x54, 0x48, 0x4f, 0x55, 0x53, 0x41, 0x4e, 0x44, 0x10, 0x01,
   230  	0x12, 0x0b, 0x0a, 0x07, 0x4d, 0x49, 0x4c, 0x4c, 0x49, 0x4f, 0x4e, 0x10, 0x02, 0x3a, 0x23, 0x9a,
   231  	0xc5, 0x88, 0x1e, 0x1e, 0x0a, 0x1c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65,
   232  	0x2e, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x65, 0x72, 0x63, 0x65,
   233  	0x6e, 0x74, 0x42, 0x35, 0x0a, 0x1b, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72,
   234  	0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76,
   235  	0x33, 0x42, 0x0c, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50,
   236  	0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
   237  	0x33,
   238  }
   239  
   240  var (
   241  	file_envoy_type_v3_percent_proto_rawDescOnce sync.Once
   242  	file_envoy_type_v3_percent_proto_rawDescData = file_envoy_type_v3_percent_proto_rawDesc
   243  )
   244  
   245  func file_envoy_type_v3_percent_proto_rawDescGZIP() []byte {
   246  	file_envoy_type_v3_percent_proto_rawDescOnce.Do(func() {
   247  		file_envoy_type_v3_percent_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_type_v3_percent_proto_rawDescData)
   248  	})
   249  	return file_envoy_type_v3_percent_proto_rawDescData
   250  }
   251  
   252  var file_envoy_type_v3_percent_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
   253  var file_envoy_type_v3_percent_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
   254  var file_envoy_type_v3_percent_proto_goTypes = []interface{}{
   255  	(FractionalPercent_DenominatorType)(0), // 0: envoy.type.v3.FractionalPercent.DenominatorType
   256  	(*Percent)(nil),                        // 1: envoy.type.v3.Percent
   257  	(*FractionalPercent)(nil),              // 2: envoy.type.v3.FractionalPercent
   258  }
   259  var file_envoy_type_v3_percent_proto_depIdxs = []int32{
   260  	0, // 0: envoy.type.v3.FractionalPercent.denominator:type_name -> envoy.type.v3.FractionalPercent.DenominatorType
   261  	1, // [1:1] is the sub-list for method output_type
   262  	1, // [1:1] is the sub-list for method input_type
   263  	1, // [1:1] is the sub-list for extension type_name
   264  	1, // [1:1] is the sub-list for extension extendee
   265  	0, // [0:1] is the sub-list for field type_name
   266  }
   267  
   268  func init() { file_envoy_type_v3_percent_proto_init() }
   269  func file_envoy_type_v3_percent_proto_init() {
   270  	if File_envoy_type_v3_percent_proto != nil {
   271  		return
   272  	}
   273  	if !protoimpl.UnsafeEnabled {
   274  		file_envoy_type_v3_percent_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
   275  			switch v := v.(*Percent); i {
   276  			case 0:
   277  				return &v.state
   278  			case 1:
   279  				return &v.sizeCache
   280  			case 2:
   281  				return &v.unknownFields
   282  			default:
   283  				return nil
   284  			}
   285  		}
   286  		file_envoy_type_v3_percent_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
   287  			switch v := v.(*FractionalPercent); i {
   288  			case 0:
   289  				return &v.state
   290  			case 1:
   291  				return &v.sizeCache
   292  			case 2:
   293  				return &v.unknownFields
   294  			default:
   295  				return nil
   296  			}
   297  		}
   298  	}
   299  	type x struct{}
   300  	out := protoimpl.TypeBuilder{
   301  		File: protoimpl.DescBuilder{
   302  			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
   303  			RawDescriptor: file_envoy_type_v3_percent_proto_rawDesc,
   304  			NumEnums:      1,
   305  			NumMessages:   2,
   306  			NumExtensions: 0,
   307  			NumServices:   0,
   308  		},
   309  		GoTypes:           file_envoy_type_v3_percent_proto_goTypes,
   310  		DependencyIndexes: file_envoy_type_v3_percent_proto_depIdxs,
   311  		EnumInfos:         file_envoy_type_v3_percent_proto_enumTypes,
   312  		MessageInfos:      file_envoy_type_v3_percent_proto_msgTypes,
   313  	}.Build()
   314  	File_envoy_type_v3_percent_proto = out.File
   315  	file_envoy_type_v3_percent_proto_rawDesc = nil
   316  	file_envoy_type_v3_percent_proto_goTypes = nil
   317  	file_envoy_type_v3_percent_proto_depIdxs = nil
   318  }