package filedesc
import (
)
type Enums struct {
List []Enum
once sync.Once
byName map[protoreflect.Name]*Enum
}
func ( *Enums) () int {
return len(.List)
}
func ( *Enums) ( int) protoreflect.EnumDescriptor {
return &.List[]
}
func ( *Enums) ( protoreflect.Name) protoreflect.EnumDescriptor {
if := .lazyInit().byName[]; != nil {
return
}
return nil
}
func ( *Enums) ( fmt.State, rune) {
descfmt.FormatList(, , )
}
func ( *Enums) (pragma.DoNotImplement) {}
func ( *Enums) () *Enums {
.once.Do(func() {
if len(.List) > 0 {
.byName = make(map[protoreflect.Name]*Enum, len(.List))
for := range .List {
:= &.List[]
if , := .byName[.Name()]; ! {
.byName[.Name()] =
}
}
}
})
return
}
type EnumValues struct {
List []EnumValue
once sync.Once
byName map[protoreflect.Name]*EnumValue
byNum map[protoreflect.EnumNumber]*EnumValue
}
func ( *EnumValues) () int {
return len(.List)
}
func ( *EnumValues) ( int) protoreflect.EnumValueDescriptor {
return &.List[]
}
func ( *EnumValues) ( protoreflect.Name) protoreflect.EnumValueDescriptor {
if := .lazyInit().byName[]; != nil {
return
}
return nil
}
func ( *EnumValues) ( protoreflect.EnumNumber) protoreflect.EnumValueDescriptor {
if := .lazyInit().byNum[]; != nil {
return
}
return nil
}
func ( *EnumValues) ( fmt.State, rune) {
descfmt.FormatList(, , )
}
func ( *EnumValues) (pragma.DoNotImplement) {}
func ( *EnumValues) () *EnumValues {
.once.Do(func() {
if len(.List) > 0 {
.byName = make(map[protoreflect.Name]*EnumValue, len(.List))
.byNum = make(map[protoreflect.EnumNumber]*EnumValue, len(.List))
for := range .List {
:= &.List[]
if , := .byName[.Name()]; ! {
.byName[.Name()] =
}
if , := .byNum[.Number()]; ! {
.byNum[.Number()] =
}
}
}
})
return
}
type Messages struct {
List []Message
once sync.Once
byName map[protoreflect.Name]*Message
}
func ( *Messages) () int {
return len(.List)
}
func ( *Messages) ( int) protoreflect.MessageDescriptor {
return &.List[]
}
func ( *Messages) ( protoreflect.Name) protoreflect.MessageDescriptor {
if := .lazyInit().byName[]; != nil {
return
}
return nil
}
func ( *Messages) ( fmt.State, rune) {
descfmt.FormatList(, , )
}
func ( *Messages) (pragma.DoNotImplement) {}
func ( *Messages) () *Messages {
.once.Do(func() {
if len(.List) > 0 {
.byName = make(map[protoreflect.Name]*Message, len(.List))
for := range .List {
:= &.List[]
if , := .byName[.Name()]; ! {
.byName[.Name()] =
}
}
}
})
return
}
type Fields struct {
List []Field
once sync.Once
byName map[protoreflect.Name]*Field
byJSON map[string]*Field
byText map[string]*Field
byNum map[protoreflect.FieldNumber]*Field
}
func ( *Fields) () int {
return len(.List)
}
func ( *Fields) ( int) protoreflect.FieldDescriptor {
return &.List[]
}
func ( *Fields) ( protoreflect.Name) protoreflect.FieldDescriptor {
if := .lazyInit().byName[]; != nil {
return
}
return nil
}
func ( *Fields) ( string) protoreflect.FieldDescriptor {
if := .lazyInit().byJSON[]; != nil {
return
}
return nil
}
func ( *Fields) ( string) protoreflect.FieldDescriptor {
if := .lazyInit().byText[]; != nil {
return
}
return nil
}
func ( *Fields) ( protoreflect.FieldNumber) protoreflect.FieldDescriptor {
if := .lazyInit().byNum[]; != nil {
return
}
return nil
}
func ( *Fields) ( fmt.State, rune) {
descfmt.FormatList(, , )
}
func ( *Fields) (pragma.DoNotImplement) {}
func ( *Fields) () *Fields {
.once.Do(func() {
if len(.List) > 0 {
.byName = make(map[protoreflect.Name]*Field, len(.List))
.byJSON = make(map[string]*Field, len(.List))
.byText = make(map[string]*Field, len(.List))
.byNum = make(map[protoreflect.FieldNumber]*Field, len(.List))
for := range .List {
:= &.List[]
if , := .byName[.Name()]; ! {
.byName[.Name()] =
}
if , := .byJSON[.JSONName()]; ! {
.byJSON[.JSONName()] =
}
if , := .byText[.TextName()]; ! {
.byText[.TextName()] =
}
if , := .byNum[.Number()]; ! {
.byNum[.Number()] =
}
}
}
})
return
}
type Oneofs struct {
List []Oneof
once sync.Once
byName map[protoreflect.Name]*Oneof
}
func ( *Oneofs) () int {
return len(.List)
}
func ( *Oneofs) ( int) protoreflect.OneofDescriptor {
return &.List[]
}
func ( *Oneofs) ( protoreflect.Name) protoreflect.OneofDescriptor {
if := .lazyInit().byName[]; != nil {
return
}
return nil
}
func ( *Oneofs) ( fmt.State, rune) {
descfmt.FormatList(, , )
}
func ( *Oneofs) (pragma.DoNotImplement) {}
func ( *Oneofs) () *Oneofs {
.once.Do(func() {
if len(.List) > 0 {
.byName = make(map[protoreflect.Name]*Oneof, len(.List))
for := range .List {
:= &.List[]
if , := .byName[.Name()]; ! {
.byName[.Name()] =
}
}
}
})
return
}
type Extensions struct {
List []Extension
once sync.Once
byName map[protoreflect.Name]*Extension
}
func ( *Extensions) () int {
return len(.List)
}
func ( *Extensions) ( int) protoreflect.ExtensionDescriptor {
return &.List[]
}
func ( *Extensions) ( protoreflect.Name) protoreflect.ExtensionDescriptor {
if := .lazyInit().byName[]; != nil {
return
}
return nil
}
func ( *Extensions) ( fmt.State, rune) {
descfmt.FormatList(, , )
}
func ( *Extensions) (pragma.DoNotImplement) {}
func ( *Extensions) () *Extensions {
.once.Do(func() {
if len(.List) > 0 {
.byName = make(map[protoreflect.Name]*Extension, len(.List))
for := range .List {
:= &.List[]
if , := .byName[.Name()]; ! {
.byName[.Name()] =
}
}
}
})
return
}
type Services struct {
List []Service
once sync.Once
byName map[protoreflect.Name]*Service
}
func ( *Services) () int {
return len(.List)
}
func ( *Services) ( int) protoreflect.ServiceDescriptor {
return &.List[]
}
func ( *Services) ( protoreflect.Name) protoreflect.ServiceDescriptor {
if := .lazyInit().byName[]; != nil {
return
}
return nil
}
func ( *Services) ( fmt.State, rune) {
descfmt.FormatList(, , )
}
func ( *Services) (pragma.DoNotImplement) {}
func ( *Services) () *Services {
.once.Do(func() {
if len(.List) > 0 {
.byName = make(map[protoreflect.Name]*Service, len(.List))
for := range .List {
:= &.List[]
if , := .byName[.Name()]; ! {
.byName[.Name()] =
}
}
}
})
return
}
type Methods struct {
List []Method
once sync.Once
byName map[protoreflect.Name]*Method
}
func ( *Methods) () int {
return len(.List)
}
func ( *Methods) ( int) protoreflect.MethodDescriptor {
return &.List[]
}
func ( *Methods) ( protoreflect.Name) protoreflect.MethodDescriptor {
if := .lazyInit().byName[]; != nil {
return
}
return nil
}
func ( *Methods) ( fmt.State, rune) {
descfmt.FormatList(, , )
}
func ( *Methods) (pragma.DoNotImplement) {}
func ( *Methods) () *Methods {
.once.Do(func() {
if len(.List) > 0 {
.byName = make(map[protoreflect.Name]*Method, len(.List))
for := range .List {
:= &.List[]
if , := .byName[.Name()]; ! {
.byName[.Name()] =
}
}
}
})
return
}