syncthing/vendor/github.com/gogo/protobuf/test/required/requiredexample.pb.go
Jakob Borg fa0101bd60 lib/protocol, lib/discover, lib/db: Use protocol buffer serialization (fixes #3080)
This changes the BEP protocol to use protocol buffer serialization
instead of XDR, and therefore also the database format. The local
discovery protocol is also updated to be protocol buffer format.

GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3276
LGTM: AudriusButkevicius
2016-07-04 10:40:29 +00:00

2212 lines
57 KiB
Go

// Code generated by protoc-gen-gogo.
// source: requiredexample.proto
// DO NOT EDIT!
/*
Package required is a generated protocol buffer package.
It is generated from these files:
requiredexample.proto
It has these top-level messages:
RequiredExample
NidOptNative
NinOptNative
NestedNinOptNative
*/
package required
import proto "github.com/gogo/protobuf/proto"
import fmt "fmt"
import math "math"
import _ "github.com/gogo/protobuf/gogoproto"
import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto"
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.
const _ = proto.GoGoProtoPackageIsVersion1
type RequiredExample struct {
TheRequiredString *string `protobuf:"bytes,1,req,name=theRequiredString" json:"theRequiredString,omitempty"`
TheOptionalString *string `protobuf:"bytes,2,opt,name=theOptionalString" json:"theOptionalString,omitempty"`
TheRepeatedStrings []string `protobuf:"bytes,3,rep,name=theRepeatedStrings" json:"theRepeatedStrings,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *RequiredExample) Reset() { *m = RequiredExample{} }
func (m *RequiredExample) String() string { return proto.CompactTextString(m) }
func (*RequiredExample) ProtoMessage() {}
func (*RequiredExample) Descriptor() ([]byte, []int) { return fileDescriptorRequiredexample, []int{0} }
func (m *RequiredExample) GetTheRequiredString() string {
if m != nil && m.TheRequiredString != nil {
return *m.TheRequiredString
}
return ""
}
func (m *RequiredExample) GetTheOptionalString() string {
if m != nil && m.TheOptionalString != nil {
return *m.TheOptionalString
}
return ""
}
func (m *RequiredExample) GetTheRepeatedStrings() []string {
if m != nil {
return m.TheRepeatedStrings
}
return nil
}
type NidOptNative struct {
Field1 float64 `protobuf:"fixed64,1,req,name=Field1,json=field1" json:"Field1"`
Field2 float32 `protobuf:"fixed32,2,req,name=Field2,json=field2" json:"Field2"`
Field3 int32 `protobuf:"varint,3,req,name=Field3,json=field3" json:"Field3"`
Field4 int64 `protobuf:"varint,4,req,name=Field4,json=field4" json:"Field4"`
Field5 uint32 `protobuf:"varint,5,req,name=Field5,json=field5" json:"Field5"`
Field6 uint64 `protobuf:"varint,6,req,name=Field6,json=field6" json:"Field6"`
Field7 int32 `protobuf:"zigzag32,7,req,name=Field7,json=field7" json:"Field7"`
Field8 int64 `protobuf:"zigzag64,8,req,name=Field8,json=field8" json:"Field8"`
Field9 uint32 `protobuf:"fixed32,9,req,name=Field9,json=field9" json:"Field9"`
Field10 int32 `protobuf:"fixed32,10,req,name=Field10,json=field10" json:"Field10"`
Field11 uint64 `protobuf:"fixed64,11,req,name=Field11,json=field11" json:"Field11"`
Field12 int64 `protobuf:"fixed64,12,req,name=Field12,json=field12" json:"Field12"`
Field13 bool `protobuf:"varint,13,req,name=Field13,json=field13" json:"Field13"`
Field14 string `protobuf:"bytes,14,req,name=Field14,json=field14" json:"Field14"`
Field15 []byte `protobuf:"bytes,15,req,name=Field15,json=field15" json:"Field15"`
XXX_unrecognized []byte `json:"-"`
}
func (m *NidOptNative) Reset() { *m = NidOptNative{} }
func (m *NidOptNative) String() string { return proto.CompactTextString(m) }
func (*NidOptNative) ProtoMessage() {}
func (*NidOptNative) Descriptor() ([]byte, []int) { return fileDescriptorRequiredexample, []int{1} }
func (m *NidOptNative) GetField1() float64 {
if m != nil {
return m.Field1
}
return 0
}
func (m *NidOptNative) GetField2() float32 {
if m != nil {
return m.Field2
}
return 0
}
func (m *NidOptNative) GetField3() int32 {
if m != nil {
return m.Field3
}
return 0
}
func (m *NidOptNative) GetField4() int64 {
if m != nil {
return m.Field4
}
return 0
}
func (m *NidOptNative) GetField5() uint32 {
if m != nil {
return m.Field5
}
return 0
}
func (m *NidOptNative) GetField6() uint64 {
if m != nil {
return m.Field6
}
return 0
}
func (m *NidOptNative) GetField7() int32 {
if m != nil {
return m.Field7
}
return 0
}
func (m *NidOptNative) GetField8() int64 {
if m != nil {
return m.Field8
}
return 0
}
func (m *NidOptNative) GetField9() uint32 {
if m != nil {
return m.Field9
}
return 0
}
func (m *NidOptNative) GetField10() int32 {
if m != nil {
return m.Field10
}
return 0
}
func (m *NidOptNative) GetField11() uint64 {
if m != nil {
return m.Field11
}
return 0
}
func (m *NidOptNative) GetField12() int64 {
if m != nil {
return m.Field12
}
return 0
}
func (m *NidOptNative) GetField13() bool {
if m != nil {
return m.Field13
}
return false
}
func (m *NidOptNative) GetField14() string {
if m != nil {
return m.Field14
}
return ""
}
func (m *NidOptNative) GetField15() []byte {
if m != nil {
return m.Field15
}
return nil
}
type NinOptNative struct {
Field1 *float64 `protobuf:"fixed64,1,req,name=Field1,json=field1" json:"Field1,omitempty"`
Field2 *float32 `protobuf:"fixed32,2,req,name=Field2,json=field2" json:"Field2,omitempty"`
Field3 *int32 `protobuf:"varint,3,req,name=Field3,json=field3" json:"Field3,omitempty"`
Field4 *int64 `protobuf:"varint,4,req,name=Field4,json=field4" json:"Field4,omitempty"`
Field5 *uint32 `protobuf:"varint,5,req,name=Field5,json=field5" json:"Field5,omitempty"`
Field6 *uint64 `protobuf:"varint,6,req,name=Field6,json=field6" json:"Field6,omitempty"`
Field7 *int32 `protobuf:"zigzag32,7,req,name=Field7,json=field7" json:"Field7,omitempty"`
Field8 *int64 `protobuf:"zigzag64,8,req,name=Field8,json=field8" json:"Field8,omitempty"`
Field9 *uint32 `protobuf:"fixed32,9,req,name=Field9,json=field9" json:"Field9,omitempty"`
Field10 *int32 `protobuf:"fixed32,10,req,name=Field10,json=field10" json:"Field10,omitempty"`
Field11 *uint64 `protobuf:"fixed64,11,req,name=Field11,json=field11" json:"Field11,omitempty"`
Field12 *int64 `protobuf:"fixed64,12,req,name=Field12,json=field12" json:"Field12,omitempty"`
Field13 *bool `protobuf:"varint,13,req,name=Field13,json=field13" json:"Field13,omitempty"`
Field14 *string `protobuf:"bytes,14,req,name=Field14,json=field14" json:"Field14,omitempty"`
Field15 []byte `protobuf:"bytes,15,req,name=Field15,json=field15" json:"Field15,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *NinOptNative) Reset() { *m = NinOptNative{} }
func (m *NinOptNative) String() string { return proto.CompactTextString(m) }
func (*NinOptNative) ProtoMessage() {}
func (*NinOptNative) Descriptor() ([]byte, []int) { return fileDescriptorRequiredexample, []int{2} }
func (m *NinOptNative) GetField1() float64 {
if m != nil && m.Field1 != nil {
return *m.Field1
}
return 0
}
func (m *NinOptNative) GetField2() float32 {
if m != nil && m.Field2 != nil {
return *m.Field2
}
return 0
}
func (m *NinOptNative) GetField3() int32 {
if m != nil && m.Field3 != nil {
return *m.Field3
}
return 0
}
func (m *NinOptNative) GetField4() int64 {
if m != nil && m.Field4 != nil {
return *m.Field4
}
return 0
}
func (m *NinOptNative) GetField5() uint32 {
if m != nil && m.Field5 != nil {
return *m.Field5
}
return 0
}
func (m *NinOptNative) GetField6() uint64 {
if m != nil && m.Field6 != nil {
return *m.Field6
}
return 0
}
func (m *NinOptNative) GetField7() int32 {
if m != nil && m.Field7 != nil {
return *m.Field7
}
return 0
}
func (m *NinOptNative) GetField8() int64 {
if m != nil && m.Field8 != nil {
return *m.Field8
}
return 0
}
func (m *NinOptNative) GetField9() uint32 {
if m != nil && m.Field9 != nil {
return *m.Field9
}
return 0
}
func (m *NinOptNative) GetField10() int32 {
if m != nil && m.Field10 != nil {
return *m.Field10
}
return 0
}
func (m *NinOptNative) GetField11() uint64 {
if m != nil && m.Field11 != nil {
return *m.Field11
}
return 0
}
func (m *NinOptNative) GetField12() int64 {
if m != nil && m.Field12 != nil {
return *m.Field12
}
return 0
}
func (m *NinOptNative) GetField13() bool {
if m != nil && m.Field13 != nil {
return *m.Field13
}
return false
}
func (m *NinOptNative) GetField14() string {
if m != nil && m.Field14 != nil {
return *m.Field14
}
return ""
}
func (m *NinOptNative) GetField15() []byte {
if m != nil {
return m.Field15
}
return nil
}
type NestedNinOptNative struct {
NestedNinOpts []*NinOptNative `protobuf:"bytes,1,rep,name=NestedNinOpts,json=nestedNinOpts" json:"NestedNinOpts,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *NestedNinOptNative) Reset() { *m = NestedNinOptNative{} }
func (m *NestedNinOptNative) String() string { return proto.CompactTextString(m) }
func (*NestedNinOptNative) ProtoMessage() {}
func (*NestedNinOptNative) Descriptor() ([]byte, []int) {
return fileDescriptorRequiredexample, []int{3}
}
func (m *NestedNinOptNative) GetNestedNinOpts() []*NinOptNative {
if m != nil {
return m.NestedNinOpts
}
return nil
}
func init() {
proto.RegisterType((*RequiredExample)(nil), "required.RequiredExample")
proto.RegisterType((*NidOptNative)(nil), "required.NidOptNative")
proto.RegisterType((*NinOptNative)(nil), "required.NinOptNative")
proto.RegisterType((*NestedNinOptNative)(nil), "required.NestedNinOptNative")
}
func (m *RequiredExample) 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 *RequiredExample) MarshalTo(data []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if m.TheRequiredString == nil {
return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("theRequiredString")
} else {
data[i] = 0xa
i++
i = encodeVarintRequiredexample(data, i, uint64(len(*m.TheRequiredString)))
i += copy(data[i:], *m.TheRequiredString)
}
if m.TheOptionalString != nil {
data[i] = 0x12
i++
i = encodeVarintRequiredexample(data, i, uint64(len(*m.TheOptionalString)))
i += copy(data[i:], *m.TheOptionalString)
}
if len(m.TheRepeatedStrings) > 0 {
for _, s := range m.TheRepeatedStrings {
data[i] = 0x1a
i++
l = len(s)
for l >= 1<<7 {
data[i] = uint8(uint64(l)&0x7f | 0x80)
l >>= 7
i++
}
data[i] = uint8(l)
i++
i += copy(data[i:], s)
}
}
if m.XXX_unrecognized != nil {
i += copy(data[i:], m.XXX_unrecognized)
}
return i, nil
}
func (m *NidOptNative) 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 *NidOptNative) MarshalTo(data []byte) (int, error) {
var i int
_ = i
var l int
_ = l
data[i] = 0x9
i++
i = encodeFixed64Requiredexample(data, i, uint64(math.Float64bits(float64(m.Field1))))
data[i] = 0x15
i++
i = encodeFixed32Requiredexample(data, i, uint32(math.Float32bits(float32(m.Field2))))
data[i] = 0x18
i++
i = encodeVarintRequiredexample(data, i, uint64(m.Field3))
data[i] = 0x20
i++
i = encodeVarintRequiredexample(data, i, uint64(m.Field4))
data[i] = 0x28
i++
i = encodeVarintRequiredexample(data, i, uint64(m.Field5))
data[i] = 0x30
i++
i = encodeVarintRequiredexample(data, i, uint64(m.Field6))
data[i] = 0x38
i++
i = encodeVarintRequiredexample(data, i, uint64((uint32(m.Field7)<<1)^uint32((m.Field7>>31))))
data[i] = 0x40
i++
i = encodeVarintRequiredexample(data, i, uint64((uint64(m.Field8)<<1)^uint64((m.Field8>>63))))
data[i] = 0x4d
i++
i = encodeFixed32Requiredexample(data, i, uint32(m.Field9))
data[i] = 0x55
i++
i = encodeFixed32Requiredexample(data, i, uint32(m.Field10))
data[i] = 0x59
i++
i = encodeFixed64Requiredexample(data, i, uint64(m.Field11))
data[i] = 0x61
i++
i = encodeFixed64Requiredexample(data, i, uint64(m.Field12))
data[i] = 0x68
i++
if m.Field13 {
data[i] = 1
} else {
data[i] = 0
}
i++
data[i] = 0x72
i++
i = encodeVarintRequiredexample(data, i, uint64(len(m.Field14)))
i += copy(data[i:], m.Field14)
if m.Field15 != nil {
data[i] = 0x7a
i++
i = encodeVarintRequiredexample(data, i, uint64(len(m.Field15)))
i += copy(data[i:], m.Field15)
}
if m.XXX_unrecognized != nil {
i += copy(data[i:], m.XXX_unrecognized)
}
return i, nil
}
func (m *NinOptNative) 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 *NinOptNative) MarshalTo(data []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if m.Field1 == nil {
return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field1")
} else {
data[i] = 0x9
i++
i = encodeFixed64Requiredexample(data, i, uint64(math.Float64bits(float64(*m.Field1))))
}
if m.Field2 == nil {
return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field2")
} else {
data[i] = 0x15
i++
i = encodeFixed32Requiredexample(data, i, uint32(math.Float32bits(float32(*m.Field2))))
}
if m.Field3 == nil {
return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field3")
} else {
data[i] = 0x18
i++
i = encodeVarintRequiredexample(data, i, uint64(*m.Field3))
}
if m.Field4 == nil {
return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field4")
} else {
data[i] = 0x20
i++
i = encodeVarintRequiredexample(data, i, uint64(*m.Field4))
}
if m.Field5 == nil {
return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field5")
} else {
data[i] = 0x28
i++
i = encodeVarintRequiredexample(data, i, uint64(*m.Field5))
}
if m.Field6 == nil {
return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field6")
} else {
data[i] = 0x30
i++
i = encodeVarintRequiredexample(data, i, uint64(*m.Field6))
}
if m.Field7 == nil {
return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field7")
} else {
data[i] = 0x38
i++
i = encodeVarintRequiredexample(data, i, uint64((uint32(*m.Field7)<<1)^uint32((*m.Field7>>31))))
}
if m.Field8 == nil {
return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field8")
} else {
data[i] = 0x40
i++
i = encodeVarintRequiredexample(data, i, uint64((uint64(*m.Field8)<<1)^uint64((*m.Field8>>63))))
}
if m.Field9 == nil {
return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field9")
} else {
data[i] = 0x4d
i++
i = encodeFixed32Requiredexample(data, i, uint32(*m.Field9))
}
if m.Field10 == nil {
return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field10")
} else {
data[i] = 0x55
i++
i = encodeFixed32Requiredexample(data, i, uint32(*m.Field10))
}
if m.Field11 == nil {
return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field11")
} else {
data[i] = 0x59
i++
i = encodeFixed64Requiredexample(data, i, uint64(*m.Field11))
}
if m.Field12 == nil {
return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field12")
} else {
data[i] = 0x61
i++
i = encodeFixed64Requiredexample(data, i, uint64(*m.Field12))
}
if m.Field13 == nil {
return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field13")
} else {
data[i] = 0x68
i++
if *m.Field13 {
data[i] = 1
} else {
data[i] = 0
}
i++
}
if m.Field14 == nil {
return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field14")
} else {
data[i] = 0x72
i++
i = encodeVarintRequiredexample(data, i, uint64(len(*m.Field14)))
i += copy(data[i:], *m.Field14)
}
if m.Field15 == nil {
return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field15")
} else {
data[i] = 0x7a
i++
i = encodeVarintRequiredexample(data, i, uint64(len(m.Field15)))
i += copy(data[i:], m.Field15)
}
if m.XXX_unrecognized != nil {
i += copy(data[i:], m.XXX_unrecognized)
}
return i, nil
}
func (m *NestedNinOptNative) 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 *NestedNinOptNative) MarshalTo(data []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if len(m.NestedNinOpts) > 0 {
for _, msg := range m.NestedNinOpts {
data[i] = 0xa
i++
i = encodeVarintRequiredexample(data, i, uint64(msg.Size()))
n, err := msg.MarshalTo(data[i:])
if err != nil {
return 0, err
}
i += n
}
}
if m.XXX_unrecognized != nil {
i += copy(data[i:], m.XXX_unrecognized)
}
return i, nil
}
func encodeFixed64Requiredexample(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 encodeFixed32Requiredexample(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 encodeVarintRequiredexample(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 NewPopulatedRequiredExample(r randyRequiredexample, easy bool) *RequiredExample {
this := &RequiredExample{}
v1 := randStringRequiredexample(r)
this.TheRequiredString = &v1
if r.Intn(10) != 0 {
v2 := randStringRequiredexample(r)
this.TheOptionalString = &v2
}
if r.Intn(10) != 0 {
v3 := r.Intn(10)
this.TheRepeatedStrings = make([]string, v3)
for i := 0; i < v3; i++ {
this.TheRepeatedStrings[i] = randStringRequiredexample(r)
}
}
if !easy && r.Intn(10) != 0 {
this.XXX_unrecognized = randUnrecognizedRequiredexample(r, 4)
}
return this
}
func NewPopulatedNidOptNative(r randyRequiredexample, easy bool) *NidOptNative {
this := &NidOptNative{}
this.Field1 = float64(r.Float64())
if r.Intn(2) == 0 {
this.Field1 *= -1
}
this.Field2 = float32(r.Float32())
if r.Intn(2) == 0 {
this.Field2 *= -1
}
this.Field3 = int32(r.Int31())
if r.Intn(2) == 0 {
this.Field3 *= -1
}
this.Field4 = int64(r.Int63())
if r.Intn(2) == 0 {
this.Field4 *= -1
}
this.Field5 = uint32(r.Uint32())
this.Field6 = uint64(uint64(r.Uint32()))
this.Field7 = int32(r.Int31())
if r.Intn(2) == 0 {
this.Field7 *= -1
}
this.Field8 = int64(r.Int63())
if r.Intn(2) == 0 {
this.Field8 *= -1
}
this.Field9 = uint32(r.Uint32())
this.Field10 = int32(r.Int31())
if r.Intn(2) == 0 {
this.Field10 *= -1
}
this.Field11 = uint64(uint64(r.Uint32()))
this.Field12 = int64(r.Int63())
if r.Intn(2) == 0 {
this.Field12 *= -1
}
this.Field13 = bool(bool(r.Intn(2) == 0))
this.Field14 = randStringRequiredexample(r)
v4 := r.Intn(100)
this.Field15 = make([]byte, v4)
for i := 0; i < v4; i++ {
this.Field15[i] = byte(r.Intn(256))
}
if !easy && r.Intn(10) != 0 {
this.XXX_unrecognized = randUnrecognizedRequiredexample(r, 16)
}
return this
}
func NewPopulatedNinOptNative(r randyRequiredexample, easy bool) *NinOptNative {
this := &NinOptNative{}
v5 := float64(r.Float64())
if r.Intn(2) == 0 {
v5 *= -1
}
this.Field1 = &v5
v6 := float32(r.Float32())
if r.Intn(2) == 0 {
v6 *= -1
}
this.Field2 = &v6
v7 := int32(r.Int31())
if r.Intn(2) == 0 {
v7 *= -1
}
this.Field3 = &v7
v8 := int64(r.Int63())
if r.Intn(2) == 0 {
v8 *= -1
}
this.Field4 = &v8
v9 := uint32(r.Uint32())
this.Field5 = &v9
v10 := uint64(uint64(r.Uint32()))
this.Field6 = &v10
v11 := int32(r.Int31())
if r.Intn(2) == 0 {
v11 *= -1
}
this.Field7 = &v11
v12 := int64(r.Int63())
if r.Intn(2) == 0 {
v12 *= -1
}
this.Field8 = &v12
v13 := uint32(r.Uint32())
this.Field9 = &v13
v14 := int32(r.Int31())
if r.Intn(2) == 0 {
v14 *= -1
}
this.Field10 = &v14
v15 := uint64(uint64(r.Uint32()))
this.Field11 = &v15
v16 := int64(r.Int63())
if r.Intn(2) == 0 {
v16 *= -1
}
this.Field12 = &v16
v17 := bool(bool(r.Intn(2) == 0))
this.Field13 = &v17
v18 := randStringRequiredexample(r)
this.Field14 = &v18
v19 := r.Intn(100)
this.Field15 = make([]byte, v19)
for i := 0; i < v19; i++ {
this.Field15[i] = byte(r.Intn(256))
}
if !easy && r.Intn(10) != 0 {
this.XXX_unrecognized = randUnrecognizedRequiredexample(r, 16)
}
return this
}
func NewPopulatedNestedNinOptNative(r randyRequiredexample, easy bool) *NestedNinOptNative {
this := &NestedNinOptNative{}
if r.Intn(10) != 0 {
v20 := r.Intn(5)
this.NestedNinOpts = make([]*NinOptNative, v20)
for i := 0; i < v20; i++ {
this.NestedNinOpts[i] = NewPopulatedNinOptNative(r, easy)
}
}
if !easy && r.Intn(10) != 0 {
this.XXX_unrecognized = randUnrecognizedRequiredexample(r, 2)
}
return this
}
type randyRequiredexample interface {
Float32() float32
Float64() float64
Int63() int64
Int31() int32
Uint32() uint32
Intn(n int) int
}
func randUTF8RuneRequiredexample(r randyRequiredexample) 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 randStringRequiredexample(r randyRequiredexample) string {
v21 := r.Intn(100)
tmps := make([]rune, v21)
for i := 0; i < v21; i++ {
tmps[i] = randUTF8RuneRequiredexample(r)
}
return string(tmps)
}
func randUnrecognizedRequiredexample(r randyRequiredexample, 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 = randFieldRequiredexample(data, r, fieldNumber, wire)
}
return data
}
func randFieldRequiredexample(data []byte, r randyRequiredexample, fieldNumber int, wire int) []byte {
key := uint32(fieldNumber)<<3 | uint32(wire)
switch wire {
case 0:
data = encodeVarintPopulateRequiredexample(data, uint64(key))
v22 := r.Int63()
if r.Intn(2) == 0 {
v22 *= -1
}
data = encodeVarintPopulateRequiredexample(data, uint64(v22))
case 1:
data = encodeVarintPopulateRequiredexample(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 = encodeVarintPopulateRequiredexample(data, uint64(key))
ll := r.Intn(100)
data = encodeVarintPopulateRequiredexample(data, uint64(ll))
for j := 0; j < ll; j++ {
data = append(data, byte(r.Intn(256)))
}
default:
data = encodeVarintPopulateRequiredexample(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 encodeVarintPopulateRequiredexample(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 *RequiredExample) Size() (n int) {
var l int
_ = l
if m.TheRequiredString != nil {
l = len(*m.TheRequiredString)
n += 1 + l + sovRequiredexample(uint64(l))
}
if m.TheOptionalString != nil {
l = len(*m.TheOptionalString)
n += 1 + l + sovRequiredexample(uint64(l))
}
if len(m.TheRepeatedStrings) > 0 {
for _, s := range m.TheRepeatedStrings {
l = len(s)
n += 1 + l + sovRequiredexample(uint64(l))
}
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *NidOptNative) Size() (n int) {
var l int
_ = l
n += 9
n += 5
n += 1 + sovRequiredexample(uint64(m.Field3))
n += 1 + sovRequiredexample(uint64(m.Field4))
n += 1 + sovRequiredexample(uint64(m.Field5))
n += 1 + sovRequiredexample(uint64(m.Field6))
n += 1 + sozRequiredexample(uint64(m.Field7))
n += 1 + sozRequiredexample(uint64(m.Field8))
n += 5
n += 5
n += 9
n += 9
n += 2
l = len(m.Field14)
n += 1 + l + sovRequiredexample(uint64(l))
if m.Field15 != nil {
l = len(m.Field15)
n += 1 + l + sovRequiredexample(uint64(l))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *NinOptNative) Size() (n int) {
var l int
_ = l
if m.Field1 != nil {
n += 9
}
if m.Field2 != nil {
n += 5
}
if m.Field3 != nil {
n += 1 + sovRequiredexample(uint64(*m.Field3))
}
if m.Field4 != nil {
n += 1 + sovRequiredexample(uint64(*m.Field4))
}
if m.Field5 != nil {
n += 1 + sovRequiredexample(uint64(*m.Field5))
}
if m.Field6 != nil {
n += 1 + sovRequiredexample(uint64(*m.Field6))
}
if m.Field7 != nil {
n += 1 + sozRequiredexample(uint64(*m.Field7))
}
if m.Field8 != nil {
n += 1 + sozRequiredexample(uint64(*m.Field8))
}
if m.Field9 != nil {
n += 5
}
if m.Field10 != nil {
n += 5
}
if m.Field11 != nil {
n += 9
}
if m.Field12 != nil {
n += 9
}
if m.Field13 != nil {
n += 2
}
if m.Field14 != nil {
l = len(*m.Field14)
n += 1 + l + sovRequiredexample(uint64(l))
}
if m.Field15 != nil {
l = len(m.Field15)
n += 1 + l + sovRequiredexample(uint64(l))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *NestedNinOptNative) Size() (n int) {
var l int
_ = l
if len(m.NestedNinOpts) > 0 {
for _, e := range m.NestedNinOpts {
l = e.Size()
n += 1 + l + sovRequiredexample(uint64(l))
}
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func sovRequiredexample(x uint64) (n int) {
for {
n++
x >>= 7
if x == 0 {
break
}
}
return n
}
func sozRequiredexample(x uint64) (n int) {
return sovRequiredexample(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *RequiredExample) Unmarshal(data []byte) error {
var hasFields [1]uint64
l := len(data)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRequiredexample
}
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: RequiredExample: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: RequiredExample: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field TheRequiredString", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRequiredexample
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := data[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthRequiredexample
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
s := string(data[iNdEx:postIndex])
m.TheRequiredString = &s
iNdEx = postIndex
hasFields[0] |= uint64(0x00000001)
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field TheOptionalString", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRequiredexample
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := data[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthRequiredexample
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
s := string(data[iNdEx:postIndex])
m.TheOptionalString = &s
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field TheRepeatedStrings", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRequiredexample
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := data[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthRequiredexample
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.TheRepeatedStrings = append(m.TheRepeatedStrings, string(data[iNdEx:postIndex]))
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipRequiredexample(data[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthRequiredexample
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if hasFields[0]&uint64(0x00000001) == 0 {
return github_com_gogo_protobuf_proto.NewRequiredNotSetError("theRequiredString")
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *NidOptNative) Unmarshal(data []byte) error {
var hasFields [1]uint64
l := len(data)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRequiredexample
}
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: NidOptNative: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: NidOptNative: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 1 {
return fmt.Errorf("proto: wrong wireType = %d for field Field1", 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.Field1 = float64(math.Float64frombits(v))
hasFields[0] |= uint64(0x00000001)
case 2:
if wireType != 5 {
return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType)
}
var v uint32
if (iNdEx + 4) > l {
return io.ErrUnexpectedEOF
}
iNdEx += 4
v = uint32(data[iNdEx-4])
v |= uint32(data[iNdEx-3]) << 8
v |= uint32(data[iNdEx-2]) << 16
v |= uint32(data[iNdEx-1]) << 24
m.Field2 = float32(math.Float32frombits(v))
hasFields[0] |= uint64(0x00000002)
case 3:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType)
}
m.Field3 = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRequiredexample
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := data[iNdEx]
iNdEx++
m.Field3 |= (int32(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
hasFields[0] |= uint64(0x00000004)
case 4:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType)
}
m.Field4 = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRequiredexample
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := data[iNdEx]
iNdEx++
m.Field4 |= (int64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
hasFields[0] |= uint64(0x00000008)
case 5:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType)
}
m.Field5 = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRequiredexample
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := data[iNdEx]
iNdEx++
m.Field5 |= (uint32(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
hasFields[0] |= uint64(0x00000010)
case 6:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType)
}
m.Field6 = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRequiredexample
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := data[iNdEx]
iNdEx++
m.Field6 |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
hasFields[0] |= uint64(0x00000020)
case 7:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType)
}
var v int32
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRequiredexample
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := data[iNdEx]
iNdEx++
v |= (int32(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31))
m.Field7 = v
hasFields[0] |= uint64(0x00000040)
case 8:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType)
}
var v uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRequiredexample
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := data[iNdEx]
iNdEx++
v |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63)
m.Field8 = int64(v)
hasFields[0] |= uint64(0x00000080)
case 9:
if wireType != 5 {
return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType)
}
m.Field9 = 0
if (iNdEx + 4) > l {
return io.ErrUnexpectedEOF
}
iNdEx += 4
m.Field9 = uint32(data[iNdEx-4])
m.Field9 |= uint32(data[iNdEx-3]) << 8
m.Field9 |= uint32(data[iNdEx-2]) << 16
m.Field9 |= uint32(data[iNdEx-1]) << 24
hasFields[0] |= uint64(0x00000100)
case 10:
if wireType != 5 {
return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType)
}
m.Field10 = 0
if (iNdEx + 4) > l {
return io.ErrUnexpectedEOF
}
iNdEx += 4
m.Field10 = int32(data[iNdEx-4])
m.Field10 |= int32(data[iNdEx-3]) << 8
m.Field10 |= int32(data[iNdEx-2]) << 16
m.Field10 |= int32(data[iNdEx-1]) << 24
hasFields[0] |= uint64(0x00000200)
case 11:
if wireType != 1 {
return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType)
}
m.Field11 = 0
if (iNdEx + 8) > l {
return io.ErrUnexpectedEOF
}
iNdEx += 8
m.Field11 = uint64(data[iNdEx-8])
m.Field11 |= uint64(data[iNdEx-7]) << 8
m.Field11 |= uint64(data[iNdEx-6]) << 16
m.Field11 |= uint64(data[iNdEx-5]) << 24
m.Field11 |= uint64(data[iNdEx-4]) << 32
m.Field11 |= uint64(data[iNdEx-3]) << 40
m.Field11 |= uint64(data[iNdEx-2]) << 48
m.Field11 |= uint64(data[iNdEx-1]) << 56
hasFields[0] |= uint64(0x00000400)
case 12:
if wireType != 1 {
return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType)
}
m.Field12 = 0
if (iNdEx + 8) > l {
return io.ErrUnexpectedEOF
}
iNdEx += 8
m.Field12 = int64(data[iNdEx-8])
m.Field12 |= int64(data[iNdEx-7]) << 8
m.Field12 |= int64(data[iNdEx-6]) << 16
m.Field12 |= int64(data[iNdEx-5]) << 24
m.Field12 |= int64(data[iNdEx-4]) << 32
m.Field12 |= int64(data[iNdEx-3]) << 40
m.Field12 |= int64(data[iNdEx-2]) << 48
m.Field12 |= int64(data[iNdEx-1]) << 56
hasFields[0] |= uint64(0x00000800)
case 13:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType)
}
var v int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRequiredexample
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := data[iNdEx]
iNdEx++
v |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
m.Field13 = bool(v != 0)
hasFields[0] |= uint64(0x00001000)
case 14:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRequiredexample
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := data[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthRequiredexample
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Field14 = string(data[iNdEx:postIndex])
iNdEx = postIndex
hasFields[0] |= uint64(0x00002000)
case 15:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRequiredexample
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := data[iNdEx]
iNdEx++
byteLen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthRequiredexample
}
postIndex := iNdEx + byteLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Field15 = append(m.Field15[:0], data[iNdEx:postIndex]...)
if m.Field15 == nil {
m.Field15 = []byte{}
}
iNdEx = postIndex
hasFields[0] |= uint64(0x00004000)
default:
iNdEx = preIndex
skippy, err := skipRequiredexample(data[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthRequiredexample
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if hasFields[0]&uint64(0x00000001) == 0 {
return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field1")
}
if hasFields[0]&uint64(0x00000002) == 0 {
return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field2")
}
if hasFields[0]&uint64(0x00000004) == 0 {
return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field3")
}
if hasFields[0]&uint64(0x00000008) == 0 {
return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field4")
}
if hasFields[0]&uint64(0x00000010) == 0 {
return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field5")
}
if hasFields[0]&uint64(0x00000020) == 0 {
return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field6")
}
if hasFields[0]&uint64(0x00000040) == 0 {
return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field7")
}
if hasFields[0]&uint64(0x00000080) == 0 {
return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field8")
}
if hasFields[0]&uint64(0x00000100) == 0 {
return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field9")
}
if hasFields[0]&uint64(0x00000200) == 0 {
return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field10")
}
if hasFields[0]&uint64(0x00000400) == 0 {
return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field11")
}
if hasFields[0]&uint64(0x00000800) == 0 {
return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field12")
}
if hasFields[0]&uint64(0x00001000) == 0 {
return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field13")
}
if hasFields[0]&uint64(0x00002000) == 0 {
return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field14")
}
if hasFields[0]&uint64(0x00004000) == 0 {
return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field15")
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *NinOptNative) Unmarshal(data []byte) error {
var hasFields [1]uint64
l := len(data)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRequiredexample
}
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: NinOptNative: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: NinOptNative: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 1 {
return fmt.Errorf("proto: wrong wireType = %d for field Field1", 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
v2 := float64(math.Float64frombits(v))
m.Field1 = &v2
hasFields[0] |= uint64(0x00000001)
case 2:
if wireType != 5 {
return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType)
}
var v uint32
if (iNdEx + 4) > l {
return io.ErrUnexpectedEOF
}
iNdEx += 4
v = uint32(data[iNdEx-4])
v |= uint32(data[iNdEx-3]) << 8
v |= uint32(data[iNdEx-2]) << 16
v |= uint32(data[iNdEx-1]) << 24
v2 := float32(math.Float32frombits(v))
m.Field2 = &v2
hasFields[0] |= uint64(0x00000002)
case 3:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType)
}
var v int32
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRequiredexample
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := data[iNdEx]
iNdEx++
v |= (int32(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
m.Field3 = &v
hasFields[0] |= uint64(0x00000004)
case 4:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType)
}
var v int64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRequiredexample
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := data[iNdEx]
iNdEx++
v |= (int64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
m.Field4 = &v
hasFields[0] |= uint64(0x00000008)
case 5:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType)
}
var v uint32
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRequiredexample
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := data[iNdEx]
iNdEx++
v |= (uint32(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
m.Field5 = &v
hasFields[0] |= uint64(0x00000010)
case 6:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType)
}
var v uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRequiredexample
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := data[iNdEx]
iNdEx++
v |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
m.Field6 = &v
hasFields[0] |= uint64(0x00000020)
case 7:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType)
}
var v int32
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRequiredexample
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := data[iNdEx]
iNdEx++
v |= (int32(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31))
m.Field7 = &v
hasFields[0] |= uint64(0x00000040)
case 8:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType)
}
var v uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRequiredexample
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := data[iNdEx]
iNdEx++
v |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63)
v2 := int64(v)
m.Field8 = &v2
hasFields[0] |= uint64(0x00000080)
case 9:
if wireType != 5 {
return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType)
}
var v uint32
if (iNdEx + 4) > l {
return io.ErrUnexpectedEOF
}
iNdEx += 4
v = uint32(data[iNdEx-4])
v |= uint32(data[iNdEx-3]) << 8
v |= uint32(data[iNdEx-2]) << 16
v |= uint32(data[iNdEx-1]) << 24
m.Field9 = &v
hasFields[0] |= uint64(0x00000100)
case 10:
if wireType != 5 {
return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType)
}
var v int32
if (iNdEx + 4) > l {
return io.ErrUnexpectedEOF
}
iNdEx += 4
v = int32(data[iNdEx-4])
v |= int32(data[iNdEx-3]) << 8
v |= int32(data[iNdEx-2]) << 16
v |= int32(data[iNdEx-1]) << 24
m.Field10 = &v
hasFields[0] |= uint64(0x00000200)
case 11:
if wireType != 1 {
return fmt.Errorf("proto: wrong wireType = %d for field Field11", 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.Field11 = &v
hasFields[0] |= uint64(0x00000400)
case 12:
if wireType != 1 {
return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType)
}
var v int64
if (iNdEx + 8) > l {
return io.ErrUnexpectedEOF
}
iNdEx += 8
v = int64(data[iNdEx-8])
v |= int64(data[iNdEx-7]) << 8
v |= int64(data[iNdEx-6]) << 16
v |= int64(data[iNdEx-5]) << 24
v |= int64(data[iNdEx-4]) << 32
v |= int64(data[iNdEx-3]) << 40
v |= int64(data[iNdEx-2]) << 48
v |= int64(data[iNdEx-1]) << 56
m.Field12 = &v
hasFields[0] |= uint64(0x00000800)
case 13:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType)
}
var v int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRequiredexample
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := data[iNdEx]
iNdEx++
v |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
b := bool(v != 0)
m.Field13 = &b
hasFields[0] |= uint64(0x00001000)
case 14:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRequiredexample
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := data[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthRequiredexample
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
s := string(data[iNdEx:postIndex])
m.Field14 = &s
iNdEx = postIndex
hasFields[0] |= uint64(0x00002000)
case 15:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRequiredexample
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := data[iNdEx]
iNdEx++
byteLen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthRequiredexample
}
postIndex := iNdEx + byteLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Field15 = append(m.Field15[:0], data[iNdEx:postIndex]...)
if m.Field15 == nil {
m.Field15 = []byte{}
}
iNdEx = postIndex
hasFields[0] |= uint64(0x00004000)
default:
iNdEx = preIndex
skippy, err := skipRequiredexample(data[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthRequiredexample
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, data[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if hasFields[0]&uint64(0x00000001) == 0 {
return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field1")
}
if hasFields[0]&uint64(0x00000002) == 0 {
return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field2")
}
if hasFields[0]&uint64(0x00000004) == 0 {
return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field3")
}
if hasFields[0]&uint64(0x00000008) == 0 {
return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field4")
}
if hasFields[0]&uint64(0x00000010) == 0 {
return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field5")
}
if hasFields[0]&uint64(0x00000020) == 0 {
return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field6")
}
if hasFields[0]&uint64(0x00000040) == 0 {
return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field7")
}
if hasFields[0]&uint64(0x00000080) == 0 {
return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field8")
}
if hasFields[0]&uint64(0x00000100) == 0 {
return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field9")
}
if hasFields[0]&uint64(0x00000200) == 0 {
return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field10")
}
if hasFields[0]&uint64(0x00000400) == 0 {
return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field11")
}
if hasFields[0]&uint64(0x00000800) == 0 {
return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field12")
}
if hasFields[0]&uint64(0x00001000) == 0 {
return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field13")
}
if hasFields[0]&uint64(0x00002000) == 0 {
return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field14")
}
if hasFields[0]&uint64(0x00004000) == 0 {
return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field15")
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *NestedNinOptNative) 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 ErrIntOverflowRequiredexample
}
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: NestedNinOptNative: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: NestedNinOptNative: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field NestedNinOpts", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowRequiredexample
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := data[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthRequiredexample
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.NestedNinOpts = append(m.NestedNinOpts, &NinOptNative{})
if err := m.NestedNinOpts[len(m.NestedNinOpts)-1].Unmarshal(data[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipRequiredexample(data[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthRequiredexample
}
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 skipRequiredexample(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, ErrIntOverflowRequiredexample
}
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, ErrIntOverflowRequiredexample
}
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, ErrIntOverflowRequiredexample
}
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, ErrInvalidLengthRequiredexample
}
return iNdEx, nil
case 3:
for {
var innerWire uint64
var start int = iNdEx
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowRequiredexample
}
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 := skipRequiredexample(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 (
ErrInvalidLengthRequiredexample = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowRequiredexample = fmt.Errorf("proto: integer overflow")
)
var fileDescriptorRequiredexample = []byte{
// 467 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x6c, 0xd4, 0x4d, 0x6e, 0xd3, 0x40,
0x14, 0xc0, 0x71, 0x6c, 0xa7, 0x49, 0x3a, 0x4d, 0x48, 0x3b, 0x12, 0xa3, 0x27, 0x84, 0x42, 0x94,
0x55, 0x16, 0xe0, 0x36, 0x4e, 0xd2, 0x0f, 0x89, 0x55, 0x25, 0x58, 0x06, 0xc9, 0x9c, 0x20, 0x25,
0x53, 0xd7, 0x52, 0x6a, 0x1b, 0xc7, 0x41, 0xac, 0xb9, 0x07, 0xf7, 0xe9, 0x92, 0x03, 0x20, 0x04,
0x9c, 0x82, 0x25, 0x8f, 0xb1, 0xfd, 0x26, 0xcf, 0xb0, 0xb0, 0x14, 0xcf, 0xef, 0x79, 0x62, 0xf9,
0x9f, 0x58, 0x3c, 0xc9, 0xf5, 0x87, 0x5d, 0x9c, 0xeb, 0xb5, 0xfe, 0xb4, 0xba, 0xcf, 0x36, 0xda,
0xcf, 0xf2, 0xb4, 0x48, 0x65, 0xb7, 0x5e, 0x7e, 0xfa, 0x32, 0x8a, 0x8b, 0xbb, 0xdd, 0x8d, 0xff,
0x3e, 0xbd, 0x3f, 0x8d, 0xd2, 0x28, 0x3d, 0x35, 0x03, 0x37, 0xbb, 0x5b, 0x73, 0x66, 0x4e, 0xcc,
0xa7, 0xf2, 0xc2, 0xf1, 0x17, 0x47, 0x0c, 0xc2, 0xea, 0xda, 0xd7, 0xe5, 0x96, 0xf2, 0x85, 0x38,
0x29, 0xee, 0x74, 0xbd, 0xfa, 0xae, 0xc8, 0xe3, 0x24, 0x02, 0x67, 0xe4, 0x4e, 0x0e, 0xc3, 0x7f,
0xa1, 0x9a, 0x7e, 0x9b, 0x15, 0x71, 0x9a, 0xac, 0x36, 0xd5, 0xb4, 0x3b, 0x72, 0xaa, 0x69, 0x0e,
0xd2, 0x17, 0xd2, 0x6c, 0x91, 0xe9, 0x55, 0x51, 0x6f, 0xb1, 0x05, 0x6f, 0xe4, 0xe1, 0xf8, 0x7f,
0x64, 0xfc, 0xcd, 0x13, 0xbd, 0x65, 0xbc, 0xc6, 0x5d, 0x96, 0xab, 0x22, 0xfe, 0xa8, 0xe5, 0x33,
0xd1, 0x7e, 0x13, 0xeb, 0xcd, 0x7a, 0x6a, 0xee, 0xc8, 0xb9, 0x6e, 0x3d, 0x7c, 0x7f, 0xfe, 0x28,
0x6c, 0xdf, 0x9a, 0x35, 0xd2, 0x00, 0xef, 0xc0, 0x9d, 0xb8, 0x4c, 0x03, 0xd2, 0x19, 0x7e, 0xa1,
0x3b, 0x39, 0x60, 0x3a, 0x23, 0x9d, 0x43, 0x0b, 0xd5, 0x63, 0x3a, 0x27, 0x5d, 0xc0, 0x01, 0x6a,
0x9f, 0xe9, 0x82, 0xf4, 0x1c, 0xda, 0xa8, 0x2d, 0xa6, 0xe7, 0xa4, 0x17, 0xd0, 0x41, 0x3d, 0x61,
0x7a, 0x41, 0x7a, 0x09, 0x5d, 0x54, 0xc9, 0xf4, 0x92, 0xf4, 0x0a, 0x0e, 0x51, 0x3b, 0x4c, 0xaf,
0xe4, 0x50, 0x74, 0xca, 0xa7, 0x71, 0x06, 0x02, 0x79, 0x50, 0x71, 0xa7, 0x7c, 0x1c, 0x67, 0xd6,
0xa7, 0x70, 0x84, 0xde, 0xe6, 0x3e, 0xb5, 0x1e, 0x40, 0x0f, 0xfd, 0x98, 0x7b, 0x60, 0x7d, 0x06,
0x7d, 0xf4, 0x2e, 0xf7, 0x99, 0xf5, 0x39, 0x3c, 0xfe, 0xfb, 0x03, 0xe1, 0x3e, 0xb7, 0xbe, 0x80,
0x01, 0x7a, 0x8f, 0xfb, 0x62, 0xfc, 0xd9, 0xe4, 0x4d, 0x6c, 0x5e, 0xc5, 0xf3, 0x52, 0x58, 0xc5,
0xc3, 0x52, 0x52, 0xc5, 0x93, 0x52, 0x4c, 0xc5, 0x63, 0x52, 0x46, 0xc5, 0x33, 0x52, 0x40, 0xc5,
0x03, 0x52, 0x3a, 0xc5, 0xd3, 0x51, 0x34, 0xc5, 0xa3, 0x51, 0x2e, 0xc5, 0x73, 0x51, 0x28, 0x68,
0x84, 0xb2, 0x89, 0xa0, 0x91, 0xc8, 0xc6, 0x81, 0x46, 0x1c, 0x9b, 0x05, 0x1a, 0x59, 0x6c, 0x10,
0x68, 0x04, 0xb1, 0x29, 0xa0, 0x91, 0xc2, 0x46, 0x08, 0x85, 0x5c, 0xea, 0x2d, 0xfe, 0xe9, 0x58,
0x89, 0x57, 0xa2, 0xbf, 0xbf, 0xba, 0xc5, 0x20, 0xde, 0xe4, 0x28, 0x50, 0x7e, 0xfd, 0xaa, 0xf1,
0xf7, 0xc7, 0xc3, 0x7e, 0xb2, 0x3f, 0x7c, 0x7d, 0xfc, 0xfb, 0xe7, 0xd0, 0x79, 0xf8, 0x35, 0x74,
0xbe, 0xe2, 0xf1, 0x03, 0x8f, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x53, 0xd6, 0x6e, 0xf7, 0xba,
0x04, 0x00, 0x00,
}