123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461 |
- // Copyright 2019 The Go Authors. All rights reserved.
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
- // Code generated by generate-protos. DO NOT EDIT.
- package protoreflect
- func (p *SourcePath) appendFileDescriptorProto(b []byte) []byte {
- if len(*p) == 0 {
- return b
- }
- switch (*p)[0] {
- case 1:
- b = p.appendSingularField(b, "name", nil)
- case 2:
- b = p.appendSingularField(b, "package", nil)
- case 3:
- b = p.appendRepeatedField(b, "dependency", nil)
- case 10:
- b = p.appendRepeatedField(b, "public_dependency", nil)
- case 11:
- b = p.appendRepeatedField(b, "weak_dependency", nil)
- case 4:
- b = p.appendRepeatedField(b, "message_type", (*SourcePath).appendDescriptorProto)
- case 5:
- b = p.appendRepeatedField(b, "enum_type", (*SourcePath).appendEnumDescriptorProto)
- case 6:
- b = p.appendRepeatedField(b, "service", (*SourcePath).appendServiceDescriptorProto)
- case 7:
- b = p.appendRepeatedField(b, "extension", (*SourcePath).appendFieldDescriptorProto)
- case 8:
- b = p.appendSingularField(b, "options", (*SourcePath).appendFileOptions)
- case 9:
- b = p.appendSingularField(b, "source_code_info", (*SourcePath).appendSourceCodeInfo)
- case 12:
- b = p.appendSingularField(b, "syntax", nil)
- }
- return b
- }
- func (p *SourcePath) appendDescriptorProto(b []byte) []byte {
- if len(*p) == 0 {
- return b
- }
- switch (*p)[0] {
- case 1:
- b = p.appendSingularField(b, "name", nil)
- case 2:
- b = p.appendRepeatedField(b, "field", (*SourcePath).appendFieldDescriptorProto)
- case 6:
- b = p.appendRepeatedField(b, "extension", (*SourcePath).appendFieldDescriptorProto)
- case 3:
- b = p.appendRepeatedField(b, "nested_type", (*SourcePath).appendDescriptorProto)
- case 4:
- b = p.appendRepeatedField(b, "enum_type", (*SourcePath).appendEnumDescriptorProto)
- case 5:
- b = p.appendRepeatedField(b, "extension_range", (*SourcePath).appendDescriptorProto_ExtensionRange)
- case 8:
- b = p.appendRepeatedField(b, "oneof_decl", (*SourcePath).appendOneofDescriptorProto)
- case 7:
- b = p.appendSingularField(b, "options", (*SourcePath).appendMessageOptions)
- case 9:
- b = p.appendRepeatedField(b, "reserved_range", (*SourcePath).appendDescriptorProto_ReservedRange)
- case 10:
- b = p.appendRepeatedField(b, "reserved_name", nil)
- }
- return b
- }
- func (p *SourcePath) appendEnumDescriptorProto(b []byte) []byte {
- if len(*p) == 0 {
- return b
- }
- switch (*p)[0] {
- case 1:
- b = p.appendSingularField(b, "name", nil)
- case 2:
- b = p.appendRepeatedField(b, "value", (*SourcePath).appendEnumValueDescriptorProto)
- case 3:
- b = p.appendSingularField(b, "options", (*SourcePath).appendEnumOptions)
- case 4:
- b = p.appendRepeatedField(b, "reserved_range", (*SourcePath).appendEnumDescriptorProto_EnumReservedRange)
- case 5:
- b = p.appendRepeatedField(b, "reserved_name", nil)
- }
- return b
- }
- func (p *SourcePath) appendServiceDescriptorProto(b []byte) []byte {
- if len(*p) == 0 {
- return b
- }
- switch (*p)[0] {
- case 1:
- b = p.appendSingularField(b, "name", nil)
- case 2:
- b = p.appendRepeatedField(b, "method", (*SourcePath).appendMethodDescriptorProto)
- case 3:
- b = p.appendSingularField(b, "options", (*SourcePath).appendServiceOptions)
- }
- return b
- }
- func (p *SourcePath) appendFieldDescriptorProto(b []byte) []byte {
- if len(*p) == 0 {
- return b
- }
- switch (*p)[0] {
- case 1:
- b = p.appendSingularField(b, "name", nil)
- case 3:
- b = p.appendSingularField(b, "number", nil)
- case 4:
- b = p.appendSingularField(b, "label", nil)
- case 5:
- b = p.appendSingularField(b, "type", nil)
- case 6:
- b = p.appendSingularField(b, "type_name", nil)
- case 2:
- b = p.appendSingularField(b, "extendee", nil)
- case 7:
- b = p.appendSingularField(b, "default_value", nil)
- case 9:
- b = p.appendSingularField(b, "oneof_index", nil)
- case 10:
- b = p.appendSingularField(b, "json_name", nil)
- case 8:
- b = p.appendSingularField(b, "options", (*SourcePath).appendFieldOptions)
- case 17:
- b = p.appendSingularField(b, "proto3_optional", nil)
- }
- return b
- }
- func (p *SourcePath) appendFileOptions(b []byte) []byte {
- if len(*p) == 0 {
- return b
- }
- switch (*p)[0] {
- case 1:
- b = p.appendSingularField(b, "java_package", nil)
- case 8:
- b = p.appendSingularField(b, "java_outer_classname", nil)
- case 10:
- b = p.appendSingularField(b, "java_multiple_files", nil)
- case 20:
- b = p.appendSingularField(b, "java_generate_equals_and_hash", nil)
- case 27:
- b = p.appendSingularField(b, "java_string_check_utf8", nil)
- case 9:
- b = p.appendSingularField(b, "optimize_for", nil)
- case 11:
- b = p.appendSingularField(b, "go_package", nil)
- case 16:
- b = p.appendSingularField(b, "cc_generic_services", nil)
- case 17:
- b = p.appendSingularField(b, "java_generic_services", nil)
- case 18:
- b = p.appendSingularField(b, "py_generic_services", nil)
- case 42:
- b = p.appendSingularField(b, "php_generic_services", nil)
- case 23:
- b = p.appendSingularField(b, "deprecated", nil)
- case 31:
- b = p.appendSingularField(b, "cc_enable_arenas", nil)
- case 36:
- b = p.appendSingularField(b, "objc_class_prefix", nil)
- case 37:
- b = p.appendSingularField(b, "csharp_namespace", nil)
- case 39:
- b = p.appendSingularField(b, "swift_prefix", nil)
- case 40:
- b = p.appendSingularField(b, "php_class_prefix", nil)
- case 41:
- b = p.appendSingularField(b, "php_namespace", nil)
- case 44:
- b = p.appendSingularField(b, "php_metadata_namespace", nil)
- case 45:
- b = p.appendSingularField(b, "ruby_package", nil)
- case 999:
- b = p.appendRepeatedField(b, "uninterpreted_option", (*SourcePath).appendUninterpretedOption)
- }
- return b
- }
- func (p *SourcePath) appendSourceCodeInfo(b []byte) []byte {
- if len(*p) == 0 {
- return b
- }
- switch (*p)[0] {
- case 1:
- b = p.appendRepeatedField(b, "location", (*SourcePath).appendSourceCodeInfo_Location)
- }
- return b
- }
- func (p *SourcePath) appendDescriptorProto_ExtensionRange(b []byte) []byte {
- if len(*p) == 0 {
- return b
- }
- switch (*p)[0] {
- case 1:
- b = p.appendSingularField(b, "start", nil)
- case 2:
- b = p.appendSingularField(b, "end", nil)
- case 3:
- b = p.appendSingularField(b, "options", (*SourcePath).appendExtensionRangeOptions)
- }
- return b
- }
- func (p *SourcePath) appendOneofDescriptorProto(b []byte) []byte {
- if len(*p) == 0 {
- return b
- }
- switch (*p)[0] {
- case 1:
- b = p.appendSingularField(b, "name", nil)
- case 2:
- b = p.appendSingularField(b, "options", (*SourcePath).appendOneofOptions)
- }
- return b
- }
- func (p *SourcePath) appendMessageOptions(b []byte) []byte {
- if len(*p) == 0 {
- return b
- }
- switch (*p)[0] {
- case 1:
- b = p.appendSingularField(b, "message_set_wire_format", nil)
- case 2:
- b = p.appendSingularField(b, "no_standard_descriptor_accessor", nil)
- case 3:
- b = p.appendSingularField(b, "deprecated", nil)
- case 7:
- b = p.appendSingularField(b, "map_entry", nil)
- case 999:
- b = p.appendRepeatedField(b, "uninterpreted_option", (*SourcePath).appendUninterpretedOption)
- }
- return b
- }
- func (p *SourcePath) appendDescriptorProto_ReservedRange(b []byte) []byte {
- if len(*p) == 0 {
- return b
- }
- switch (*p)[0] {
- case 1:
- b = p.appendSingularField(b, "start", nil)
- case 2:
- b = p.appendSingularField(b, "end", nil)
- }
- return b
- }
- func (p *SourcePath) appendEnumValueDescriptorProto(b []byte) []byte {
- if len(*p) == 0 {
- return b
- }
- switch (*p)[0] {
- case 1:
- b = p.appendSingularField(b, "name", nil)
- case 2:
- b = p.appendSingularField(b, "number", nil)
- case 3:
- b = p.appendSingularField(b, "options", (*SourcePath).appendEnumValueOptions)
- }
- return b
- }
- func (p *SourcePath) appendEnumOptions(b []byte) []byte {
- if len(*p) == 0 {
- return b
- }
- switch (*p)[0] {
- case 2:
- b = p.appendSingularField(b, "allow_alias", nil)
- case 3:
- b = p.appendSingularField(b, "deprecated", nil)
- case 999:
- b = p.appendRepeatedField(b, "uninterpreted_option", (*SourcePath).appendUninterpretedOption)
- }
- return b
- }
- func (p *SourcePath) appendEnumDescriptorProto_EnumReservedRange(b []byte) []byte {
- if len(*p) == 0 {
- return b
- }
- switch (*p)[0] {
- case 1:
- b = p.appendSingularField(b, "start", nil)
- case 2:
- b = p.appendSingularField(b, "end", nil)
- }
- return b
- }
- func (p *SourcePath) appendMethodDescriptorProto(b []byte) []byte {
- if len(*p) == 0 {
- return b
- }
- switch (*p)[0] {
- case 1:
- b = p.appendSingularField(b, "name", nil)
- case 2:
- b = p.appendSingularField(b, "input_type", nil)
- case 3:
- b = p.appendSingularField(b, "output_type", nil)
- case 4:
- b = p.appendSingularField(b, "options", (*SourcePath).appendMethodOptions)
- case 5:
- b = p.appendSingularField(b, "client_streaming", nil)
- case 6:
- b = p.appendSingularField(b, "server_streaming", nil)
- }
- return b
- }
- func (p *SourcePath) appendServiceOptions(b []byte) []byte {
- if len(*p) == 0 {
- return b
- }
- switch (*p)[0] {
- case 33:
- b = p.appendSingularField(b, "deprecated", nil)
- case 999:
- b = p.appendRepeatedField(b, "uninterpreted_option", (*SourcePath).appendUninterpretedOption)
- }
- return b
- }
- func (p *SourcePath) appendFieldOptions(b []byte) []byte {
- if len(*p) == 0 {
- return b
- }
- switch (*p)[0] {
- case 1:
- b = p.appendSingularField(b, "ctype", nil)
- case 2:
- b = p.appendSingularField(b, "packed", nil)
- case 6:
- b = p.appendSingularField(b, "jstype", nil)
- case 5:
- b = p.appendSingularField(b, "lazy", nil)
- case 3:
- b = p.appendSingularField(b, "deprecated", nil)
- case 10:
- b = p.appendSingularField(b, "weak", nil)
- case 999:
- b = p.appendRepeatedField(b, "uninterpreted_option", (*SourcePath).appendUninterpretedOption)
- }
- return b
- }
- func (p *SourcePath) appendUninterpretedOption(b []byte) []byte {
- if len(*p) == 0 {
- return b
- }
- switch (*p)[0] {
- case 2:
- b = p.appendRepeatedField(b, "name", (*SourcePath).appendUninterpretedOption_NamePart)
- case 3:
- b = p.appendSingularField(b, "identifier_value", nil)
- case 4:
- b = p.appendSingularField(b, "positive_int_value", nil)
- case 5:
- b = p.appendSingularField(b, "negative_int_value", nil)
- case 6:
- b = p.appendSingularField(b, "double_value", nil)
- case 7:
- b = p.appendSingularField(b, "string_value", nil)
- case 8:
- b = p.appendSingularField(b, "aggregate_value", nil)
- }
- return b
- }
- func (p *SourcePath) appendSourceCodeInfo_Location(b []byte) []byte {
- if len(*p) == 0 {
- return b
- }
- switch (*p)[0] {
- case 1:
- b = p.appendRepeatedField(b, "path", nil)
- case 2:
- b = p.appendRepeatedField(b, "span", nil)
- case 3:
- b = p.appendSingularField(b, "leading_comments", nil)
- case 4:
- b = p.appendSingularField(b, "trailing_comments", nil)
- case 6:
- b = p.appendRepeatedField(b, "leading_detached_comments", nil)
- }
- return b
- }
- func (p *SourcePath) appendExtensionRangeOptions(b []byte) []byte {
- if len(*p) == 0 {
- return b
- }
- switch (*p)[0] {
- case 999:
- b = p.appendRepeatedField(b, "uninterpreted_option", (*SourcePath).appendUninterpretedOption)
- }
- return b
- }
- func (p *SourcePath) appendOneofOptions(b []byte) []byte {
- if len(*p) == 0 {
- return b
- }
- switch (*p)[0] {
- case 999:
- b = p.appendRepeatedField(b, "uninterpreted_option", (*SourcePath).appendUninterpretedOption)
- }
- return b
- }
- func (p *SourcePath) appendEnumValueOptions(b []byte) []byte {
- if len(*p) == 0 {
- return b
- }
- switch (*p)[0] {
- case 1:
- b = p.appendSingularField(b, "deprecated", nil)
- case 999:
- b = p.appendRepeatedField(b, "uninterpreted_option", (*SourcePath).appendUninterpretedOption)
- }
- return b
- }
- func (p *SourcePath) appendMethodOptions(b []byte) []byte {
- if len(*p) == 0 {
- return b
- }
- switch (*p)[0] {
- case 33:
- b = p.appendSingularField(b, "deprecated", nil)
- case 34:
- b = p.appendSingularField(b, "idempotency_level", nil)
- case 999:
- b = p.appendRepeatedField(b, "uninterpreted_option", (*SourcePath).appendUninterpretedOption)
- }
- return b
- }
- func (p *SourcePath) appendUninterpretedOption_NamePart(b []byte) []byte {
- if len(*p) == 0 {
- return b
- }
- switch (*p)[0] {
- case 1:
- b = p.appendSingularField(b, "name_part", nil)
- case 2:
- b = p.appendSingularField(b, "is_extension", nil)
- }
- return b
- }
|