1// Code generated by protoc-gen-gogo. DO NOT EDIT. 2// source: tessen.proto 3 4package v2 5 6import proto "github.com/golang/protobuf/proto" 7import fmt "fmt" 8import math "math" 9import _ "github.com/gogo/protobuf/gogoproto" 10 11import bytes "bytes" 12 13import github_com_golang_protobuf_proto "github.com/golang/protobuf/proto" 14 15import io "io" 16 17// Reference imports to suppress errors if they are not otherwise used. 18var _ = proto.Marshal 19var _ = fmt.Errorf 20var _ = math.Inf 21 22// This is a compile-time assertion to ensure that this generated file 23// is compatible with the proto package it is being compiled against. 24// A compilation error at this line likely means your copy of the 25// proto package needs to be updated. 26const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package 27 28// TessenConfig is the representation of a tessen configuration. 29type TessenConfig struct { 30 // OptOut is the opt-out status of the tessen configuration 31 OptOut bool `protobuf:"varint,1,opt,name=opt_out,json=optOut,proto3" json:"opt_out"` 32 XXX_NoUnkeyedLiteral struct{} `json:"-"` 33 XXX_unrecognized []byte `json:"-"` 34 XXX_sizecache int32 `json:"-"` 35} 36 37func (m *TessenConfig) Reset() { *m = TessenConfig{} } 38func (m *TessenConfig) String() string { return proto.CompactTextString(m) } 39func (*TessenConfig) ProtoMessage() {} 40func (*TessenConfig) Descriptor() ([]byte, []int) { 41 return fileDescriptor_tessen_0dc0f81e14b99fb3, []int{0} 42} 43func (m *TessenConfig) XXX_Unmarshal(b []byte) error { 44 return m.Unmarshal(b) 45} 46func (m *TessenConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 47 if deterministic { 48 return xxx_messageInfo_TessenConfig.Marshal(b, m, deterministic) 49 } else { 50 b = b[:cap(b)] 51 n, err := m.MarshalTo(b) 52 if err != nil { 53 return nil, err 54 } 55 return b[:n], nil 56 } 57} 58func (dst *TessenConfig) XXX_Merge(src proto.Message) { 59 xxx_messageInfo_TessenConfig.Merge(dst, src) 60} 61func (m *TessenConfig) XXX_Size() int { 62 return m.Size() 63} 64func (m *TessenConfig) XXX_DiscardUnknown() { 65 xxx_messageInfo_TessenConfig.DiscardUnknown(m) 66} 67 68var xxx_messageInfo_TessenConfig proto.InternalMessageInfo 69 70func init() { 71 proto.RegisterType((*TessenConfig)(nil), "sensu.core.v2.TessenConfig") 72} 73func (this *TessenConfig) Equal(that interface{}) bool { 74 if that == nil { 75 return this == nil 76 } 77 78 that1, ok := that.(*TessenConfig) 79 if !ok { 80 that2, ok := that.(TessenConfig) 81 if ok { 82 that1 = &that2 83 } else { 84 return false 85 } 86 } 87 if that1 == nil { 88 return this == nil 89 } else if this == nil { 90 return false 91 } 92 if this.OptOut != that1.OptOut { 93 return false 94 } 95 if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { 96 return false 97 } 98 return true 99} 100 101type TessenConfigFace interface { 102 Proto() github_com_golang_protobuf_proto.Message 103 GetOptOut() bool 104} 105 106func (this *TessenConfig) Proto() github_com_golang_protobuf_proto.Message { 107 return this 108} 109 110func (this *TessenConfig) TestProto() github_com_golang_protobuf_proto.Message { 111 return NewTessenConfigFromFace(this) 112} 113 114func (this *TessenConfig) GetOptOut() bool { 115 return this.OptOut 116} 117 118func NewTessenConfigFromFace(that TessenConfigFace) *TessenConfig { 119 this := &TessenConfig{} 120 this.OptOut = that.GetOptOut() 121 return this 122} 123 124func (m *TessenConfig) Marshal() (dAtA []byte, err error) { 125 size := m.Size() 126 dAtA = make([]byte, size) 127 n, err := m.MarshalTo(dAtA) 128 if err != nil { 129 return nil, err 130 } 131 return dAtA[:n], nil 132} 133 134func (m *TessenConfig) MarshalTo(dAtA []byte) (int, error) { 135 var i int 136 _ = i 137 var l int 138 _ = l 139 if m.OptOut { 140 dAtA[i] = 0x8 141 i++ 142 if m.OptOut { 143 dAtA[i] = 1 144 } else { 145 dAtA[i] = 0 146 } 147 i++ 148 } 149 if m.XXX_unrecognized != nil { 150 i += copy(dAtA[i:], m.XXX_unrecognized) 151 } 152 return i, nil 153} 154 155func encodeVarintTessen(dAtA []byte, offset int, v uint64) int { 156 for v >= 1<<7 { 157 dAtA[offset] = uint8(v&0x7f | 0x80) 158 v >>= 7 159 offset++ 160 } 161 dAtA[offset] = uint8(v) 162 return offset + 1 163} 164func NewPopulatedTessenConfig(r randyTessen, easy bool) *TessenConfig { 165 this := &TessenConfig{} 166 this.OptOut = bool(bool(r.Intn(2) == 0)) 167 if !easy && r.Intn(10) != 0 { 168 this.XXX_unrecognized = randUnrecognizedTessen(r, 2) 169 } 170 return this 171} 172 173type randyTessen interface { 174 Float32() float32 175 Float64() float64 176 Int63() int64 177 Int31() int32 178 Uint32() uint32 179 Intn(n int) int 180} 181 182func randUTF8RuneTessen(r randyTessen) rune { 183 ru := r.Intn(62) 184 if ru < 10 { 185 return rune(ru + 48) 186 } else if ru < 36 { 187 return rune(ru + 55) 188 } 189 return rune(ru + 61) 190} 191func randStringTessen(r randyTessen) string { 192 v1 := r.Intn(100) 193 tmps := make([]rune, v1) 194 for i := 0; i < v1; i++ { 195 tmps[i] = randUTF8RuneTessen(r) 196 } 197 return string(tmps) 198} 199func randUnrecognizedTessen(r randyTessen, maxFieldNumber int) (dAtA []byte) { 200 l := r.Intn(5) 201 for i := 0; i < l; i++ { 202 wire := r.Intn(4) 203 if wire == 3 { 204 wire = 5 205 } 206 fieldNumber := maxFieldNumber + r.Intn(100) 207 dAtA = randFieldTessen(dAtA, r, fieldNumber, wire) 208 } 209 return dAtA 210} 211func randFieldTessen(dAtA []byte, r randyTessen, fieldNumber int, wire int) []byte { 212 key := uint32(fieldNumber)<<3 | uint32(wire) 213 switch wire { 214 case 0: 215 dAtA = encodeVarintPopulateTessen(dAtA, uint64(key)) 216 v2 := r.Int63() 217 if r.Intn(2) == 0 { 218 v2 *= -1 219 } 220 dAtA = encodeVarintPopulateTessen(dAtA, uint64(v2)) 221 case 1: 222 dAtA = encodeVarintPopulateTessen(dAtA, uint64(key)) 223 dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) 224 case 2: 225 dAtA = encodeVarintPopulateTessen(dAtA, uint64(key)) 226 ll := r.Intn(100) 227 dAtA = encodeVarintPopulateTessen(dAtA, uint64(ll)) 228 for j := 0; j < ll; j++ { 229 dAtA = append(dAtA, byte(r.Intn(256))) 230 } 231 default: 232 dAtA = encodeVarintPopulateTessen(dAtA, uint64(key)) 233 dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) 234 } 235 return dAtA 236} 237func encodeVarintPopulateTessen(dAtA []byte, v uint64) []byte { 238 for v >= 1<<7 { 239 dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) 240 v >>= 7 241 } 242 dAtA = append(dAtA, uint8(v)) 243 return dAtA 244} 245func (m *TessenConfig) Size() (n int) { 246 var l int 247 _ = l 248 if m.OptOut { 249 n += 2 250 } 251 if m.XXX_unrecognized != nil { 252 n += len(m.XXX_unrecognized) 253 } 254 return n 255} 256 257func sovTessen(x uint64) (n int) { 258 for { 259 n++ 260 x >>= 7 261 if x == 0 { 262 break 263 } 264 } 265 return n 266} 267func sozTessen(x uint64) (n int) { 268 return sovTessen(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 269} 270func (m *TessenConfig) Unmarshal(dAtA []byte) error { 271 l := len(dAtA) 272 iNdEx := 0 273 for iNdEx < l { 274 preIndex := iNdEx 275 var wire uint64 276 for shift := uint(0); ; shift += 7 { 277 if shift >= 64 { 278 return ErrIntOverflowTessen 279 } 280 if iNdEx >= l { 281 return io.ErrUnexpectedEOF 282 } 283 b := dAtA[iNdEx] 284 iNdEx++ 285 wire |= (uint64(b) & 0x7F) << shift 286 if b < 0x80 { 287 break 288 } 289 } 290 fieldNum := int32(wire >> 3) 291 wireType := int(wire & 0x7) 292 if wireType == 4 { 293 return fmt.Errorf("proto: TessenConfig: wiretype end group for non-group") 294 } 295 if fieldNum <= 0 { 296 return fmt.Errorf("proto: TessenConfig: illegal tag %d (wire type %d)", fieldNum, wire) 297 } 298 switch fieldNum { 299 case 1: 300 if wireType != 0 { 301 return fmt.Errorf("proto: wrong wireType = %d for field OptOut", wireType) 302 } 303 var v int 304 for shift := uint(0); ; shift += 7 { 305 if shift >= 64 { 306 return ErrIntOverflowTessen 307 } 308 if iNdEx >= l { 309 return io.ErrUnexpectedEOF 310 } 311 b := dAtA[iNdEx] 312 iNdEx++ 313 v |= (int(b) & 0x7F) << shift 314 if b < 0x80 { 315 break 316 } 317 } 318 m.OptOut = bool(v != 0) 319 default: 320 iNdEx = preIndex 321 skippy, err := skipTessen(dAtA[iNdEx:]) 322 if err != nil { 323 return err 324 } 325 if skippy < 0 { 326 return ErrInvalidLengthTessen 327 } 328 if (iNdEx + skippy) > l { 329 return io.ErrUnexpectedEOF 330 } 331 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 332 iNdEx += skippy 333 } 334 } 335 336 if iNdEx > l { 337 return io.ErrUnexpectedEOF 338 } 339 return nil 340} 341func skipTessen(dAtA []byte) (n int, err error) { 342 l := len(dAtA) 343 iNdEx := 0 344 for iNdEx < l { 345 var wire uint64 346 for shift := uint(0); ; shift += 7 { 347 if shift >= 64 { 348 return 0, ErrIntOverflowTessen 349 } 350 if iNdEx >= l { 351 return 0, io.ErrUnexpectedEOF 352 } 353 b := dAtA[iNdEx] 354 iNdEx++ 355 wire |= (uint64(b) & 0x7F) << shift 356 if b < 0x80 { 357 break 358 } 359 } 360 wireType := int(wire & 0x7) 361 switch wireType { 362 case 0: 363 for shift := uint(0); ; shift += 7 { 364 if shift >= 64 { 365 return 0, ErrIntOverflowTessen 366 } 367 if iNdEx >= l { 368 return 0, io.ErrUnexpectedEOF 369 } 370 iNdEx++ 371 if dAtA[iNdEx-1] < 0x80 { 372 break 373 } 374 } 375 return iNdEx, nil 376 case 1: 377 iNdEx += 8 378 return iNdEx, nil 379 case 2: 380 var length int 381 for shift := uint(0); ; shift += 7 { 382 if shift >= 64 { 383 return 0, ErrIntOverflowTessen 384 } 385 if iNdEx >= l { 386 return 0, io.ErrUnexpectedEOF 387 } 388 b := dAtA[iNdEx] 389 iNdEx++ 390 length |= (int(b) & 0x7F) << shift 391 if b < 0x80 { 392 break 393 } 394 } 395 iNdEx += length 396 if length < 0 { 397 return 0, ErrInvalidLengthTessen 398 } 399 return iNdEx, nil 400 case 3: 401 for { 402 var innerWire uint64 403 var start int = iNdEx 404 for shift := uint(0); ; shift += 7 { 405 if shift >= 64 { 406 return 0, ErrIntOverflowTessen 407 } 408 if iNdEx >= l { 409 return 0, io.ErrUnexpectedEOF 410 } 411 b := dAtA[iNdEx] 412 iNdEx++ 413 innerWire |= (uint64(b) & 0x7F) << shift 414 if b < 0x80 { 415 break 416 } 417 } 418 innerWireType := int(innerWire & 0x7) 419 if innerWireType == 4 { 420 break 421 } 422 next, err := skipTessen(dAtA[start:]) 423 if err != nil { 424 return 0, err 425 } 426 iNdEx = start + next 427 } 428 return iNdEx, nil 429 case 4: 430 return iNdEx, nil 431 case 5: 432 iNdEx += 4 433 return iNdEx, nil 434 default: 435 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 436 } 437 } 438 panic("unreachable") 439} 440 441var ( 442 ErrInvalidLengthTessen = fmt.Errorf("proto: negative length found during unmarshaling") 443 ErrIntOverflowTessen = fmt.Errorf("proto: integer overflow") 444) 445 446func init() { proto.RegisterFile("tessen.proto", fileDescriptor_tessen_0dc0f81e14b99fb3) } 447 448var fileDescriptor_tessen_0dc0f81e14b99fb3 = []byte{ 449 // 188 bytes of a gzipped FileDescriptorProto 450 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x29, 0x49, 0x2d, 0x2e, 451 0x4e, 0xcd, 0xd3, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x2d, 0x4e, 0xcd, 0x2b, 0x2e, 0xd5, 452 0x4b, 0xce, 0x2f, 0x4a,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