// Code generated by protoc-gen-gogo. // source: issue42.proto // DO NOT EDIT! /* Package issue42 is a generated protocol buffer package. It is generated from these files: issue42.proto It has these top-level messages: UnorderedFields OrderedFields */ package issue42 import proto "QmfH4HuZyN1p2wQLWWkXC91Z76435xKrBVfLQ2MY8ayG5R/gogo-protobuf/proto" import fmt "fmt" import math "math" // discarding unused import gogoproto "github.com/gogo/protobuf/gogoproto" import io "io" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf type UnorderedFields struct { A *int64 `protobuf:"varint,10,opt,name=A" json:"A,omitempty"` B *uint64 `protobuf:"fixed64,1,opt,name=B" json:"B,omitempty"` XXX_unrecognized []byte `json:"-"` } func (m *UnorderedFields) Reset() { *m = UnorderedFields{} } func (m *UnorderedFields) String() string { return proto.CompactTextString(m) } func (*UnorderedFields) ProtoMessage() {} func (m *UnorderedFields) GetA() int64 { if m != nil && m.A != nil { return *m.A } return 0 } func (m *UnorderedFields) GetB() uint64 { if m != nil && m.B != nil { return *m.B } return 0 } type OrderedFields struct { B *uint64 `protobuf:"fixed64,1,opt,name=B" json:"B,omitempty"` A *int64 `protobuf:"varint,10,opt,name=A" json:"A,omitempty"` XXX_unrecognized []byte `json:"-"` } func (m *OrderedFields) Reset() { *m = OrderedFields{} } func (m *OrderedFields) String() string { return proto.CompactTextString(m) } func (*OrderedFields) ProtoMessage() {} func (m *OrderedFields) GetB() uint64 { if m != nil && m.B != nil { return *m.B } return 0 } func (m *OrderedFields) GetA() int64 { if m != nil && m.A != nil { return *m.A } return 0 } func (m *UnorderedFields) Marshal() (data []byte, err error) { size := m.Size() data = make([]byte, size) n, err := m.MarshalTo(data) if err != nil { return nil, err } return data[:n], nil } func (m *UnorderedFields) MarshalTo(data []byte) (int, error) { var i int _ = i var l int _ = l if m.B != nil { data[i] = 0x9 i++ i = encodeFixed64Issue42(data, i, uint64(*m.B)) } if m.A != nil { data[i] = 0x50 i++ i = encodeVarintIssue42(data, i, uint64(*m.A)) } if m.XXX_unrecognized != nil { i += copy(data[i:], m.XXX_unrecognized) } return i, nil } func (m *OrderedFields) Marshal() (data []byte, err error) { size := m.Size() data = make([]byte, size) n, err := m.MarshalTo(data) if err != nil { return nil, err } return data[:n], nil } func (m *OrderedFields) MarshalTo(data []byte) (int, error) { var i int _ = i var l int _ = l if m.B != nil { data[i] = 0x9 i++ i = encodeFixed64Issue42(data, i, uint64(*m.B)) } if m.A != nil { data[i] = 0x50 i++ i = encodeVarintIssue42(data, i, uint64(*m.A)) } if m.XXX_unrecognized != nil { i += copy(data[i:], m.XXX_unrecognized) } return i, nil } func encodeFixed64Issue42(data []byte, offset int, v uint64) int { data[offset] = uint8(v) data[offset+1] = uint8(v >> 8) data[offset+2] = uint8(v >> 16) data[offset+3] = uint8(v >> 24) data[offset+4] = uint8(v >> 32) data[offset+5] = uint8(v >> 40) data[offset+6] = uint8(v >> 48) data[offset+7] = uint8(v >> 56) return offset + 8 } func encodeFixed32Issue42(data []byte, offset int, v uint32) int { data[offset] = uint8(v) data[offset+1] = uint8(v >> 8) data[offset+2] = uint8(v >> 16) data[offset+3] = uint8(v >> 24) return offset + 4 } func encodeVarintIssue42(data []byte, offset int, v uint64) int { for v >= 1<<7 { data[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } data[offset] = uint8(v) return offset + 1 } func NewPopulatedUnorderedFields(r randyIssue42, easy bool) *UnorderedFields { this := &UnorderedFields{} if r.Intn(10) != 0 { v1 := uint64(uint64(r.Uint32())) this.B = &v1 } if r.Intn(10) != 0 { v2 := int64(r.Int63()) if r.Intn(2) == 0 { v2 *= -1 } this.A = &v2 } if !easy && r.Intn(10) != 0 { this.XXX_unrecognized = randUnrecognizedIssue42(r, 11) } return this } func NewPopulatedOrderedFields(r randyIssue42, easy bool) *OrderedFields { this := &OrderedFields{} if r.Intn(10) != 0 { v3 := uint64(uint64(r.Uint32())) this.B = &v3 } if r.Intn(10) != 0 { v4 := int64(r.Int63()) if r.Intn(2) == 0 { v4 *= -1 } this.A = &v4 } if !easy && r.Intn(10) != 0 { this.XXX_unrecognized = randUnrecognizedIssue42(r, 11) } return this } type randyIssue42 interface { Float32() float32 Float64() float64 Int63() int64 Int31() int32 Uint32() uint32 Intn(n int) int } func randUTF8RuneIssue42(r randyIssue42) rune { ru := r.Intn(62) if ru < 10 { return rune(ru + 48) } else if ru < 36 { return rune(ru + 55) } return rune(ru + 61) } func randStringIssue42(r randyIssue42) string { v5 := r.Intn(100) tmps := make([]rune, v5) for i := 0; i < v5; i++ { tmps[i] = randUTF8RuneIssue42(r) } return string(tmps) } func randUnrecognizedIssue42(r randyIssue42, maxFieldNumber int) (data []byte) { l := r.Intn(5) for i := 0; i < l; i++ { wire := r.Intn(4) if wire == 3 { wire = 5 } fieldNumber := maxFieldNumber + r.Intn(100) data = randFieldIssue42(data, r, fieldNumber, wire) } return data } func randFieldIssue42(data []byte, r randyIssue42, fieldNumber int, wire int) []byte { key := uint32(fieldNumber)<<3 | uint32(wire) switch wire { case 0: data = encodeVarintPopulateIssue42(data, uint64(key)) v6 := r.Int63() if r.Intn(2) == 0 { v6 *= -1 } data = encodeVarintPopulateIssue42(data, uint64(v6)) case 1: data = encodeVarintPopulateIssue42(data, uint64(key)) 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))) case 2: data = encodeVarintPopulateIssue42(data, uint64(key)) ll := r.Intn(100) data = encodeVarintPopulateIssue42(data, uint64(ll)) for j := 0; j < ll; j++ { data = append(data, byte(r.Intn(256))) } default: data = encodeVarintPopulateIssue42(data, uint64(key)) data = append(data, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) } return data } func encodeVarintPopulateIssue42(data []byte, v uint64) []byte { for v >= 1<<7 { data = append(data, uint8(uint64(v)&0x7f|0x80)) v >>= 7 } data = append(data, uint8(v)) return data } func (m *UnorderedFields) Size() (n int) { var l int _ = l if m.B != nil { n += 9 } if m.A != nil { n += 1 + sovIssue42(uint64(*m.A)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } return n } func (m *OrderedFields) Size() (n int) { var l int _ = l if m.B != nil { n += 9 } if m.A != nil { n += 1 + sovIssue42(uint64(*m.A)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } return n } func sovIssue42(x uint64) (n int) { for { n++ x >>= 7 if x == 0 { break } } return n } func sozIssue42(x uint64) (n int) { return sovIssue42(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (m *UnorderedFields) Unmarshal(data []byte) error { l := len(data) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowIssue42 } if iNdEx >= l { return io.ErrUnexpectedEOF } b := data[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: UnorderedFields: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: UnorderedFields: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 1 { return fmt.Errorf("proto: wrong wireType = %d for field B", wireType) } var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } iNdEx += 8 v = uint64(data[iNdEx-8]) v |= uint64(data[iNdEx-7]) << 8 v |= uint64(data[iNdEx-6]) << 16 v |= uint64(data[iNdEx-5]) << 24 v |= uint64(data[iNdEx-4]) << 32 v |= uint64(data[iNdEx-3]) << 40 v |= uint64(data[iNdEx-2]) << 48 v |= uint64(data[iNdEx-1]) << 56 m.B = &v case 10: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field A", wireType) } var v int64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowIssue42 } if iNdEx >= l { return io.ErrUnexpectedEOF } b := data[iNdEx] iNdEx++ v |= (int64(b) & 0x7F) << shift if b < 0x80 { break } } m.A = &v default: iNdEx = preIndex skippy, err := skipIssue42(data[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthIssue42 } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *OrderedFields) Unmarshal(data []byte) error { l := len(data) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowIssue42 } if iNdEx >= l { return io.ErrUnexpectedEOF } b := data[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: OrderedFields: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: OrderedFields: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 1 { return fmt.Errorf("proto: wrong wireType = %d for field B", wireType) } var v uint64 if (iNdEx + 8) > l { return io.ErrUnexpectedEOF } iNdEx += 8 v = uint64(data[iNdEx-8]) v |= uint64(data[iNdEx-7]) << 8 v |= uint64(data[iNdEx-6]) << 16 v |= uint64(data[iNdEx-5]) << 24 v |= uint64(data[iNdEx-4]) << 32 v |= uint64(data[iNdEx-3]) << 40 v |= uint64(data[iNdEx-2]) << 48 v |= uint64(data[iNdEx-1]) << 56 m.B = &v case 10: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field A", wireType) } var v int64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowIssue42 } if iNdEx >= l { return io.ErrUnexpectedEOF } b := data[iNdEx] iNdEx++ v |= (int64(b) & 0x7F) << shift if b < 0x80 { break } } m.A = &v default: iNdEx = preIndex skippy, err := skipIssue42(data[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthIssue42 } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func skipIssue42(data []byte) (n int, err error) { l := len(data) iNdEx := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowIssue42 } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := data[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } wireType := int(wire & 0x7) switch wireType { case 0: for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowIssue42 } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } iNdEx++ if data[iNdEx-1] < 0x80 { break } } return iNdEx, nil case 1: iNdEx += 8 return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowIssue42 } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := data[iNdEx] iNdEx++ length |= (int(b) & 0x7F) << shift if b < 0x80 { break } } iNdEx += length if length < 0 { return 0, ErrInvalidLengthIssue42 } return iNdEx, nil case 3: for { var innerWire uint64 var start int = iNdEx for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowIssue42 } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := data[iNdEx] iNdEx++ innerWire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } innerWireType := int(innerWire & 0x7) if innerWireType == 4 { break } next, err := skipIssue42(data[start:]) if err != nil { return 0, err } iNdEx = start + next } return iNdEx, nil case 4: return iNdEx, nil case 5: iNdEx += 4 return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } } panic("unreachable") } var ( ErrInvalidLengthIssue42 = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowIssue42 = fmt.Errorf("proto: integer overflow") )