cri-o/vendor/github.com/gogo/protobuf/test/issue42order/issue42.pb.go

628 lines
15 KiB
Go
Raw Normal View History

// 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 "github.com/gogo/protobuf/proto"
import fmt "fmt"
import math "math"
import _ "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
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
type UnorderedFields struct {
A *int64 `protobuf:"varint,10,opt,name=A,json=a" json:"A,omitempty"`
B *uint64 `protobuf:"fixed64,1,opt,name=B,json=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 (*UnorderedFields) Descriptor() ([]byte, []int) { return fileDescriptorIssue42, []int{0} }
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" json:"B,omitempty"`
A *int64 `protobuf:"varint,10,opt,name=A,json=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 (*OrderedFields) Descriptor() ([]byte, []int) { return fileDescriptorIssue42, []int{1} }
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 init() {
proto.RegisterType((*UnorderedFields)(nil), "issue42.UnorderedFields")
proto.RegisterType((*OrderedFields)(nil), "issue42.OrderedFields")
}
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")
)
func init() { proto.RegisterFile("issue42.proto", fileDescriptorIssue42) }
var fileDescriptorIssue42 = []byte{
// 144 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xe2, 0xcd, 0x2c, 0x2e, 0x2e,
0x4d, 0x35, 0x31, 0xd2, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x87, 0x72, 0xa5, 0x74, 0xd3,
0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xd3, 0xf3, 0xd3, 0xf3, 0xf5, 0xc1,
0xf2, 0x49, 0xa5, 0x69, 0x60, 0x1e, 0x98, 0x03, 0x66, 0x41, 0xf4, 0x29, 0xe9, 0x72, 0xf1, 0x87,
0xe6, 0xe5, 0x17, 0xa5, 0xa4, 0x16, 0xa5, 0xa6, 0xb8, 0x65, 0xa6, 0xe6, 0xa4, 0x14, 0x0b, 0xf1,
0x70, 0x31, 0x3a, 0x49, 0x30, 0x2a, 0x30, 0x6a, 0xb0, 0x05, 0x31, 0x26, 0x81, 0x78, 0x8e, 0x12,
0x5c, 0x0a, 0x8c, 0x1a, 0xcc, 0x41, 0x8c, 0x89, 0x4a, 0xda, 0x5c, 0xbc, 0xfe, 0xc4, 0x2a, 0x76,
0x12, 0xf8, 0xf1, 0x50, 0x8e, 0xf1, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x1f, 0x3c,
0x92, 0x63, 0x04, 0x04, 0x00, 0x00, 0xff, 0xff, 0xad, 0x9a, 0xd1, 0x5b, 0xb5, 0x00, 0x00, 0x00,
}