blob: 5f406e04143594da149f2fb9926db7749d6e7b19 [file] [log] [blame]
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: google/protobuf/type.proto
package types
import proto "github.com/gogo/protobuf/proto"
import fmt "fmt"
import math "math"
import bytes "bytes"
import strconv "strconv"
import strings "strings"
import reflect "reflect"
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
// The syntax in which a protocol buffer element is defined.
type Syntax int32
const (
// Syntax `proto2`.
SYNTAX_PROTO2 Syntax = 0
// Syntax `proto3`.
SYNTAX_PROTO3 Syntax = 1
)
var Syntax_name = map[int32]string{
0: "SYNTAX_PROTO2",
1: "SYNTAX_PROTO3",
}
var Syntax_value = map[string]int32{
"SYNTAX_PROTO2": 0,
"SYNTAX_PROTO3": 1,
}
func (Syntax) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_type_345e3aff58b7b252, []int{0}
}
// Basic field types.
type Field_Kind int32
const (
// Field type unknown.
TYPE_UNKNOWN Field_Kind = 0
// Field type double.
TYPE_DOUBLE Field_Kind = 1
// Field type float.
TYPE_FLOAT Field_Kind = 2
// Field type int64.
TYPE_INT64 Field_Kind = 3
// Field type uint64.
TYPE_UINT64 Field_Kind = 4
// Field type int32.
TYPE_INT32 Field_Kind = 5
// Field type fixed64.
TYPE_FIXED64 Field_Kind = 6
// Field type fixed32.
TYPE_FIXED32 Field_Kind = 7
// Field type bool.
TYPE_BOOL Field_Kind = 8
// Field type string.
TYPE_STRING Field_Kind = 9
// Field type group. Proto2 syntax only, and deprecated.
TYPE_GROUP Field_Kind = 10
// Field type message.
TYPE_MESSAGE Field_Kind = 11
// Field type bytes.
TYPE_BYTES Field_Kind = 12
// Field type uint32.
TYPE_UINT32 Field_Kind = 13
// Field type enum.
TYPE_ENUM Field_Kind = 14
// Field type sfixed32.
TYPE_SFIXED32 Field_Kind = 15
// Field type sfixed64.
TYPE_SFIXED64 Field_Kind = 16
// Field type sint32.
TYPE_SINT32 Field_Kind = 17
// Field type sint64.
TYPE_SINT64 Field_Kind = 18
)
var Field_Kind_name = map[int32]string{
0: "TYPE_UNKNOWN",
1: "TYPE_DOUBLE",
2: "TYPE_FLOAT",
3: "TYPE_INT64",
4: "TYPE_UINT64",
5: "TYPE_INT32",
6: "TYPE_FIXED64",
7: "TYPE_FIXED32",
8: "TYPE_BOOL",
9: "TYPE_STRING",
10: "TYPE_GROUP",
11: "TYPE_MESSAGE",
12: "TYPE_BYTES",
13: "TYPE_UINT32",
14: "TYPE_ENUM",
15: "TYPE_SFIXED32",
16: "TYPE_SFIXED64",
17: "TYPE_SINT32",
18: "TYPE_SINT64",
}
var Field_Kind_value = map[string]int32{
"TYPE_UNKNOWN": 0,
"TYPE_DOUBLE": 1,
"TYPE_FLOAT": 2,
"TYPE_INT64": 3,
"TYPE_UINT64": 4,
"TYPE_INT32": 5,
"TYPE_FIXED64": 6,
"TYPE_FIXED32": 7,
"TYPE_BOOL": 8,
"TYPE_STRING": 9,
"TYPE_GROUP": 10,
"TYPE_MESSAGE": 11,
"TYPE_BYTES": 12,
"TYPE_UINT32": 13,
"TYPE_ENUM": 14,
"TYPE_SFIXED32": 15,
"TYPE_SFIXED64": 16,
"TYPE_SINT32": 17,
"TYPE_SINT64": 18,
}
func (Field_Kind) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_type_345e3aff58b7b252, []int{1, 0}
}
// Whether a field is optional, required, or repeated.
type Field_Cardinality int32
const (
// For fields with unknown cardinality.
CARDINALITY_UNKNOWN Field_Cardinality = 0
// For optional fields.
CARDINALITY_OPTIONAL Field_Cardinality = 1
// For required fields. Proto2 syntax only.
CARDINALITY_REQUIRED Field_Cardinality = 2
// For repeated fields.
CARDINALITY_REPEATED Field_Cardinality = 3
)
var Field_Cardinality_name = map[int32]string{
0: "CARDINALITY_UNKNOWN",
1: "CARDINALITY_OPTIONAL",
2: "CARDINALITY_REQUIRED",
3: "CARDINALITY_REPEATED",
}
var Field_Cardinality_value = map[string]int32{
"CARDINALITY_UNKNOWN": 0,
"CARDINALITY_OPTIONAL": 1,
"CARDINALITY_REQUIRED": 2,
"CARDINALITY_REPEATED": 3,
}
func (Field_Cardinality) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_type_345e3aff58b7b252, []int{1, 1}
}
// A protocol buffer message type.
type Type struct {
// The fully qualified message name.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// The list of fields.
Fields []*Field `protobuf:"bytes,2,rep,name=fields" json:"fields,omitempty"`
// The list of types appearing in `oneof` definitions in this type.
Oneofs []string `protobuf:"bytes,3,rep,name=oneofs" json:"oneofs,omitempty"`
// The protocol buffer options.
Options []*Option `protobuf:"bytes,4,rep,name=options" json:"options,omitempty"`
// The source context.
SourceContext *SourceContext `protobuf:"bytes,5,opt,name=source_context,json=sourceContext" json:"source_context,omitempty"`
// The source syntax.
Syntax Syntax `protobuf:"varint,6,opt,name=syntax,proto3,enum=google.protobuf.Syntax" json:"syntax,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Type) Reset() { *m = Type{} }
func (*Type) ProtoMessage() {}
func (*Type) Descriptor() ([]byte, []int) {
return fileDescriptor_type_345e3aff58b7b252, []int{0}
}
func (m *Type) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Type) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Type.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalTo(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (dst *Type) XXX_Merge(src proto.Message) {
xxx_messageInfo_Type.Merge(dst, src)
}
func (m *Type) XXX_Size() int {
return m.Size()
}
func (m *Type) XXX_DiscardUnknown() {
xxx_messageInfo_Type.DiscardUnknown(m)
}
var xxx_messageInfo_Type proto.InternalMessageInfo
func (m *Type) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *Type) GetFields() []*Field {
if m != nil {
return m.Fields
}
return nil
}
func (m *Type) GetOneofs() []string {
if m != nil {
return m.Oneofs
}
return nil
}
func (m *Type) GetOptions() []*Option {
if m != nil {
return m.Options
}
return nil
}
func (m *Type) GetSourceContext() *SourceContext {
if m != nil {
return m.SourceContext
}
return nil
}
func (m *Type) GetSyntax() Syntax {
if m != nil {
return m.Syntax
}
return SYNTAX_PROTO2
}
func (*Type) XXX_MessageName() string {
return "google.protobuf.Type"
}
// A single field of a message type.
type Field struct {
// The field type.
Kind Field_Kind `protobuf:"varint,1,opt,name=kind,proto3,enum=google.protobuf.Field_Kind" json:"kind,omitempty"`
// The field cardinality.
Cardinality Field_Cardinality `protobuf:"varint,2,opt,name=cardinality,proto3,enum=google.protobuf.Field_Cardinality" json:"cardinality,omitempty"`
// The field number.
Number int32 `protobuf:"varint,3,opt,name=number,proto3" json:"number,omitempty"`
// The field name.
Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"`
// The field type URL, without the scheme, for message or enumeration
// types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.
TypeUrl string `protobuf:"bytes,6,opt,name=type_url,json=typeUrl,proto3" json:"type_url,omitempty"`
// The index of the field type in `Type.oneofs`, for message or enumeration
// types. The first type has index 1; zero means the type is not in the list.
OneofIndex int32 `protobuf:"varint,7,opt,name=oneof_index,json=oneofIndex,proto3" json:"oneof_index,omitempty"`
// Whether to use alternative packed wire representation.
Packed bool `protobuf:"varint,8,opt,name=packed,proto3" json:"packed,omitempty"`
// The protocol buffer options.
Options []*Option `protobuf:"bytes,9,rep,name=options" json:"options,omitempty"`
// The field JSON name.
JsonName string `protobuf:"bytes,10,opt,name=json_name,json=jsonName,proto3" json:"json_name,omitempty"`
// The string value of the default value of this field. Proto2 syntax only.
DefaultValue string `protobuf:"bytes,11,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Field) Reset() { *m = Field{} }
func (*Field) ProtoMessage() {}
func (*Field) Descriptor() ([]byte, []int) {
return fileDescriptor_type_345e3aff58b7b252, []int{1}
}
func (m *Field) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Field) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Field.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalTo(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (dst *Field) XXX_Merge(src proto.Message) {
xxx_messageInfo_Field.Merge(dst, src)
}
func (m *Field) XXX_Size() int {
return m.Size()
}
func (m *Field) XXX_DiscardUnknown() {
xxx_messageInfo_Field.DiscardUnknown(m)
}
var xxx_messageInfo_Field proto.InternalMessageInfo
func (m *Field) GetKind() Field_Kind {
if m != nil {
return m.Kind
}
return TYPE_UNKNOWN
}
func (m *Field) GetCardinality() Field_Cardinality {
if m != nil {
return m.Cardinality
}
return CARDINALITY_UNKNOWN
}
func (m *Field) GetNumber() int32 {
if m != nil {
return m.Number
}
return 0
}
func (m *Field) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *Field) GetTypeUrl() string {
if m != nil {
return m.TypeUrl
}
return ""
}
func (m *Field) GetOneofIndex() int32 {
if m != nil {
return m.OneofIndex
}
return 0
}
func (m *Field) GetPacked() bool {
if m != nil {
return m.Packed
}
return false
}
func (m *Field) GetOptions() []*Option {
if m != nil {
return m.Options
}
return nil
}
func (m *Field) GetJsonName() string {
if m != nil {
return m.JsonName
}
return ""
}
func (m *Field) GetDefaultValue() string {
if m != nil {
return m.DefaultValue
}
return ""
}
func (*Field) XXX_MessageName() string {
return "google.protobuf.Field"
}
// Enum type definition.
type Enum struct {
// Enum type name.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Enum value definitions.
Enumvalue []*EnumValue `protobuf:"bytes,2,rep,name=enumvalue" json:"enumvalue,omitempty"`
// Protocol buffer options.
Options []*Option `protobuf:"bytes,3,rep,name=options" json:"options,omitempty"`
// The source context.
SourceContext *SourceContext `protobuf:"bytes,4,opt,name=source_context,json=sourceContext" json:"source_context,omitempty"`
// The source syntax.
Syntax Syntax `protobuf:"varint,5,opt,name=syntax,proto3,enum=google.protobuf.Syntax" json:"syntax,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Enum) Reset() { *m = Enum{} }
func (*Enum) ProtoMessage() {}
func (*Enum) Descriptor() ([]byte, []int) {
return fileDescriptor_type_345e3aff58b7b252, []int{2}
}
func (m *Enum) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Enum) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Enum.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalTo(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (dst *Enum) XXX_Merge(src proto.Message) {
xxx_messageInfo_Enum.Merge(dst, src)
}
func (m *Enum) XXX_Size() int {
return m.Size()
}
func (m *Enum) XXX_DiscardUnknown() {
xxx_messageInfo_Enum.DiscardUnknown(m)
}
var xxx_messageInfo_Enum proto.InternalMessageInfo
func (m *Enum) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *Enum) GetEnumvalue() []*EnumValue {
if m != nil {
return m.Enumvalue
}
return nil
}
func (m *Enum) GetOptions() []*Option {
if m != nil {
return m.Options
}
return nil
}
func (m *Enum) GetSourceContext() *SourceContext {
if m != nil {
return m.SourceContext
}
return nil
}
func (m *Enum) GetSyntax() Syntax {
if m != nil {
return m.Syntax
}
return SYNTAX_PROTO2
}
func (*Enum) XXX_MessageName() string {
return "google.protobuf.Enum"
}
// Enum value definition.
type EnumValue struct {
// Enum value name.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Enum value number.
Number int32 `protobuf:"varint,2,opt,name=number,proto3" json:"number,omitempty"`
// Protocol buffer options.
Options []*Option `protobuf:"bytes,3,rep,name=options" json:"options,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *EnumValue) Reset() { *m = EnumValue{} }
func (*EnumValue) ProtoMessage() {}
func (*EnumValue) Descriptor() ([]byte, []int) {
return fileDescriptor_type_345e3aff58b7b252, []int{3}
}
func (m *EnumValue) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *EnumValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_EnumValue.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalTo(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (dst *EnumValue) XXX_Merge(src proto.Message) {
xxx_messageInfo_EnumValue.Merge(dst, src)
}
func (m *EnumValue) XXX_Size() int {
return m.Size()
}
func (m *EnumValue) XXX_DiscardUnknown() {
xxx_messageInfo_EnumValue.DiscardUnknown(m)
}
var xxx_messageInfo_EnumValue proto.InternalMessageInfo
func (m *EnumValue) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *EnumValue) GetNumber() int32 {
if m != nil {
return m.Number
}
return 0
}
func (m *EnumValue) GetOptions() []*Option {
if m != nil {
return m.Options
}
return nil
}
func (*EnumValue) XXX_MessageName() string {
return "google.protobuf.EnumValue"
}
// A protocol buffer option, which can be attached to a message, field,
// enumeration, etc.
type Option struct {
// The option's name. For protobuf built-in options (options defined in
// descriptor.proto), this is the short name. For example, `"map_entry"`.
// For custom options, it should be the fully-qualified name. For example,
// `"google.api.http"`.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// The option's value packed in an Any message. If the value is a primitive,
// the corresponding wrapper type defined in google/protobuf/wrappers.proto
// should be used. If the value is an enum, it should be stored as an int32
// value using the google.protobuf.Int32Value type.
Value *Any `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Option) Reset() { *m = Option{} }
func (*Option) ProtoMessage() {}
func (*Option) Descriptor() ([]byte, []int) {
return fileDescriptor_type_345e3aff58b7b252, []int{4}
}
func (m *Option) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Option) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Option.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalTo(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (dst *Option) XXX_Merge(src proto.Message) {
xxx_messageInfo_Option.Merge(dst, src)
}
func (m *Option) XXX_Size() int {
return m.Size()
}
func (m *Option) XXX_DiscardUnknown() {
xxx_messageInfo_Option.DiscardUnknown(m)
}
var xxx_messageInfo_Option proto.InternalMessageInfo
func (m *Option) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *Option) GetValue() *Any {
if m != nil {
return m.Value
}
return nil
}
func (*Option) XXX_MessageName() string {
return "google.protobuf.Option"
}
func init() {
proto.RegisterType((*Type)(nil), "google.protobuf.Type")
proto.RegisterType((*Field)(nil), "google.protobuf.Field")
proto.RegisterType((*Enum)(nil), "google.protobuf.Enum")
proto.RegisterType((*EnumValue)(nil), "google.protobuf.EnumValue")
proto.RegisterType((*Option)(nil), "google.protobuf.Option")
proto.RegisterEnum("google.protobuf.Syntax", Syntax_name, Syntax_value)
proto.RegisterEnum("google.protobuf.Field_Kind", Field_Kind_name, Field_Kind_value)
proto.RegisterEnum("google.protobuf.Field_Cardinality", Field_Cardinality_name, Field_Cardinality_value)
}
func (this *Type) Compare(that interface{}) int {
if that == nil {
if this == nil {
return 0
}
return 1
}
that1, ok := that.(*Type)
if !ok {
that2, ok := that.(Type)
if ok {
that1 = &that2
} else {
return 1
}
}
if that1 == nil {
if this == nil {
return 0
}
return 1
} else if this == nil {
return -1
}
if this.Name != that1.Name {
if this.Name < that1.Name {
return -1
}
return 1
}
if len(this.Fields) != len(that1.Fields) {
if len(this.Fields) < len(that1.Fields) {
return -1
}
return 1
}
for i := range this.Fields {
if c := this.Fields[i].Compare(that1.Fields[i]); c != 0 {
return c
}
}
if len(this.Oneofs) != len(that1.Oneofs) {
if len(this.Oneofs) < len(that1.Oneofs) {
return -1
}
return 1
}
for i := range this.Oneofs {
if this.Oneofs[i] != that1.Oneofs[i] {
if this.Oneofs[i] < that1.Oneofs[i] {
return -1
}
return 1
}
}
if len(this.Options) != len(that1.Options) {
if len(this.Options) < len(that1.Options) {
return -1
}
return 1
}
for i := range this.Options {
if c := this.Options[i].Compare(that1.Options[i]); c != 0 {
return c
}
}
if c := this.SourceContext.Compare(that1.SourceContext); c != 0 {
return c
}
if this.Syntax != that1.Syntax {
if this.Syntax < that1.Syntax {
return -1
}
return 1
}
if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 {
return c
}
return 0
}
func (this *Field) Compare(that interface{}) int {
if that == nil {
if this == nil {
return 0
}
return 1
}
that1, ok := that.(*Field)
if !ok {
that2, ok := that.(Field)
if ok {
that1 = &that2
} else {
return 1
}
}
if that1 == nil {
if this == nil {
return 0
}
return 1
} else if this == nil {
return -1
}
if this.Kind != that1.Kind {
if this.Kind < that1.Kind {
return -1
}
return 1
}
if this.Cardinality != that1.Cardinality {
if this.Cardinality < that1.Cardinality {
return -1
}
return 1
}
if this.Number != that1.Number {
if this.Number < that1.Number {
return -1
}
return 1
}
if this.Name != that1.Name {
if this.Name < that1.Name {
return -1
}
return 1
}
if this.TypeUrl != that1.TypeUrl {
if this.TypeUrl < that1.TypeUrl {
return -1
}
return 1
}
if this.OneofIndex != that1.OneofIndex {
if this.OneofIndex < that1.OneofIndex {
return -1
}
return 1
}
if this.Packed != that1.Packed {
if !this.Packed {
return -1
}
return 1
}
if len(this.Options) != len(that1.Options) {
if len(this.Options) < len(that1.Options) {
return -1
}
return 1
}
for i := range this.Options {
if c := this.Options[i].Compare(that1.Options[i]); c != 0 {
return c
}
}
if this.JsonName != that1.JsonName {
if this.JsonName < that1.JsonName {
return -1
}
return 1
}
if this.DefaultValue != that1.DefaultValue {
if this.DefaultValue < that1.DefaultValue {
return -1
}
return 1
}
if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 {
return c
}
return 0
}
func (this *Enum) Compare(that interface{}) int {
if that == nil {
if this == nil {
return 0
}
return 1
}
that1, ok := that.(*Enum)
if !ok {
that2, ok := that.(Enum)
if ok {
that1 = &that2
} else {
return 1
}
}
if that1 == nil {
if this == nil {
return 0
}
return 1
} else if this == nil {
return -1
}
if this.Name != that1.Name {
if this.Name < that1.Name {
return -1
}
return 1
}
if len(this.Enumvalue) != len(that1.Enumvalue) {
if len(this.Enumvalue) < len(that1.Enumvalue) {
return -1
}
return 1
}
for i := range this.Enumvalue {
if c := this.Enumvalue[i].Compare(that1.Enumvalue[i]); c != 0 {
return c
}
}
if len(this.Options) != len(that1.Options) {
if len(this.Options) < len(that1.Options) {
return -1
}
return 1
}
for i := range this.Options {
if c := this.Options[i].Compare(that1.Options[i]); c != 0 {
return c
}
}
if c := this.SourceContext.Compare(that1.SourceContext); c != 0 {
return c
}
if this.Syntax != that1.Syntax {
if this.Syntax < that1.Syntax {
return -1
}
return 1
}
if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 {
return c
}
return 0
}
func (this *EnumValue) Compare(that interface{}) int {
if that == nil {
if this == nil {
return 0
}
return 1
}
that1, ok := that.(*EnumValue)
if !ok {
that2, ok := that.(EnumValue)
if ok {
that1 = &that2
} else {
return 1
}
}
if that1 == nil {
if this == nil {
return 0
}
return 1
} else if this == nil {
return -1
}
if this.Name != that1.Name {
if this.Name < that1.Name {
return -1
}
return 1
}
if this.Number != that1.Number {
if this.Number < that1.Number {
return -1
}
return 1
}
if len(this.Options) != len(that1.Options) {
if len(this.Options) < len(that1.Options) {
return -1
}
return 1
}
for i := range this.Options {
if c := this.Options[i].Compare(that1.Options[i]); c != 0 {
return c
}
}
if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 {
return c
}
return 0
}
func (this *Option) Compare(that interface{}) int {
if that == nil {
if this == nil {
return 0
}
return 1
}
that1, ok := that.(*Option)
if !ok {
that2, ok := that.(Option)
if ok {
that1 = &that2
} else {
return 1
}
}
if that1 == nil {
if this == nil {
return 0
}
return 1
} else if this == nil {
return -1
}
if this.Name != that1.Name {
if this.Name < that1.Name {
return -1
}
return 1
}
if c := this.Value.Compare(that1.Value); c != 0 {
return c
}
if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 {
return c
}
return 0
}
func (x Syntax) String() string {
s, ok := Syntax_name[int32(x)]
if ok {
return s
}
return strconv.Itoa(int(x))
}
func (x Field_Kind) String() string {
s, ok := Field_Kind_name[int32(x)]
if ok {
return s
}
return strconv.Itoa(int(x))
}
func (x Field_Cardinality) String() string {
s, ok := Field_Cardinality_name[int32(x)]
if ok {
return s
}
return strconv.Itoa(int(x))
}
func (this *Type) Equal(that interface{}) bool {
if that == nil {
return this == nil
}
that1, ok := that.(*Type)
if !ok {
that2, ok := that.(Type)
if ok {
that1 = &that2
} else {
return false
}
}
if that1 == nil {
return this == nil
} else if this == nil {
return false
}
if this.Name != that1.Name {
return false
}
if len(this.Fields) != len(that1.Fields) {
return false
}
for i := range this.Fields {
if !this.Fields[i].Equal(that1.Fields[i]) {
return false
}
}
if len(this.Oneofs) != len(that1.Oneofs) {
return false
}
for i := range this.Oneofs {
if this.Oneofs[i] != that1.Oneofs[i] {
return false
}
}
if len(this.Options) != len(that1.Options) {
return false
}
for i := range this.Options {
if !this.Options[i].Equal(that1.Options[i]) {
return false
}
}
if !this.SourceContext.Equal(that1.SourceContext) {
return false
}
if this.Syntax != that1.Syntax {
return false
}
if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
return false
}
return true
}
func (this *Field) Equal(that interface{}) bool {
if that == nil {
return this == nil
}
that1, ok := that.(*Field)
if !ok {
that2, ok := that.(Field)
if ok {
that1 = &that2
} else {
return false
}
}
if that1 == nil {
return this == nil
} else if this == nil {
return false
}
if this.Kind != that1.Kind {
return false
}
if this.Cardinality != that1.Cardinality {
return false
}
if this.Number != that1.Number {
return false
}
if this.Name != that1.Name {
return false
}
if this.TypeUrl != that1.TypeUrl {
return false
}
if this.OneofIndex != that1.OneofIndex {
return false
}
if this.Packed != that1.Packed {
return false
}
if len(this.Options) != len(that1.Options) {
return false
}
for i := range this.Options {
if !this.Options[i].Equal(that1.Options[i]) {
return false
}
}
if this.JsonName != that1.JsonName {
return false
}
if this.DefaultValue != that1.DefaultValue {
return false
}
if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
return false
}
return true
}
func (this *Enum) Equal(that interface{}) bool {
if that == nil {
return this == nil
}
that1, ok := that.(*Enum)
if !ok {
that2, ok := that.(Enum)
if ok {
that1 = &that2
} else {
return false
}
}
if that1 == nil {
return this == nil
} else if this == nil {
return false
}
if this.Name != that1.Name {
return false
}
if len(this.Enumvalue) != len(that1.Enumvalue) {
return false
}
for i := range this.Enumvalue {
if !this.Enumvalue[i].Equal(that1.Enumvalue[i]) {
return false
}
}
if len(this.Options) != len(that1.Options) {
return false
}
for i := range this.Options {
if !this.Options[i].Equal(that1.Options[i]) {
return false
}
}
if !this.SourceContext.Equal(that1.SourceContext) {
return false
}
if this.Syntax != that1.Syntax {
return false
}
if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
return false
}
return true
}
func (this *EnumValue) Equal(that interface{}) bool {
if that == nil {
return this == nil
}
that1, ok := that.(*EnumValue)
if !ok {
that2, ok := that.(EnumValue)
if ok {
that1 = &that2
} else {
return false
}
}
if that1 == nil {
return this == nil
} else if this == nil {
return false
}
if this.Name != that1.Name {
return false
}
if this.Number != that1.Number {
return false
}
if len(this.Options) != len(that1.Options) {
return false
}
for i := range this.Options {
if !this.Options[i].Equal(that1.Options[i]) {
return false
}
}
if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
return false
}
return true
}
func (this *Option) Equal(that interface{}) bool {
if that == nil {
return this == nil
}
that1, ok := that.(*Option)
if !ok {
that2, ok := that.(Option)
if ok {
that1 = &that2
} else {
return false
}
}
if that1 == nil {
return this == nil
} else if this == nil {
return false
}
if this.Name != that1.Name {
return false
}
if !this.Value.Equal(that1.Value) {
return false
}
if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
return false
}
return true
}
func (this *Type) GoString() string {
if this == nil {
return "nil"
}
s := make([]string, 0, 10)
s = append(s, "&types.Type{")
s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n")
if this.Fields != nil {
s = append(s, "Fields: "+fmt.Sprintf("%#v", this.Fields)+",\n")
}
s = append(s, "Oneofs: "+fmt.Sprintf("%#v", this.Oneofs)+",\n")
if this.Options != nil {
s = append(s, "Options: "+fmt.Sprintf("%#v", this.Options)+",\n")
}
if this.SourceContext != nil {
s = append(s, "SourceContext: "+fmt.Sprintf("%#v", this.SourceContext)+",\n")
}
s = append(s, "Syntax: "+fmt.Sprintf("%#v", this.Syntax)+",\n")
if this.XXX_unrecognized != nil {
s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n")
}
s = append(s, "}")
return strings.Join(s, "")
}
func (this *Field) GoString() string {
if this == nil {
return "nil"
}
s := make([]string, 0, 14)
s = append(s, "&types.Field{")
s = append(s, "Kind: "+fmt.Sprintf("%#v", this.Kind)+",\n")
s = append(s, "Cardinality: "+fmt.Sprintf("%#v", this.Cardinality)+",\n")
s = append(s, "Number: "+fmt.Sprintf("%#v", this.Number)+",\n")
s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n")
s = append(s, "TypeUrl: "+fmt.Sprintf("%#v", this.TypeUrl)+",\n")
s = append(s, "OneofIndex: "+fmt.Sprintf("%#v", this.OneofIndex)+",\n")
s = append(s, "Packed: "+fmt.Sprintf("%#v", this.Packed)+",\n")
if this.Options != nil {
s = append(s, "Options: "+fmt.Sprintf("%#v", this.Options)+",\n")
}
s = append(s, "JsonName: "+fmt.Sprintf("%#v", this.JsonName)+",\n")
s = append(s, "DefaultValue: "+fmt.Sprintf("%#v", this.DefaultValue)+",\n")
if this.XXX_unrecognized != nil {
s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n")
}
s = append(s, "}")
return strings.Join(s, "")
}
func (this *Enum) GoString() string {
if this == nil {
return "nil"
}
s := make([]string, 0, 9)
s = append(s, "&types.Enum{")
s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n")
if this.Enumvalue != nil {
s = append(s, "Enumvalue: "+fmt.Sprintf("%#v", this.Enumvalue)+",\n")
}
if this.Options != nil {
s = append(s, "Options: "+fmt.Sprintf("%#v", this.Options)+",\n")
}
if this.SourceContext != nil {
s = append(s, "SourceContext: "+fmt.Sprintf("%#v", this.SourceContext)+",\n")
}
s = append(s, "Syntax: "+fmt.Sprintf("%#v", this.Syntax)+",\n")
if this.XXX_unrecognized != nil {
s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n")
}
s = append(s, "}")
return strings.Join(s, "")
}
func (this *EnumValue) GoString() string {
if this == nil {
return "nil"
}
s := make([]string, 0, 7)
s = append(s, "&types.EnumValue{")
s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n")
s = append(s, "Number: "+fmt.Sprintf("%#v", this.Number)+",\n")
if this.Options != nil {
s = append(s, "Options: "+fmt.Sprintf("%#v", this.Options)+",\n")
}
if this.XXX_unrecognized != nil {
s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n")
}
s = append(s, "}")
return strings.Join(s, "")
}
func (this *Option) GoString() string {
if this == nil {
return "nil"
}
s := make([]string, 0, 6)
s = append(s, "&types.Option{")
s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n")
if this.Value != nil {
s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n")
}
if this.XXX_unrecognized != nil {
s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n")
}
s = append(s, "}")
return strings.Join(s, "")
}
func valueToGoStringType(v interface{}, typ string) string {
rv := reflect.ValueOf(v)
if rv.IsNil() {
return "nil"
}
pv := reflect.Indirect(rv).Interface()
return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv)
}
func (m *Type) 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 *Type) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if len(m.Name) > 0 {
dAtA[i] = 0xa
i++
i = encodeVarintType(dAtA, i, uint64(len(m.Name)))
i += copy(dAtA[i:], m.Name)
}
if len(m.Fields) > 0 {
for _, msg := range m.Fields {
dAtA[i] = 0x12
i++
i = encodeVarintType(dAtA, i, uint64(msg.Size()))
n, err := msg.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n
}
}
if len(m.Oneofs) > 0 {
for _, s := range m.Oneofs {
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 len(m.Options) > 0 {
for _, msg := range m.Options {
dAtA[i] = 0x22
i++
i = encodeVarintType(dAtA, i, uint64(msg.Size()))
n, err := msg.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n
}
}
if m.SourceContext != nil {
dAtA[i] = 0x2a
i++
i = encodeVarintType(dAtA, i, uint64(m.SourceContext.Size()))
n1, err := m.SourceContext.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n1
}
if m.Syntax != 0 {
dAtA[i] = 0x30
i++
i = encodeVarintType(dAtA, i, uint64(m.Syntax))
}
if m.XXX_unrecognized != nil {
i += copy(dAtA[i:], m.XXX_unrecognized)
}
return i, nil
}
func (m *Field) 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 *Field) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if m.Kind != 0 {
dAtA[i] = 0x8
i++
i = encodeVarintType(dAtA, i, uint64(m.Kind))
}
if m.Cardinality != 0 {
dAtA[i] = 0x10
i++
i = encodeVarintType(dAtA, i, uint64(m.Cardinality))
}
if m.Number != 0 {
dAtA[i] = 0x18
i++
i = encodeVarintType(dAtA, i, uint64(m.Number))
}
if len(m.Name) > 0 {
dAtA[i] = 0x22
i++
i = encodeVarintType(dAtA, i, uint64(len(m.Name)))
i += copy(dAtA[i:], m.Name)
}
if len(m.TypeUrl) > 0 {
dAtA[i] = 0x32
i++
i = encodeVarintType(dAtA, i, uint64(len(m.TypeUrl)))
i += copy(dAtA[i:], m.TypeUrl)
}
if m.OneofIndex != 0 {
dAtA[i] = 0x38
i++
i = encodeVarintType(dAtA, i, uint64(m.OneofIndex))
}
if m.Packed {
dAtA[i] = 0x40
i++
if m.Packed {
dAtA[i] = 1
} else {
dAtA[i] = 0
}
i++
}
if len(m.Options) > 0 {
for _, msg := range m.Options {
dAtA[i] = 0x4a
i++
i = encodeVarintType(dAtA, i, uint64(msg.Size()))
n, err := msg.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n
}
}
if len(m.JsonName) > 0 {
dAtA[i] = 0x52
i++
i = encodeVarintType(dAtA, i, uint64(len(m.JsonName)))
i += copy(dAtA[i:], m.JsonName)
}
if len(m.DefaultValue) > 0 {
dAtA[i] = 0x5a
i++
i = encodeVarintType(dAtA, i, uint64(len(m.DefaultValue)))
i += copy(dAtA[i:], m.DefaultValue)
}
if m.XXX_unrecognized != nil {
i += copy(dAtA[i:], m.XXX_unrecognized)
}
return i, nil
}
func (m *Enum) 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 *Enum) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if len(m.Name) > 0 {
dAtA[i] = 0xa
i++
i = encodeVarintType(dAtA, i, uint64(len(m.Name)))
i += copy(dAtA[i:], m.Name)
}
if len(m.Enumvalue) > 0 {
for _, msg := range m.Enumvalue {
dAtA[i] = 0x12
i++
i = encodeVarintType(dAtA, i, uint64(msg.Size()))
n, err := msg.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n
}
}
if len(m.Options) > 0 {
for _, msg := range m.Options {
dAtA[i] = 0x1a
i++
i = encodeVarintType(dAtA, i, uint64(msg.Size()))
n, err := msg.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n
}
}
if m.SourceContext != nil {
dAtA[i] = 0x22
i++
i = encodeVarintType(dAtA, i, uint64(m.SourceContext.Size()))
n2, err := m.SourceContext.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n2
}
if m.Syntax != 0 {
dAtA[i] = 0x28
i++
i = encodeVarintType(dAtA, i, uint64(m.Syntax))
}
if m.XXX_unrecognized != nil {
i += copy(dAtA[i:], m.XXX_unrecognized)
}
return i, nil
}
func (m *EnumValue) 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 *EnumValue) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if len(m.Name) > 0 {
dAtA[i] = 0xa
i++
i = encodeVarintType(dAtA, i, uint64(len(m.Name)))
i += copy(dAtA[i:], m.Name)
}
if m.Number != 0 {
dAtA[i] = 0x10
i++
i = encodeVarintType(dAtA, i, uint64(m.Number))
}
if len(m.Options) > 0 {
for _, msg := range m.Options {
dAtA[i] = 0x1a
i++
i = encodeVarintType(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 (m *Option) 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 *Option) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if len(m.Name) > 0 {
dAtA[i] = 0xa
i++
i = encodeVarintType(dAtA, i, uint64(len(m.Name)))
i += copy(dAtA[i:], m.Name)
}
if m.Value != nil {
dAtA[i] = 0x12
i++
i = encodeVarintType(dAtA, i, uint64(m.Value.Size()))
n3, err := m.Value.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n3
}
if m.XXX_unrecognized != nil {
i += copy(dAtA[i:], m.XXX_unrecognized)
}
return i, nil
}
func encodeVarintType(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 NewPopulatedType(r randyType, easy bool) *Type {
this := &Type{}
this.Name = string(randStringType(r))
if r.Intn(10) != 0 {
v1 := r.Intn(5)
this.Fields = make([]*Field, v1)
for i := 0; i < v1; i++ {
this.Fields[i] = NewPopulatedField(r, easy)
}
}
v2 := r.Intn(10)
this.Oneofs = make([]string, v2)
for i := 0; i < v2; i++ {
this.Oneofs[i] = string(randStringType(r))
}
if r.Intn(10) != 0 {
v3 := r.Intn(5)
this.Options = make([]*Option, v3)
for i := 0; i < v3; i++ {
this.Options[i] = NewPopulatedOption(r, easy)
}
}
if r.Intn(10) != 0 {
this.SourceContext = NewPopulatedSourceContext(r, easy)
}
this.Syntax = Syntax([]int32{0, 1}[r.Intn(2)])
if !easy && r.Intn(10) != 0 {
this.XXX_unrecognized = randUnrecognizedType(r, 7)
}
return this
}
func NewPopulatedField(r randyType, easy bool) *Field {
this := &Field{}
this.Kind = Field_Kind([]int32{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18}[r.Intn(19)])
this.Cardinality = Field_Cardinality([]int32{0, 1, 2, 3}[r.Intn(4)])
this.Number = int32(r.Int31())
if r.Intn(2) == 0 {
this.Number *= -1
}
this.Name = string(randStringType(r))
this.TypeUrl = string(randStringType(r))
this.OneofIndex = int32(r.Int31())
if r.Intn(2) == 0 {
this.OneofIndex *= -1
}
this.Packed = bool(bool(r.Intn(2) == 0))
if r.Intn(10) != 0 {
v4 := r.Intn(5)
this.Options = make([]*Option, v4)
for i := 0; i < v4; i++ {
this.Options[i] = NewPopulatedOption(r, easy)
}
}
this.JsonName = string(randStringType(r))
this.DefaultValue = string(randStringType(r))
if !easy && r.Intn(10) != 0 {
this.XXX_unrecognized = randUnrecognizedType(r, 12)
}
return this
}
func NewPopulatedEnum(r randyType, easy bool) *Enum {
this := &Enum{}
this.Name = string(randStringType(r))
if r.Intn(10) != 0 {
v5 := r.Intn(5)
this.Enumvalue = make([]*EnumValue, v5)
for i := 0; i < v5; i++ {
this.Enumvalue[i] = NewPopulatedEnumValue(r, easy)
}
}
if r.Intn(10) != 0 {
v6 := r.Intn(5)
this.Options = make([]*Option, v6)
for i := 0; i < v6; i++ {
this.Options[i] = NewPopulatedOption(r, easy)
}
}
if r.Intn(10) != 0 {
this.SourceContext = NewPopulatedSourceContext(r, easy)
}
this.Syntax = Syntax([]int32{0, 1}[r.Intn(2)])
if !easy && r.Intn(10) != 0 {
this.XXX_unrecognized = randUnrecognizedType(r, 6)
}
return this
}
func NewPopulatedEnumValue(r randyType, easy bool) *EnumValue {
this := &EnumValue{}
this.Name = string(randStringType(r))
this.Number = int32(r.Int31())
if r.Intn(2) == 0 {
this.Number *= -1
}
if r.Intn(10) != 0 {
v7 := r.Intn(5)
this.Options = make([]*Option, v7)
for i := 0; i < v7; i++ {
this.Options[i] = NewPopulatedOption(r, easy)
}
}
if !easy && r.Intn(10) != 0 {
this.XXX_unrecognized = randUnrecognizedType(r, 4)
}
return this
}
func NewPopulatedOption(r randyType, easy bool) *Option {
this := &Option{}
this.Name = string(randStringType(r))
if r.Intn(10) != 0 {
this.Value = NewPopulatedAny(r, easy)
}
if !easy && r.Intn(10) != 0 {
this.XXX_unrecognized = randUnrecognizedType(r, 3)
}
return this
}
type randyType interface {
Float32() float32
Float64() float64
Int63() int64
Int31() int32
Uint32() uint32
Intn(n int) int
}
func randUTF8RuneType(r randyType) 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 randStringType(r randyType) string {
v8 := r.Intn(100)
tmps := make([]rune, v8)
for i := 0; i < v8; i++ {
tmps[i] = randUTF8RuneType(r)
}
return string(tmps)
}
func randUnrecognizedType(r randyType, 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 = randFieldType(dAtA, r, fieldNumber, wire)
}
return dAtA
}
func randFieldType(dAtA []byte, r randyType, fieldNumber int, wire int) []byte {
key := uint32(fieldNumber)<<3 | uint32(wire)
switch wire {
case 0:
dAtA = encodeVarintPopulateType(dAtA, uint64(key))
v9 := r.Int63()
if r.Intn(2) == 0 {
v9 *= -1
}
dAtA = encodeVarintPopulateType(dAtA, uint64(v9))
case 1:
dAtA = encodeVarintPopulateType(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 = encodeVarintPopulateType(dAtA, uint64(key))
ll := r.Intn(100)
dAtA = encodeVarintPopulateType(dAtA, uint64(ll))
for j := 0; j < ll; j++ {
dAtA = append(dAtA, byte(r.Intn(256)))
}
default:
dAtA = encodeVarintPopulateType(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 encodeVarintPopulateType(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 *Type) Size() (n int) {
var l int
_ = l
l = len(m.Name)
if l > 0 {
n += 1 + l + sovType(uint64(l))
}
if len(m.Fields) > 0 {
for _, e := range m.Fields {
l = e.Size()
n += 1 + l + sovType(uint64(l))
}
}
if len(m.Oneofs) > 0 {
for _, s := range m.Oneofs {
l = len(s)
n += 1 + l + sovType(uint64(l))
}
}
if len(m.Options) > 0 {
for _, e := range m.Options {
l = e.Size()
n += 1 + l + sovType(uint64(l))
}
}
if m.SourceContext != nil {
l = m.SourceContext.Size()
n += 1 + l + sovType(uint64(l))
}
if m.Syntax != 0 {
n += 1 + sovType(uint64(m.Syntax))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *Field) Size() (n int) {
var l int
_ = l
if m.Kind != 0 {
n += 1 + sovType(uint64(m.Kind))
}
if m.Cardinality != 0 {
n += 1 + sovType(uint64(m.Cardinality))
}
if m.Number != 0 {
n += 1 + sovType(uint64(m.Number))
}
l = len(m.Name)
if l > 0 {
n += 1 + l + sovType(uint64(l))
}
l = len(m.TypeUrl)
if l > 0 {
n += 1 + l + sovType(uint64(l))
}
if m.OneofIndex != 0 {
n += 1 + sovType(uint64(m.OneofIndex))
}
if m.Packed {
n += 2
}
if len(m.Options) > 0 {
for _, e := range m.Options {
l = e.Size()
n += 1 + l + sovType(uint64(l))
}
}
l = len(m.JsonName)
if l > 0 {
n += 1 + l + sovType(uint64(l))
}
l = len(m.DefaultValue)
if l > 0 {
n += 1 + l + sovType(uint64(l))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *Enum) Size() (n int) {
var l int
_ = l
l = len(m.Name)
if l > 0 {
n += 1 + l + sovType(uint64(l))
}
if len(m.Enumvalue) > 0 {
for _, e := range m.Enumvalue {
l = e.Size()
n += 1 + l + sovType(uint64(l))
}
}
if len(m.Options) > 0 {
for _, e := range m.Options {
l = e.Size()
n += 1 + l + sovType(uint64(l))
}
}
if m.SourceContext != nil {
l = m.SourceContext.Size()
n += 1 + l + sovType(uint64(l))
}
if m.Syntax != 0 {
n += 1 + sovType(uint64(m.Syntax))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *EnumValue) Size() (n int) {
var l int
_ = l
l = len(m.Name)
if l > 0 {
n += 1 + l + sovType(uint64(l))
}
if m.Number != 0 {
n += 1 + sovType(uint64(m.Number))
}
if len(m.Options) > 0 {
for _, e := range m.Options {
l = e.Size()
n += 1 + l + sovType(uint64(l))
}
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *Option) Size() (n int) {
var l int
_ = l
l = len(m.Name)
if l > 0 {
n += 1 + l + sovType(uint64(l))
}
if m.Value != nil {
l = m.Value.Size()
n += 1 + l + sovType(uint64(l))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func sovType(x uint64) (n int) {
for {
n++
x >>= 7
if x == 0 {
break
}
}
return n
}
func sozType(x uint64) (n int) {
return sovType(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (this *Type) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&Type{`,
`Name:` + fmt.Sprintf("%v", this.Name) + `,`,
`Fields:` + strings.Replace(fmt.Sprintf("%v", this.Fields), "Field", "Field", 1) + `,`,
`Oneofs:` + fmt.Sprintf("%v", this.Oneofs) + `,`,
`Options:` + strings.Replace(fmt.Sprintf("%v", this.Options), "Option", "Option", 1) + `,`,
`SourceContext:` + strings.Replace(fmt.Sprintf("%v", this.SourceContext), "SourceContext", "SourceContext", 1) + `,`,
`Syntax:` + fmt.Sprintf("%v", this.Syntax) + `,`,
`XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
}
func (this *Field) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&Field{`,
`Kind:` + fmt.Sprintf("%v", this.Kind) + `,`,
`Cardinality:` + fmt.Sprintf("%v", this.Cardinality) + `,`,
`Number:` + fmt.Sprintf("%v", this.Number) + `,`,
`Name:` + fmt.Sprintf("%v", this.Name) + `,`,
`TypeUrl:` + fmt.Sprintf("%v", this.TypeUrl) + `,`,
`OneofIndex:` + fmt.Sprintf("%v", this.OneofIndex) + `,`,
`Packed:` + fmt.Sprintf("%v", this.Packed) + `,`,
`Options:` + strings.Replace(fmt.Sprintf("%v", this.Options), "Option", "Option", 1) + `,`,
`JsonName:` + fmt.Sprintf("%v", this.JsonName) + `,`,
`DefaultValue:` + fmt.Sprintf("%v", this.DefaultValue) + `,`,
`XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
}
func (this *Enum) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&Enum{`,
`Name:` + fmt.Sprintf("%v", this.Name) + `,`,
`Enumvalue:` + strings.Replace(fmt.Sprintf("%v", this.Enumvalue), "EnumValue", "EnumValue", 1) + `,`,
`Options:` + strings.Replace(fmt.Sprintf("%v", this.Options), "Option", "Option", 1) + `,`,
`SourceContext:` + strings.Replace(fmt.Sprintf("%v", this.SourceContext), "SourceContext", "SourceContext", 1) + `,`,
`Syntax:` + fmt.Sprintf("%v", this.Syntax) + `,`,
`XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
}
func (this *EnumValue) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&EnumValue{`,
`Name:` + fmt.Sprintf("%v", this.Name) + `,`,
`Number:` + fmt.Sprintf("%v", this.Number) + `,`,
`Options:` + strings.Replace(fmt.Sprintf("%v", this.Options), "Option", "Option", 1) + `,`,
`XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
}
func (this *Option) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&Option{`,
`Name:` + fmt.Sprintf("%v", this.Name) + `,`,
`Value:` + strings.Replace(fmt.Sprintf("%v", this.Value), "Any", "Any", 1) + `,`,
`XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
}
func valueToStringType(v interface{}) string {
rv := reflect.ValueOf(v)
if rv.IsNil() {
return "nil"
}
pv := reflect.Indirect(rv).Interface()
return fmt.Sprintf("*%v", pv)
}
func (m *Type) 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 ErrIntOverflowType
}
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: Type: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Type: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowType
}
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 ErrInvalidLengthType
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Name = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Fields", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowType
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthType
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Fields = append(m.Fields, &Field{})
if err := m.Fields[len(m.Fields)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Oneofs", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowType
}
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 ErrInvalidLengthType
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Oneofs = append(m.Oneofs, string(dAtA[iNdEx:postIndex]))
iNdEx = postIndex
case 4:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Options", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowType
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthType
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Options = append(m.Options, &Option{})
if err := m.Options[len(m.Options)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 5:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field SourceContext", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowType
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthType
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.SourceContext == nil {
m.SourceContext = &SourceContext{}
}
if err := m.SourceContext.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 6:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Syntax", wireType)
}
m.Syntax = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowType
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Syntax |= (Syntax(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
default:
iNdEx = preIndex
skippy, err := skipType(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthType
}
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 *Field) 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 ErrIntOverflowType
}
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: Field: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Field: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType)
}
m.Kind = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowType
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Kind |= (Field_Kind(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
case 2:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Cardinality", wireType)
}
m.Cardinality = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowType
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Cardinality |= (Field_Cardinality(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
case 3:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Number", wireType)
}
m.Number = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowType
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Number |= (int32(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
case 4:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowType
}
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 ErrInvalidLengthType
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Name = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 6:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field TypeUrl", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowType
}
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 ErrInvalidLengthType
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.TypeUrl = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 7:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field OneofIndex", wireType)
}
m.OneofIndex = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowType
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.OneofIndex |= (int32(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
case 8:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Packed", wireType)
}
var v int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowType
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
m.Packed = bool(v != 0)
case 9:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Options", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowType
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthType
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Options = append(m.Options, &Option{})
if err := m.Options[len(m.Options)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 10:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field JsonName", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowType
}
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 ErrInvalidLengthType
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.JsonName = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 11:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field DefaultValue", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowType
}
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 ErrInvalidLengthType
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.DefaultValue = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipType(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthType
}
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 *Enum) 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 ErrIntOverflowType
}
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: Enum: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Enum: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowType
}
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 ErrInvalidLengthType
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Name = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Enumvalue", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowType
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthType
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Enumvalue = append(m.Enumvalue, &EnumValue{})
if err := m.Enumvalue[len(m.Enumvalue)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Options", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowType
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthType
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Options = append(m.Options, &Option{})
if err := m.Options[len(m.Options)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 4:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field SourceContext", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowType
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthType
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.SourceContext == nil {
m.SourceContext = &SourceContext{}
}
if err := m.SourceContext.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 5:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Syntax", wireType)
}
m.Syntax = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowType
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Syntax |= (Syntax(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
default:
iNdEx = preIndex
skippy, err := skipType(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthType
}
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 *EnumValue) 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 ErrIntOverflowType
}
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: EnumValue: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: EnumValue: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowType
}
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 ErrInvalidLengthType
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Name = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Number", wireType)
}
m.Number = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowType
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Number |= (int32(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Options", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowType
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthType
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Options = append(m.Options, &Option{})
if err := m.Options[len(m.Options)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipType(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthType
}
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 *Option) 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 ErrIntOverflowType
}
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: Option: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Option: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowType
}
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 ErrInvalidLengthType
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Name = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowType
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthType
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Value == nil {
m.Value = &Any{}
}
if err := m.Value.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipType(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthType
}
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 skipType(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, ErrIntOverflowType
}
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, ErrIntOverflowType
}
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, ErrIntOverflowType
}
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, ErrInvalidLengthType
}
return iNdEx, nil
case 3:
for {
var innerWire uint64
var start int = iNdEx
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowType
}
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 := skipType(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 (
ErrInvalidLengthType = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowType = fmt.Errorf("proto: integer overflow")
)
func init() { proto.RegisterFile("google/protobuf/type.proto", fileDescriptor_type_345e3aff58b7b252) }
var fileDescriptor_type_345e3aff58b7b252 = []byte{
// 844 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x55, 0xcf, 0x73, 0xda, 0x46,
0x14, 0x66, 0x41, 0xc8, 0xe8, 0x61, 0xf0, 0x66, 0x93, 0x49, 0x14, 0x67, 0x46, 0x65, 0x68, 0x0f,
0x4c, 0x0e, 0x78, 0x0a, 0x1e, 0x4f, 0xaf, 0x60, 0x64, 0xca, 0x98, 0x48, 0xea, 0x22, 0x9a, 0xb8,
0x17, 0x06, 0x83, 0x9c, 0x21, 0x11, 0x2b, 0x06, 0x89, 0xd6, 0xdc, 0x7a, 0xeb, 0xa9, 0xff, 0x44,
0x4f, 0x9d, 0x9e, 0xfb, 0x47, 0xf8, 0x98, 0x63, 0x8f, 0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