github.com/hxx258456/ccgo@v0.0.5-0.20230213014102-48b35f46f66f/go-control-plane/envoy/type/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/percent.proto 6 7 package envoy_type 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_percent_proto_enumTypes[0].Descriptor() 74 } 75 76 func (FractionalPercent_DenominatorType) Type() protoreflect.EnumType { 77 return &file_envoy_type_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_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_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_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_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.FractionalPercent_DenominatorType" json:"denominator,omitempty"` 153 } 154 155 func (x *FractionalPercent) Reset() { 156 *x = FractionalPercent{} 157 if protoimpl.UnsafeEnabled { 158 mi := &file_envoy_type_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_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_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_percent_proto protoreflect.FileDescriptor 202 203 var file_envoy_type_percent_proto_rawDesc = []byte{ 204 0x0a, 0x18, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x70, 0x65, 0x72, 205 0x63, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x65, 0x6e, 0x76, 0x6f, 206 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 207 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 208 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 209 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x38, 210 0x0a, 0x07, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x12, 0x2d, 0x0a, 0x05, 0x76, 0x61, 0x6c, 211 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 0x42, 0x17, 0xfa, 0x42, 0x14, 0x12, 0x12, 0x19, 212 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x59, 0x40, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 213 0x00, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xcb, 0x01, 0x0a, 0x11, 0x46, 0x72, 0x61, 214 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x12, 0x1c, 215 0x0a, 0x09, 0x6e, 0x75, 0x6d, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 216 0x0d, 0x52, 0x09, 0x6e, 0x75, 0x6d, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x59, 0x0a, 0x0b, 217 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 218 0x0e, 0x32, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x46, 219 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 220 0x2e, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x54, 0x79, 0x70, 0x65, 221 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x64, 0x65, 0x6e, 0x6f, 222 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x3d, 0x0a, 0x0f, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 223 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x48, 0x55, 224 0x4e, 0x44, 0x52, 0x45, 0x44, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x45, 0x4e, 0x5f, 0x54, 225 0x48, 0x4f, 0x55, 0x53, 0x41, 0x4e, 0x44, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x4d, 0x49, 0x4c, 226 0x4c, 0x49, 0x4f, 0x4e, 0x10, 0x02, 0x42, 0x32, 0x0a, 0x18, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 227 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 228 0x70, 0x65, 0x42, 0x0c, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 229 0x50, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 230 0x6f, 0x33, 231 } 232 233 var ( 234 file_envoy_type_percent_proto_rawDescOnce sync.Once 235 file_envoy_type_percent_proto_rawDescData = file_envoy_type_percent_proto_rawDesc 236 ) 237 238 func file_envoy_type_percent_proto_rawDescGZIP() []byte { 239 file_envoy_type_percent_proto_rawDescOnce.Do(func() { 240 file_envoy_type_percent_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_type_percent_proto_rawDescData) 241 }) 242 return file_envoy_type_percent_proto_rawDescData 243 } 244 245 var file_envoy_type_percent_proto_enumTypes = make([]protoimpl.EnumInfo, 1) 246 var file_envoy_type_percent_proto_msgTypes = make([]protoimpl.MessageInfo, 2) 247 var file_envoy_type_percent_proto_goTypes = []interface{}{ 248 (FractionalPercent_DenominatorType)(0), // 0: envoy.type.FractionalPercent.DenominatorType 249 (*Percent)(nil), // 1: envoy.type.Percent 250 (*FractionalPercent)(nil), // 2: envoy.type.FractionalPercent 251 } 252 var file_envoy_type_percent_proto_depIdxs = []int32{ 253 0, // 0: envoy.type.FractionalPercent.denominator:type_name -> envoy.type.FractionalPercent.DenominatorType 254 1, // [1:1] is the sub-list for method output_type 255 1, // [1:1] is the sub-list for method input_type 256 1, // [1:1] is the sub-list for extension type_name 257 1, // [1:1] is the sub-list for extension extendee 258 0, // [0:1] is the sub-list for field type_name 259 } 260 261 func init() { file_envoy_type_percent_proto_init() } 262 func file_envoy_type_percent_proto_init() { 263 if File_envoy_type_percent_proto != nil { 264 return 265 } 266 if !protoimpl.UnsafeEnabled { 267 file_envoy_type_percent_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { 268 switch v := v.(*Percent); i { 269 case 0: 270 return &v.state 271 case 1: 272 return &v.sizeCache 273 case 2: 274 return &v.unknownFields 275 default: 276 return nil 277 } 278 } 279 file_envoy_type_percent_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { 280 switch v := v.(*FractionalPercent); i { 281 case 0: 282 return &v.state 283 case 1: 284 return &v.sizeCache 285 case 2: 286 return &v.unknownFields 287 default: 288 return nil 289 } 290 } 291 } 292 type x struct{} 293 out := protoimpl.TypeBuilder{ 294 File: protoimpl.DescBuilder{ 295 GoPackagePath: reflect.TypeOf(x{}).PkgPath(), 296 RawDescriptor: file_envoy_type_percent_proto_rawDesc, 297 NumEnums: 1, 298 NumMessages: 2, 299 NumExtensions: 0, 300 NumServices: 0, 301 }, 302 GoTypes: file_envoy_type_percent_proto_goTypes, 303 DependencyIndexes: file_envoy_type_percent_proto_depIdxs, 304 EnumInfos: file_envoy_type_percent_proto_enumTypes, 305 MessageInfos: file_envoy_type_percent_proto_msgTypes, 306 }.Build() 307 File_envoy_type_percent_proto = out.File 308 file_envoy_type_percent_proto_rawDesc = nil 309 file_envoy_type_percent_proto_goTypes = nil 310 file_envoy_type_percent_proto_depIdxs = nil 311 }