...

Source file src/google.golang.org/protobuf/internal/testprotos/legacy/bug1052/bug1052.pb.go

Documentation: google.golang.org/protobuf/internal/testprotos/legacy/bug1052

     1  // Copyright 2020 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  // Code generated by protoc-gen-go. DO NOT EDIT.
     6  // source: internal/testprotos/legacy/bug1052/bug1052.proto
     7  
     8  package bug1052
     9  
    10  import (
    11  	fmt "fmt"
    12  	math "math"
    13  
    14  	proto "google.golang.org/protobuf/internal/protolegacy"
    15  	descriptor "google.golang.org/protobuf/types/descriptorpb"
    16  )
    17  
    18  // Reference imports to suppress errors if they are not otherwise used.
    19  var _ = proto.Marshal
    20  var _ = fmt.Errorf
    21  var _ = math.Inf
    22  
    23  // This is a compile-time assertion to ensure that this generated file
    24  // is compatible with the proto package it is being compiled against.
    25  // A compilation error at this line likely means your copy of the
    26  // proto package needs to be updated.
    27  const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
    28  
    29  type Enum int32
    30  
    31  const (
    32  	Enum_ZERO Enum = 0
    33  )
    34  
    35  var Enum_name = map[int32]string{
    36  	0: "ZERO",
    37  }
    38  
    39  var Enum_value = map[string]int32{
    40  	"ZERO": 0,
    41  }
    42  
    43  func (x Enum) Enum() *Enum {
    44  	p := new(Enum)
    45  	*p = x
    46  	return p
    47  }
    48  
    49  func (x Enum) String() string {
    50  	return proto.EnumName(Enum_name, int32(x))
    51  }
    52  
    53  func (x *Enum) UnmarshalJSON(data []byte) error {
    54  	value, err := proto.UnmarshalJSONEnum(Enum_value, data, "Enum")
    55  	if err != nil {
    56  		return err
    57  	}
    58  	*x = Enum(value)
    59  	return nil
    60  }
    61  
    62  func (Enum) EnumDescriptor() ([]byte, []int) {
    63  	return fileDescriptor_2d34d4f47c51af27, []int{0}
    64  }
    65  
    66  var E_ExtensionEnum = &proto.ExtensionDesc{
    67  	ExtendedType:  (*descriptor.MethodOptions)(nil),
    68  	ExtensionType: (*Enum)(nil),
    69  	Field:         5000,
    70  	Name:          "goproto.proto.legacy.extension_enum",
    71  	Tag:           "varint,5000,opt,name=extension_enum,enum=goproto.proto.legacy.Enum",
    72  	Filename:      "internal/testprotos/legacy/bug1052/bug1052.proto",
    73  }
    74  
    75  func init() {
    76  	proto.RegisterEnum("goproto.proto.legacy.Enum", Enum_name, Enum_value)
    77  	proto.RegisterExtension(E_ExtensionEnum)
    78  }
    79  
    80  func init() {
    81  	proto.RegisterFile("internal/testprotos/legacy/bug1052/bug1052.proto", fileDescriptor_2d34d4f47c51af27)
    82  }
    83  
    84  var fileDescriptor_2d34d4f47c51af27 = []byte{
    85  	// 200 bytes of a gzipped FileDescriptorProto
    86  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x32, 0xc8, 0xcc, 0x2b, 0x49,
    87  	0x2d, 0xca, 0x4b, 0xcc, 0xd1, 0x2f, 0x49, 0x2d, 0x2e, 0x29, 0x28, 0xca, 0x2f, 0xc9, 0x2f, 0xd6,
    88  	0xcf, 0x49, 0x4d, 0x4f, 0x4c, 0xae, 0xd4, 0x4f, 0x2a, 0x4d, 0x37, 0x34, 0x30, 0x35, 0x82, 0xd1,
    89  	0x7a, 0x60, 0x59, 0x21, 0x91, 0xf4, 0x7c, 0x30, 0x03, 0xc2, 0xd5, 0x83, 0xa8, 0x95, 0x52, 0x48,
    90  	0xcf, 0xcf, 0x4f, 0xcf, 0x49, 0xd5, 0x07, 0x0b, 0x26, 0x95, 0xa6, 0xe9, 0xa7, 0xa4, 0x16, 0x27,
    91  	0x17, 0x65, 0x16, 0x94, 0xe4, 0x17, 0x41, 0x14, 0x6a, 0x09, 0x70, 0xb1, 0xb8, 0xe6, 0x95, 0xe6,
    92  	0x0a, 0x71, 0x70, 0xb1, 0x44, 0xb9, 0x06, 0xf9, 0x0b, 0x30, 0x58, 0x25, 0x71, 0xf1, 0xa5, 0x56,
    93  	0x94, 0xa4, 0xe6, 0x15, 0x67, 0xe6, 0xe7, 0xc5, 0xa7, 0x82, 0xe4, 0xe4, 0xf4, 0x20, 0xc6, 0xe8,
    94  	0xc1, 0x8c, 0xd1, 0xf3, 0x4d, 0x2d, 0xc9, 0xc8, 0x4f, 0xf1, 0x2f, 0x28, 0xc9, 0xcc, 0xcf, 0x2b,
    95  	0x96, 0xe8, 0x50, 0x57, 0x60, 0xd4, 0xe0, 0x33, 0x92, 0xd2, 0xc3, 0xe6, 0x06, 0x3d, 0x90, 0xf1,
    96  	0x41, 0xbc, 0x70, 0x23, 0x41, 0x5c, 0x27, 0xfb, 0x28, 0x5b, 0xa8, 0x91, 0xe9, 0xf9, 0x39, 0x89,
    97  	0x79, 0xe9, 0x7a, 0xf9, 0x45, 0xe9, 0x08, 0x47, 0x12, 0xf6, 0x3c, 0x20, 0x00, 0x00, 0xff, 0xff,
    98  	0x1d, 0x9e, 0x09, 0x6e, 0x21, 0x01, 0x00, 0x00,
    99  }
   100  

View as plain text