1// Code generated by protoc-gen-gogo. DO NOT EDIT. 2// source: mixer/adapter/model/v1beta1/check.proto 3 4package v1beta1 5 6import ( 7 fmt "fmt" 8 _ "github.com/gogo/protobuf/gogoproto" 9 proto "github.com/gogo/protobuf/proto" 10 _ "github.com/gogo/protobuf/types" 11 github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" 12 io "io" 13 rpc "istio.io/gogo-genproto/googleapis/google/rpc" 14 math "math" 15 math_bits "math/bits" 16 reflect "reflect" 17 strings "strings" 18 time "time" 19) 20 21// Reference imports to suppress errors if they are not otherwise used. 22var _ = proto.Marshal 23var _ = fmt.Errorf 24var _ = math.Inf 25var _ = time.Kitchen 26 27// This is a compile-time assertion to ensure that this generated file 28// is compatible with the proto package it is being compiled against. 29// A compilation error at this line likely means your copy of the 30// proto package needs to be updated. 31const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 32 33// Expresses the result of a precondition check. 34type CheckResult struct { 35 // A status code of OK indicates preconditions were satisfied. Any other code indicates preconditions were not 36 // satisfied and details describe why. 37 Status rpc.Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status"` 38 // The amount of time for which this result can be considered valid. 39 ValidDuration time.Duration `protobuf:"bytes,2,opt,name=valid_duration,json=validDuration,proto3,stdduration" json:"valid_duration"` 40 // The number of uses for which this result can be considered valid. 41 ValidUseCount int32 `protobuf:"varint,3,opt,name=valid_use_count,json=validUseCount,proto3" json:"valid_use_count,omitempty"` 42} 43 44func (m *CheckResult) Reset() { *m = CheckResult{} } 45func (*CheckResult) ProtoMessage() {} 46func (*CheckResult) Descriptor() ([]byte, []int) { 47 return fileDescriptor_b5cd393dc2a446fd, []int{0} 48} 49func (m *CheckResult) XXX_Unmarshal(b []byte) error { 50 return m.Unmarshal(b) 51} 52func (m *CheckResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 53 if deterministic { 54 return xxx_messageInfo_CheckResult.Marshal(b, m, deterministic) 55 } else { 56 b = b[:cap(b)] 57 n, err := m.MarshalToSizedBuffer(b) 58 if err != nil { 59 return nil, err 60 } 61 return b[:n], nil 62 } 63} 64func (m *CheckResult) XXX_Merge(src proto.Message) { 65 xxx_messageInfo_CheckResult.Merge(m, src) 66} 67func (m *CheckResult) XXX_Size() int { 68 return m.Size() 69} 70func (m *CheckResult) XXX_DiscardUnknown() { 71 xxx_messageInfo_CheckResult.DiscardUnknown(m) 72} 73 74var xxx_messageInfo_CheckResult proto.InternalMessageInfo 75 76func init() { 77 proto.RegisterType((*CheckResult)(nil), "istio.mixer.adapter.model.v1beta1.CheckResult") 78} 79 80func init() { 81 proto.RegisterFile("mixer/adapter/model/v1beta1/check.proto", fileDescriptor_b5cd393dc2a446fd) 82} 83 84var fileDescriptor_b5cd393dc2a446fd = []byte{ 85 // 322 bytes of a gzipped FileDescriptorProto 86 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x91, 0x3d, 0x4e, 0xc3, 0x30, 87 0x18, 0x86, 0x6d, 0x7e, 0x2a, 0x94, 0x0a, 0x90, 0x22, 0x24, 0x4a, 0x87, 0xaf, 0x85, 0x01, 0x3a, 88 0xd9, 0x14, 0x6e, 0xd0, 0x32, 0x31, 0x16, 0xb1, 0xb0, 0x54, 0x4e, 0x62, 0x82, 0x45, 0x5a, 0x47, 89 0x89, 0x53, 0x31, 0x72, 0x04, 0x46, 0x8e, 0xc0, 0xce, 0x25, 0x3a, 0x76, 0xec, 0x04, 0xc4, 0x59, 90 0x18, 0x7b, 0x04, 0x14, 0xdb, 0x59, 0xd9, 0x6c, 0x3f, 0xcf, 0xfb, 0xf9, 0x95, 0xed, 0x5d, 0xcc, 91 0xc4, 0x0b, 0xcf, 0x28, 0x8b, 0x58, 0xaa, 0x78, 0x46, 0x67, 0x32, 0xe2, 0x09, 0x5d, 0x0c, 0x03, 92 0xae, 0xd8, 0x90, 0x86, 0x4f, 0x3c, 0x7c, 0x26, 0x69, 0x26, 0x95, 0xf4, 0x4f, 0x45, 0xae, 0x84, 93 0x24, 0x46, 0x27, 0x4e, 0x27, 0x46, 0x27, 0x4e, 0xef, 0x1e, 0xc5, 0x32, 0x96, 0xc6, 0xa6, 0xf5, 94 0xca, 0x06, 0xbb, 0x10, 0x4b, 0x19, 0x27, 0x9c, 0x9a, 0x5d, 0x50, 0x3c, 0xd2, 0xa8, 0xc8, 0x98, 95 0x12, 0x72, 0xee, 0xf8, 0xb1, 0xe3, 0x59, 0x1a, 0xd2, 0x5c, 0x31, 0x55, 0xe4, 0x16, 0x9c, 0x7d, 96 0x62, 0xaf, 0x3d, 0xae, 0x1b, 0x4c, 0x78, 0x5e, 0x24, 0xca, 0xbf, 0xf4, 0x5a, 0x96, 0x77, 0x70, 97 0x1f, 0x0f, 0xda, 0x57, 0x3e, 0xb1, 0x49, 0x92, 0xa5, 0x21, 0xb9, 0x33, 0x64, 0xb4, 0xb3, 0xfc, 98 0xea, 0xa1, 0x89, 0xf3, 0xfc, 0x5b, 0xef, 0x60, 0xc1, 0x12, 0x11, 0x4d, 0x9b, 0x2b, 0x3b, 0x5b, 99 0x26, 0x79, 0xd2, 0x24, 0x9b, 0x4e, 0xe4, 0xc6, 0x09, 0xa3, 0xbd, 0x7a, 0xc0, 0xfb, 0x77, 0x0f, 100 0x4f, 0xf6, 0x4d, 0xb4, 0x01, 0xfe, 0xb9, 0x77, 0x68, 0x67, 0x15, 0x39, 0x9f, 0x86, 0xb2, 0x98, 101 0xab, 0xce, 0x76, 0x1f, 0x0f, 0x76, 0x9d, 0x77, 0x9f, 0xf3, 0x71, 0x7d, 0x38, 0x0a, 0x96, 0x25, 102 0xa0, 0x55, 0x09, 0x68, 0x5d, 0x02, 0xda, 0x94, 0x80, 0x5e, 0x35, 0xe0, 0x0f, 0x0d, 0x68, 0xa9, 103 0x01, 0xaf, 0x34, 0xe0, 0x1f, 0x0d, 0xf8, 0x57, 0x03, 0xda, 0x68, 0xc0, 0x6f, 0x15, 0xa0, 0x55, 104 0x05, 0x68, 0x5d, 0x01, 0x7a, 0x18, 0xd8, 0x17, 0x16, 0x92, 0xb2, 0x54, 0xd0, 0x7f, 0xfe, 0x25, 105 0x68, 0x99, 0xde, 0xd7, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xc7, 0x5b, 0xc8, 0xb5, 0xbd, 0x01, 106 0x00, 0x00, 107} 108 109func (m *CheckResult) Marshal() (dAtA []byte, err error) { 110 size := m.Size() 111 dAtA = make([]byte, size) 112 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 113 if err != nil { 114 return nil, err 115 } 116 return dAtA[:n], nil 117} 118 119func (m *CheckResult) MarshalTo(dAtA []byte) (int, error) { 120 size := m.Size() 121 return m.MarshalToSizedBuffer(dAtA[:size]) 122} 123 124func (m *CheckResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { 125 i := len(dAtA) 126 _ = i 127 var l int 128 _ = l 129 if m.ValidUseCount != 0 { 130 i = encodeVarintCheck(dAtA, i, uint64(m.ValidUseCount)) 131 i-- 132 dAtA[i] = 0x18 133 } 134 n1, err1 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.ValidDuration, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.ValidDuration):]) 135 if err1 != nil { 136 return 0, err1 137 } 138 i -= n1 139 i = encodeVarintCheck(dAtA, i, uint64(n1)) 140 i-- 141 dAtA[i] = 0x12 142 { 143 size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) 144 if err != nil { 145 return 0, err 146 } 147 i -= size 148 i = encodeVarintCheck(dAtA, i, uint64(size)) 149 } 150 i-- 151 dAtA[i] = 0xa 152 return len(dAtA) - i, nil 153} 154 155func encodeVarintCheck(dAtA []byte, offset int, v uint64) int { 156 offset -= sovCheck(v) 157 base := offset 158 for v >= 1<<7 { 159 dAtA[offset] = uint8(v&0x7f | 0x80) 160 v >>= 7 161 offset++ 162 } 163 dAtA[offset] = uint8(v) 164 return base 165} 166func (m *CheckResult) Size() (n int) { 167 if m == nil { 168 return 0 169 } 170 var l int 171 _ = l 172 l = m.Status.Size() 173 n += 1 + l + sovCheck(uint64(l)) 174 l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.ValidDuration) 175 n += 1 + l + sovCheck(uint64(l)) 176 if m.ValidUseCount != 0 { 177 n += 1 + sovCheck(uint64(m.ValidUseCount)) 178 } 179 return n 180} 181 182func sovCheck(x uint64) (n int) { 183 return (math_bits.Len64(x|1) + 6) / 7 184} 185func sozCheck(x uint64) (n int) { 186 return sovCheck(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 187} 188func (this *CheckResult) String() string { 189 if this == nil { 190 return "nil" 191 } 192 s := strings.Join([]string{`&CheckResult{`, 193 `Status:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Status), "Status", "rpc.Status", 1), `&`, ``, 1) + `,`, 194 `ValidDuration:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ValidDuration), "Duration", "types.Duration", 1), `&`, ``, 1) + `,`, 195 `ValidUseCount:` + fmt.Sprintf("%v", this.ValidUseCount) + `,`, 196 `}`, 197 }, "") 198 return s 199} 200func valueToStringCheck(v interface{}) string { 201 rv := reflect.ValueOf(v) 202 if rv.IsNil() { 203 return "nil" 204 } 205 pv := reflect.Indirect(rv).Interface() 206 return fmt.Sprintf("*%v", pv) 207} 208func (m *CheckResult) Unmarshal(dAtA []byte) error { 209 l := len(dAtA) 210 iNdEx := 0 211 for iNdEx < l { 212 preIndex := iNdEx 213 var wire uint64 214 for shift := uint(0); ; shift += 7 { 215 if shift >= 64 { 216 return ErrIntOverflowCheck 217 } 218 if iNdEx >= l { 219 return io.ErrUnexpectedEOF 220 } 221 b := dAtA[iNdEx] 222 iNdEx++ 223 wire |= uint64(b&0x7F) << shift 224 if b < 0x80 { 225 break 226 } 227 } 228 fieldNum := int32(wire >> 3) 229 wireType := int(wire & 0x7) 230 if wireType == 4 { 231 return fmt.Errorf("proto: CheckResult: wiretype end group for non-group") 232 } 233 if fieldNum <= 0 { 234 return fmt.Errorf("proto: CheckResult: illegal tag %d (wire type %d)", fieldNum, wire) 235 } 236 switch fieldNum { 237 case 1: 238 if wireType != 2 { 239 return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) 240 } 241 var msglen int 242 for shift := uint(0); ; shift += 7 { 243 if shift >= 64 { 244 return ErrIntOverflowCheck 245 } 246 if iNdEx >= l { 247 return io.ErrUnexpectedEOF 248 } 249 b := dAtA[iNdEx] 250 iNdEx++ 251 msglen |= int(b&0x7F) << shift 252 if b < 0x80 { 253 break 254 } 255 } 256 if msglen < 0 { 257 return ErrInvalidLengthCheck 258 } 259 postIndex := iNdEx + msglen 260 if postIndex < 0 { 261 return ErrInvalidLengthCheck 262 } 263 if postIndex > l { 264 return io.ErrUnexpectedEOF 265 } 266 if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 267 return err 268 } 269 iNdEx = postIndex 270 case 2: 271 if wireType != 2 { 272 return fmt.Errorf("proto: wrong wireType = %d for field ValidDuration", wireType) 273 } 274 var msglen int 275 for shift := uint(0); ; shift += 7 { 276 if shift >= 64 { 277 return ErrIntOverflowCheck 278 } 279 if iNdEx >= l { 280 return io.ErrUnexpectedEOF 281 } 282 b := dAtA[iNdEx] 283 iNdEx++ 284 msglen |= int(b&0x7F) << shift 285 if b < 0x80 { 286 break 287 } 288 } 289 if msglen < 0 { 290 return ErrInvalidLengthCheck 291 } 292 postIndex := iNdEx + msglen 293 if postIndex < 0 { 294 return ErrInvalidLengthCheck 295 } 296 if postIndex > l { 297 return io.ErrUnexpectedEOF 298 } 299 if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(&m.ValidDuration, dAtA[iNdEx:postIndex]); err != nil { 300 return err 301 } 302 iNdEx = postIndex 303 case 3: 304 if wireType != 0 { 305 return fmt.Errorf("proto: wrong wireType = %d for field ValidUseCount", wireType) 306 } 307 m.ValidUseCount = 0 308 for shift := uint(0); ; shift += 7 { 309 if shift >= 64 { 310 return ErrIntOverflowCheck 311 } 312 if iNdEx >= l { 313 return io.ErrUnexpectedEOF 314 } 315 b := dAtA[iNdEx] 316 iNdEx++ 317 m.ValidUseCount |= int32(b&0x7F) << shift 318 if b < 0x80 { 319 break 320 } 321 } 322 default: 323 iNdEx = preIndex 324 skippy, err := skipCheck(dAtA[iNdEx:]) 325 if err != nil { 326 return err 327 } 328 if skippy < 0 { 329 return ErrInvalidLengthCheck 330 } 331 if (iNdEx + skippy) < 0 { 332 return ErrInvalidLengthCheck 333 } 334 if (iNdEx + skippy) > l { 335 return io.ErrUnexpectedEOF 336 } 337 iNdEx += skippy 338 } 339 } 340 341 if iNdEx > l { 342 return io.ErrUnexpectedEOF 343 } 344 return nil 345} 346func skipCheck(dAtA []byte) (n int, err error) { 347 l := len(dAtA) 348 iNdEx := 0 349 for iNdEx < l { 350 var wire uint64 351 for shift := uint(0); ; shift += 7 { 352 if shift >= 64 { 353 return 0, ErrIntOverflowCheck 354 } 355 if iNdEx >= l { 356 return 0, io.ErrUnexpectedEOF 357 } 358 b := dAtA[iNdEx] 359 iNdEx++ 360 wire |= (uint64(b) & 0x7F) << shift 361 if b < 0x80 { 362 break 363 } 364 } 365 wireType := int(wire & 0x7) 366 switch wireType { 367 case 0: 368 for shift := uint(0); ; shift += 7 { 369 if shift >= 64 { 370 return 0, ErrIntOverflowCheck 371 } 372 if iNdEx >= l { 373 return 0, io.ErrUnexpectedEOF 374 } 375 iNdEx++ 376 if dAtA[iNdEx-1] < 0x80 { 377 break 378 } 379 } 380 return iNdEx, nil 381 case 1: 382 iNdEx += 8 383 return iNdEx, nil 384 case 2: 385 var length int 386 for shift := uint(0); ; shift += 7 { 387 if shift >= 64 { 388 return 0, ErrIntOverflowCheck 389 } 390 if iNdEx >= l { 391 return 0, io.ErrUnexpectedEOF 392 } 393 b := dAtA[iNdEx] 394 iNdEx++ 395 length |= (int(b) & 0x7F) << shift 396 if b < 0x80 { 397 break 398 } 399 } 400 if length < 0 { 401 return 0, ErrInvalidLengthCheck 402 } 403 iNdEx += length 404 if iNdEx < 0 { 405 return 0, ErrInvalidLengthCheck 406 } 407 return iNdEx, nil 408 case 3: 409 for { 410 var innerWire uint64 411 var start int = iNdEx 412 for shift := uint(0); ; shift += 7 { 413 if shift >= 64 { 414 return 0, ErrIntOverflowCheck 415 } 416 if iNdEx >= l { 417 return 0, io.ErrUnexpectedEOF 418 } 419 b := dAtA[iNdEx] 420 iNdEx++ 421 innerWire |= (uint64(b) & 0x7F) << shift 422 if b < 0x80 { 423 break 424 } 425 } 426 innerWireType := int(innerWire & 0x7) 427 if innerWireType == 4 { 428 break 429 } 430 next, err := skipCheck(dAtA[start:]) 431 if err != nil { 432 return 0, err 433 } 434 iNdEx = start + next 435 if iNdEx < 0 { 436 return 0, ErrInvalidLengthCheck 437 } 438 } 439 return iNdEx, nil 440 case 4: 441 return iNdEx, nil 442 case 5: 443 iNdEx += 4 444 return iNdEx, nil 445 default: 446 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 447 } 448 } 449 panic("unreachable") 450} 451 452var ( 453 ErrInvalidLengthCheck = fmt.Errorf("proto: negative length found during unmarshaling") 454 ErrIntOverflowCheck = fmt.Errorf("proto: integer overflow") 455) 456