cmd/protoc-gen-go: perform some code cleanup
Minor changes:
* Use x as the receiver since "e" and "m" are meaningless in the presence
of user-defined enum and message names.
* Consistently keep enum methods together, rather awkwardly split apart
by the value maps.
Change-Id: I68e5666efb56ac7a4d062fb223b9f826dc72aba9
Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/170357
Reviewed-by: Herbie Ong <herbie@google.com>
diff --git a/cmd/protoc-gen-go-grpc/testdata/grpc/grpc.pb.go b/cmd/protoc-gen-go-grpc/testdata/grpc/grpc.pb.go
index c438dfa..4f84300 100644
--- a/cmd/protoc-gen-go-grpc/testdata/grpc/grpc.pb.go
+++ b/cmd/protoc-gen-go-grpc/testdata/grpc/grpc.pb.go
@@ -18,12 +18,19 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *Request) ProtoReflect() protoreflect.Message {
- return xxx_File_grpc_grpc_proto_messageTypes[0].MessageOf(m)
+func (x *Request) Reset() {
+ *x = Request{}
}
-func (m *Request) Reset() { *m = Request{} }
-func (m *Request) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*Request) ProtoMessage() {}
+
+func (x *Request) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Request) ProtoMessage() {}
+
+func (x *Request) ProtoReflect() protoreflect.Message {
+ return xxx_File_grpc_grpc_proto_messageTypes[0].MessageOf(x)
+}
// Deprecated: Use Request.ProtoReflect.Type instead.
func (*Request) Descriptor() ([]byte, []int) {
@@ -36,12 +43,19 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *Response) ProtoReflect() protoreflect.Message {
- return xxx_File_grpc_grpc_proto_messageTypes[1].MessageOf(m)
+func (x *Response) Reset() {
+ *x = Response{}
}
-func (m *Response) Reset() { *m = Response{} }
-func (m *Response) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*Response) ProtoMessage() {}
+
+func (x *Response) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Response) ProtoMessage() {}
+
+func (x *Response) ProtoReflect() protoreflect.Message {
+ return xxx_File_grpc_grpc_proto_messageTypes[1].MessageOf(x)
+}
// Deprecated: Use Response.ProtoReflect.Type instead.
func (*Response) Descriptor() ([]byte, []int) {
diff --git a/cmd/protoc-gen-go/annotation_test.go b/cmd/protoc-gen-go/annotation_test.go
index 1f38d5a..beecdfe 100644
--- a/cmd/protoc-gen-go/annotation_test.go
+++ b/cmd/protoc-gen-go/annotation_test.go
@@ -47,7 +47,7 @@
"\t", "AnnotationsTestField", " ",
[]int32{fieldnum.FileDescriptorProto_MessageType, 0, fieldnum.DescriptorProto_Field, 0},
}, {
- "func (m *AnnotationsTestMessage) ", "GetAnnotationsTestField", "() string {",
+ "func (x *AnnotationsTestMessage) ", "GetAnnotationsTestField", "() string {",
[]int32{fieldnum.FileDescriptorProto_MessageType, 0, fieldnum.DescriptorProto_Field, 0},
}} {
s := want.prefix + want.text + want.suffix
diff --git a/cmd/protoc-gen-go/internal_gengo/main.go b/cmd/protoc-gen-go/internal_gengo/main.go
index 95d7072..1b05a43 100644
--- a/cmd/protoc-gen-go/internal_gengo/main.go
+++ b/cmd/protoc-gen-go/internal_gengo/main.go
@@ -207,10 +207,13 @@
}
func genEnum(gen *protogen.Plugin, g *protogen.GeneratedFile, f *fileInfo, enum *protogen.Enum) {
+ // Enum type declaration.
g.PrintLeadingComments(enum.Location)
g.Annotate(enum.GoIdent.GoName, enum.Location)
g.P("type ", enum.GoIdent, " int32",
deprecationComment(enum.Desc.Options().(*descriptorpb.EnumOptions).GetDeprecated()))
+
+ // Enum value constants.
g.P("const (")
for _, value := range enum.Values {
g.PrintLeadingComments(value.Location)
@@ -221,9 +224,7 @@
g.P(")")
g.P()
- // Generate support for protobuf reflection.
- genReflectEnum(gen, g, f, enum)
-
+ // Enum value mapping (number -> name).
nameMap := enum.GoIdent.GoName + "_name"
g.P("// Deprecated: Use ", enum.GoIdent.GoName, ".Type.Values instead.")
g.P("var ", nameMap, " = map[int32]string{")
@@ -239,6 +240,7 @@
g.P("}")
g.P()
+ // Enum value mapping (name -> number).
valueMap := enum.GoIdent.GoName + "_value"
g.P("// Deprecated: Use ", enum.GoIdent.GoName, ".Type.Values instead.")
g.P("var ", valueMap, " = map[string]int32{")
@@ -248,17 +250,22 @@
g.P("}")
g.P()
+ // Enum method.
if enum.Desc.Syntax() != protoreflect.Proto3 {
g.P("func (x ", enum.GoIdent, ") Enum() *", enum.GoIdent, " {")
g.P("return &x")
g.P("}")
g.P()
}
+ // String method.
g.P("func (x ", enum.GoIdent, ") String() string {")
g.P("return ", protoimplPackage.Ident("X"), ".EnumStringOf(x.Type(), ", protoreflectPackage.Ident("EnumNumber"), "(x))")
g.P("}")
g.P()
+ genReflectEnum(gen, g, f, enum)
+
+ // UnmarshalJSON method.
if enum.Desc.Syntax() == protoreflect.Proto2 {
g.P("// Deprecated: Do not use.")
g.P("func (x *", enum.GoIdent, ") UnmarshalJSON(b []byte) error {")
@@ -272,6 +279,7 @@
g.P()
}
+ // EnumDescriptor method.
var indexes []string
for i := 1; i < len(enum.Location.Path); i += 2 {
indexes = append(indexes, strconv.Itoa(int(enum.Location.Path[i])))
@@ -285,13 +293,12 @@
genWellKnownType(g, "", enum.GoIdent, enum.Desc)
}
-// enumRegistryName returns the name used to register an enum with the proto
-// package registry.
+// enumLegacyName returns the name used by the v1 proto package.
//
// Confusingly, this is <proto_package>.<go_ident>. This probably should have
// been the full name of the proto enum type instead, but changing it at this
// point would require thought.
-func enumRegistryName(enum *protogen.Enum) string {
+func enumLegacyName(enum *protogen.Enum) string {
// Find the FileDescriptor for this enum.
var desc protoreflect.Descriptor = enum.Desc
for {
@@ -313,6 +320,7 @@
return
}
+ // Message type declaration.
hasComment := g.PrintLeadingComments(message.Location)
if message.Desc.Options().(*descriptorpb.MessageOptions).GetDeprecated() {
if hasComment {
@@ -369,16 +377,23 @@
g.P("}")
g.P()
- // Generate support for protobuf reflection.
+ // Reset method.
+ g.P("func (x *", message.GoIdent, ") Reset() {")
+ g.P("*x = ", message.GoIdent, "{}")
+ g.P("}")
+ g.P()
+ // String method.
+ g.P("func (x *", message.GoIdent, ") String() string {")
+ g.P("return ", protoimplPackage.Ident("X"), ".MessageStringOf(x)")
+ g.P("}")
+ g.P()
+ // ProtoMessage method.
+ g.P("func (*", message.GoIdent, ") ProtoMessage() {}")
+ g.P()
+
genReflectMessage(gen, g, f, message)
- // Reset
- g.P("func (m *", message.GoIdent, ") Reset() { *m = ", message.GoIdent, "{} }")
- // String
- g.P("func (m *", message.GoIdent, ") String() string { return ", protoimplPackage.Ident("X"), ".MessageStringOf(m) }")
- // ProtoMessage
- g.P("func (*", message.GoIdent, ") ProtoMessage() {}")
- // Descriptor
+ // Descriptor method.
var indexes []string
for i := 1; i < len(message.Location.Path); i += 2 {
indexes = append(indexes, strconv.Itoa(int(message.Location.Path[i])))
@@ -389,7 +404,7 @@
g.P("}")
g.P()
- // ExtensionRangeArray
+ // ExtensionRangeArray method.
if extranges := message.Desc.ExtensionRanges(); extranges.Len() > 0 {
protoExtRange := protoifacePackage.Ident("ExtensionRangeV1")
extRangeVar := "extRange_" + message.GoIdent.GoName
@@ -459,7 +474,7 @@
}
g.P()
- // Getters.
+ // Getter methods.
for _, field := range message.Fields {
if field.OneofType != nil {
if field == field.OneofType.Fields[0] {
@@ -472,22 +487,22 @@
g.P(deprecationComment(true))
}
g.Annotate(message.GoIdent.GoName+".Get"+field.GoName, field.Location)
- g.P("func (m *", message.GoIdent, ") Get", field.GoName, "() ", goType, " {")
+ g.P("func (x *", message.GoIdent, ") Get", field.GoName, "() ", goType, " {")
if field.OneofType != nil {
- g.P("if x, ok := m.Get", field.OneofType.GoName, "().(*", fieldOneofType(field), "); ok {")
+ g.P("if x, ok := x.Get", field.OneofType.GoName, "().(*", fieldOneofType(field), "); ok {")
g.P("return x.", field.GoName)
g.P("}")
} else {
if field.Desc.Syntax() == protoreflect.Proto3 || defaultValue == "nil" {
- g.P("if m != nil {")
+ g.P("if x != nil {")
} else {
- g.P("if m != nil && m.", field.GoName, " != nil {")
+ g.P("if x != nil && x.", field.GoName, " != nil {")
}
star := ""
if pointer {
star = "*"
}
- g.P("return ", star, " m.", field.GoName)
+ g.P("return ", star, " x.", field.GoName)
g.P("}")
}
g.P("return ", defaultValue)
@@ -550,7 +565,7 @@
func fieldProtobufTag(field *protogen.Field) string {
var enumName string
if field.Desc.Kind() == protoreflect.EnumKind {
- enumName = enumRegistryName(field.EnumType)
+ enumName = enumLegacyName(field.EnumType)
}
return tag.Marshal(field.Desc, enumName)
}
@@ -679,6 +694,8 @@
return "// Deprecated: Do not use."
}
+// TODO: Remove this. This was added to aid jsonpb, but jsonpb does this work
+// through the use of protobuf reflection now.
func genWellKnownType(g *protogen.GeneratedFile, ptr string, ident protogen.GoIdent, desc protoreflect.Descriptor) {
if wellKnownTypes[desc.FullName()] {
g.P("func (", ptr, ident, `) XXX_WellKnownType() string { return "`, desc.Name(), `" }`)
diff --git a/cmd/protoc-gen-go/internal_gengo/reflect.go b/cmd/protoc-gen-go/internal_gengo/reflect.go
index 69b5acd..2d0a9ff 100644
--- a/cmd/protoc-gen-go/internal_gengo/reflect.go
+++ b/cmd/protoc-gen-go/internal_gengo/reflect.go
@@ -242,20 +242,29 @@
func genReflectEnum(gen *protogen.Plugin, g *protogen.GeneratedFile, f *fileInfo, enum *protogen.Enum) {
idx := f.allEnumsByPtr[enum]
typesVar := enumTypesVarName(f)
- g.P("func (e ", enum.GoIdent, ") Type() ", protoreflectPackage.Ident("EnumType"), " {")
+
+ // Type method.
+ g.P("func (", enum.GoIdent, ") Type() ", protoreflectPackage.Ident("EnumType"), " {")
g.P("return ", typesVar, "[", idx, "]")
g.P("}")
- g.P("func (e ", enum.GoIdent, ") Number() ", protoreflectPackage.Ident("EnumNumber"), " {")
- g.P("return ", protoreflectPackage.Ident("EnumNumber"), "(e)")
+ g.P()
+
+ // Number method.
+ g.P("func (x ", enum.GoIdent, ") Number() ", protoreflectPackage.Ident("EnumNumber"), " {")
+ g.P("return ", protoreflectPackage.Ident("EnumNumber"), "(x)")
g.P("}")
+ g.P()
}
func genReflectMessage(gen *protogen.Plugin, g *protogen.GeneratedFile, f *fileInfo, message *protogen.Message) {
idx := f.allMessagesByPtr[message]
typesVar := messageTypesVarName(f)
- g.P("func (m *", message.GoIdent, ") ProtoReflect() ", protoreflectPackage.Ident("Message"), " {")
- g.P("return ", typesVar, "[", idx, "].MessageOf(m)")
+
+ // ProtoReflect method.
+ g.P("func (x *", message.GoIdent, ") ProtoReflect() ", protoreflectPackage.Ident("Message"), " {")
+ g.P("return ", typesVar, "[", idx, "].MessageOf(x)")
g.P("}")
+ g.P()
}
func rawDescVarName(f *fileInfo) string {
diff --git a/cmd/protoc-gen-go/testdata/annotations/annotations.pb.go b/cmd/protoc-gen-go/testdata/annotations/annotations.pb.go
index b17f3ea..e4e3e06 100644
--- a/cmd/protoc-gen-go/testdata/annotations/annotations.pb.go
+++ b/cmd/protoc-gen-go/testdata/annotations/annotations.pb.go
@@ -18,13 +18,6 @@
AnnotationsTestEnum_ANNOTATIONS_TEST_ENUM_VALUE AnnotationsTestEnum = 0
)
-func (e AnnotationsTestEnum) Type() protoreflect.EnumType {
- return xxx_File_annotations_annotations_proto_enumTypes[0]
-}
-func (e AnnotationsTestEnum) Number() protoreflect.EnumNumber {
- return protoreflect.EnumNumber(e)
-}
-
// Deprecated: Use AnnotationsTestEnum.Type.Values instead.
var AnnotationsTestEnum_name = map[int32]string{
0: "ANNOTATIONS_TEST_ENUM_VALUE",
@@ -43,6 +36,14 @@
return protoimpl.X.EnumStringOf(x.Type(), protoreflect.EnumNumber(x))
}
+func (AnnotationsTestEnum) Type() protoreflect.EnumType {
+ return xxx_File_annotations_annotations_proto_enumTypes[0]
+}
+
+func (x AnnotationsTestEnum) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
// Deprecated: Do not use.
func (x *AnnotationsTestEnum) UnmarshalJSON(b []byte) error {
num, err := protoimpl.X.UnmarshalJSONEnum(x.Type(), b)
@@ -65,21 +66,28 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *AnnotationsTestMessage) ProtoReflect() protoreflect.Message {
- return xxx_File_annotations_annotations_proto_messageTypes[0].MessageOf(m)
+func (x *AnnotationsTestMessage) Reset() {
+ *x = AnnotationsTestMessage{}
}
-func (m *AnnotationsTestMessage) Reset() { *m = AnnotationsTestMessage{} }
-func (m *AnnotationsTestMessage) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*AnnotationsTestMessage) ProtoMessage() {}
+
+func (x *AnnotationsTestMessage) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*AnnotationsTestMessage) ProtoMessage() {}
+
+func (x *AnnotationsTestMessage) ProtoReflect() protoreflect.Message {
+ return xxx_File_annotations_annotations_proto_messageTypes[0].MessageOf(x)
+}
// Deprecated: Use AnnotationsTestMessage.ProtoReflect.Type instead.
func (*AnnotationsTestMessage) Descriptor() ([]byte, []int) {
return xxx_File_annotations_annotations_proto_rawDescGZIP(), []int{0}
}
-func (m *AnnotationsTestMessage) GetAnnotationsTestField() string {
- if m != nil && m.AnnotationsTestField != nil {
- return *m.AnnotationsTestField
+func (x *AnnotationsTestMessage) GetAnnotationsTestField() string {
+ if x != nil && x.AnnotationsTestField != nil {
+ return *x.AnnotationsTestField
}
return ""
}
diff --git a/cmd/protoc-gen-go/testdata/annotations/annotations.pb.go.meta b/cmd/protoc-gen-go/testdata/annotations/annotations.pb.go.meta
index 9c2596f..a0f0199 100644
--- a/cmd/protoc-gen-go/testdata/annotations/annotations.pb.go.meta
+++ b/cmd/protoc-gen-go/testdata/annotations/annotations.pb.go.meta
@@ -1 +1 @@
-annotation:{path:5 path:0 source_file:"annotations/annotations.proto" begin:398 end:417} annotation:{path:5 path:0 path:2 path:0 source_file:"annotations/annotations.proto" begin:434 end:481} annotation:{path:4 path:0 source_file:"annotations/annotations.proto" begin:1640 end:1662} annotation:{path:4 path:0 path:2 path:0 source_file:"annotations/annotations.proto" begin:1673 end:1693} annotation:{path:4 path:0 path:2 path:0 source_file:"annotations/annotations.proto" begin:2535 end:2558}
\ No newline at end of file
+annotation:{path:5 path:0 source_file:"annotations/annotations.proto" begin:398 end:417} annotation:{path:5 path:0 path:2 path:0 source_file:"annotations/annotations.proto" begin:434 end:481} annotation:{path:4 path:0 source_file:"annotations/annotations.proto" begin:1639 end:1661} annotation:{path:4 path:0 path:2 path:0 source_file:"annotations/annotations.proto" begin:1672 end:1692} annotation:{path:4 path:0 path:2 path:0 source_file:"annotations/annotations.proto" begin:2528 end:2551}
\ No newline at end of file
diff --git a/cmd/protoc-gen-go/testdata/comments/comments.pb.go b/cmd/protoc-gen-go/testdata/comments/comments.pb.go
index 55aa839..48a847e 100644
--- a/cmd/protoc-gen-go/testdata/comments/comments.pb.go
+++ b/cmd/protoc-gen-go/testdata/comments/comments.pb.go
@@ -29,21 +29,28 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *Message1) ProtoReflect() protoreflect.Message {
- return xxx_File_comments_comments_proto_messageTypes[0].MessageOf(m)
+func (x *Message1) Reset() {
+ *x = Message1{}
}
-func (m *Message1) Reset() { *m = Message1{} }
-func (m *Message1) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*Message1) ProtoMessage() {}
+
+func (x *Message1) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Message1) ProtoMessage() {}
+
+func (x *Message1) ProtoReflect() protoreflect.Message {
+ return xxx_File_comments_comments_proto_messageTypes[0].MessageOf(x)
+}
// Deprecated: Use Message1.ProtoReflect.Type instead.
func (*Message1) Descriptor() ([]byte, []int) {
return xxx_File_comments_comments_proto_rawDescGZIP(), []int{0}
}
-func (m *Message1) GetField1A() string {
- if m != nil && m.Field1A != nil {
- return *m.Field1A
+func (x *Message1) GetField1A() string {
+ if x != nil && x.Field1A != nil {
+ return *x.Field1A
}
return ""
}
@@ -65,8 +72,8 @@
return nil
}
-func (m *Message1) GetOneof1AField1() string {
- if x, ok := m.GetOneof1A().(*Message1_Oneof1AField1); ok {
+func (x *Message1) GetOneof1AField1() string {
+ if x, ok := x.GetOneof1A().(*Message1_Oneof1AField1); ok {
return x.Oneof1AField1
}
return ""
@@ -86,12 +93,19 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *Message2) ProtoReflect() protoreflect.Message {
- return xxx_File_comments_comments_proto_messageTypes[1].MessageOf(m)
+func (x *Message2) Reset() {
+ *x = Message2{}
}
-func (m *Message2) Reset() { *m = Message2{} }
-func (m *Message2) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*Message2) ProtoMessage() {}
+
+func (x *Message2) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Message2) ProtoMessage() {}
+
+func (x *Message2) ProtoReflect() protoreflect.Message {
+ return xxx_File_comments_comments_proto_messageTypes[1].MessageOf(x)
+}
// Deprecated: Use Message2.ProtoReflect.Type instead.
func (*Message2) Descriptor() ([]byte, []int) {
@@ -105,12 +119,19 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *Message1_Message1A) ProtoReflect() protoreflect.Message {
- return xxx_File_comments_comments_proto_messageTypes[2].MessageOf(m)
+func (x *Message1_Message1A) Reset() {
+ *x = Message1_Message1A{}
}
-func (m *Message1_Message1A) Reset() { *m = Message1_Message1A{} }
-func (m *Message1_Message1A) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*Message1_Message1A) ProtoMessage() {}
+
+func (x *Message1_Message1A) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Message1_Message1A) ProtoMessage() {}
+
+func (x *Message1_Message1A) ProtoReflect() protoreflect.Message {
+ return xxx_File_comments_comments_proto_messageTypes[2].MessageOf(x)
+}
// Deprecated: Use Message1_Message1A.ProtoReflect.Type instead.
func (*Message1_Message1A) Descriptor() ([]byte, []int) {
@@ -124,12 +145,19 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *Message1_Message1B) ProtoReflect() protoreflect.Message {
- return xxx_File_comments_comments_proto_messageTypes[3].MessageOf(m)
+func (x *Message1_Message1B) Reset() {
+ *x = Message1_Message1B{}
}
-func (m *Message1_Message1B) Reset() { *m = Message1_Message1B{} }
-func (m *Message1_Message1B) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*Message1_Message1B) ProtoMessage() {}
+
+func (x *Message1_Message1B) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Message1_Message1B) ProtoMessage() {}
+
+func (x *Message1_Message1B) ProtoReflect() protoreflect.Message {
+ return xxx_File_comments_comments_proto_messageTypes[3].MessageOf(x)
+}
// Deprecated: Use Message1_Message1B.ProtoReflect.Type instead.
func (*Message1_Message1B) Descriptor() ([]byte, []int) {
@@ -143,12 +171,19 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *Message2_Message2A) ProtoReflect() protoreflect.Message {
- return xxx_File_comments_comments_proto_messageTypes[4].MessageOf(m)
+func (x *Message2_Message2A) Reset() {
+ *x = Message2_Message2A{}
}
-func (m *Message2_Message2A) Reset() { *m = Message2_Message2A{} }
-func (m *Message2_Message2A) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*Message2_Message2A) ProtoMessage() {}
+
+func (x *Message2_Message2A) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Message2_Message2A) ProtoMessage() {}
+
+func (x *Message2_Message2A) ProtoReflect() protoreflect.Message {
+ return xxx_File_comments_comments_proto_messageTypes[4].MessageOf(x)
+}
// Deprecated: Use Message2_Message2A.ProtoReflect.Type instead.
func (*Message2_Message2A) Descriptor() ([]byte, []int) {
@@ -162,12 +197,19 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *Message2_Message2B) ProtoReflect() protoreflect.Message {
- return xxx_File_comments_comments_proto_messageTypes[5].MessageOf(m)
+func (x *Message2_Message2B) Reset() {
+ *x = Message2_Message2B{}
}
-func (m *Message2_Message2B) Reset() { *m = Message2_Message2B{} }
-func (m *Message2_Message2B) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*Message2_Message2B) ProtoMessage() {}
+
+func (x *Message2_Message2B) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Message2_Message2B) ProtoMessage() {}
+
+func (x *Message2_Message2B) ProtoReflect() protoreflect.Message {
+ return xxx_File_comments_comments_proto_messageTypes[5].MessageOf(x)
+}
// Deprecated: Use Message2_Message2B.ProtoReflect.Type instead.
func (*Message2_Message2B) Descriptor() ([]byte, []int) {
diff --git a/cmd/protoc-gen-go/testdata/comments/deprecated.pb.go b/cmd/protoc-gen-go/testdata/comments/deprecated.pb.go
index cf11d52..19721de 100644
--- a/cmd/protoc-gen-go/testdata/comments/deprecated.pb.go
+++ b/cmd/protoc-gen-go/testdata/comments/deprecated.pb.go
@@ -17,13 +17,6 @@
DeprecatedEnum_DEPRECATED DeprecatedEnum = 0 // Deprecated: Do not use.
)
-func (e DeprecatedEnum) Type() protoreflect.EnumType {
- return xxx_File_comments_deprecated_proto_enumTypes[0]
-}
-func (e DeprecatedEnum) Number() protoreflect.EnumNumber {
- return protoreflect.EnumNumber(e)
-}
-
// Deprecated: Use DeprecatedEnum.Type.Values instead.
var DeprecatedEnum_name = map[int32]string{
0: "DEPRECATED",
@@ -38,6 +31,14 @@
return protoimpl.X.EnumStringOf(x.Type(), protoreflect.EnumNumber(x))
}
+func (DeprecatedEnum) Type() protoreflect.EnumType {
+ return xxx_File_comments_deprecated_proto_enumTypes[0]
+}
+
+func (x DeprecatedEnum) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
// Deprecated: Use DeprecatedEnum.Type instead.
func (DeprecatedEnum) EnumDescriptor() ([]byte, []int) {
return xxx_File_comments_deprecated_proto_rawDescGZIP(), []int{0}
@@ -51,12 +52,19 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *DeprecatedMessage) ProtoReflect() protoreflect.Message {
- return xxx_File_comments_deprecated_proto_messageTypes[0].MessageOf(m)
+func (x *DeprecatedMessage) Reset() {
+ *x = DeprecatedMessage{}
}
-func (m *DeprecatedMessage) Reset() { *m = DeprecatedMessage{} }
-func (m *DeprecatedMessage) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*DeprecatedMessage) ProtoMessage() {}
+
+func (x *DeprecatedMessage) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DeprecatedMessage) ProtoMessage() {}
+
+func (x *DeprecatedMessage) ProtoReflect() protoreflect.Message {
+ return xxx_File_comments_deprecated_proto_messageTypes[0].MessageOf(x)
+}
// Deprecated: Use DeprecatedMessage.ProtoReflect.Type instead.
func (*DeprecatedMessage) Descriptor() ([]byte, []int) {
@@ -64,9 +72,9 @@
}
// Deprecated: Do not use.
-func (m *DeprecatedMessage) GetDeprecatedField() string {
- if m != nil {
- return m.DeprecatedField
+func (x *DeprecatedMessage) GetDeprecatedField() string {
+ if x != nil {
+ return x.DeprecatedField
}
return ""
}
diff --git a/cmd/protoc-gen-go/testdata/extensions/base/base.pb.go b/cmd/protoc-gen-go/testdata/extensions/base/base.pb.go
index 1b7cd9a..17e4bd6 100644
--- a/cmd/protoc-gen-go/testdata/extensions/base/base.pb.go
+++ b/cmd/protoc-gen-go/testdata/extensions/base/base.pb.go
@@ -21,12 +21,19 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *BaseMessage) ProtoReflect() protoreflect.Message {
- return xxx_File_extensions_base_base_proto_messageTypes[0].MessageOf(m)
+func (x *BaseMessage) Reset() {
+ *x = BaseMessage{}
}
-func (m *BaseMessage) Reset() { *m = BaseMessage{} }
-func (m *BaseMessage) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*BaseMessage) ProtoMessage() {}
+
+func (x *BaseMessage) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*BaseMessage) ProtoMessage() {}
+
+func (x *BaseMessage) ProtoReflect() protoreflect.Message {
+ return xxx_File_extensions_base_base_proto_messageTypes[0].MessageOf(x)
+}
// Deprecated: Use BaseMessage.ProtoReflect.Type instead.
func (*BaseMessage) Descriptor() ([]byte, []int) {
@@ -43,9 +50,9 @@
return extRange_BaseMessage
}
-func (m *BaseMessage) GetField() string {
- if m != nil && m.Field != nil {
- return *m.Field
+func (x *BaseMessage) GetField() string {
+ if x != nil && x.Field != nil {
+ return *x.Field
}
return ""
}
@@ -57,12 +64,19 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *MessageSetWireFormatMessage) ProtoReflect() protoreflect.Message {
- return xxx_File_extensions_base_base_proto_messageTypes[1].MessageOf(m)
+func (x *MessageSetWireFormatMessage) Reset() {
+ *x = MessageSetWireFormatMessage{}
}
-func (m *MessageSetWireFormatMessage) Reset() { *m = MessageSetWireFormatMessage{} }
-func (m *MessageSetWireFormatMessage) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*MessageSetWireFormatMessage) ProtoMessage() {}
+
+func (x *MessageSetWireFormatMessage) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*MessageSetWireFormatMessage) ProtoMessage() {}
+
+func (x *MessageSetWireFormatMessage) ProtoReflect() protoreflect.Message {
+ return xxx_File_extensions_base_base_proto_messageTypes[1].MessageOf(x)
+}
// Deprecated: Use MessageSetWireFormatMessage.ProtoReflect.Type instead.
func (*MessageSetWireFormatMessage) Descriptor() ([]byte, []int) {
diff --git a/cmd/protoc-gen-go/testdata/extensions/ext/ext.pb.go b/cmd/protoc-gen-go/testdata/extensions/ext/ext.pb.go
index 851b7ee..8ff2821 100644
--- a/cmd/protoc-gen-go/testdata/extensions/ext/ext.pb.go
+++ b/cmd/protoc-gen-go/testdata/extensions/ext/ext.pb.go
@@ -21,13 +21,6 @@
Enum_ZERO Enum = 0
)
-func (e Enum) Type() protoreflect.EnumType {
- return xxx_File_extensions_ext_ext_proto_enumTypes[0]
-}
-func (e Enum) Number() protoreflect.EnumNumber {
- return protoreflect.EnumNumber(e)
-}
-
// Deprecated: Use Enum.Type.Values instead.
var Enum_name = map[int32]string{
0: "ZERO",
@@ -46,6 +39,14 @@
return protoimpl.X.EnumStringOf(x.Type(), protoreflect.EnumNumber(x))
}
+func (Enum) Type() protoreflect.EnumType {
+ return xxx_File_extensions_ext_ext_proto_enumTypes[0]
+}
+
+func (x Enum) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
// Deprecated: Do not use.
func (x *Enum) UnmarshalJSON(b []byte) error {
num, err := protoimpl.X.UnmarshalJSONEnum(x.Type(), b)
@@ -68,21 +69,28 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *Message) ProtoReflect() protoreflect.Message {
- return xxx_File_extensions_ext_ext_proto_messageTypes[0].MessageOf(m)
+func (x *Message) Reset() {
+ *x = Message{}
}
-func (m *Message) Reset() { *m = Message{} }
-func (m *Message) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*Message) ProtoMessage() {}
+
+func (x *Message) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Message) ProtoMessage() {}
+
+func (x *Message) ProtoReflect() protoreflect.Message {
+ return xxx_File_extensions_ext_ext_proto_messageTypes[0].MessageOf(x)
+}
// Deprecated: Use Message.ProtoReflect.Type instead.
func (*Message) Descriptor() ([]byte, []int) {
return xxx_File_extensions_ext_ext_proto_rawDescGZIP(), []int{0}
}
-func (m *Message) GetData() []byte {
- if m != nil {
- return m.Data
+func (x *Message) GetData() []byte {
+ if x != nil {
+ return x.Data
}
return nil
}
@@ -94,21 +102,28 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *ExtensionGroup) ProtoReflect() protoreflect.Message {
- return xxx_File_extensions_ext_ext_proto_messageTypes[1].MessageOf(m)
+func (x *ExtensionGroup) Reset() {
+ *x = ExtensionGroup{}
}
-func (m *ExtensionGroup) Reset() { *m = ExtensionGroup{} }
-func (m *ExtensionGroup) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*ExtensionGroup) ProtoMessage() {}
+
+func (x *ExtensionGroup) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ExtensionGroup) ProtoMessage() {}
+
+func (x *ExtensionGroup) ProtoReflect() protoreflect.Message {
+ return xxx_File_extensions_ext_ext_proto_messageTypes[1].MessageOf(x)
+}
// Deprecated: Use ExtensionGroup.ProtoReflect.Type instead.
func (*ExtensionGroup) Descriptor() ([]byte, []int) {
return xxx_File_extensions_ext_ext_proto_rawDescGZIP(), []int{1}
}
-func (m *ExtensionGroup) GetExtensionGroup() string {
- if m != nil && m.ExtensionGroup != nil {
- return *m.ExtensionGroup
+func (x *ExtensionGroup) GetExtensionGroup() string {
+ if x != nil && x.ExtensionGroup != nil {
+ return *x.ExtensionGroup
}
return ""
}
@@ -120,12 +135,19 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *ExtendingMessage) ProtoReflect() protoreflect.Message {
- return xxx_File_extensions_ext_ext_proto_messageTypes[2].MessageOf(m)
+func (x *ExtendingMessage) Reset() {
+ *x = ExtendingMessage{}
}
-func (m *ExtendingMessage) Reset() { *m = ExtendingMessage{} }
-func (m *ExtendingMessage) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*ExtendingMessage) ProtoMessage() {}
+
+func (x *ExtendingMessage) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ExtendingMessage) ProtoMessage() {}
+
+func (x *ExtendingMessage) ProtoReflect() protoreflect.Message {
+ return xxx_File_extensions_ext_ext_proto_messageTypes[2].MessageOf(x)
+}
// Deprecated: Use ExtendingMessage.ProtoReflect.Type instead.
func (*ExtendingMessage) Descriptor() ([]byte, []int) {
@@ -139,21 +161,28 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *RepeatedGroup) ProtoReflect() protoreflect.Message {
- return xxx_File_extensions_ext_ext_proto_messageTypes[3].MessageOf(m)
+func (x *RepeatedGroup) Reset() {
+ *x = RepeatedGroup{}
}
-func (m *RepeatedGroup) Reset() { *m = RepeatedGroup{} }
-func (m *RepeatedGroup) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*RepeatedGroup) ProtoMessage() {}
+
+func (x *RepeatedGroup) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*RepeatedGroup) ProtoMessage() {}
+
+func (x *RepeatedGroup) ProtoReflect() protoreflect.Message {
+ return xxx_File_extensions_ext_ext_proto_messageTypes[3].MessageOf(x)
+}
// Deprecated: Use RepeatedGroup.ProtoReflect.Type instead.
func (*RepeatedGroup) Descriptor() ([]byte, []int) {
return xxx_File_extensions_ext_ext_proto_rawDescGZIP(), []int{3}
}
-func (m *RepeatedGroup) GetRepeatedXGroup() []string {
- if m != nil {
- return m.RepeatedXGroup
+func (x *RepeatedGroup) GetRepeatedXGroup() []string {
+ if x != nil {
+ return x.RepeatedXGroup
}
return nil
}
@@ -166,12 +195,19 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *Extendable) ProtoReflect() protoreflect.Message {
- return xxx_File_extensions_ext_ext_proto_messageTypes[4].MessageOf(m)
+func (x *Extendable) Reset() {
+ *x = Extendable{}
}
-func (m *Extendable) Reset() { *m = Extendable{} }
-func (m *Extendable) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*Extendable) ProtoMessage() {}
+
+func (x *Extendable) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Extendable) ProtoMessage() {}
+
+func (x *Extendable) ProtoReflect() protoreflect.Message {
+ return xxx_File_extensions_ext_ext_proto_messageTypes[4].MessageOf(x)
+}
// Deprecated: Use Extendable.ProtoReflect.Type instead.
func (*Extendable) Descriptor() ([]byte, []int) {
@@ -194,12 +230,19 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *MessageSetWireFormatExtension) ProtoReflect() protoreflect.Message {
- return xxx_File_extensions_ext_ext_proto_messageTypes[5].MessageOf(m)
+func (x *MessageSetWireFormatExtension) Reset() {
+ *x = MessageSetWireFormatExtension{}
}
-func (m *MessageSetWireFormatExtension) Reset() { *m = MessageSetWireFormatExtension{} }
-func (m *MessageSetWireFormatExtension) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*MessageSetWireFormatExtension) ProtoMessage() {}
+
+func (x *MessageSetWireFormatExtension) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*MessageSetWireFormatExtension) ProtoMessage() {}
+
+func (x *MessageSetWireFormatExtension) ProtoReflect() protoreflect.Message {
+ return xxx_File_extensions_ext_ext_proto_messageTypes[5].MessageOf(x)
+}
// Deprecated: Use MessageSetWireFormatExtension.ProtoReflect.Type instead.
func (*MessageSetWireFormatExtension) Descriptor() ([]byte, []int) {
@@ -212,12 +255,19 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *Message_M) ProtoReflect() protoreflect.Message {
- return xxx_File_extensions_ext_ext_proto_messageTypes[6].MessageOf(m)
+func (x *Message_M) Reset() {
+ *x = Message_M{}
}
-func (m *Message_M) Reset() { *m = Message_M{} }
-func (m *Message_M) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*Message_M) ProtoMessage() {}
+
+func (x *Message_M) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Message_M) ProtoMessage() {}
+
+func (x *Message_M) ProtoReflect() protoreflect.Message {
+ return xxx_File_extensions_ext_ext_proto_messageTypes[6].MessageOf(x)
+}
// Deprecated: Use Message_M.ProtoReflect.Type instead.
func (*Message_M) Descriptor() ([]byte, []int) {
@@ -230,17 +280,20 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *ExtendingMessage_ExtendingMessageSubmessage) ProtoReflect() protoreflect.Message {
- return xxx_File_extensions_ext_ext_proto_messageTypes[7].MessageOf(m)
+func (x *ExtendingMessage_ExtendingMessageSubmessage) Reset() {
+ *x = ExtendingMessage_ExtendingMessageSubmessage{}
}
-func (m *ExtendingMessage_ExtendingMessageSubmessage) Reset() {
- *m = ExtendingMessage_ExtendingMessageSubmessage{}
+
+func (x *ExtendingMessage_ExtendingMessageSubmessage) String() string {
+ return protoimpl.X.MessageStringOf(x)
}
-func (m *ExtendingMessage_ExtendingMessageSubmessage) String() string {
- return protoimpl.X.MessageStringOf(m)
-}
+
func (*ExtendingMessage_ExtendingMessageSubmessage) ProtoMessage() {}
+func (x *ExtendingMessage_ExtendingMessageSubmessage) ProtoReflect() protoreflect.Message {
+ return xxx_File_extensions_ext_ext_proto_messageTypes[7].MessageOf(x)
+}
+
// Deprecated: Use ExtendingMessage_ExtendingMessageSubmessage.ProtoReflect.Type instead.
func (*ExtendingMessage_ExtendingMessageSubmessage) Descriptor() ([]byte, []int) {
return xxx_File_extensions_ext_ext_proto_rawDescGZIP(), []int{2, 0}
diff --git a/cmd/protoc-gen-go/testdata/extensions/extra/extra.pb.go b/cmd/protoc-gen-go/testdata/extensions/extra/extra.pb.go
index ace02cc..ef84692 100644
--- a/cmd/protoc-gen-go/testdata/extensions/extra/extra.pb.go
+++ b/cmd/protoc-gen-go/testdata/extensions/extra/extra.pb.go
@@ -19,21 +19,28 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *ExtraMessage) ProtoReflect() protoreflect.Message {
- return xxx_File_extensions_extra_extra_proto_messageTypes[0].MessageOf(m)
+func (x *ExtraMessage) Reset() {
+ *x = ExtraMessage{}
}
-func (m *ExtraMessage) Reset() { *m = ExtraMessage{} }
-func (m *ExtraMessage) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*ExtraMessage) ProtoMessage() {}
+
+func (x *ExtraMessage) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ExtraMessage) ProtoMessage() {}
+
+func (x *ExtraMessage) ProtoReflect() protoreflect.Message {
+ return xxx_File_extensions_extra_extra_proto_messageTypes[0].MessageOf(x)
+}
// Deprecated: Use ExtraMessage.ProtoReflect.Type instead.
func (*ExtraMessage) Descriptor() ([]byte, []int) {
return xxx_File_extensions_extra_extra_proto_rawDescGZIP(), []int{0}
}
-func (m *ExtraMessage) GetData() []byte {
- if m != nil {
- return m.Data
+func (x *ExtraMessage) GetData() []byte {
+ if x != nil {
+ return x.Data
}
return nil
}
diff --git a/cmd/protoc-gen-go/testdata/extensions/proto3/ext3.pb.go b/cmd/protoc-gen-go/testdata/extensions/proto3/ext3.pb.go
index 5acd599..e8d218c 100644
--- a/cmd/protoc-gen-go/testdata/extensions/proto3/ext3.pb.go
+++ b/cmd/protoc-gen-go/testdata/extensions/proto3/ext3.pb.go
@@ -20,13 +20,6 @@
Enum_ZERO Enum = 0
)
-func (e Enum) Type() protoreflect.EnumType {
- return xxx_File_extensions_proto3_ext3_proto_enumTypes[0]
-}
-func (e Enum) Number() protoreflect.EnumNumber {
- return protoreflect.EnumNumber(e)
-}
-
// Deprecated: Use Enum.Type.Values instead.
var Enum_name = map[int32]string{
0: "ZERO",
@@ -41,6 +34,14 @@
return protoimpl.X.EnumStringOf(x.Type(), protoreflect.EnumNumber(x))
}
+func (Enum) Type() protoreflect.EnumType {
+ return xxx_File_extensions_proto3_ext3_proto_enumTypes[0]
+}
+
+func (x Enum) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
// Deprecated: Use Enum.Type instead.
func (Enum) EnumDescriptor() ([]byte, []int) {
return xxx_File_extensions_proto3_ext3_proto_rawDescGZIP(), []int{0}
@@ -52,12 +53,19 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *Message) ProtoReflect() protoreflect.Message {
- return xxx_File_extensions_proto3_ext3_proto_messageTypes[0].MessageOf(m)
+func (x *Message) Reset() {
+ *x = Message{}
}
-func (m *Message) Reset() { *m = Message{} }
-func (m *Message) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*Message) ProtoMessage() {}
+
+func (x *Message) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Message) ProtoMessage() {}
+
+func (x *Message) ProtoReflect() protoreflect.Message {
+ return xxx_File_extensions_proto3_ext3_proto_messageTypes[0].MessageOf(x)
+}
// Deprecated: Use Message.ProtoReflect.Type instead.
func (*Message) Descriptor() ([]byte, []int) {
diff --git a/cmd/protoc-gen-go/testdata/fieldnames/fieldnames.pb.go b/cmd/protoc-gen-go/testdata/fieldnames/fieldnames.pb.go
index 84405af..cf6cca5 100644
--- a/cmd/protoc-gen-go/testdata/fieldnames/fieldnames.pb.go
+++ b/cmd/protoc-gen-go/testdata/fieldnames/fieldnames.pb.go
@@ -57,112 +57,119 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *Message) ProtoReflect() protoreflect.Message {
- return xxx_File_fieldnames_fieldnames_proto_messageTypes[0].MessageOf(m)
+func (x *Message) Reset() {
+ *x = Message{}
}
-func (m *Message) Reset() { *m = Message{} }
-func (m *Message) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*Message) ProtoMessage() {}
+
+func (x *Message) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Message) ProtoMessage() {}
+
+func (x *Message) ProtoReflect() protoreflect.Message {
+ return xxx_File_fieldnames_fieldnames_proto_messageTypes[0].MessageOf(x)
+}
// Deprecated: Use Message.ProtoReflect.Type instead.
func (*Message) Descriptor() ([]byte, []int) {
return xxx_File_fieldnames_fieldnames_proto_rawDescGZIP(), []int{0}
}
-func (m *Message) GetFieldOne() string {
- if m != nil && m.FieldOne != nil {
- return *m.FieldOne
+func (x *Message) GetFieldOne() string {
+ if x != nil && x.FieldOne != nil {
+ return *x.FieldOne
}
return ""
}
-func (m *Message) GetFieldTwo() string {
- if m != nil && m.FieldTwo != nil {
- return *m.FieldTwo
+func (x *Message) GetFieldTwo() string {
+ if x != nil && x.FieldTwo != nil {
+ return *x.FieldTwo
}
return ""
}
-func (m *Message) GetFieldThree() string {
- if m != nil && m.FieldThree != nil {
- return *m.FieldThree
+func (x *Message) GetFieldThree() string {
+ if x != nil && x.FieldThree != nil {
+ return *x.FieldThree
}
return ""
}
-func (m *Message) GetField_Four() string {
- if m != nil && m.Field_Four != nil {
- return *m.Field_Four
+func (x *Message) GetField_Four() string {
+ if x != nil && x.Field_Four != nil {
+ return *x.Field_Four
}
return ""
}
-func (m *Message) GetDescriptor_() string {
- if m != nil && m.Descriptor_ != nil {
- return *m.Descriptor_
+func (x *Message) GetDescriptor_() string {
+ if x != nil && x.Descriptor_ != nil {
+ return *x.Descriptor_
}
return ""
}
-func (m *Message) GetMarshal_() string {
- if m != nil && m.Marshal_ != nil {
- return *m.Marshal_
+func (x *Message) GetMarshal_() string {
+ if x != nil && x.Marshal_ != nil {
+ return *x.Marshal_
}
return ""
}
-func (m *Message) GetUnmarshal_() string {
- if m != nil && m.Unmarshal_ != nil {
- return *m.Unmarshal_
+func (x *Message) GetUnmarshal_() string {
+ if x != nil && x.Unmarshal_ != nil {
+ return *x.Unmarshal_
}
return ""
}
-func (m *Message) GetProtoMessage_() string {
- if m != nil && m.ProtoMessage_ != nil {
- return *m.ProtoMessage_
+func (x *Message) GetProtoMessage_() string {
+ if x != nil && x.ProtoMessage_ != nil {
+ return *x.ProtoMessage_
}
return ""
}
-func (m *Message) GetCamelCase() string {
- if m != nil && m.CamelCase != nil {
- return *m.CamelCase
+func (x *Message) GetCamelCase() string {
+ if x != nil && x.CamelCase != nil {
+ return *x.CamelCase
}
return ""
}
-func (m *Message) GetCamelCase_() string {
- if m != nil && m.CamelCase_ != nil {
- return *m.CamelCase_
+func (x *Message) GetCamelCase_() string {
+ if x != nil && x.CamelCase_ != nil {
+ return *x.CamelCase_
}
return ""
}
-func (m *Message) GetCamelCase__() string {
- if m != nil && m.CamelCase__ != nil {
- return *m.CamelCase__
+func (x *Message) GetCamelCase__() string {
+ if x != nil && x.CamelCase__ != nil {
+ return *x.CamelCase__
}
return ""
}
-func (m *Message) GetCamelCase___() string {
- if m != nil && m.CamelCase___ != nil {
- return *m.CamelCase___
+func (x *Message) GetCamelCase___() string {
+ if x != nil && x.CamelCase___ != nil {
+ return *x.CamelCase___
}
return ""
}
-func (m *Message) GetGetName() string {
- if m != nil && m.GetName != nil {
- return *m.GetName
+func (x *Message) GetGetName() string {
+ if x != nil && x.GetName != nil {
+ return *x.GetName
}
return ""
}
-func (m *Message) GetName_() string {
- if m != nil && m.Name_ != nil {
- return *m.Name_
+func (x *Message) GetName_() string {
+ if x != nil && x.Name_ != nil {
+ return *x.Name_
}
return ""
}
@@ -184,8 +191,8 @@
return nil
}
-func (m *Message) GetOneofConflictA() string {
- if x, ok := m.GetOneofConflictA_().(*Message_OneofConflictA); ok {
+func (x *Message) GetOneofConflictA() string {
+ if x, ok := x.GetOneofConflictA_().(*Message_OneofConflictA); ok {
return x.OneofConflictA
}
return ""
@@ -214,15 +221,15 @@
return nil
}
-func (m *Message) GetOneofNoConflict() string {
- if x, ok := m.GetOneofConflictB().(*Message_OneofNoConflict); ok {
+func (x *Message) GetOneofNoConflict() string {
+ if x, ok := x.GetOneofConflictB().(*Message_OneofNoConflict); ok {
return x.OneofNoConflict
}
return ""
}
-func (m *Message) GetOneofConflictB_() string {
- if x, ok := m.GetOneofConflictB().(*Message_OneofConflictB_); ok {
+func (x *Message) GetOneofConflictB_() string {
+ if x, ok := x.GetOneofConflictB().(*Message_OneofConflictB_); ok {
return x.OneofConflictB_
}
return ""
@@ -245,8 +252,8 @@
return nil
}
-func (m *Message) GetOneofMessageConflict() string {
- if x, ok := m.GetOneofConflictC().(*Message_OneofMessageConflict_); ok {
+func (x *Message) GetOneofMessageConflict() string {
+ if x, ok := x.GetOneofConflictC().(*Message_OneofMessageConflict_); ok {
return x.OneofMessageConflict
}
return ""
@@ -268,12 +275,19 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *Message_OneofMessageConflict) ProtoReflect() protoreflect.Message {
- return xxx_File_fieldnames_fieldnames_proto_messageTypes[1].MessageOf(m)
+func (x *Message_OneofMessageConflict) Reset() {
+ *x = Message_OneofMessageConflict{}
}
-func (m *Message_OneofMessageConflict) Reset() { *m = Message_OneofMessageConflict{} }
-func (m *Message_OneofMessageConflict) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*Message_OneofMessageConflict) ProtoMessage() {}
+
+func (x *Message_OneofMessageConflict) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Message_OneofMessageConflict) ProtoMessage() {}
+
+func (x *Message_OneofMessageConflict) ProtoReflect() protoreflect.Message {
+ return xxx_File_fieldnames_fieldnames_proto_messageTypes[1].MessageOf(x)
+}
// Deprecated: Use Message_OneofMessageConflict.ProtoReflect.Type instead.
func (*Message_OneofMessageConflict) Descriptor() ([]byte, []int) {
diff --git a/cmd/protoc-gen-go/testdata/import_public/a.pb.go b/cmd/protoc-gen-go/testdata/import_public/a.pb.go
index fc02f6e..af81fce 100644
--- a/cmd/protoc-gen-go/testdata/import_public/a.pb.go
+++ b/cmd/protoc-gen-go/testdata/import_public/a.pb.go
@@ -65,35 +65,42 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *Public) ProtoReflect() protoreflect.Message {
- return xxx_File_import_public_a_proto_messageTypes[0].MessageOf(m)
+func (x *Public) Reset() {
+ *x = Public{}
}
-func (m *Public) Reset() { *m = Public{} }
-func (m *Public) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*Public) ProtoMessage() {}
+
+func (x *Public) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Public) ProtoMessage() {}
+
+func (x *Public) ProtoReflect() protoreflect.Message {
+ return xxx_File_import_public_a_proto_messageTypes[0].MessageOf(x)
+}
// Deprecated: Use Public.ProtoReflect.Type instead.
func (*Public) Descriptor() ([]byte, []int) {
return xxx_File_import_public_a_proto_rawDescGZIP(), []int{0}
}
-func (m *Public) GetM() *sub.M {
- if m != nil {
- return m.M
+func (x *Public) GetM() *sub.M {
+ if x != nil {
+ return x.M
}
return nil
}
-func (m *Public) GetE() sub.E {
- if m != nil && m.E != nil {
- return *m.E
+func (x *Public) GetE() sub.E {
+ if x != nil && x.E != nil {
+ return *x.E
}
return sub.E_ZERO
}
-func (m *Public) GetLocal() *Local {
- if m != nil {
- return m.Local
+func (x *Public) GetLocal() *Local {
+ if x != nil {
+ return x.Local
}
return nil
}
diff --git a/cmd/protoc-gen-go/testdata/import_public/b.pb.go b/cmd/protoc-gen-go/testdata/import_public/b.pb.go
index 34a991e..5dcf793 100644
--- a/cmd/protoc-gen-go/testdata/import_public/b.pb.go
+++ b/cmd/protoc-gen-go/testdata/import_public/b.pb.go
@@ -21,28 +21,35 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *Local) ProtoReflect() protoreflect.Message {
- return xxx_File_import_public_b_proto_messageTypes[0].MessageOf(m)
+func (x *Local) Reset() {
+ *x = Local{}
}
-func (m *Local) Reset() { *m = Local{} }
-func (m *Local) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*Local) ProtoMessage() {}
+
+func (x *Local) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Local) ProtoMessage() {}
+
+func (x *Local) ProtoReflect() protoreflect.Message {
+ return xxx_File_import_public_b_proto_messageTypes[0].MessageOf(x)
+}
// Deprecated: Use Local.ProtoReflect.Type instead.
func (*Local) Descriptor() ([]byte, []int) {
return xxx_File_import_public_b_proto_rawDescGZIP(), []int{0}
}
-func (m *Local) GetM() *sub.M {
- if m != nil {
- return m.M
+func (x *Local) GetM() *sub.M {
+ if x != nil {
+ return x.M
}
return nil
}
-func (m *Local) GetE() sub.E {
- if m != nil && m.E != nil {
- return *m.E
+func (x *Local) GetE() sub.E {
+ if x != nil && x.E != nil {
+ return *x.E
}
return sub.E_ZERO
}
diff --git a/cmd/protoc-gen-go/testdata/import_public/sub/a.pb.go b/cmd/protoc-gen-go/testdata/import_public/sub/a.pb.go
index 874e622..1a94137 100644
--- a/cmd/protoc-gen-go/testdata/import_public/sub/a.pb.go
+++ b/cmd/protoc-gen-go/testdata/import_public/sub/a.pb.go
@@ -25,13 +25,6 @@
E_ZERO E = 0
)
-func (e E) Type() protoreflect.EnumType {
- return xxx_File_import_public_sub_a_proto_enumTypes[0]
-}
-func (e E) Number() protoreflect.EnumNumber {
- return protoreflect.EnumNumber(e)
-}
-
// Deprecated: Use E.Type.Values instead.
var E_name = map[int32]string{
0: "ZERO",
@@ -50,6 +43,14 @@
return protoimpl.X.EnumStringOf(x.Type(), protoreflect.EnumNumber(x))
}
+func (E) Type() protoreflect.EnumType {
+ return xxx_File_import_public_sub_a_proto_enumTypes[0]
+}
+
+func (x E) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
// Deprecated: Do not use.
func (x *E) UnmarshalJSON(b []byte) error {
num, err := protoimpl.X.UnmarshalJSONEnum(x.Type(), b)
@@ -71,13 +72,6 @@
M_M_ZERO M_Subenum = 0
)
-func (e M_Subenum) Type() protoreflect.EnumType {
- return xxx_File_import_public_sub_a_proto_enumTypes[1]
-}
-func (e M_Subenum) Number() protoreflect.EnumNumber {
- return protoreflect.EnumNumber(e)
-}
-
// Deprecated: Use M_Subenum.Type.Values instead.
var M_Subenum_name = map[int32]string{
0: "M_ZERO",
@@ -96,6 +90,14 @@
return protoimpl.X.EnumStringOf(x.Type(), protoreflect.EnumNumber(x))
}
+func (M_Subenum) Type() protoreflect.EnumType {
+ return xxx_File_import_public_sub_a_proto_enumTypes[1]
+}
+
+func (x M_Subenum) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
// Deprecated: Do not use.
func (x *M_Subenum) UnmarshalJSON(b []byte) error {
num, err := protoimpl.X.UnmarshalJSONEnum(x.Type(), b)
@@ -117,13 +119,6 @@
M_Submessage_M_SUBMESSAGE_ZERO M_Submessage_Submessage_Subenum = 0
)
-func (e M_Submessage_Submessage_Subenum) Type() protoreflect.EnumType {
- return xxx_File_import_public_sub_a_proto_enumTypes[2]
-}
-func (e M_Submessage_Submessage_Subenum) Number() protoreflect.EnumNumber {
- return protoreflect.EnumNumber(e)
-}
-
// Deprecated: Use M_Submessage_Submessage_Subenum.Type.Values instead.
var M_Submessage_Submessage_Subenum_name = map[int32]string{
0: "M_SUBMESSAGE_ZERO",
@@ -142,6 +137,14 @@
return protoimpl.X.EnumStringOf(x.Type(), protoreflect.EnumNumber(x))
}
+func (M_Submessage_Submessage_Subenum) Type() protoreflect.EnumType {
+ return xxx_File_import_public_sub_a_proto_enumTypes[2]
+}
+
+func (x M_Submessage_Submessage_Subenum) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
// Deprecated: Do not use.
func (x *M_Submessage_Submessage_Subenum) UnmarshalJSON(b []byte) error {
num, err := protoimpl.X.UnmarshalJSONEnum(x.Type(), b)
@@ -173,12 +176,19 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *M) ProtoReflect() protoreflect.Message {
- return xxx_File_import_public_sub_a_proto_messageTypes[0].MessageOf(m)
+func (x *M) Reset() {
+ *x = M{}
}
-func (m *M) Reset() { *m = M{} }
-func (m *M) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*M) ProtoMessage() {}
+
+func (x *M) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*M) ProtoMessage() {}
+
+func (x *M) ProtoReflect() protoreflect.Message {
+ return xxx_File_import_public_sub_a_proto_messageTypes[0].MessageOf(x)
+}
// Deprecated: Use M.ProtoReflect.Type instead.
func (*M) Descriptor() ([]byte, []int) {
@@ -199,30 +209,30 @@
var Default_M_B []byte = []byte("default")
var Default_M_F float64 = math.NaN()
-func (m *M) GetM2() *M2 {
- if m != nil {
- return m.M2
+func (x *M) GetM2() *M2 {
+ if x != nil {
+ return x.M2
}
return nil
}
-func (m *M) GetS() string {
- if m != nil && m.S != nil {
- return *m.S
+func (x *M) GetS() string {
+ if x != nil && x.S != nil {
+ return *x.S
}
return Default_M_S
}
-func (m *M) GetB() []byte {
- if m != nil && m.B != nil {
- return m.B
+func (x *M) GetB() []byte {
+ if x != nil && x.B != nil {
+ return x.B
}
return append([]byte(nil), Default_M_B...)
}
-func (m *M) GetF() float64 {
- if m != nil && m.F != nil {
- return *m.F
+func (x *M) GetF() float64 {
+ if x != nil && x.F != nil {
+ return *x.F
}
return Default_M_F
}
@@ -250,15 +260,15 @@
return nil
}
-func (m *M) GetOneofInt32() int32 {
- if x, ok := m.GetOneofField().(*M_OneofInt32); ok {
+func (x *M) GetOneofInt32() int32 {
+ if x, ok := x.GetOneofField().(*M_OneofInt32); ok {
return x.OneofInt32
}
return 0
}
-func (m *M) GetOneofInt64() int64 {
- if x, ok := m.GetOneofField().(*M_OneofInt64); ok {
+func (x *M) GetOneofInt64() int64 {
+ if x, ok := x.GetOneofField().(*M_OneofInt64); ok {
return x.OneofInt64
}
return 0
@@ -282,12 +292,19 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *M_Submessage) ProtoReflect() protoreflect.Message {
- return xxx_File_import_public_sub_a_proto_messageTypes[1].MessageOf(m)
+func (x *M_Submessage) Reset() {
+ *x = M_Submessage{}
}
-func (m *M_Submessage) Reset() { *m = M_Submessage{} }
-func (m *M_Submessage) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*M_Submessage) ProtoMessage() {}
+
+func (x *M_Submessage) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*M_Submessage) ProtoMessage() {}
+
+func (x *M_Submessage) ProtoReflect() protoreflect.Message {
+ return xxx_File_import_public_sub_a_proto_messageTypes[1].MessageOf(x)
+}
// Deprecated: Use M_Submessage.ProtoReflect.Type instead.
func (*M_Submessage) Descriptor() ([]byte, []int) {
@@ -317,15 +334,15 @@
return nil
}
-func (m *M_Submessage) GetSubmessageOneofInt32() int32 {
- if x, ok := m.GetSubmessageOneofField().(*M_Submessage_SubmessageOneofInt32); ok {
+func (x *M_Submessage) GetSubmessageOneofInt32() int32 {
+ if x, ok := x.GetSubmessageOneofField().(*M_Submessage_SubmessageOneofInt32); ok {
return x.SubmessageOneofInt32
}
return 0
}
-func (m *M_Submessage) GetSubmessageOneofInt64() int64 {
- if x, ok := m.GetSubmessageOneofField().(*M_Submessage_SubmessageOneofInt64); ok {
+func (x *M_Submessage) GetSubmessageOneofInt64() int64 {
+ if x, ok := x.GetSubmessageOneofField().(*M_Submessage_SubmessageOneofInt64); ok {
return x.SubmessageOneofInt64
}
return 0
diff --git a/cmd/protoc-gen-go/testdata/import_public/sub/b.pb.go b/cmd/protoc-gen-go/testdata/import_public/sub/b.pb.go
index caca555..bbb09bf 100644
--- a/cmd/protoc-gen-go/testdata/import_public/sub/b.pb.go
+++ b/cmd/protoc-gen-go/testdata/import_public/sub/b.pb.go
@@ -18,12 +18,19 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *M2) ProtoReflect() protoreflect.Message {
- return xxx_File_import_public_sub_b_proto_messageTypes[0].MessageOf(m)
+func (x *M2) Reset() {
+ *x = M2{}
}
-func (m *M2) Reset() { *m = M2{} }
-func (m *M2) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*M2) ProtoMessage() {}
+
+func (x *M2) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*M2) ProtoMessage() {}
+
+func (x *M2) ProtoReflect() protoreflect.Message {
+ return xxx_File_import_public_sub_b_proto_messageTypes[0].MessageOf(x)
+}
// Deprecated: Use M2.ProtoReflect.Type instead.
func (*M2) Descriptor() ([]byte, []int) {
diff --git a/cmd/protoc-gen-go/testdata/import_public/sub2/a.pb.go b/cmd/protoc-gen-go/testdata/import_public/sub2/a.pb.go
index 7f936e1..be37da4 100644
--- a/cmd/protoc-gen-go/testdata/import_public/sub2/a.pb.go
+++ b/cmd/protoc-gen-go/testdata/import_public/sub2/a.pb.go
@@ -18,12 +18,19 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *Sub2Message) ProtoReflect() protoreflect.Message {
- return xxx_File_import_public_sub2_a_proto_messageTypes[0].MessageOf(m)
+func (x *Sub2Message) Reset() {
+ *x = Sub2Message{}
}
-func (m *Sub2Message) Reset() { *m = Sub2Message{} }
-func (m *Sub2Message) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*Sub2Message) ProtoMessage() {}
+
+func (x *Sub2Message) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Sub2Message) ProtoMessage() {}
+
+func (x *Sub2Message) ProtoReflect() protoreflect.Message {
+ return xxx_File_import_public_sub2_a_proto_messageTypes[0].MessageOf(x)
+}
// Deprecated: Use Sub2Message.ProtoReflect.Type instead.
func (*Sub2Message) Descriptor() ([]byte, []int) {
diff --git a/cmd/protoc-gen-go/testdata/imports/fmt/m.pb.go b/cmd/protoc-gen-go/testdata/imports/fmt/m.pb.go
index 779c7e3..1ad7e8d 100644
--- a/cmd/protoc-gen-go/testdata/imports/fmt/m.pb.go
+++ b/cmd/protoc-gen-go/testdata/imports/fmt/m.pb.go
@@ -18,12 +18,19 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *M) ProtoReflect() protoreflect.Message {
- return xxx_File_imports_fmt_m_proto_messageTypes[0].MessageOf(m)
+func (x *M) Reset() {
+ *x = M{}
}
-func (m *M) Reset() { *m = M{} }
-func (m *M) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*M) ProtoMessage() {}
+
+func (x *M) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*M) ProtoMessage() {}
+
+func (x *M) ProtoReflect() protoreflect.Message {
+ return xxx_File_imports_fmt_m_proto_messageTypes[0].MessageOf(x)
+}
// Deprecated: Use M.ProtoReflect.Type instead.
func (*M) Descriptor() ([]byte, []int) {
diff --git a/cmd/protoc-gen-go/testdata/imports/test_a_1/m1.pb.go b/cmd/protoc-gen-go/testdata/imports/test_a_1/m1.pb.go
index c4efa6f..8f1cb2c 100644
--- a/cmd/protoc-gen-go/testdata/imports/test_a_1/m1.pb.go
+++ b/cmd/protoc-gen-go/testdata/imports/test_a_1/m1.pb.go
@@ -18,13 +18,6 @@
E1_E1_ZERO E1 = 0
)
-func (e E1) Type() protoreflect.EnumType {
- return xxx_File_imports_test_a_1_m1_proto_enumTypes[0]
-}
-func (e E1) Number() protoreflect.EnumNumber {
- return protoreflect.EnumNumber(e)
-}
-
// Deprecated: Use E1.Type.Values instead.
var E1_name = map[int32]string{
0: "E1_ZERO",
@@ -39,6 +32,14 @@
return protoimpl.X.EnumStringOf(x.Type(), protoreflect.EnumNumber(x))
}
+func (E1) Type() protoreflect.EnumType {
+ return xxx_File_imports_test_a_1_m1_proto_enumTypes[0]
+}
+
+func (x E1) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
// Deprecated: Use E1.Type instead.
func (E1) EnumDescriptor() ([]byte, []int) {
return xxx_File_imports_test_a_1_m1_proto_rawDescGZIP(), []int{0}
@@ -50,12 +51,19 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *M1) ProtoReflect() protoreflect.Message {
- return xxx_File_imports_test_a_1_m1_proto_messageTypes[0].MessageOf(m)
+func (x *M1) Reset() {
+ *x = M1{}
}
-func (m *M1) Reset() { *m = M1{} }
-func (m *M1) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*M1) ProtoMessage() {}
+
+func (x *M1) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*M1) ProtoMessage() {}
+
+func (x *M1) ProtoReflect() protoreflect.Message {
+ return xxx_File_imports_test_a_1_m1_proto_messageTypes[0].MessageOf(x)
+}
// Deprecated: Use M1.ProtoReflect.Type instead.
func (*M1) Descriptor() ([]byte, []int) {
@@ -69,21 +77,28 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *M1_1) ProtoReflect() protoreflect.Message {
- return xxx_File_imports_test_a_1_m1_proto_messageTypes[1].MessageOf(m)
+func (x *M1_1) Reset() {
+ *x = M1_1{}
}
-func (m *M1_1) Reset() { *m = M1_1{} }
-func (m *M1_1) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*M1_1) ProtoMessage() {}
+
+func (x *M1_1) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*M1_1) ProtoMessage() {}
+
+func (x *M1_1) ProtoReflect() protoreflect.Message {
+ return xxx_File_imports_test_a_1_m1_proto_messageTypes[1].MessageOf(x)
+}
// Deprecated: Use M1_1.ProtoReflect.Type instead.
func (*M1_1) Descriptor() ([]byte, []int) {
return xxx_File_imports_test_a_1_m1_proto_rawDescGZIP(), []int{1}
}
-func (m *M1_1) GetM1() *M1 {
- if m != nil {
- return m.M1
+func (x *M1_1) GetM1() *M1 {
+ if x != nil {
+ return x.M1
}
return nil
}
diff --git a/cmd/protoc-gen-go/testdata/imports/test_a_1/m2.pb.go b/cmd/protoc-gen-go/testdata/imports/test_a_1/m2.pb.go
index 70ab52d..f822333 100644
--- a/cmd/protoc-gen-go/testdata/imports/test_a_1/m2.pb.go
+++ b/cmd/protoc-gen-go/testdata/imports/test_a_1/m2.pb.go
@@ -18,12 +18,19 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *M2) ProtoReflect() protoreflect.Message {
- return xxx_File_imports_test_a_1_m2_proto_messageTypes[0].MessageOf(m)
+func (x *M2) Reset() {
+ *x = M2{}
}
-func (m *M2) Reset() { *m = M2{} }
-func (m *M2) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*M2) ProtoMessage() {}
+
+func (x *M2) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*M2) ProtoMessage() {}
+
+func (x *M2) ProtoReflect() protoreflect.Message {
+ return xxx_File_imports_test_a_1_m2_proto_messageTypes[0].MessageOf(x)
+}
// Deprecated: Use M2.ProtoReflect.Type instead.
func (*M2) Descriptor() ([]byte, []int) {
diff --git a/cmd/protoc-gen-go/testdata/imports/test_a_2/m3.pb.go b/cmd/protoc-gen-go/testdata/imports/test_a_2/m3.pb.go
index e1e05d0..9eda985 100644
--- a/cmd/protoc-gen-go/testdata/imports/test_a_2/m3.pb.go
+++ b/cmd/protoc-gen-go/testdata/imports/test_a_2/m3.pb.go
@@ -18,12 +18,19 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *M3) ProtoReflect() protoreflect.Message {
- return xxx_File_imports_test_a_2_m3_proto_messageTypes[0].MessageOf(m)
+func (x *M3) Reset() {
+ *x = M3{}
}
-func (m *M3) Reset() { *m = M3{} }
-func (m *M3) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*M3) ProtoMessage() {}
+
+func (x *M3) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*M3) ProtoMessage() {}
+
+func (x *M3) ProtoReflect() protoreflect.Message {
+ return xxx_File_imports_test_a_2_m3_proto_messageTypes[0].MessageOf(x)
+}
// Deprecated: Use M3.ProtoReflect.Type instead.
func (*M3) Descriptor() ([]byte, []int) {
diff --git a/cmd/protoc-gen-go/testdata/imports/test_a_2/m4.pb.go b/cmd/protoc-gen-go/testdata/imports/test_a_2/m4.pb.go
index 17a57ab..d9eb9d4 100644
--- a/cmd/protoc-gen-go/testdata/imports/test_a_2/m4.pb.go
+++ b/cmd/protoc-gen-go/testdata/imports/test_a_2/m4.pb.go
@@ -18,12 +18,19 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *M4) ProtoReflect() protoreflect.Message {
- return xxx_File_imports_test_a_2_m4_proto_messageTypes[0].MessageOf(m)
+func (x *M4) Reset() {
+ *x = M4{}
}
-func (m *M4) Reset() { *m = M4{} }
-func (m *M4) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*M4) ProtoMessage() {}
+
+func (x *M4) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*M4) ProtoMessage() {}
+
+func (x *M4) ProtoReflect() protoreflect.Message {
+ return xxx_File_imports_test_a_2_m4_proto_messageTypes[0].MessageOf(x)
+}
// Deprecated: Use M4.ProtoReflect.Type instead.
func (*M4) Descriptor() ([]byte, []int) {
diff --git a/cmd/protoc-gen-go/testdata/imports/test_b_1/m1.pb.go b/cmd/protoc-gen-go/testdata/imports/test_b_1/m1.pb.go
index 6ea825b..4f8f37e 100644
--- a/cmd/protoc-gen-go/testdata/imports/test_b_1/m1.pb.go
+++ b/cmd/protoc-gen-go/testdata/imports/test_b_1/m1.pb.go
@@ -18,12 +18,19 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *M1) ProtoReflect() protoreflect.Message {
- return xxx_File_imports_test_b_1_m1_proto_messageTypes[0].MessageOf(m)
+func (x *M1) Reset() {
+ *x = M1{}
}
-func (m *M1) Reset() { *m = M1{} }
-func (m *M1) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*M1) ProtoMessage() {}
+
+func (x *M1) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*M1) ProtoMessage() {}
+
+func (x *M1) ProtoReflect() protoreflect.Message {
+ return xxx_File_imports_test_b_1_m1_proto_messageTypes[0].MessageOf(x)
+}
// Deprecated: Use M1.ProtoReflect.Type instead.
func (*M1) Descriptor() ([]byte, []int) {
diff --git a/cmd/protoc-gen-go/testdata/imports/test_b_1/m2.pb.go b/cmd/protoc-gen-go/testdata/imports/test_b_1/m2.pb.go
index c4f866a..6da5dfb 100644
--- a/cmd/protoc-gen-go/testdata/imports/test_b_1/m2.pb.go
+++ b/cmd/protoc-gen-go/testdata/imports/test_b_1/m2.pb.go
@@ -18,12 +18,19 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *M2) ProtoReflect() protoreflect.Message {
- return xxx_File_imports_test_b_1_m2_proto_messageTypes[0].MessageOf(m)
+func (x *M2) Reset() {
+ *x = M2{}
}
-func (m *M2) Reset() { *m = M2{} }
-func (m *M2) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*M2) ProtoMessage() {}
+
+func (x *M2) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*M2) ProtoMessage() {}
+
+func (x *M2) ProtoReflect() protoreflect.Message {
+ return xxx_File_imports_test_b_1_m2_proto_messageTypes[0].MessageOf(x)
+}
// Deprecated: Use M2.ProtoReflect.Type instead.
func (*M2) Descriptor() ([]byte, []int) {
diff --git a/cmd/protoc-gen-go/testdata/imports/test_import_a1m1.pb.go b/cmd/protoc-gen-go/testdata/imports/test_import_a1m1.pb.go
index 552dc5a..3022393 100644
--- a/cmd/protoc-gen-go/testdata/imports/test_import_a1m1.pb.go
+++ b/cmd/protoc-gen-go/testdata/imports/test_import_a1m1.pb.go
@@ -20,21 +20,28 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *A1M1) ProtoReflect() protoreflect.Message {
- return xxx_File_imports_test_import_a1m1_proto_messageTypes[0].MessageOf(m)
+func (x *A1M1) Reset() {
+ *x = A1M1{}
}
-func (m *A1M1) Reset() { *m = A1M1{} }
-func (m *A1M1) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*A1M1) ProtoMessage() {}
+
+func (x *A1M1) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*A1M1) ProtoMessage() {}
+
+func (x *A1M1) ProtoReflect() protoreflect.Message {
+ return xxx_File_imports_test_import_a1m1_proto_messageTypes[0].MessageOf(x)
+}
// Deprecated: Use A1M1.ProtoReflect.Type instead.
func (*A1M1) Descriptor() ([]byte, []int) {
return xxx_File_imports_test_import_a1m1_proto_rawDescGZIP(), []int{0}
}
-func (m *A1M1) GetF() *test_a_1.M1 {
- if m != nil {
- return m.F
+func (x *A1M1) GetF() *test_a_1.M1 {
+ if x != nil {
+ return x.F
}
return nil
}
diff --git a/cmd/protoc-gen-go/testdata/imports/test_import_a1m2.pb.go b/cmd/protoc-gen-go/testdata/imports/test_import_a1m2.pb.go
index c0a0022..b2c5d85 100644
--- a/cmd/protoc-gen-go/testdata/imports/test_import_a1m2.pb.go
+++ b/cmd/protoc-gen-go/testdata/imports/test_import_a1m2.pb.go
@@ -20,21 +20,28 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *A1M2) ProtoReflect() protoreflect.Message {
- return xxx_File_imports_test_import_a1m2_proto_messageTypes[0].MessageOf(m)
+func (x *A1M2) Reset() {
+ *x = A1M2{}
}
-func (m *A1M2) Reset() { *m = A1M2{} }
-func (m *A1M2) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*A1M2) ProtoMessage() {}
+
+func (x *A1M2) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*A1M2) ProtoMessage() {}
+
+func (x *A1M2) ProtoReflect() protoreflect.Message {
+ return xxx_File_imports_test_import_a1m2_proto_messageTypes[0].MessageOf(x)
+}
// Deprecated: Use A1M2.ProtoReflect.Type instead.
func (*A1M2) Descriptor() ([]byte, []int) {
return xxx_File_imports_test_import_a1m2_proto_rawDescGZIP(), []int{0}
}
-func (m *A1M2) GetF() *test_a_1.M2 {
- if m != nil {
- return m.F
+func (x *A1M2) GetF() *test_a_1.M2 {
+ if x != nil {
+ return x.F
}
return nil
}
diff --git a/cmd/protoc-gen-go/testdata/imports/test_import_all.pb.go b/cmd/protoc-gen-go/testdata/imports/test_import_all.pb.go
index b2d6f9d..ff1fd2f 100644
--- a/cmd/protoc-gen-go/testdata/imports/test_import_all.pb.go
+++ b/cmd/protoc-gen-go/testdata/imports/test_import_all.pb.go
@@ -27,49 +27,56 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *All) ProtoReflect() protoreflect.Message {
- return xxx_File_imports_test_import_all_proto_messageTypes[0].MessageOf(m)
+func (x *All) Reset() {
+ *x = All{}
}
-func (m *All) Reset() { *m = All{} }
-func (m *All) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*All) ProtoMessage() {}
+
+func (x *All) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*All) ProtoMessage() {}
+
+func (x *All) ProtoReflect() protoreflect.Message {
+ return xxx_File_imports_test_import_all_proto_messageTypes[0].MessageOf(x)
+}
// Deprecated: Use All.ProtoReflect.Type instead.
func (*All) Descriptor() ([]byte, []int) {
return xxx_File_imports_test_import_all_proto_rawDescGZIP(), []int{0}
}
-func (m *All) GetAm1() *test_a_1.M1 {
- if m != nil {
- return m.Am1
+func (x *All) GetAm1() *test_a_1.M1 {
+ if x != nil {
+ return x.Am1
}
return nil
}
-func (m *All) GetAm2() *test_a_1.M2 {
- if m != nil {
- return m.Am2
+func (x *All) GetAm2() *test_a_1.M2 {
+ if x != nil {
+ return x.Am2
}
return nil
}
-func (m *All) GetBm1() *test_b_1.M1 {
- if m != nil {
- return m.Bm1
+func (x *All) GetBm1() *test_b_1.M1 {
+ if x != nil {
+ return x.Bm1
}
return nil
}
-func (m *All) GetBm2() *test_b_1.M2 {
- if m != nil {
- return m.Bm2
+func (x *All) GetBm2() *test_b_1.M2 {
+ if x != nil {
+ return x.Bm2
}
return nil
}
-func (m *All) GetFmt() *fmt.M {
- if m != nil {
- return m.Fmt
+func (x *All) GetFmt() *fmt.M {
+ if x != nil {
+ return x.Fmt
}
return nil
}
diff --git a/cmd/protoc-gen-go/testdata/issue780_oneof_conflict/test.pb.go b/cmd/protoc-gen-go/testdata/issue780_oneof_conflict/test.pb.go
index 1ed2429..b2826bd 100644
--- a/cmd/protoc-gen-go/testdata/issue780_oneof_conflict/test.pb.go
+++ b/cmd/protoc-gen-go/testdata/issue780_oneof_conflict/test.pb.go
@@ -21,12 +21,19 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *Foo) ProtoReflect() protoreflect.Message {
- return xxx_File_issue780_oneof_conflict_test_proto_messageTypes[0].MessageOf(m)
+func (x *Foo) Reset() {
+ *x = Foo{}
}
-func (m *Foo) Reset() { *m = Foo{} }
-func (m *Foo) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*Foo) ProtoMessage() {}
+
+func (x *Foo) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Foo) ProtoMessage() {}
+
+func (x *Foo) ProtoReflect() protoreflect.Message {
+ return xxx_File_issue780_oneof_conflict_test_proto_messageTypes[0].MessageOf(x)
+}
// Deprecated: Use Foo.ProtoReflect.Type instead.
func (*Foo) Descriptor() ([]byte, []int) {
@@ -50,8 +57,8 @@
return nil
}
-func (m *Foo) GetGetBar() string {
- if x, ok := m.GetBar().(*Foo_GetBar); ok {
+func (x *Foo) GetGetBar() string {
+ if x, ok := x.GetBar().(*Foo_GetBar); ok {
return x.GetBar
}
return ""
diff --git a/cmd/protoc-gen-go/testdata/nopackage/nopackage.pb.go b/cmd/protoc-gen-go/testdata/nopackage/nopackage.pb.go
index 28669fb..829a1b6 100644
--- a/cmd/protoc-gen-go/testdata/nopackage/nopackage.pb.go
+++ b/cmd/protoc-gen-go/testdata/nopackage/nopackage.pb.go
@@ -18,13 +18,6 @@
Enum_ZERO Enum = 0
)
-func (e Enum) Type() protoreflect.EnumType {
- return xxx_File_nopackage_nopackage_proto_enumTypes[0]
-}
-func (e Enum) Number() protoreflect.EnumNumber {
- return protoreflect.EnumNumber(e)
-}
-
// Deprecated: Use Enum.Type.Values instead.
var Enum_name = map[int32]string{
0: "ZERO",
@@ -43,6 +36,14 @@
return protoimpl.X.EnumStringOf(x.Type(), protoreflect.EnumNumber(x))
}
+func (Enum) Type() protoreflect.EnumType {
+ return xxx_File_nopackage_nopackage_proto_enumTypes[0]
+}
+
+func (x Enum) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
// Deprecated: Do not use.
func (x *Enum) UnmarshalJSON(b []byte) error {
num, err := protoimpl.X.UnmarshalJSONEnum(x.Type(), b)
@@ -66,12 +67,19 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *Message) ProtoReflect() protoreflect.Message {
- return xxx_File_nopackage_nopackage_proto_messageTypes[0].MessageOf(m)
+func (x *Message) Reset() {
+ *x = Message{}
}
-func (m *Message) Reset() { *m = Message{} }
-func (m *Message) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*Message) ProtoMessage() {}
+
+func (x *Message) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Message) ProtoMessage() {}
+
+func (x *Message) ProtoReflect() protoreflect.Message {
+ return xxx_File_nopackage_nopackage_proto_messageTypes[0].MessageOf(x)
+}
// Deprecated: Use Message.ProtoReflect.Type instead.
func (*Message) Descriptor() ([]byte, []int) {
@@ -80,16 +88,16 @@
const Default_Message_EnumField Enum = Enum_ZERO
-func (m *Message) GetStringField() string {
- if m != nil && m.StringField != nil {
- return *m.StringField
+func (x *Message) GetStringField() string {
+ if x != nil && x.StringField != nil {
+ return *x.StringField
}
return ""
}
-func (m *Message) GetEnumField() Enum {
- if m != nil && m.EnumField != nil {
- return *m.EnumField
+func (x *Message) GetEnumField() Enum {
+ if x != nil && x.EnumField != nil {
+ return *x.EnumField
}
return Default_Message_EnumField
}
diff --git a/cmd/protoc-gen-go/testdata/proto2/enum.pb.go b/cmd/protoc-gen-go/testdata/proto2/enum.pb.go
index b1e534d..ca359dd 100644
--- a/cmd/protoc-gen-go/testdata/proto2/enum.pb.go
+++ b/cmd/protoc-gen-go/testdata/proto2/enum.pb.go
@@ -22,13 +22,6 @@
EnumType1_TWO EnumType1 = 2
)
-func (e EnumType1) Type() protoreflect.EnumType {
- return xxx_File_proto2_enum_proto_enumTypes[0]
-}
-func (e EnumType1) Number() protoreflect.EnumNumber {
- return protoreflect.EnumNumber(e)
-}
-
// Deprecated: Use EnumType1.Type.Values instead.
var EnumType1_name = map[int32]string{
1: "ONE",
@@ -49,6 +42,14 @@
return protoimpl.X.EnumStringOf(x.Type(), protoreflect.EnumNumber(x))
}
+func (EnumType1) Type() protoreflect.EnumType {
+ return xxx_File_proto2_enum_proto_enumTypes[0]
+}
+
+func (x EnumType1) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
// Deprecated: Do not use.
func (x *EnumType1) UnmarshalJSON(b []byte) error {
num, err := protoimpl.X.UnmarshalJSONEnum(x.Type(), b)
@@ -71,13 +72,6 @@
EnumType2_duplicate2 EnumType2 = 1
)
-func (e EnumType2) Type() protoreflect.EnumType {
- return xxx_File_proto2_enum_proto_enumTypes[1]
-}
-func (e EnumType2) Number() protoreflect.EnumNumber {
- return protoreflect.EnumNumber(e)
-}
-
// Deprecated: Use EnumType2.Type.Values instead.
var EnumType2_name = map[int32]string{
1: "duplicate1",
@@ -98,6 +92,14 @@
return protoimpl.X.EnumStringOf(x.Type(), protoreflect.EnumNumber(x))
}
+func (EnumType2) Type() protoreflect.EnumType {
+ return xxx_File_proto2_enum_proto_enumTypes[1]
+}
+
+func (x EnumType2) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
// Deprecated: Do not use.
func (x *EnumType2) UnmarshalJSON(b []byte) error {
num, err := protoimpl.X.UnmarshalJSONEnum(x.Type(), b)
@@ -121,13 +123,6 @@
EnumContainerMessage1_NESTED_1A_VALUE EnumContainerMessage1_NestedEnumType1A = 0
)
-func (e EnumContainerMessage1_NestedEnumType1A) Type() protoreflect.EnumType {
- return xxx_File_proto2_enum_proto_enumTypes[2]
-}
-func (e EnumContainerMessage1_NestedEnumType1A) Number() protoreflect.EnumNumber {
- return protoreflect.EnumNumber(e)
-}
-
// Deprecated: Use EnumContainerMessage1_NestedEnumType1A.Type.Values instead.
var EnumContainerMessage1_NestedEnumType1A_name = map[int32]string{
0: "NESTED_1A_VALUE",
@@ -146,6 +141,14 @@
return protoimpl.X.EnumStringOf(x.Type(), protoreflect.EnumNumber(x))
}
+func (EnumContainerMessage1_NestedEnumType1A) Type() protoreflect.EnumType {
+ return xxx_File_proto2_enum_proto_enumTypes[2]
+}
+
+func (x EnumContainerMessage1_NestedEnumType1A) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
// Deprecated: Do not use.
func (x *EnumContainerMessage1_NestedEnumType1A) UnmarshalJSON(b []byte) error {
num, err := protoimpl.X.UnmarshalJSONEnum(x.Type(), b)
@@ -167,13 +170,6 @@
EnumContainerMessage1_NESTED_1B_VALUE EnumContainerMessage1_NestedEnumType1B = 0
)
-func (e EnumContainerMessage1_NestedEnumType1B) Type() protoreflect.EnumType {
- return xxx_File_proto2_enum_proto_enumTypes[3]
-}
-func (e EnumContainerMessage1_NestedEnumType1B) Number() protoreflect.EnumNumber {
- return protoreflect.EnumNumber(e)
-}
-
// Deprecated: Use EnumContainerMessage1_NestedEnumType1B.Type.Values instead.
var EnumContainerMessage1_NestedEnumType1B_name = map[int32]string{
0: "NESTED_1B_VALUE",
@@ -192,6 +188,14 @@
return protoimpl.X.EnumStringOf(x.Type(), protoreflect.EnumNumber(x))
}
+func (EnumContainerMessage1_NestedEnumType1B) Type() protoreflect.EnumType {
+ return xxx_File_proto2_enum_proto_enumTypes[3]
+}
+
+func (x EnumContainerMessage1_NestedEnumType1B) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
// Deprecated: Do not use.
func (x *EnumContainerMessage1_NestedEnumType1B) UnmarshalJSON(b []byte) error {
num, err := protoimpl.X.UnmarshalJSONEnum(x.Type(), b)
@@ -215,13 +219,6 @@
EnumContainerMessage1_EnumContainerMessage2_NESTED_2A_VALUE EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A = 0
)
-func (e EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A) Type() protoreflect.EnumType {
- return xxx_File_proto2_enum_proto_enumTypes[4]
-}
-func (e EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A) Number() protoreflect.EnumNumber {
- return protoreflect.EnumNumber(e)
-}
-
// Deprecated: Use EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A.Type.Values instead.
var EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A_name = map[int32]string{
0: "NESTED_2A_VALUE",
@@ -240,6 +237,14 @@
return protoimpl.X.EnumStringOf(x.Type(), protoreflect.EnumNumber(x))
}
+func (EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A) Type() protoreflect.EnumType {
+ return xxx_File_proto2_enum_proto_enumTypes[4]
+}
+
+func (x EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
// Deprecated: Do not use.
func (x *EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2A) UnmarshalJSON(b []byte) error {
num, err := protoimpl.X.UnmarshalJSONEnum(x.Type(), b)
@@ -261,13 +266,6 @@
EnumContainerMessage1_EnumContainerMessage2_NESTED_2B_VALUE EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B = 0
)
-func (e EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B) Type() protoreflect.EnumType {
- return xxx_File_proto2_enum_proto_enumTypes[5]
-}
-func (e EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B) Number() protoreflect.EnumNumber {
- return protoreflect.EnumNumber(e)
-}
-
// Deprecated: Use EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B.Type.Values instead.
var EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B_name = map[int32]string{
0: "NESTED_2B_VALUE",
@@ -286,6 +284,14 @@
return protoimpl.X.EnumStringOf(x.Type(), protoreflect.EnumNumber(x))
}
+func (EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B) Type() protoreflect.EnumType {
+ return xxx_File_proto2_enum_proto_enumTypes[5]
+}
+
+func (x EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
// Deprecated: Do not use.
func (x *EnumContainerMessage1_EnumContainerMessage2_NestedEnumType2B) UnmarshalJSON(b []byte) error {
num, err := protoimpl.X.UnmarshalJSONEnum(x.Type(), b)
@@ -309,12 +315,19 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *EnumContainerMessage1) ProtoReflect() protoreflect.Message {
- return xxx_File_proto2_enum_proto_messageTypes[0].MessageOf(m)
+func (x *EnumContainerMessage1) Reset() {
+ *x = EnumContainerMessage1{}
}
-func (m *EnumContainerMessage1) Reset() { *m = EnumContainerMessage1{} }
-func (m *EnumContainerMessage1) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*EnumContainerMessage1) ProtoMessage() {}
+
+func (x *EnumContainerMessage1) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*EnumContainerMessage1) ProtoMessage() {}
+
+func (x *EnumContainerMessage1) ProtoReflect() protoreflect.Message {
+ return xxx_File_proto2_enum_proto_messageTypes[0].MessageOf(x)
+}
// Deprecated: Use EnumContainerMessage1.ProtoReflect.Type instead.
func (*EnumContainerMessage1) Descriptor() ([]byte, []int) {
@@ -324,16 +337,16 @@
const Default_EnumContainerMessage1_DefaultDuplicate1 EnumType2 = EnumType2_duplicate1
const Default_EnumContainerMessage1_DefaultDuplicate2 EnumType2 = EnumType2_duplicate2
-func (m *EnumContainerMessage1) GetDefaultDuplicate1() EnumType2 {
- if m != nil && m.DefaultDuplicate1 != nil {
- return *m.DefaultDuplicate1
+func (x *EnumContainerMessage1) GetDefaultDuplicate1() EnumType2 {
+ if x != nil && x.DefaultDuplicate1 != nil {
+ return *x.DefaultDuplicate1
}
return Default_EnumContainerMessage1_DefaultDuplicate1
}
-func (m *EnumContainerMessage1) GetDefaultDuplicate2() EnumType2 {
- if m != nil && m.DefaultDuplicate2 != nil {
- return *m.DefaultDuplicate2
+func (x *EnumContainerMessage1) GetDefaultDuplicate2() EnumType2 {
+ if x != nil && x.DefaultDuplicate2 != nil {
+ return *x.DefaultDuplicate2
}
return Default_EnumContainerMessage1_DefaultDuplicate2
}
@@ -344,17 +357,20 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *EnumContainerMessage1_EnumContainerMessage2) ProtoReflect() protoreflect.Message {
- return xxx_File_proto2_enum_proto_messageTypes[1].MessageOf(m)
+func (x *EnumContainerMessage1_EnumContainerMessage2) Reset() {
+ *x = EnumContainerMessage1_EnumContainerMessage2{}
}
-func (m *EnumContainerMessage1_EnumContainerMessage2) Reset() {
- *m = EnumContainerMessage1_EnumContainerMessage2{}
+
+func (x *EnumContainerMessage1_EnumContainerMessage2) String() string {
+ return protoimpl.X.MessageStringOf(x)
}
-func (m *EnumContainerMessage1_EnumContainerMessage2) String() string {
- return protoimpl.X.MessageStringOf(m)
-}
+
func (*EnumContainerMessage1_EnumContainerMessage2) ProtoMessage() {}
+func (x *EnumContainerMessage1_EnumContainerMessage2) ProtoReflect() protoreflect.Message {
+ return xxx_File_proto2_enum_proto_messageTypes[1].MessageOf(x)
+}
+
// Deprecated: Use EnumContainerMessage1_EnumContainerMessage2.ProtoReflect.Type instead.
func (*EnumContainerMessage1_EnumContainerMessage2) Descriptor() ([]byte, []int) {
return xxx_File_proto2_enum_proto_rawDescGZIP(), []int{0, 0}
diff --git a/cmd/protoc-gen-go/testdata/proto2/fields.pb.go b/cmd/protoc-gen-go/testdata/proto2/fields.pb.go
index d37f28c..da2f13a 100644
--- a/cmd/protoc-gen-go/testdata/proto2/fields.pb.go
+++ b/cmd/protoc-gen-go/testdata/proto2/fields.pb.go
@@ -20,13 +20,6 @@
FieldTestMessage_ONE FieldTestMessage_Enum = 1
)
-func (e FieldTestMessage_Enum) Type() protoreflect.EnumType {
- return xxx_File_proto2_fields_proto_enumTypes[0]
-}
-func (e FieldTestMessage_Enum) Number() protoreflect.EnumNumber {
- return protoreflect.EnumNumber(e)
-}
-
// Deprecated: Use FieldTestMessage_Enum.Type.Values instead.
var FieldTestMessage_Enum_name = map[int32]string{
0: "ZERO",
@@ -47,6 +40,14 @@
return protoimpl.X.EnumStringOf(x.Type(), protoreflect.EnumNumber(x))
}
+func (FieldTestMessage_Enum) Type() protoreflect.EnumType {
+ return xxx_File_proto2_fields_proto_enumTypes[0]
+}
+
+func (x FieldTestMessage_Enum) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
// Deprecated: Do not use.
func (x *FieldTestMessage_Enum) UnmarshalJSON(b []byte) error {
num, err := protoimpl.X.UnmarshalJSONEnum(x.Type(), b)
@@ -174,12 +175,19 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *FieldTestMessage) ProtoReflect() protoreflect.Message {
- return xxx_File_proto2_fields_proto_messageTypes[0].MessageOf(m)
+func (x *FieldTestMessage) Reset() {
+ *x = FieldTestMessage{}
}
-func (m *FieldTestMessage) Reset() { *m = FieldTestMessage{} }
-func (m *FieldTestMessage) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*FieldTestMessage) ProtoMessage() {}
+
+func (x *FieldTestMessage) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*FieldTestMessage) ProtoMessage() {}
+
+func (x *FieldTestMessage) ProtoReflect() protoreflect.Message {
+ return xxx_File_proto2_fields_proto_messageTypes[0].MessageOf(x)
+}
// Deprecated: Use FieldTestMessage.ProtoReflect.Type instead.
func (*FieldTestMessage) Descriptor() ([]byte, []int) {
@@ -214,569 +222,569 @@
var Default_FieldTestMessage_DefaultDoublePosinf float64 = math.Inf(1)
var Default_FieldTestMessage_DefaultDoubleNan float64 = math.NaN()
-func (m *FieldTestMessage) GetOptionalBool() bool {
- if m != nil && m.OptionalBool != nil {
- return *m.OptionalBool
+func (x *FieldTestMessage) GetOptionalBool() bool {
+ if x != nil && x.OptionalBool != nil {
+ return *x.OptionalBool
}
return false
}
-func (m *FieldTestMessage) GetOptionalEnum() FieldTestMessage_Enum {
- if m != nil && m.OptionalEnum != nil {
- return *m.OptionalEnum
+func (x *FieldTestMessage) GetOptionalEnum() FieldTestMessage_Enum {
+ if x != nil && x.OptionalEnum != nil {
+ return *x.OptionalEnum
}
return FieldTestMessage_ZERO
}
-func (m *FieldTestMessage) GetOptionalInt32() int32 {
- if m != nil && m.OptionalInt32 != nil {
- return *m.OptionalInt32
+func (x *FieldTestMessage) GetOptionalInt32() int32 {
+ if x != nil && x.OptionalInt32 != nil {
+ return *x.OptionalInt32
}
return 0
}
-func (m *FieldTestMessage) GetOptionalSint32() int32 {
- if m != nil && m.OptionalSint32 != nil {
- return *m.OptionalSint32
+func (x *FieldTestMessage) GetOptionalSint32() int32 {
+ if x != nil && x.OptionalSint32 != nil {
+ return *x.OptionalSint32
}
return 0
}
-func (m *FieldTestMessage) GetOptionalUint32() uint32 {
- if m != nil && m.OptionalUint32 != nil {
- return *m.OptionalUint32
+func (x *FieldTestMessage) GetOptionalUint32() uint32 {
+ if x != nil && x.OptionalUint32 != nil {
+ return *x.OptionalUint32
}
return 0
}
-func (m *FieldTestMessage) GetOptionalInt64() int64 {
- if m != nil && m.OptionalInt64 != nil {
- return *m.OptionalInt64
+func (x *FieldTestMessage) GetOptionalInt64() int64 {
+ if x != nil && x.OptionalInt64 != nil {
+ return *x.OptionalInt64
}
return 0
}
-func (m *FieldTestMessage) GetOptionalSint64() int64 {
- if m != nil && m.OptionalSint64 != nil {
- return *m.OptionalSint64
+func (x *FieldTestMessage) GetOptionalSint64() int64 {
+ if x != nil && x.OptionalSint64 != nil {
+ return *x.OptionalSint64
}
return 0
}
-func (m *FieldTestMessage) GetOptionalUint64() uint64 {
- if m != nil && m.OptionalUint64 != nil {
- return *m.OptionalUint64
+func (x *FieldTestMessage) GetOptionalUint64() uint64 {
+ if x != nil && x.OptionalUint64 != nil {
+ return *x.OptionalUint64
}
return 0
}
-func (m *FieldTestMessage) GetOptionalSfixed32() int32 {
- if m != nil && m.OptionalSfixed32 != nil {
- return *m.OptionalSfixed32
+func (x *FieldTestMessage) GetOptionalSfixed32() int32 {
+ if x != nil && x.OptionalSfixed32 != nil {
+ return *x.OptionalSfixed32
}
return 0
}
-func (m *FieldTestMessage) GetOptionalFixed32() uint32 {
- if m != nil && m.OptionalFixed32 != nil {
- return *m.OptionalFixed32
+func (x *FieldTestMessage) GetOptionalFixed32() uint32 {
+ if x != nil && x.OptionalFixed32 != nil {
+ return *x.OptionalFixed32
}
return 0
}
-func (m *FieldTestMessage) GetOptionalFloat() float32 {
- if m != nil && m.OptionalFloat != nil {
- return *m.OptionalFloat
+func (x *FieldTestMessage) GetOptionalFloat() float32 {
+ if x != nil && x.OptionalFloat != nil {
+ return *x.OptionalFloat
}
return 0
}
-func (m *FieldTestMessage) GetOptionalSfixed64() int64 {
- if m != nil && m.OptionalSfixed64 != nil {
- return *m.OptionalSfixed64
+func (x *FieldTestMessage) GetOptionalSfixed64() int64 {
+ if x != nil && x.OptionalSfixed64 != nil {
+ return *x.OptionalSfixed64
}
return 0
}
-func (m *FieldTestMessage) GetOptionalFixed64() uint64 {
- if m != nil && m.OptionalFixed64 != nil {
- return *m.OptionalFixed64
+func (x *FieldTestMessage) GetOptionalFixed64() uint64 {
+ if x != nil && x.OptionalFixed64 != nil {
+ return *x.OptionalFixed64
}
return 0
}
-func (m *FieldTestMessage) GetOptionalDouble() float64 {
- if m != nil && m.OptionalDouble != nil {
- return *m.OptionalDouble
+func (x *FieldTestMessage) GetOptionalDouble() float64 {
+ if x != nil && x.OptionalDouble != nil {
+ return *x.OptionalDouble
}
return 0
}
-func (m *FieldTestMessage) GetOptionalString() string {
- if m != nil && m.OptionalString != nil {
- return *m.OptionalString
+func (x *FieldTestMessage) GetOptionalString() string {
+ if x != nil && x.OptionalString != nil {
+ return *x.OptionalString
}
return ""
}
-func (m *FieldTestMessage) GetOptionalBytes() []byte {
- if m != nil {
- return m.OptionalBytes
+func (x *FieldTestMessage) GetOptionalBytes() []byte {
+ if x != nil {
+ return x.OptionalBytes
}
return nil
}
-func (m *FieldTestMessage) GetOptional_Message() *FieldTestMessage_Message {
- if m != nil {
- return m.Optional_Message
+func (x *FieldTestMessage) GetOptional_Message() *FieldTestMessage_Message {
+ if x != nil {
+ return x.Optional_Message
}
return nil
}
-func (m *FieldTestMessage) GetOptionalgroup() *FieldTestMessage_OptionalGroup {
- if m != nil {
- return m.Optionalgroup
+func (x *FieldTestMessage) GetOptionalgroup() *FieldTestMessage_OptionalGroup {
+ if x != nil {
+ return x.Optionalgroup
}
return nil
}
-func (m *FieldTestMessage) GetRequiredBool() bool {
- if m != nil && m.RequiredBool != nil {
- return *m.RequiredBool
+func (x *FieldTestMessage) GetRequiredBool() bool {
+ if x != nil && x.RequiredBool != nil {
+ return *x.RequiredBool
}
return false
}
-func (m *FieldTestMessage) GetRequiredEnum() FieldTestMessage_Enum {
- if m != nil && m.RequiredEnum != nil {
- return *m.RequiredEnum
+func (x *FieldTestMessage) GetRequiredEnum() FieldTestMessage_Enum {
+ if x != nil && x.RequiredEnum != nil {
+ return *x.RequiredEnum
}
return FieldTestMessage_ZERO
}
-func (m *FieldTestMessage) GetRequiredInt32() int32 {
- if m != nil && m.RequiredInt32 != nil {
- return *m.RequiredInt32
+func (x *FieldTestMessage) GetRequiredInt32() int32 {
+ if x != nil && x.RequiredInt32 != nil {
+ return *x.RequiredInt32
}
return 0
}
-func (m *FieldTestMessage) GetRequiredSint32() int32 {
- if m != nil && m.RequiredSint32 != nil {
- return *m.RequiredSint32
+func (x *FieldTestMessage) GetRequiredSint32() int32 {
+ if x != nil && x.RequiredSint32 != nil {
+ return *x.RequiredSint32
}
return 0
}
-func (m *FieldTestMessage) GetRequiredUint32() uint32 {
- if m != nil && m.RequiredUint32 != nil {
- return *m.RequiredUint32
+func (x *FieldTestMessage) GetRequiredUint32() uint32 {
+ if x != nil && x.RequiredUint32 != nil {
+ return *x.RequiredUint32
}
return 0
}
-func (m *FieldTestMessage) GetRequiredInt64() int64 {
- if m != nil && m.RequiredInt64 != nil {
- return *m.RequiredInt64
+func (x *FieldTestMessage) GetRequiredInt64() int64 {
+ if x != nil && x.RequiredInt64 != nil {
+ return *x.RequiredInt64
}
return 0
}
-func (m *FieldTestMessage) GetRequiredSint64() int64 {
- if m != nil && m.RequiredSint64 != nil {
- return *m.RequiredSint64
+func (x *FieldTestMessage) GetRequiredSint64() int64 {
+ if x != nil && x.RequiredSint64 != nil {
+ return *x.RequiredSint64
}
return 0
}
-func (m *FieldTestMessage) GetRequiredUint64() uint64 {
- if m != nil && m.RequiredUint64 != nil {
- return *m.RequiredUint64
+func (x *FieldTestMessage) GetRequiredUint64() uint64 {
+ if x != nil && x.RequiredUint64 != nil {
+ return *x.RequiredUint64
}
return 0
}
-func (m *FieldTestMessage) GetRequiredSfixed32() int32 {
- if m != nil && m.RequiredSfixed32 != nil {
- return *m.RequiredSfixed32
+func (x *FieldTestMessage) GetRequiredSfixed32() int32 {
+ if x != nil && x.RequiredSfixed32 != nil {
+ return *x.RequiredSfixed32
}
return 0
}
-func (m *FieldTestMessage) GetRequiredFixed32() uint32 {
- if m != nil && m.RequiredFixed32 != nil {
- return *m.RequiredFixed32
+func (x *FieldTestMessage) GetRequiredFixed32() uint32 {
+ if x != nil && x.RequiredFixed32 != nil {
+ return *x.RequiredFixed32
}
return 0
}
-func (m *FieldTestMessage) GetRequiredFloat() float32 {
- if m != nil && m.RequiredFloat != nil {
- return *m.RequiredFloat
+func (x *FieldTestMessage) GetRequiredFloat() float32 {
+ if x != nil && x.RequiredFloat != nil {
+ return *x.RequiredFloat
}
return 0
}
-func (m *FieldTestMessage) GetRequiredSfixed64() int64 {
- if m != nil && m.RequiredSfixed64 != nil {
- return *m.RequiredSfixed64
+func (x *FieldTestMessage) GetRequiredSfixed64() int64 {
+ if x != nil && x.RequiredSfixed64 != nil {
+ return *x.RequiredSfixed64
}
return 0
}
-func (m *FieldTestMessage) GetRequiredFixed64() uint64 {
- if m != nil && m.RequiredFixed64 != nil {
- return *m.RequiredFixed64
+func (x *FieldTestMessage) GetRequiredFixed64() uint64 {
+ if x != nil && x.RequiredFixed64 != nil {
+ return *x.RequiredFixed64
}
return 0
}
-func (m *FieldTestMessage) GetRequiredDouble() float64 {
- if m != nil && m.RequiredDouble != nil {
- return *m.RequiredDouble
+func (x *FieldTestMessage) GetRequiredDouble() float64 {
+ if x != nil && x.RequiredDouble != nil {
+ return *x.RequiredDouble
}
return 0
}
-func (m *FieldTestMessage) GetRequiredString() string {
- if m != nil && m.RequiredString != nil {
- return *m.RequiredString
+func (x *FieldTestMessage) GetRequiredString() string {
+ if x != nil && x.RequiredString != nil {
+ return *x.RequiredString
}
return ""
}
-func (m *FieldTestMessage) GetRequiredBytes() []byte {
- if m != nil {
- return m.RequiredBytes
+func (x *FieldTestMessage) GetRequiredBytes() []byte {
+ if x != nil {
+ return x.RequiredBytes
}
return nil
}
-func (m *FieldTestMessage) GetRequired_Message() *FieldTestMessage_Message {
- if m != nil {
- return m.Required_Message
+func (x *FieldTestMessage) GetRequired_Message() *FieldTestMessage_Message {
+ if x != nil {
+ return x.Required_Message
}
return nil
}
-func (m *FieldTestMessage) GetRequiredgroup() *FieldTestMessage_RequiredGroup {
- if m != nil {
- return m.Requiredgroup
+func (x *FieldTestMessage) GetRequiredgroup() *FieldTestMessage_RequiredGroup {
+ if x != nil {
+ return x.Requiredgroup
}
return nil
}
-func (m *FieldTestMessage) GetRepeatedBool() []bool {
- if m != nil {
- return m.RepeatedBool
+func (x *FieldTestMessage) GetRepeatedBool() []bool {
+ if x != nil {
+ return x.RepeatedBool
}
return nil
}
-func (m *FieldTestMessage) GetRepeatedEnum() []FieldTestMessage_Enum {
- if m != nil {
- return m.RepeatedEnum
+func (x *FieldTestMessage) GetRepeatedEnum() []FieldTestMessage_Enum {
+ if x != nil {
+ return x.RepeatedEnum
}
return nil
}
-func (m *FieldTestMessage) GetRepeatedInt32() []int32 {
- if m != nil {
- return m.RepeatedInt32
+func (x *FieldTestMessage) GetRepeatedInt32() []int32 {
+ if x != nil {
+ return x.RepeatedInt32
}
return nil
}
-func (m *FieldTestMessage) GetRepeatedSint32() []int32 {
- if m != nil {
- return m.RepeatedSint32
+func (x *FieldTestMessage) GetRepeatedSint32() []int32 {
+ if x != nil {
+ return x.RepeatedSint32
}
return nil
}
-func (m *FieldTestMessage) GetRepeatedUint32() []uint32 {
- if m != nil {
- return m.RepeatedUint32
+func (x *FieldTestMessage) GetRepeatedUint32() []uint32 {
+ if x != nil {
+ return x.RepeatedUint32
}
return nil
}
-func (m *FieldTestMessage) GetRepeatedInt64() []int64 {
- if m != nil {
- return m.RepeatedInt64
+func (x *FieldTestMessage) GetRepeatedInt64() []int64 {
+ if x != nil {
+ return x.RepeatedInt64
}
return nil
}
-func (m *FieldTestMessage) GetRepeatedSint64() []int64 {
- if m != nil {
- return m.RepeatedSint64
+func (x *FieldTestMessage) GetRepeatedSint64() []int64 {
+ if x != nil {
+ return x.RepeatedSint64
}
return nil
}
-func (m *FieldTestMessage) GetRepeatedUint64() []uint64 {
- if m != nil {
- return m.RepeatedUint64
+func (x *FieldTestMessage) GetRepeatedUint64() []uint64 {
+ if x != nil {
+ return x.RepeatedUint64
}
return nil
}
-func (m *FieldTestMessage) GetRepeatedSfixed32() []int32 {
- if m != nil {
- return m.RepeatedSfixed32
+func (x *FieldTestMessage) GetRepeatedSfixed32() []int32 {
+ if x != nil {
+ return x.RepeatedSfixed32
}
return nil
}
-func (m *FieldTestMessage) GetRepeatedFixed32() []uint32 {
- if m != nil {
- return m.RepeatedFixed32
+func (x *FieldTestMessage) GetRepeatedFixed32() []uint32 {
+ if x != nil {
+ return x.RepeatedFixed32
}
return nil
}
-func (m *FieldTestMessage) GetRepeatedFloat() []float32 {
- if m != nil {
- return m.RepeatedFloat
+func (x *FieldTestMessage) GetRepeatedFloat() []float32 {
+ if x != nil {
+ return x.RepeatedFloat
}
return nil
}
-func (m *FieldTestMessage) GetRepeatedSfixed64() []int64 {
- if m != nil {
- return m.RepeatedSfixed64
+func (x *FieldTestMessage) GetRepeatedSfixed64() []int64 {
+ if x != nil {
+ return x.RepeatedSfixed64
}
return nil
}
-func (m *FieldTestMessage) GetRepeatedFixed64() []uint64 {
- if m != nil {
- return m.RepeatedFixed64
+func (x *FieldTestMessage) GetRepeatedFixed64() []uint64 {
+ if x != nil {
+ return x.RepeatedFixed64
}
return nil
}
-func (m *FieldTestMessage) GetRepeatedDouble() []float64 {
- if m != nil {
- return m.RepeatedDouble
+func (x *FieldTestMessage) GetRepeatedDouble() []float64 {
+ if x != nil {
+ return x.RepeatedDouble
}
return nil
}
-func (m *FieldTestMessage) GetRepeatedString() []string {
- if m != nil {
- return m.RepeatedString
+func (x *FieldTestMessage) GetRepeatedString() []string {
+ if x != nil {
+ return x.RepeatedString
}
return nil
}
-func (m *FieldTestMessage) GetRepeatedBytes() [][]byte {
- if m != nil {
- return m.RepeatedBytes
+func (x *FieldTestMessage) GetRepeatedBytes() [][]byte {
+ if x != nil {
+ return x.RepeatedBytes
}
return nil
}
-func (m *FieldTestMessage) GetRepeated_Message() []*FieldTestMessage_Message {
- if m != nil {
- return m.Repeated_Message
+func (x *FieldTestMessage) GetRepeated_Message() []*FieldTestMessage_Message {
+ if x != nil {
+ return x.Repeated_Message
}
return nil
}
-func (m *FieldTestMessage) GetRepeatedgroup() []*FieldTestMessage_RepeatedGroup {
- if m != nil {
- return m.Repeatedgroup
+func (x *FieldTestMessage) GetRepeatedgroup() []*FieldTestMessage_RepeatedGroup {
+ if x != nil {
+ return x.Repeatedgroup
}
return nil
}
-func (m *FieldTestMessage) GetDefaultBool() bool {
- if m != nil && m.DefaultBool != nil {
- return *m.DefaultBool
+func (x *FieldTestMessage) GetDefaultBool() bool {
+ if x != nil && x.DefaultBool != nil {
+ return *x.DefaultBool
}
return Default_FieldTestMessage_DefaultBool
}
-func (m *FieldTestMessage) GetDefaultEnum() FieldTestMessage_Enum {
- if m != nil && m.DefaultEnum != nil {
- return *m.DefaultEnum
+func (x *FieldTestMessage) GetDefaultEnum() FieldTestMessage_Enum {
+ if x != nil && x.DefaultEnum != nil {
+ return *x.DefaultEnum
}
return Default_FieldTestMessage_DefaultEnum
}
-func (m *FieldTestMessage) GetDefaultInt32() int32 {
- if m != nil && m.DefaultInt32 != nil {
- return *m.DefaultInt32
+func (x *FieldTestMessage) GetDefaultInt32() int32 {
+ if x != nil && x.DefaultInt32 != nil {
+ return *x.DefaultInt32
}
return Default_FieldTestMessage_DefaultInt32
}
-func (m *FieldTestMessage) GetDefaultSint32() int32 {
- if m != nil && m.DefaultSint32 != nil {
- return *m.DefaultSint32
+func (x *FieldTestMessage) GetDefaultSint32() int32 {
+ if x != nil && x.DefaultSint32 != nil {
+ return *x.DefaultSint32
}
return Default_FieldTestMessage_DefaultSint32
}
-func (m *FieldTestMessage) GetDefaultUint32() uint32 {
- if m != nil && m.DefaultUint32 != nil {
- return *m.DefaultUint32
+func (x *FieldTestMessage) GetDefaultUint32() uint32 {
+ if x != nil && x.DefaultUint32 != nil {
+ return *x.DefaultUint32
}
return Default_FieldTestMessage_DefaultUint32
}
-func (m *FieldTestMessage) GetDefaultInt64() int64 {
- if m != nil && m.DefaultInt64 != nil {
- return *m.DefaultInt64
+func (x *FieldTestMessage) GetDefaultInt64() int64 {
+ if x != nil && x.DefaultInt64 != nil {
+ return *x.DefaultInt64
}
return Default_FieldTestMessage_DefaultInt64
}
-func (m *FieldTestMessage) GetDefaultSint64() int64 {
- if m != nil && m.DefaultSint64 != nil {
- return *m.DefaultSint64
+func (x *FieldTestMessage) GetDefaultSint64() int64 {
+ if x != nil && x.DefaultSint64 != nil {
+ return *x.DefaultSint64
}
return Default_FieldTestMessage_DefaultSint64
}
-func (m *FieldTestMessage) GetDefaultUint64() uint64 {
- if m != nil && m.DefaultUint64 != nil {
- return *m.DefaultUint64
+func (x *FieldTestMessage) GetDefaultUint64() uint64 {
+ if x != nil && x.DefaultUint64 != nil {
+ return *x.DefaultUint64
}
return Default_FieldTestMessage_DefaultUint64
}
-func (m *FieldTestMessage) GetDefaultSfixed32() int32 {
- if m != nil && m.DefaultSfixed32 != nil {
- return *m.DefaultSfixed32
+func (x *FieldTestMessage) GetDefaultSfixed32() int32 {
+ if x != nil && x.DefaultSfixed32 != nil {
+ return *x.DefaultSfixed32
}
return Default_FieldTestMessage_DefaultSfixed32
}
-func (m *FieldTestMessage) GetDefaultFixed32() uint32 {
- if m != nil && m.DefaultFixed32 != nil {
- return *m.DefaultFixed32
+func (x *FieldTestMessage) GetDefaultFixed32() uint32 {
+ if x != nil && x.DefaultFixed32 != nil {
+ return *x.DefaultFixed32
}
return Default_FieldTestMessage_DefaultFixed32
}
-func (m *FieldTestMessage) GetDefaultFloat() float32 {
- if m != nil && m.DefaultFloat != nil {
- return *m.DefaultFloat
+func (x *FieldTestMessage) GetDefaultFloat() float32 {
+ if x != nil && x.DefaultFloat != nil {
+ return *x.DefaultFloat
}
return Default_FieldTestMessage_DefaultFloat
}
-func (m *FieldTestMessage) GetDefaultSfixed64() int64 {
- if m != nil && m.DefaultSfixed64 != nil {
- return *m.DefaultSfixed64
+func (x *FieldTestMessage) GetDefaultSfixed64() int64 {
+ if x != nil && x.DefaultSfixed64 != nil {
+ return *x.DefaultSfixed64
}
return Default_FieldTestMessage_DefaultSfixed64
}
-func (m *FieldTestMessage) GetDefaultFixed64() uint64 {
- if m != nil && m.DefaultFixed64 != nil {
- return *m.DefaultFixed64
+func (x *FieldTestMessage) GetDefaultFixed64() uint64 {
+ if x != nil && x.DefaultFixed64 != nil {
+ return *x.DefaultFixed64
}
return Default_FieldTestMessage_DefaultFixed64
}
-func (m *FieldTestMessage) GetDefaultDouble() float64 {
- if m != nil && m.DefaultDouble != nil {
- return *m.DefaultDouble
+func (x *FieldTestMessage) GetDefaultDouble() float64 {
+ if x != nil && x.DefaultDouble != nil {
+ return *x.DefaultDouble
}
return Default_FieldTestMessage_DefaultDouble
}
-func (m *FieldTestMessage) GetDefaultString() string {
- if m != nil && m.DefaultString != nil {
- return *m.DefaultString
+func (x *FieldTestMessage) GetDefaultString() string {
+ if x != nil && x.DefaultString != nil {
+ return *x.DefaultString
}
return Default_FieldTestMessage_DefaultString
}
-func (m *FieldTestMessage) GetDefaultBytes() []byte {
- if m != nil && m.DefaultBytes != nil {
- return m.DefaultBytes
+func (x *FieldTestMessage) GetDefaultBytes() []byte {
+ if x != nil && x.DefaultBytes != nil {
+ return x.DefaultBytes
}
return append([]byte(nil), Default_FieldTestMessage_DefaultBytes...)
}
-func (m *FieldTestMessage) GetDefaultZeroString() string {
- if m != nil && m.DefaultZeroString != nil {
- return *m.DefaultZeroString
+func (x *FieldTestMessage) GetDefaultZeroString() string {
+ if x != nil && x.DefaultZeroString != nil {
+ return *x.DefaultZeroString
}
return Default_FieldTestMessage_DefaultZeroString
}
-func (m *FieldTestMessage) GetDefaultZeroBytes() []byte {
- if m != nil && m.DefaultZeroBytes != nil {
- return m.DefaultZeroBytes
+func (x *FieldTestMessage) GetDefaultZeroBytes() []byte {
+ if x != nil && x.DefaultZeroBytes != nil {
+ return x.DefaultZeroBytes
}
return append([]byte(nil), Default_FieldTestMessage_DefaultZeroBytes...)
}
-func (m *FieldTestMessage) GetDefaultFloatNeginf() float32 {
- if m != nil && m.DefaultFloatNeginf != nil {
- return *m.DefaultFloatNeginf
+func (x *FieldTestMessage) GetDefaultFloatNeginf() float32 {
+ if x != nil && x.DefaultFloatNeginf != nil {
+ return *x.DefaultFloatNeginf
}
return Default_FieldTestMessage_DefaultFloatNeginf
}
-func (m *FieldTestMessage) GetDefaultFloatPosinf() float32 {
- if m != nil && m.DefaultFloatPosinf != nil {
- return *m.DefaultFloatPosinf
+func (x *FieldTestMessage) GetDefaultFloatPosinf() float32 {
+ if x != nil && x.DefaultFloatPosinf != nil {
+ return *x.DefaultFloatPosinf
}
return Default_FieldTestMessage_DefaultFloatPosinf
}
-func (m *FieldTestMessage) GetDefaultFloatNan() float32 {
- if m != nil && m.DefaultFloatNan != nil {
- return *m.DefaultFloatNan
+func (x *FieldTestMessage) GetDefaultFloatNan() float32 {
+ if x != nil && x.DefaultFloatNan != nil {
+ return *x.DefaultFloatNan
}
return Default_FieldTestMessage_DefaultFloatNan
}
-func (m *FieldTestMessage) GetDefaultDoubleNeginf() float64 {
- if m != nil && m.DefaultDoubleNeginf != nil {
- return *m.DefaultDoubleNeginf
+func (x *FieldTestMessage) GetDefaultDoubleNeginf() float64 {
+ if x != nil && x.DefaultDoubleNeginf != nil {
+ return *x.DefaultDoubleNeginf
}
return Default_FieldTestMessage_DefaultDoubleNeginf
}
-func (m *FieldTestMessage) GetDefaultDoublePosinf() float64 {
- if m != nil && m.DefaultDoublePosinf != nil {
- return *m.DefaultDoublePosinf
+func (x *FieldTestMessage) GetDefaultDoublePosinf() float64 {
+ if x != nil && x.DefaultDoublePosinf != nil {
+ return *x.DefaultDoublePosinf
}
return Default_FieldTestMessage_DefaultDoublePosinf
}
-func (m *FieldTestMessage) GetDefaultDoubleNan() float64 {
- if m != nil && m.DefaultDoubleNan != nil {
- return *m.DefaultDoubleNan
+func (x *FieldTestMessage) GetDefaultDoubleNan() float64 {
+ if x != nil && x.DefaultDoubleNan != nil {
+ return *x.DefaultDoubleNan
}
return Default_FieldTestMessage_DefaultDoubleNan
}
-func (m *FieldTestMessage) GetMapInt32Int64() map[int32]int64 {
- if m != nil {
- return m.MapInt32Int64
+func (x *FieldTestMessage) GetMapInt32Int64() map[int32]int64 {
+ if x != nil {
+ return x.MapInt32Int64
}
return nil
}
-func (m *FieldTestMessage) GetMapStringMessage() map[string]*FieldTestMessage_Message {
- if m != nil {
- return m.MapStringMessage
+func (x *FieldTestMessage) GetMapStringMessage() map[string]*FieldTestMessage_Message {
+ if x != nil {
+ return x.MapStringMessage
}
return nil
}
-func (m *FieldTestMessage) GetMapFixed64Enum() map[uint64]FieldTestMessage_Enum {
- if m != nil {
- return m.MapFixed64Enum
+func (x *FieldTestMessage) GetMapFixed64Enum() map[uint64]FieldTestMessage_Enum {
+ if x != nil {
+ return x.MapFixed64Enum
}
return nil
}
@@ -906,134 +914,134 @@
return nil
}
-func (m *FieldTestMessage) GetOneofBool() bool {
- if x, ok := m.GetOneofField().(*FieldTestMessage_OneofBool); ok {
+func (x *FieldTestMessage) GetOneofBool() bool {
+ if x, ok := x.GetOneofField().(*FieldTestMessage_OneofBool); ok {
return x.OneofBool
}
return false
}
-func (m *FieldTestMessage) GetOneofEnum() FieldTestMessage_Enum {
- if x, ok := m.GetOneofField().(*FieldTestMessage_OneofEnum); ok {
+func (x *FieldTestMessage) GetOneofEnum() FieldTestMessage_Enum {
+ if x, ok := x.GetOneofField().(*FieldTestMessage_OneofEnum); ok {
return x.OneofEnum
}
return FieldTestMessage_ZERO
}
-func (m *FieldTestMessage) GetOneofInt32() int32 {
- if x, ok := m.GetOneofField().(*FieldTestMessage_OneofInt32); ok {
+func (x *FieldTestMessage) GetOneofInt32() int32 {
+ if x, ok := x.GetOneofField().(*FieldTestMessage_OneofInt32); ok {
return x.OneofInt32
}
return 0
}
-func (m *FieldTestMessage) GetOneofSint32() int32 {
- if x, ok := m.GetOneofField().(*FieldTestMessage_OneofSint32); ok {
+func (x *FieldTestMessage) GetOneofSint32() int32 {
+ if x, ok := x.GetOneofField().(*FieldTestMessage_OneofSint32); ok {
return x.OneofSint32
}
return 0
}
-func (m *FieldTestMessage) GetOneofUint32() uint32 {
- if x, ok := m.GetOneofField().(*FieldTestMessage_OneofUint32); ok {
+func (x *FieldTestMessage) GetOneofUint32() uint32 {
+ if x, ok := x.GetOneofField().(*FieldTestMessage_OneofUint32); ok {
return x.OneofUint32
}
return 0
}
-func (m *FieldTestMessage) GetOneofInt64() int64 {
- if x, ok := m.GetOneofField().(*FieldTestMessage_OneofInt64); ok {
+func (x *FieldTestMessage) GetOneofInt64() int64 {
+ if x, ok := x.GetOneofField().(*FieldTestMessage_OneofInt64); ok {
return x.OneofInt64
}
return 0
}
-func (m *FieldTestMessage) GetOneofSint64() int64 {
- if x, ok := m.GetOneofField().(*FieldTestMessage_OneofSint64); ok {
+func (x *FieldTestMessage) GetOneofSint64() int64 {
+ if x, ok := x.GetOneofField().(*FieldTestMessage_OneofSint64); ok {
return x.OneofSint64
}
return 0
}
-func (m *FieldTestMessage) GetOneofUint64() uint64 {
- if x, ok := m.GetOneofField().(*FieldTestMessage_OneofUint64); ok {
+func (x *FieldTestMessage) GetOneofUint64() uint64 {
+ if x, ok := x.GetOneofField().(*FieldTestMessage_OneofUint64); ok {
return x.OneofUint64
}
return 0
}
-func (m *FieldTestMessage) GetOneofSfixed32() int32 {
- if x, ok := m.GetOneofField().(*FieldTestMessage_OneofSfixed32); ok {
+func (x *FieldTestMessage) GetOneofSfixed32() int32 {
+ if x, ok := x.GetOneofField().(*FieldTestMessage_OneofSfixed32); ok {
return x.OneofSfixed32
}
return 0
}
-func (m *FieldTestMessage) GetOneofFixed32() uint32 {
- if x, ok := m.GetOneofField().(*FieldTestMessage_OneofFixed32); ok {
+func (x *FieldTestMessage) GetOneofFixed32() uint32 {
+ if x, ok := x.GetOneofField().(*FieldTestMessage_OneofFixed32); ok {
return x.OneofFixed32
}
return 0
}
-func (m *FieldTestMessage) GetOneofFloat() float32 {
- if x, ok := m.GetOneofField().(*FieldTestMessage_OneofFloat); ok {
+func (x *FieldTestMessage) GetOneofFloat() float32 {
+ if x, ok := x.GetOneofField().(*FieldTestMessage_OneofFloat); ok {
return x.OneofFloat
}
return 0
}
-func (m *FieldTestMessage) GetOneofSfixed64() int64 {
- if x, ok := m.GetOneofField().(*FieldTestMessage_OneofSfixed64); ok {
+func (x *FieldTestMessage) GetOneofSfixed64() int64 {
+ if x, ok := x.GetOneofField().(*FieldTestMessage_OneofSfixed64); ok {
return x.OneofSfixed64
}
return 0
}
-func (m *FieldTestMessage) GetOneofFixed64() uint64 {
- if x, ok := m.GetOneofField().(*FieldTestMessage_OneofFixed64); ok {
+func (x *FieldTestMessage) GetOneofFixed64() uint64 {
+ if x, ok := x.GetOneofField().(*FieldTestMessage_OneofFixed64); ok {
return x.OneofFixed64
}
return 0
}
-func (m *FieldTestMessage) GetOneofDouble() float64 {
- if x, ok := m.GetOneofField().(*FieldTestMessage_OneofDouble); ok {
+func (x *FieldTestMessage) GetOneofDouble() float64 {
+ if x, ok := x.GetOneofField().(*FieldTestMessage_OneofDouble); ok {
return x.OneofDouble
}
return 0
}
-func (m *FieldTestMessage) GetOneofString() string {
- if x, ok := m.GetOneofField().(*FieldTestMessage_OneofString); ok {
+func (x *FieldTestMessage) GetOneofString() string {
+ if x, ok := x.GetOneofField().(*FieldTestMessage_OneofString); ok {
return x.OneofString
}
return ""
}
-func (m *FieldTestMessage) GetOneofBytes() []byte {
- if x, ok := m.GetOneofField().(*FieldTestMessage_OneofBytes); ok {
+func (x *FieldTestMessage) GetOneofBytes() []byte {
+ if x, ok := x.GetOneofField().(*FieldTestMessage_OneofBytes); ok {
return x.OneofBytes
}
return nil
}
-func (m *FieldTestMessage) GetOneof_Message() *FieldTestMessage_Message {
- if x, ok := m.GetOneofField().(*FieldTestMessage_Oneof_Message); ok {
+func (x *FieldTestMessage) GetOneof_Message() *FieldTestMessage_Message {
+ if x, ok := x.GetOneofField().(*FieldTestMessage_Oneof_Message); ok {
return x.Oneof_Message
}
return nil
}
-func (m *FieldTestMessage) GetOneofgroup() *FieldTestMessage_OneofGroup {
- if x, ok := m.GetOneofField().(*FieldTestMessage_Oneofgroup); ok {
+func (x *FieldTestMessage) GetOneofgroup() *FieldTestMessage_OneofGroup {
+ if x, ok := x.GetOneofField().(*FieldTestMessage_Oneofgroup); ok {
return x.Oneofgroup
}
return nil
}
-func (m *FieldTestMessage) GetOneofLargestTag() int32 {
- if x, ok := m.GetOneofField().(*FieldTestMessage_OneofLargestTag); ok {
+func (x *FieldTestMessage) GetOneofLargestTag() int32 {
+ if x, ok := x.GetOneofField().(*FieldTestMessage_OneofLargestTag); ok {
return x.OneofLargestTag
}
return 0
@@ -1062,15 +1070,15 @@
return nil
}
-func (m *FieldTestMessage) GetOneofTwo_1() int32 {
- if x, ok := m.GetOneofTwo().(*FieldTestMessage_OneofTwo_1); ok {
+func (x *FieldTestMessage) GetOneofTwo_1() int32 {
+ if x, ok := x.GetOneofTwo().(*FieldTestMessage_OneofTwo_1); ok {
return x.OneofTwo_1
}
return 0
}
-func (m *FieldTestMessage) GetOneofTwo_2() int64 {
- if x, ok := m.GetOneofTwo().(*FieldTestMessage_OneofTwo_2); ok {
+func (x *FieldTestMessage) GetOneofTwo_2() int64 {
+ if x, ok := x.GetOneofTwo().(*FieldTestMessage_OneofTwo_2); ok {
return x.OneofTwo_2
}
return 0
@@ -1110,21 +1118,28 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *FieldTestMessage_OptionalGroup) ProtoReflect() protoreflect.Message {
- return xxx_File_proto2_fields_proto_messageTypes[1].MessageOf(m)
+func (x *FieldTestMessage_OptionalGroup) Reset() {
+ *x = FieldTestMessage_OptionalGroup{}
}
-func (m *FieldTestMessage_OptionalGroup) Reset() { *m = FieldTestMessage_OptionalGroup{} }
-func (m *FieldTestMessage_OptionalGroup) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*FieldTestMessage_OptionalGroup) ProtoMessage() {}
+
+func (x *FieldTestMessage_OptionalGroup) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*FieldTestMessage_OptionalGroup) ProtoMessage() {}
+
+func (x *FieldTestMessage_OptionalGroup) ProtoReflect() protoreflect.Message {
+ return xxx_File_proto2_fields_proto_messageTypes[1].MessageOf(x)
+}
// Deprecated: Use FieldTestMessage_OptionalGroup.ProtoReflect.Type instead.
func (*FieldTestMessage_OptionalGroup) Descriptor() ([]byte, []int) {
return xxx_File_proto2_fields_proto_rawDescGZIP(), []int{0, 0}
}
-func (m *FieldTestMessage_OptionalGroup) GetOptionalGroup() string {
- if m != nil && m.OptionalGroup != nil {
- return *m.OptionalGroup
+func (x *FieldTestMessage_OptionalGroup) GetOptionalGroup() string {
+ if x != nil && x.OptionalGroup != nil {
+ return *x.OptionalGroup
}
return ""
}
@@ -1136,21 +1151,28 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *FieldTestMessage_RequiredGroup) ProtoReflect() protoreflect.Message {
- return xxx_File_proto2_fields_proto_messageTypes[2].MessageOf(m)
+func (x *FieldTestMessage_RequiredGroup) Reset() {
+ *x = FieldTestMessage_RequiredGroup{}
}
-func (m *FieldTestMessage_RequiredGroup) Reset() { *m = FieldTestMessage_RequiredGroup{} }
-func (m *FieldTestMessage_RequiredGroup) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*FieldTestMessage_RequiredGroup) ProtoMessage() {}
+
+func (x *FieldTestMessage_RequiredGroup) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*FieldTestMessage_RequiredGroup) ProtoMessage() {}
+
+func (x *FieldTestMessage_RequiredGroup) ProtoReflect() protoreflect.Message {
+ return xxx_File_proto2_fields_proto_messageTypes[2].MessageOf(x)
+}
// Deprecated: Use FieldTestMessage_RequiredGroup.ProtoReflect.Type instead.
func (*FieldTestMessage_RequiredGroup) Descriptor() ([]byte, []int) {
return xxx_File_proto2_fields_proto_rawDescGZIP(), []int{0, 1}
}
-func (m *FieldTestMessage_RequiredGroup) GetRequiredGroup() string {
- if m != nil && m.RequiredGroup != nil {
- return *m.RequiredGroup
+func (x *FieldTestMessage_RequiredGroup) GetRequiredGroup() string {
+ if x != nil && x.RequiredGroup != nil {
+ return *x.RequiredGroup
}
return ""
}
@@ -1162,21 +1184,28 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *FieldTestMessage_RepeatedGroup) ProtoReflect() protoreflect.Message {
- return xxx_File_proto2_fields_proto_messageTypes[3].MessageOf(m)
+func (x *FieldTestMessage_RepeatedGroup) Reset() {
+ *x = FieldTestMessage_RepeatedGroup{}
}
-func (m *FieldTestMessage_RepeatedGroup) Reset() { *m = FieldTestMessage_RepeatedGroup{} }
-func (m *FieldTestMessage_RepeatedGroup) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*FieldTestMessage_RepeatedGroup) ProtoMessage() {}
+
+func (x *FieldTestMessage_RepeatedGroup) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*FieldTestMessage_RepeatedGroup) ProtoMessage() {}
+
+func (x *FieldTestMessage_RepeatedGroup) ProtoReflect() protoreflect.Message {
+ return xxx_File_proto2_fields_proto_messageTypes[3].MessageOf(x)
+}
// Deprecated: Use FieldTestMessage_RepeatedGroup.ProtoReflect.Type instead.
func (*FieldTestMessage_RepeatedGroup) Descriptor() ([]byte, []int) {
return xxx_File_proto2_fields_proto_rawDescGZIP(), []int{0, 2}
}
-func (m *FieldTestMessage_RepeatedGroup) GetRepeatedGroup() []string {
- if m != nil {
- return m.RepeatedGroup
+func (x *FieldTestMessage_RepeatedGroup) GetRepeatedGroup() []string {
+ if x != nil {
+ return x.RepeatedGroup
}
return nil
}
@@ -1188,21 +1217,28 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *FieldTestMessage_OneofGroup) ProtoReflect() protoreflect.Message {
- return xxx_File_proto2_fields_proto_messageTypes[7].MessageOf(m)
+func (x *FieldTestMessage_OneofGroup) Reset() {
+ *x = FieldTestMessage_OneofGroup{}
}
-func (m *FieldTestMessage_OneofGroup) Reset() { *m = FieldTestMessage_OneofGroup{} }
-func (m *FieldTestMessage_OneofGroup) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*FieldTestMessage_OneofGroup) ProtoMessage() {}
+
+func (x *FieldTestMessage_OneofGroup) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*FieldTestMessage_OneofGroup) ProtoMessage() {}
+
+func (x *FieldTestMessage_OneofGroup) ProtoReflect() protoreflect.Message {
+ return xxx_File_proto2_fields_proto_messageTypes[7].MessageOf(x)
+}
// Deprecated: Use FieldTestMessage_OneofGroup.ProtoReflect.Type instead.
func (*FieldTestMessage_OneofGroup) Descriptor() ([]byte, []int) {
return xxx_File_proto2_fields_proto_rawDescGZIP(), []int{0, 6}
}
-func (m *FieldTestMessage_OneofGroup) GetOneofGroupField() string {
- if m != nil && m.OneofGroupField != nil {
- return *m.OneofGroupField
+func (x *FieldTestMessage_OneofGroup) GetOneofGroupField() string {
+ if x != nil && x.OneofGroupField != nil {
+ return *x.OneofGroupField
}
return ""
}
@@ -1213,12 +1249,19 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *FieldTestMessage_Message) ProtoReflect() protoreflect.Message {
- return xxx_File_proto2_fields_proto_messageTypes[8].MessageOf(m)
+func (x *FieldTestMessage_Message) Reset() {
+ *x = FieldTestMessage_Message{}
}
-func (m *FieldTestMessage_Message) Reset() { *m = FieldTestMessage_Message{} }
-func (m *FieldTestMessage_Message) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*FieldTestMessage_Message) ProtoMessage() {}
+
+func (x *FieldTestMessage_Message) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*FieldTestMessage_Message) ProtoMessage() {}
+
+func (x *FieldTestMessage_Message) ProtoReflect() protoreflect.Message {
+ return xxx_File_proto2_fields_proto_messageTypes[8].MessageOf(x)
+}
// Deprecated: Use FieldTestMessage_Message.ProtoReflect.Type instead.
func (*FieldTestMessage_Message) Descriptor() ([]byte, []int) {
diff --git a/cmd/protoc-gen-go/testdata/proto2/nested_messages.pb.go b/cmd/protoc-gen-go/testdata/proto2/nested_messages.pb.go
index 02c70b0..c9b2e46 100644
--- a/cmd/protoc-gen-go/testdata/proto2/nested_messages.pb.go
+++ b/cmd/protoc-gen-go/testdata/proto2/nested_messages.pb.go
@@ -20,28 +20,35 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *Layer1) ProtoReflect() protoreflect.Message {
- return xxx_File_proto2_nested_messages_proto_messageTypes[0].MessageOf(m)
+func (x *Layer1) Reset() {
+ *x = Layer1{}
}
-func (m *Layer1) Reset() { *m = Layer1{} }
-func (m *Layer1) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*Layer1) ProtoMessage() {}
+
+func (x *Layer1) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Layer1) ProtoMessage() {}
+
+func (x *Layer1) ProtoReflect() protoreflect.Message {
+ return xxx_File_proto2_nested_messages_proto_messageTypes[0].MessageOf(x)
+}
// Deprecated: Use Layer1.ProtoReflect.Type instead.
func (*Layer1) Descriptor() ([]byte, []int) {
return xxx_File_proto2_nested_messages_proto_rawDescGZIP(), []int{0}
}
-func (m *Layer1) GetL2() *Layer1_Layer2 {
- if m != nil {
- return m.L2
+func (x *Layer1) GetL2() *Layer1_Layer2 {
+ if x != nil {
+ return x.L2
}
return nil
}
-func (m *Layer1) GetL3() *Layer1_Layer2_Layer3 {
- if m != nil {
- return m.L3
+func (x *Layer1) GetL3() *Layer1_Layer2_Layer3 {
+ if x != nil {
+ return x.L3
}
return nil
}
@@ -53,21 +60,28 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *Layer1_Layer2) ProtoReflect() protoreflect.Message {
- return xxx_File_proto2_nested_messages_proto_messageTypes[1].MessageOf(m)
+func (x *Layer1_Layer2) Reset() {
+ *x = Layer1_Layer2{}
}
-func (m *Layer1_Layer2) Reset() { *m = Layer1_Layer2{} }
-func (m *Layer1_Layer2) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*Layer1_Layer2) ProtoMessage() {}
+
+func (x *Layer1_Layer2) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Layer1_Layer2) ProtoMessage() {}
+
+func (x *Layer1_Layer2) ProtoReflect() protoreflect.Message {
+ return xxx_File_proto2_nested_messages_proto_messageTypes[1].MessageOf(x)
+}
// Deprecated: Use Layer1_Layer2.ProtoReflect.Type instead.
func (*Layer1_Layer2) Descriptor() ([]byte, []int) {
return xxx_File_proto2_nested_messages_proto_rawDescGZIP(), []int{0, 0}
}
-func (m *Layer1_Layer2) GetL3() *Layer1_Layer2_Layer3 {
- if m != nil {
- return m.L3
+func (x *Layer1_Layer2) GetL3() *Layer1_Layer2_Layer3 {
+ if x != nil {
+ return x.L3
}
return nil
}
@@ -78,12 +92,19 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *Layer1_Layer2_Layer3) ProtoReflect() protoreflect.Message {
- return xxx_File_proto2_nested_messages_proto_messageTypes[2].MessageOf(m)
+func (x *Layer1_Layer2_Layer3) Reset() {
+ *x = Layer1_Layer2_Layer3{}
}
-func (m *Layer1_Layer2_Layer3) Reset() { *m = Layer1_Layer2_Layer3{} }
-func (m *Layer1_Layer2_Layer3) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*Layer1_Layer2_Layer3) ProtoMessage() {}
+
+func (x *Layer1_Layer2_Layer3) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Layer1_Layer2_Layer3) ProtoMessage() {}
+
+func (x *Layer1_Layer2_Layer3) ProtoReflect() protoreflect.Message {
+ return xxx_File_proto2_nested_messages_proto_messageTypes[2].MessageOf(x)
+}
// Deprecated: Use Layer1_Layer2_Layer3.ProtoReflect.Type instead.
func (*Layer1_Layer2_Layer3) Descriptor() ([]byte, []int) {
diff --git a/cmd/protoc-gen-go/testdata/proto2/proto2.pb.go b/cmd/protoc-gen-go/testdata/proto2/proto2.pb.go
index 3c5eb9a..2ac0ff1 100644
--- a/cmd/protoc-gen-go/testdata/proto2/proto2.pb.go
+++ b/cmd/protoc-gen-go/testdata/proto2/proto2.pb.go
@@ -20,28 +20,35 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *Message) ProtoReflect() protoreflect.Message {
- return xxx_File_proto2_proto2_proto_messageTypes[0].MessageOf(m)
+func (x *Message) Reset() {
+ *x = Message{}
}
-func (m *Message) Reset() { *m = Message{} }
-func (m *Message) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*Message) ProtoMessage() {}
+
+func (x *Message) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Message) ProtoMessage() {}
+
+func (x *Message) ProtoReflect() protoreflect.Message {
+ return xxx_File_proto2_proto2_proto_messageTypes[0].MessageOf(x)
+}
// Deprecated: Use Message.ProtoReflect.Type instead.
func (*Message) Descriptor() ([]byte, []int) {
return xxx_File_proto2_proto2_proto_rawDescGZIP(), []int{0}
}
-func (m *Message) GetI32() int32 {
- if m != nil && m.I32 != nil {
- return *m.I32
+func (x *Message) GetI32() int32 {
+ if x != nil && x.I32 != nil {
+ return *x.I32
}
return 0
}
-func (m *Message) GetM() *Message {
- if m != nil {
- return m.M
+func (x *Message) GetM() *Message {
+ if x != nil {
+ return x.M
}
return nil
}
diff --git a/cmd/protoc-gen-go/testdata/proto3/enum.pb.go b/cmd/protoc-gen-go/testdata/proto3/enum.pb.go
index 6b466e8..2cfa3a7 100644
--- a/cmd/protoc-gen-go/testdata/proto3/enum.pb.go
+++ b/cmd/protoc-gen-go/testdata/proto3/enum.pb.go
@@ -20,13 +20,6 @@
Enum_TWO Enum = 2
)
-func (e Enum) Type() protoreflect.EnumType {
- return xxx_File_proto3_enum_proto_enumTypes[0]
-}
-func (e Enum) Number() protoreflect.EnumNumber {
- return protoreflect.EnumNumber(e)
-}
-
// Deprecated: Use Enum.Type.Values instead.
var Enum_name = map[int32]string{
0: "ZERO",
@@ -45,6 +38,14 @@
return protoimpl.X.EnumStringOf(x.Type(), protoreflect.EnumNumber(x))
}
+func (Enum) Type() protoreflect.EnumType {
+ return xxx_File_proto3_enum_proto_enumTypes[0]
+}
+
+func (x Enum) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
// Deprecated: Use Enum.Type instead.
func (Enum) EnumDescriptor() ([]byte, []int) {
return xxx_File_proto3_enum_proto_rawDescGZIP(), []int{0}
diff --git a/cmd/protoc-gen-go/testdata/proto3/fields.pb.go b/cmd/protoc-gen-go/testdata/proto3/fields.pb.go
index 8a10f2e..8cb68f6 100644
--- a/cmd/protoc-gen-go/testdata/proto3/fields.pb.go
+++ b/cmd/protoc-gen-go/testdata/proto3/fields.pb.go
@@ -18,13 +18,6 @@
FieldTestMessage_ZERO FieldTestMessage_Enum = 0
)
-func (e FieldTestMessage_Enum) Type() protoreflect.EnumType {
- return xxx_File_proto3_fields_proto_enumTypes[0]
-}
-func (e FieldTestMessage_Enum) Number() protoreflect.EnumNumber {
- return protoreflect.EnumNumber(e)
-}
-
// Deprecated: Use FieldTestMessage_Enum.Type.Values instead.
var FieldTestMessage_Enum_name = map[int32]string{
0: "ZERO",
@@ -39,6 +32,14 @@
return protoimpl.X.EnumStringOf(x.Type(), protoreflect.EnumNumber(x))
}
+func (FieldTestMessage_Enum) Type() protoreflect.EnumType {
+ return xxx_File_proto3_fields_proto_enumTypes[0]
+}
+
+func (x FieldTestMessage_Enum) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
// Deprecated: Use FieldTestMessage_Enum.Type instead.
func (FieldTestMessage_Enum) EnumDescriptor() ([]byte, []int) {
return xxx_File_proto3_fields_proto_rawDescGZIP(), []int{0, 0}
@@ -87,273 +88,280 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *FieldTestMessage) ProtoReflect() protoreflect.Message {
- return xxx_File_proto3_fields_proto_messageTypes[0].MessageOf(m)
+func (x *FieldTestMessage) Reset() {
+ *x = FieldTestMessage{}
}
-func (m *FieldTestMessage) Reset() { *m = FieldTestMessage{} }
-func (m *FieldTestMessage) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*FieldTestMessage) ProtoMessage() {}
+
+func (x *FieldTestMessage) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*FieldTestMessage) ProtoMessage() {}
+
+func (x *FieldTestMessage) ProtoReflect() protoreflect.Message {
+ return xxx_File_proto3_fields_proto_messageTypes[0].MessageOf(x)
+}
// Deprecated: Use FieldTestMessage.ProtoReflect.Type instead.
func (*FieldTestMessage) Descriptor() ([]byte, []int) {
return xxx_File_proto3_fields_proto_rawDescGZIP(), []int{0}
}
-func (m *FieldTestMessage) GetOptionalBool() string {
- if m != nil {
- return m.OptionalBool
+func (x *FieldTestMessage) GetOptionalBool() string {
+ if x != nil {
+ return x.OptionalBool
}
return ""
}
-func (m *FieldTestMessage) GetOptionalEnum() FieldTestMessage_Enum {
- if m != nil {
- return m.OptionalEnum
+func (x *FieldTestMessage) GetOptionalEnum() FieldTestMessage_Enum {
+ if x != nil {
+ return x.OptionalEnum
}
return FieldTestMessage_ZERO
}
-func (m *FieldTestMessage) GetOptionalInt32() int32 {
- if m != nil {
- return m.OptionalInt32
+func (x *FieldTestMessage) GetOptionalInt32() int32 {
+ if x != nil {
+ return x.OptionalInt32
}
return 0
}
-func (m *FieldTestMessage) GetOptionalSint32() int32 {
- if m != nil {
- return m.OptionalSint32
+func (x *FieldTestMessage) GetOptionalSint32() int32 {
+ if x != nil {
+ return x.OptionalSint32
}
return 0
}
-func (m *FieldTestMessage) GetOptionalUint32() uint32 {
- if m != nil {
- return m.OptionalUint32
+func (x *FieldTestMessage) GetOptionalUint32() uint32 {
+ if x != nil {
+ return x.OptionalUint32
}
return 0
}
-func (m *FieldTestMessage) GetOptionalInt64() int64 {
- if m != nil {
- return m.OptionalInt64
+func (x *FieldTestMessage) GetOptionalInt64() int64 {
+ if x != nil {
+ return x.OptionalInt64
}
return 0
}
-func (m *FieldTestMessage) GetOptionalSint64() int64 {
- if m != nil {
- return m.OptionalSint64
+func (x *FieldTestMessage) GetOptionalSint64() int64 {
+ if x != nil {
+ return x.OptionalSint64
}
return 0
}
-func (m *FieldTestMessage) GetOptionalUint64() uint64 {
- if m != nil {
- return m.OptionalUint64
+func (x *FieldTestMessage) GetOptionalUint64() uint64 {
+ if x != nil {
+ return x.OptionalUint64
}
return 0
}
-func (m *FieldTestMessage) GetOptionalSfixed32() int32 {
- if m != nil {
- return m.OptionalSfixed32
+func (x *FieldTestMessage) GetOptionalSfixed32() int32 {
+ if x != nil {
+ return x.OptionalSfixed32
}
return 0
}
-func (m *FieldTestMessage) GetOptionalFixed32() uint32 {
- if m != nil {
- return m.OptionalFixed32
+func (x *FieldTestMessage) GetOptionalFixed32() uint32 {
+ if x != nil {
+ return x.OptionalFixed32
}
return 0
}
-func (m *FieldTestMessage) GetOptionalFloat() float32 {
- if m != nil {
- return m.OptionalFloat
+func (x *FieldTestMessage) GetOptionalFloat() float32 {
+ if x != nil {
+ return x.OptionalFloat
}
return 0
}
-func (m *FieldTestMessage) GetOptionalSfixed64() int64 {
- if m != nil {
- return m.OptionalSfixed64
+func (x *FieldTestMessage) GetOptionalSfixed64() int64 {
+ if x != nil {
+ return x.OptionalSfixed64
}
return 0
}
-func (m *FieldTestMessage) GetOptionalFixed64() uint64 {
- if m != nil {
- return m.OptionalFixed64
+func (x *FieldTestMessage) GetOptionalFixed64() uint64 {
+ if x != nil {
+ return x.OptionalFixed64
}
return 0
}
-func (m *FieldTestMessage) GetOptionalDouble() float64 {
- if m != nil {
- return m.OptionalDouble
+func (x *FieldTestMessage) GetOptionalDouble() float64 {
+ if x != nil {
+ return x.OptionalDouble
}
return 0
}
-func (m *FieldTestMessage) GetOptionalString() string {
- if m != nil {
- return m.OptionalString
+func (x *FieldTestMessage) GetOptionalString() string {
+ if x != nil {
+ return x.OptionalString
}
return ""
}
-func (m *FieldTestMessage) GetOptionalBytes() []byte {
- if m != nil {
- return m.OptionalBytes
+func (x *FieldTestMessage) GetOptionalBytes() []byte {
+ if x != nil {
+ return x.OptionalBytes
}
return nil
}
-func (m *FieldTestMessage) GetOptional_Message() *FieldTestMessage_Message {
- if m != nil {
- return m.Optional_Message
+func (x *FieldTestMessage) GetOptional_Message() *FieldTestMessage_Message {
+ if x != nil {
+ return x.Optional_Message
}
return nil
}
-func (m *FieldTestMessage) GetRepeatedBool() []bool {
- if m != nil {
- return m.RepeatedBool
+func (x *FieldTestMessage) GetRepeatedBool() []bool {
+ if x != nil {
+ return x.RepeatedBool
}
return nil
}
-func (m *FieldTestMessage) GetRepeatedEnum() []FieldTestMessage_Enum {
- if m != nil {
- return m.RepeatedEnum
+func (x *FieldTestMessage) GetRepeatedEnum() []FieldTestMessage_Enum {
+ if x != nil {
+ return x.RepeatedEnum
}
return nil
}
-func (m *FieldTestMessage) GetRepeatedInt32() []int32 {
- if m != nil {
- return m.RepeatedInt32
+func (x *FieldTestMessage) GetRepeatedInt32() []int32 {
+ if x != nil {
+ return x.RepeatedInt32
}
return nil
}
-func (m *FieldTestMessage) GetRepeatedSint32() []int32 {
- if m != nil {
- return m.RepeatedSint32
+func (x *FieldTestMessage) GetRepeatedSint32() []int32 {
+ if x != nil {
+ return x.RepeatedSint32
}
return nil
}
-func (m *FieldTestMessage) GetRepeatedUint32() []uint32 {
- if m != nil {
- return m.RepeatedUint32
+func (x *FieldTestMessage) GetRepeatedUint32() []uint32 {
+ if x != nil {
+ return x.RepeatedUint32
}
return nil
}
-func (m *FieldTestMessage) GetRepeatedInt64() []int64 {
- if m != nil {
- return m.RepeatedInt64
+func (x *FieldTestMessage) GetRepeatedInt64() []int64 {
+ if x != nil {
+ return x.RepeatedInt64
}
return nil
}
-func (m *FieldTestMessage) GetRepeatedSint64() []int64 {
- if m != nil {
- return m.RepeatedSint64
+func (x *FieldTestMessage) GetRepeatedSint64() []int64 {
+ if x != nil {
+ return x.RepeatedSint64
}
return nil
}
-func (m *FieldTestMessage) GetRepeatedUint64() []uint64 {
- if m != nil {
- return m.RepeatedUint64
+func (x *FieldTestMessage) GetRepeatedUint64() []uint64 {
+ if x != nil {
+ return x.RepeatedUint64
}
return nil
}
-func (m *FieldTestMessage) GetRepeatedSfixed32() []int32 {
- if m != nil {
- return m.RepeatedSfixed32
+func (x *FieldTestMessage) GetRepeatedSfixed32() []int32 {
+ if x != nil {
+ return x.RepeatedSfixed32
}
return nil
}
-func (m *FieldTestMessage) GetRepeatedFixed32() []uint32 {
- if m != nil {
- return m.RepeatedFixed32
+func (x *FieldTestMessage) GetRepeatedFixed32() []uint32 {
+ if x != nil {
+ return x.RepeatedFixed32
}
return nil
}
-func (m *FieldTestMessage) GetRepeatedFloat() []float32 {
- if m != nil {
- return m.RepeatedFloat
+func (x *FieldTestMessage) GetRepeatedFloat() []float32 {
+ if x != nil {
+ return x.RepeatedFloat
}
return nil
}
-func (m *FieldTestMessage) GetRepeatedSfixed64() []int64 {
- if m != nil {
- return m.RepeatedSfixed64
+func (x *FieldTestMessage) GetRepeatedSfixed64() []int64 {
+ if x != nil {
+ return x.RepeatedSfixed64
}
return nil
}
-func (m *FieldTestMessage) GetRepeatedFixed64() []uint64 {
- if m != nil {
- return m.RepeatedFixed64
+func (x *FieldTestMessage) GetRepeatedFixed64() []uint64 {
+ if x != nil {
+ return x.RepeatedFixed64
}
return nil
}
-func (m *FieldTestMessage) GetRepeatedDouble() []float64 {
- if m != nil {
- return m.RepeatedDouble
+func (x *FieldTestMessage) GetRepeatedDouble() []float64 {
+ if x != nil {
+ return x.RepeatedDouble
}
return nil
}
-func (m *FieldTestMessage) GetRepeatedString() []string {
- if m != nil {
- return m.RepeatedString
+func (x *FieldTestMessage) GetRepeatedString() []string {
+ if x != nil {
+ return x.RepeatedString
}
return nil
}
-func (m *FieldTestMessage) GetRepeatedBytes() [][]byte {
- if m != nil {
- return m.RepeatedBytes
+func (x *FieldTestMessage) GetRepeatedBytes() [][]byte {
+ if x != nil {
+ return x.RepeatedBytes
}
return nil
}
-func (m *FieldTestMessage) GetRepeated_Message() []*FieldTestMessage_Message {
- if m != nil {
- return m.Repeated_Message
+func (x *FieldTestMessage) GetRepeated_Message() []*FieldTestMessage_Message {
+ if x != nil {
+ return x.Repeated_Message
}
return nil
}
-func (m *FieldTestMessage) GetMapInt32Int64() map[int32]int64 {
- if m != nil {
- return m.MapInt32Int64
+func (x *FieldTestMessage) GetMapInt32Int64() map[int32]int64 {
+ if x != nil {
+ return x.MapInt32Int64
}
return nil
}
-func (m *FieldTestMessage) GetMapStringMessage() map[string]*FieldTestMessage_Message {
- if m != nil {
- return m.MapStringMessage
+func (x *FieldTestMessage) GetMapStringMessage() map[string]*FieldTestMessage_Message {
+ if x != nil {
+ return x.MapStringMessage
}
return nil
}
-func (m *FieldTestMessage) GetMapFixed64Enum() map[uint64]FieldTestMessage_Enum {
- if m != nil {
- return m.MapFixed64Enum
+func (x *FieldTestMessage) GetMapFixed64Enum() map[uint64]FieldTestMessage_Enum {
+ if x != nil {
+ return x.MapFixed64Enum
}
return nil
}
@@ -364,12 +372,19 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *FieldTestMessage_Message) ProtoReflect() protoreflect.Message {
- return xxx_File_proto3_fields_proto_messageTypes[4].MessageOf(m)
+func (x *FieldTestMessage_Message) Reset() {
+ *x = FieldTestMessage_Message{}
}
-func (m *FieldTestMessage_Message) Reset() { *m = FieldTestMessage_Message{} }
-func (m *FieldTestMessage_Message) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*FieldTestMessage_Message) ProtoMessage() {}
+
+func (x *FieldTestMessage_Message) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*FieldTestMessage_Message) ProtoMessage() {}
+
+func (x *FieldTestMessage_Message) ProtoReflect() protoreflect.Message {
+ return xxx_File_proto3_fields_proto_messageTypes[4].MessageOf(x)
+}
// Deprecated: Use FieldTestMessage_Message.ProtoReflect.Type instead.
func (*FieldTestMessage_Message) Descriptor() ([]byte, []int) {
diff --git a/encoding/testprotos/pb2/test.pb.go b/encoding/testprotos/pb2/test.pb.go
index 61050ba..5a1b5b2 100644
--- a/encoding/testprotos/pb2/test.pb.go
+++ b/encoding/testprotos/pb2/test.pb.go
@@ -22,13 +22,6 @@
Enum_TEN Enum = 10
)
-func (e Enum) Type() protoreflect.EnumType {
- return xxx_File_pb2_test_proto_enumTypes[0]
-}
-func (e Enum) Number() protoreflect.EnumNumber {
- return protoreflect.EnumNumber(e)
-}
-
// Deprecated: Use Enum.Type.Values instead.
var Enum_name = map[int32]string{
1: "ONE",
@@ -51,6 +44,14 @@
return protoimpl.X.EnumStringOf(x.Type(), protoreflect.EnumNumber(x))
}
+func (Enum) Type() protoreflect.EnumType {
+ return xxx_File_pb2_test_proto_enumTypes[0]
+}
+
+func (x Enum) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
// Deprecated: Do not use.
func (x *Enum) UnmarshalJSON(b []byte) error {
num, err := protoimpl.X.UnmarshalJSONEnum(x.Type(), b)
@@ -74,13 +75,6 @@
Enums_DIEZ Enums_NestedEnum = 10
)
-func (e Enums_NestedEnum) Type() protoreflect.EnumType {
- return xxx_File_pb2_test_proto_enumTypes[1]
-}
-func (e Enums_NestedEnum) Number() protoreflect.EnumNumber {
- return protoreflect.EnumNumber(e)
-}
-
// Deprecated: Use Enums_NestedEnum.Type.Values instead.
var Enums_NestedEnum_name = map[int32]string{
1: "UNO",
@@ -103,6 +97,14 @@
return protoimpl.X.EnumStringOf(x.Type(), protoreflect.EnumNumber(x))
}
+func (Enums_NestedEnum) Type() protoreflect.EnumType {
+ return xxx_File_pb2_test_proto_enumTypes[1]
+}
+
+func (x Enums_NestedEnum) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
// Deprecated: Do not use.
func (x *Enums_NestedEnum) UnmarshalJSON(b []byte) error {
num, err := protoimpl.X.UnmarshalJSONEnum(x.Type(), b)
@@ -140,119 +142,126 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *Scalars) ProtoReflect() protoreflect.Message {
- return xxx_File_pb2_test_proto_messageTypes[0].MessageOf(m)
+func (x *Scalars) Reset() {
+ *x = Scalars{}
}
-func (m *Scalars) Reset() { *m = Scalars{} }
-func (m *Scalars) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*Scalars) ProtoMessage() {}
+
+func (x *Scalars) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Scalars) ProtoMessage() {}
+
+func (x *Scalars) ProtoReflect() protoreflect.Message {
+ return xxx_File_pb2_test_proto_messageTypes[0].MessageOf(x)
+}
// Deprecated: Use Scalars.ProtoReflect.Type instead.
func (*Scalars) Descriptor() ([]byte, []int) {
return xxx_File_pb2_test_proto_rawDescGZIP(), []int{0}
}
-func (m *Scalars) GetOptBool() bool {
- if m != nil && m.OptBool != nil {
- return *m.OptBool
+func (x *Scalars) GetOptBool() bool {
+ if x != nil && x.OptBool != nil {
+ return *x.OptBool
}
return false
}
-func (m *Scalars) GetOptInt32() int32 {
- if m != nil && m.OptInt32 != nil {
- return *m.OptInt32
+func (x *Scalars) GetOptInt32() int32 {
+ if x != nil && x.OptInt32 != nil {
+ return *x.OptInt32
}
return 0
}
-func (m *Scalars) GetOptInt64() int64 {
- if m != nil && m.OptInt64 != nil {
- return *m.OptInt64
+func (x *Scalars) GetOptInt64() int64 {
+ if x != nil && x.OptInt64 != nil {
+ return *x.OptInt64
}
return 0
}
-func (m *Scalars) GetOptUint32() uint32 {
- if m != nil && m.OptUint32 != nil {
- return *m.OptUint32
+func (x *Scalars) GetOptUint32() uint32 {
+ if x != nil && x.OptUint32 != nil {
+ return *x.OptUint32
}
return 0
}
-func (m *Scalars) GetOptUint64() uint64 {
- if m != nil && m.OptUint64 != nil {
- return *m.OptUint64
+func (x *Scalars) GetOptUint64() uint64 {
+ if x != nil && x.OptUint64 != nil {
+ return *x.OptUint64
}
return 0
}
-func (m *Scalars) GetOptSint32() int32 {
- if m != nil && m.OptSint32 != nil {
- return *m.OptSint32
+func (x *Scalars) GetOptSint32() int32 {
+ if x != nil && x.OptSint32 != nil {
+ return *x.OptSint32
}
return 0
}
-func (m *Scalars) GetOptSint64() int64 {
- if m != nil && m.OptSint64 != nil {
- return *m.OptSint64
+func (x *Scalars) GetOptSint64() int64 {
+ if x != nil && x.OptSint64 != nil {
+ return *x.OptSint64
}
return 0
}
-func (m *Scalars) GetOptFixed32() uint32 {
- if m != nil && m.OptFixed32 != nil {
- return *m.OptFixed32
+func (x *Scalars) GetOptFixed32() uint32 {
+ if x != nil && x.OptFixed32 != nil {
+ return *x.OptFixed32
}
return 0
}
-func (m *Scalars) GetOptFixed64() uint64 {
- if m != nil && m.OptFixed64 != nil {
- return *m.OptFixed64
+func (x *Scalars) GetOptFixed64() uint64 {
+ if x != nil && x.OptFixed64 != nil {
+ return *x.OptFixed64
}
return 0
}
-func (m *Scalars) GetOptSfixed32() int32 {
- if m != nil && m.OptSfixed32 != nil {
- return *m.OptSfixed32
+func (x *Scalars) GetOptSfixed32() int32 {
+ if x != nil && x.OptSfixed32 != nil {
+ return *x.OptSfixed32
}
return 0
}
-func (m *Scalars) GetOptSfixed64() int64 {
- if m != nil && m.OptSfixed64 != nil {
- return *m.OptSfixed64
+func (x *Scalars) GetOptSfixed64() int64 {
+ if x != nil && x.OptSfixed64 != nil {
+ return *x.OptSfixed64
}
return 0
}
-func (m *Scalars) GetOptFloat() float32 {
- if m != nil && m.OptFloat != nil {
- return *m.OptFloat
+func (x *Scalars) GetOptFloat() float32 {
+ if x != nil && x.OptFloat != nil {
+ return *x.OptFloat
}
return 0
}
-func (m *Scalars) GetOptDouble() float64 {
- if m != nil && m.OptDouble != nil {
- return *m.OptDouble
+func (x *Scalars) GetOptDouble() float64 {
+ if x != nil && x.OptDouble != nil {
+ return *x.OptDouble
}
return 0
}
-func (m *Scalars) GetOptBytes() []byte {
- if m != nil {
- return m.OptBytes
+func (x *Scalars) GetOptBytes() []byte {
+ if x != nil {
+ return x.OptBytes
}
return nil
}
-func (m *Scalars) GetOptString() string {
- if m != nil && m.OptString != nil {
- return *m.OptString
+func (x *Scalars) GetOptString() string {
+ if x != nil && x.OptString != nil {
+ return *x.OptString
}
return ""
}
@@ -268,42 +277,49 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *Enums) ProtoReflect() protoreflect.Message {
- return xxx_File_pb2_test_proto_messageTypes[1].MessageOf(m)
+func (x *Enums) Reset() {
+ *x = Enums{}
}
-func (m *Enums) Reset() { *m = Enums{} }
-func (m *Enums) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*Enums) ProtoMessage() {}
+
+func (x *Enums) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Enums) ProtoMessage() {}
+
+func (x *Enums) ProtoReflect() protoreflect.Message {
+ return xxx_File_pb2_test_proto_messageTypes[1].MessageOf(x)
+}
// Deprecated: Use Enums.ProtoReflect.Type instead.
func (*Enums) Descriptor() ([]byte, []int) {
return xxx_File_pb2_test_proto_rawDescGZIP(), []int{1}
}
-func (m *Enums) GetOptEnum() Enum {
- if m != nil && m.OptEnum != nil {
- return *m.OptEnum
+func (x *Enums) GetOptEnum() Enum {
+ if x != nil && x.OptEnum != nil {
+ return *x.OptEnum
}
return Enum_ONE
}
-func (m *Enums) GetRptEnum() []Enum {
- if m != nil {
- return m.RptEnum
+func (x *Enums) GetRptEnum() []Enum {
+ if x != nil {
+ return x.RptEnum
}
return nil
}
-func (m *Enums) GetOptNestedEnum() Enums_NestedEnum {
- if m != nil && m.OptNestedEnum != nil {
- return *m.OptNestedEnum
+func (x *Enums) GetOptNestedEnum() Enums_NestedEnum {
+ if x != nil && x.OptNestedEnum != nil {
+ return *x.OptNestedEnum
}
return Enums_UNO
}
-func (m *Enums) GetRptNestedEnum() []Enums_NestedEnum {
- if m != nil {
- return m.RptNestedEnum
+func (x *Enums) GetRptNestedEnum() []Enums_NestedEnum {
+ if x != nil {
+ return x.RptNestedEnum
}
return nil
}
@@ -324,77 +340,84 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *Repeats) ProtoReflect() protoreflect.Message {
- return xxx_File_pb2_test_proto_messageTypes[2].MessageOf(m)
+func (x *Repeats) Reset() {
+ *x = Repeats{}
}
-func (m *Repeats) Reset() { *m = Repeats{} }
-func (m *Repeats) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*Repeats) ProtoMessage() {}
+
+func (x *Repeats) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Repeats) ProtoMessage() {}
+
+func (x *Repeats) ProtoReflect() protoreflect.Message {
+ return xxx_File_pb2_test_proto_messageTypes[2].MessageOf(x)
+}
// Deprecated: Use Repeats.ProtoReflect.Type instead.
func (*Repeats) Descriptor() ([]byte, []int) {
return xxx_File_pb2_test_proto_rawDescGZIP(), []int{2}
}
-func (m *Repeats) GetRptBool() []bool {
- if m != nil {
- return m.RptBool
+func (x *Repeats) GetRptBool() []bool {
+ if x != nil {
+ return x.RptBool
}
return nil
}
-func (m *Repeats) GetRptInt32() []int32 {
- if m != nil {
- return m.RptInt32
+func (x *Repeats) GetRptInt32() []int32 {
+ if x != nil {
+ return x.RptInt32
}
return nil
}
-func (m *Repeats) GetRptInt64() []int64 {
- if m != nil {
- return m.RptInt64
+func (x *Repeats) GetRptInt64() []int64 {
+ if x != nil {
+ return x.RptInt64
}
return nil
}
-func (m *Repeats) GetRptUint32() []uint32 {
- if m != nil {
- return m.RptUint32
+func (x *Repeats) GetRptUint32() []uint32 {
+ if x != nil {
+ return x.RptUint32
}
return nil
}
-func (m *Repeats) GetRptUint64() []uint64 {
- if m != nil {
- return m.RptUint64
+func (x *Repeats) GetRptUint64() []uint64 {
+ if x != nil {
+ return x.RptUint64
}
return nil
}
-func (m *Repeats) GetRptFloat() []float32 {
- if m != nil {
- return m.RptFloat
+func (x *Repeats) GetRptFloat() []float32 {
+ if x != nil {
+ return x.RptFloat
}
return nil
}
-func (m *Repeats) GetRptDouble() []float64 {
- if m != nil {
- return m.RptDouble
+func (x *Repeats) GetRptDouble() []float64 {
+ if x != nil {
+ return x.RptDouble
}
return nil
}
-func (m *Repeats) GetRptString() []string {
- if m != nil {
- return m.RptString
+func (x *Repeats) GetRptString() []string {
+ if x != nil {
+ return x.RptString
}
return nil
}
-func (m *Repeats) GetRptBytes() [][]byte {
- if m != nil {
- return m.RptBytes
+func (x *Repeats) GetRptBytes() [][]byte {
+ if x != nil {
+ return x.RptBytes
}
return nil
}
@@ -408,28 +431,35 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *Nested) ProtoReflect() protoreflect.Message {
- return xxx_File_pb2_test_proto_messageTypes[3].MessageOf(m)
+func (x *Nested) Reset() {
+ *x = Nested{}
}
-func (m *Nested) Reset() { *m = Nested{} }
-func (m *Nested) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*Nested) ProtoMessage() {}
+
+func (x *Nested) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Nested) ProtoMessage() {}
+
+func (x *Nested) ProtoReflect() protoreflect.Message {
+ return xxx_File_pb2_test_proto_messageTypes[3].MessageOf(x)
+}
// Deprecated: Use Nested.ProtoReflect.Type instead.
func (*Nested) Descriptor() ([]byte, []int) {
return xxx_File_pb2_test_proto_rawDescGZIP(), []int{3}
}
-func (m *Nested) GetOptString() string {
- if m != nil && m.OptString != nil {
- return *m.OptString
+func (x *Nested) GetOptString() string {
+ if x != nil && x.OptString != nil {
+ return *x.OptString
}
return ""
}
-func (m *Nested) GetOptNested() *Nested {
- if m != nil {
- return m.OptNested
+func (x *Nested) GetOptNested() *Nested {
+ if x != nil {
+ return x.OptNested
}
return nil
}
@@ -445,42 +475,49 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *Nests) ProtoReflect() protoreflect.Message {
- return xxx_File_pb2_test_proto_messageTypes[4].MessageOf(m)
+func (x *Nests) Reset() {
+ *x = Nests{}
}
-func (m *Nests) Reset() { *m = Nests{} }
-func (m *Nests) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*Nests) ProtoMessage() {}
+
+func (x *Nests) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Nests) ProtoMessage() {}
+
+func (x *Nests) ProtoReflect() protoreflect.Message {
+ return xxx_File_pb2_test_proto_messageTypes[4].MessageOf(x)
+}
// Deprecated: Use Nests.ProtoReflect.Type instead.
func (*Nests) Descriptor() ([]byte, []int) {
return xxx_File_pb2_test_proto_rawDescGZIP(), []int{4}
}
-func (m *Nests) GetOptNested() *Nested {
- if m != nil {
- return m.OptNested
+func (x *Nests) GetOptNested() *Nested {
+ if x != nil {
+ return x.OptNested
}
return nil
}
-func (m *Nests) GetOptgroup() *Nests_OptGroup {
- if m != nil {
- return m.Optgroup
+func (x *Nests) GetOptgroup() *Nests_OptGroup {
+ if x != nil {
+ return x.Optgroup
}
return nil
}
-func (m *Nests) GetRptNested() []*Nested {
- if m != nil {
- return m.RptNested
+func (x *Nests) GetRptNested() []*Nested {
+ if x != nil {
+ return x.RptNested
}
return nil
}
-func (m *Nests) GetRptgroup() []*Nests_RptGroup {
- if m != nil {
- return m.Rptgroup
+func (x *Nests) GetRptgroup() []*Nests_RptGroup {
+ if x != nil {
+ return x.Rptgroup
}
return nil
}
@@ -498,56 +535,63 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *Requireds) ProtoReflect() protoreflect.Message {
- return xxx_File_pb2_test_proto_messageTypes[5].MessageOf(m)
+func (x *Requireds) Reset() {
+ *x = Requireds{}
}
-func (m *Requireds) Reset() { *m = Requireds{} }
-func (m *Requireds) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*Requireds) ProtoMessage() {}
+
+func (x *Requireds) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Requireds) ProtoMessage() {}
+
+func (x *Requireds) ProtoReflect() protoreflect.Message {
+ return xxx_File_pb2_test_proto_messageTypes[5].MessageOf(x)
+}
// Deprecated: Use Requireds.ProtoReflect.Type instead.
func (*Requireds) Descriptor() ([]byte, []int) {
return xxx_File_pb2_test_proto_rawDescGZIP(), []int{5}
}
-func (m *Requireds) GetReqBool() bool {
- if m != nil && m.ReqBool != nil {
- return *m.ReqBool
+func (x *Requireds) GetReqBool() bool {
+ if x != nil && x.ReqBool != nil {
+ return *x.ReqBool
}
return false
}
-func (m *Requireds) GetReqSfixed64() int64 {
- if m != nil && m.ReqSfixed64 != nil {
- return *m.ReqSfixed64
+func (x *Requireds) GetReqSfixed64() int64 {
+ if x != nil && x.ReqSfixed64 != nil {
+ return *x.ReqSfixed64
}
return 0
}
-func (m *Requireds) GetReqDouble() float64 {
- if m != nil && m.ReqDouble != nil {
- return *m.ReqDouble
+func (x *Requireds) GetReqDouble() float64 {
+ if x != nil && x.ReqDouble != nil {
+ return *x.ReqDouble
}
return 0
}
-func (m *Requireds) GetReqString() string {
- if m != nil && m.ReqString != nil {
- return *m.ReqString
+func (x *Requireds) GetReqString() string {
+ if x != nil && x.ReqString != nil {
+ return *x.ReqString
}
return ""
}
-func (m *Requireds) GetReqEnum() Enum {
- if m != nil && m.ReqEnum != nil {
- return *m.ReqEnum
+func (x *Requireds) GetReqEnum() Enum {
+ if x != nil && x.ReqEnum != nil {
+ return *x.ReqEnum
}
return Enum_ONE
}
-func (m *Requireds) GetReqNested() *Nested {
- if m != nil {
- return m.ReqNested
+func (x *Requireds) GetReqNested() *Nested {
+ if x != nil {
+ return x.ReqNested
}
return nil
}
@@ -561,28 +605,35 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *PartialRequired) ProtoReflect() protoreflect.Message {
- return xxx_File_pb2_test_proto_messageTypes[6].MessageOf(m)
+func (x *PartialRequired) Reset() {
+ *x = PartialRequired{}
}
-func (m *PartialRequired) Reset() { *m = PartialRequired{} }
-func (m *PartialRequired) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*PartialRequired) ProtoMessage() {}
+
+func (x *PartialRequired) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PartialRequired) ProtoMessage() {}
+
+func (x *PartialRequired) ProtoReflect() protoreflect.Message {
+ return xxx_File_pb2_test_proto_messageTypes[6].MessageOf(x)
+}
// Deprecated: Use PartialRequired.ProtoReflect.Type instead.
func (*PartialRequired) Descriptor() ([]byte, []int) {
return xxx_File_pb2_test_proto_rawDescGZIP(), []int{6}
}
-func (m *PartialRequired) GetReqString() string {
- if m != nil && m.ReqString != nil {
- return *m.ReqString
+func (x *PartialRequired) GetReqString() string {
+ if x != nil && x.ReqString != nil {
+ return *x.ReqString
}
return ""
}
-func (m *PartialRequired) GetOptString() string {
- if m != nil && m.OptString != nil {
- return *m.OptString
+func (x *PartialRequired) GetOptString() string {
+ if x != nil && x.OptString != nil {
+ return *x.OptString
}
return ""
}
@@ -594,21 +645,28 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *NestedWithRequired) ProtoReflect() protoreflect.Message {
- return xxx_File_pb2_test_proto_messageTypes[7].MessageOf(m)
+func (x *NestedWithRequired) Reset() {
+ *x = NestedWithRequired{}
}
-func (m *NestedWithRequired) Reset() { *m = NestedWithRequired{} }
-func (m *NestedWithRequired) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*NestedWithRequired) ProtoMessage() {}
+
+func (x *NestedWithRequired) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*NestedWithRequired) ProtoMessage() {}
+
+func (x *NestedWithRequired) ProtoReflect() protoreflect.Message {
+ return xxx_File_pb2_test_proto_messageTypes[7].MessageOf(x)
+}
// Deprecated: Use NestedWithRequired.ProtoReflect.Type instead.
func (*NestedWithRequired) Descriptor() ([]byte, []int) {
return xxx_File_pb2_test_proto_rawDescGZIP(), []int{7}
}
-func (m *NestedWithRequired) GetReqString() string {
- if m != nil && m.ReqString != nil {
- return *m.ReqString
+func (x *NestedWithRequired) GetReqString() string {
+ if x != nil && x.ReqString != nil {
+ return *x.ReqString
}
return ""
}
@@ -625,35 +683,42 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *IndirectRequired) ProtoReflect() protoreflect.Message {
- return xxx_File_pb2_test_proto_messageTypes[8].MessageOf(m)
+func (x *IndirectRequired) Reset() {
+ *x = IndirectRequired{}
}
-func (m *IndirectRequired) Reset() { *m = IndirectRequired{} }
-func (m *IndirectRequired) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*IndirectRequired) ProtoMessage() {}
+
+func (x *IndirectRequired) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*IndirectRequired) ProtoMessage() {}
+
+func (x *IndirectRequired) ProtoReflect() protoreflect.Message {
+ return xxx_File_pb2_test_proto_messageTypes[8].MessageOf(x)
+}
// Deprecated: Use IndirectRequired.ProtoReflect.Type instead.
func (*IndirectRequired) Descriptor() ([]byte, []int) {
return xxx_File_pb2_test_proto_rawDescGZIP(), []int{8}
}
-func (m *IndirectRequired) GetOptNested() *NestedWithRequired {
- if m != nil {
- return m.OptNested
+func (x *IndirectRequired) GetOptNested() *NestedWithRequired {
+ if x != nil {
+ return x.OptNested
}
return nil
}
-func (m *IndirectRequired) GetRptNested() []*NestedWithRequired {
- if m != nil {
- return m.RptNested
+func (x *IndirectRequired) GetRptNested() []*NestedWithRequired {
+ if x != nil {
+ return x.RptNested
}
return nil
}
-func (m *IndirectRequired) GetStrToNested() map[string]*NestedWithRequired {
- if m != nil {
- return m.StrToNested
+func (x *IndirectRequired) GetStrToNested() map[string]*NestedWithRequired {
+ if x != nil {
+ return x.StrToNested
}
return nil
}
@@ -675,8 +740,8 @@
return nil
}
-func (m *IndirectRequired) GetOneofNested() *NestedWithRequired {
- if x, ok := m.GetUnion().(*IndirectRequired_OneofNested); ok {
+func (x *IndirectRequired) GetOneofNested() *NestedWithRequired {
+ if x, ok := x.GetUnion().(*IndirectRequired_OneofNested); ok {
return x.OneofNested
}
return nil
@@ -699,12 +764,19 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *Extensions) ProtoReflect() protoreflect.Message {
- return xxx_File_pb2_test_proto_messageTypes[9].MessageOf(m)
+func (x *Extensions) Reset() {
+ *x = Extensions{}
}
-func (m *Extensions) Reset() { *m = Extensions{} }
-func (m *Extensions) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*Extensions) ProtoMessage() {}
+
+func (x *Extensions) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Extensions) ProtoMessage() {}
+
+func (x *Extensions) ProtoReflect() protoreflect.Message {
+ return xxx_File_pb2_test_proto_messageTypes[9].MessageOf(x)
+}
// Deprecated: Use Extensions.ProtoReflect.Type instead.
func (*Extensions) Descriptor() ([]byte, []int) {
@@ -720,23 +792,23 @@
return extRange_Extensions
}
-func (m *Extensions) GetOptString() string {
- if m != nil && m.OptString != nil {
- return *m.OptString
+func (x *Extensions) GetOptString() string {
+ if x != nil && x.OptString != nil {
+ return *x.OptString
}
return ""
}
-func (m *Extensions) GetOptBool() bool {
- if m != nil && m.OptBool != nil {
- return *m.OptBool
+func (x *Extensions) GetOptBool() bool {
+ if x != nil && x.OptBool != nil {
+ return *x.OptBool
}
return false
}
-func (m *Extensions) GetOptInt32() int32 {
- if m != nil && m.OptInt32 != nil {
- return *m.OptInt32
+func (x *Extensions) GetOptInt32() int32 {
+ if x != nil && x.OptInt32 != nil {
+ return *x.OptInt32
}
return 0
}
@@ -747,12 +819,19 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *ExtensionsContainer) ProtoReflect() protoreflect.Message {
- return xxx_File_pb2_test_proto_messageTypes[10].MessageOf(m)
+func (x *ExtensionsContainer) Reset() {
+ *x = ExtensionsContainer{}
}
-func (m *ExtensionsContainer) Reset() { *m = ExtensionsContainer{} }
-func (m *ExtensionsContainer) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*ExtensionsContainer) ProtoMessage() {}
+
+func (x *ExtensionsContainer) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ExtensionsContainer) ProtoMessage() {}
+
+func (x *ExtensionsContainer) ProtoReflect() protoreflect.Message {
+ return xxx_File_pb2_test_proto_messageTypes[10].MessageOf(x)
+}
// Deprecated: Use ExtensionsContainer.ProtoReflect.Type instead.
func (*ExtensionsContainer) Descriptor() ([]byte, []int) {
@@ -766,12 +845,19 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *MessageSet) ProtoReflect() protoreflect.Message {
- return xxx_File_pb2_test_proto_messageTypes[11].MessageOf(m)
+func (x *MessageSet) Reset() {
+ *x = MessageSet{}
}
-func (m *MessageSet) Reset() { *m = MessageSet{} }
-func (m *MessageSet) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*MessageSet) ProtoMessage() {}
+
+func (x *MessageSet) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*MessageSet) ProtoMessage() {}
+
+func (x *MessageSet) ProtoReflect() protoreflect.Message {
+ return xxx_File_pb2_test_proto_messageTypes[11].MessageOf(x)
+}
// Deprecated: Use MessageSet.ProtoReflect.Type instead.
func (*MessageSet) Descriptor() ([]byte, []int) {
@@ -794,21 +880,28 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *MessageSetExtension) ProtoReflect() protoreflect.Message {
- return xxx_File_pb2_test_proto_messageTypes[12].MessageOf(m)
+func (x *MessageSetExtension) Reset() {
+ *x = MessageSetExtension{}
}
-func (m *MessageSetExtension) Reset() { *m = MessageSetExtension{} }
-func (m *MessageSetExtension) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*MessageSetExtension) ProtoMessage() {}
+
+func (x *MessageSetExtension) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*MessageSetExtension) ProtoMessage() {}
+
+func (x *MessageSetExtension) ProtoReflect() protoreflect.Message {
+ return xxx_File_pb2_test_proto_messageTypes[12].MessageOf(x)
+}
// Deprecated: Use MessageSetExtension.ProtoReflect.Type instead.
func (*MessageSetExtension) Descriptor() ([]byte, []int) {
return xxx_File_pb2_test_proto_rawDescGZIP(), []int{12}
}
-func (m *MessageSetExtension) GetOptString() string {
- if m != nil && m.OptString != nil {
- return *m.OptString
+func (x *MessageSetExtension) GetOptString() string {
+ if x != nil && x.OptString != nil {
+ return *x.OptString
}
return ""
}
@@ -820,12 +913,19 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *FakeMessageSet) ProtoReflect() protoreflect.Message {
- return xxx_File_pb2_test_proto_messageTypes[13].MessageOf(m)
+func (x *FakeMessageSet) Reset() {
+ *x = FakeMessageSet{}
}
-func (m *FakeMessageSet) Reset() { *m = FakeMessageSet{} }
-func (m *FakeMessageSet) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*FakeMessageSet) ProtoMessage() {}
+
+func (x *FakeMessageSet) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*FakeMessageSet) ProtoMessage() {}
+
+func (x *FakeMessageSet) ProtoReflect() protoreflect.Message {
+ return xxx_File_pb2_test_proto_messageTypes[13].MessageOf(x)
+}
// Deprecated: Use FakeMessageSet.ProtoReflect.Type instead.
func (*FakeMessageSet) Descriptor() ([]byte, []int) {
@@ -848,21 +948,28 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *FakeMessageSetExtension) ProtoReflect() protoreflect.Message {
- return xxx_File_pb2_test_proto_messageTypes[14].MessageOf(m)
+func (x *FakeMessageSetExtension) Reset() {
+ *x = FakeMessageSetExtension{}
}
-func (m *FakeMessageSetExtension) Reset() { *m = FakeMessageSetExtension{} }
-func (m *FakeMessageSetExtension) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*FakeMessageSetExtension) ProtoMessage() {}
+
+func (x *FakeMessageSetExtension) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*FakeMessageSetExtension) ProtoMessage() {}
+
+func (x *FakeMessageSetExtension) ProtoReflect() protoreflect.Message {
+ return xxx_File_pb2_test_proto_messageTypes[14].MessageOf(x)
+}
// Deprecated: Use FakeMessageSetExtension.ProtoReflect.Type instead.
func (*FakeMessageSetExtension) Descriptor() ([]byte, []int) {
return xxx_File_pb2_test_proto_rawDescGZIP(), []int{14}
}
-func (m *FakeMessageSetExtension) GetOptString() string {
- if m != nil && m.OptString != nil {
- return *m.OptString
+func (x *FakeMessageSetExtension) GetOptString() string {
+ if x != nil && x.OptString != nil {
+ return *x.OptString
}
return ""
}
@@ -891,133 +998,140 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *KnownTypes) ProtoReflect() protoreflect.Message {
- return xxx_File_pb2_test_proto_messageTypes[15].MessageOf(m)
+func (x *KnownTypes) Reset() {
+ *x = KnownTypes{}
}
-func (m *KnownTypes) Reset() { *m = KnownTypes{} }
-func (m *KnownTypes) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*KnownTypes) ProtoMessage() {}
+
+func (x *KnownTypes) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*KnownTypes) ProtoMessage() {}
+
+func (x *KnownTypes) ProtoReflect() protoreflect.Message {
+ return xxx_File_pb2_test_proto_messageTypes[15].MessageOf(x)
+}
// Deprecated: Use KnownTypes.ProtoReflect.Type instead.
func (*KnownTypes) Descriptor() ([]byte, []int) {
return xxx_File_pb2_test_proto_rawDescGZIP(), []int{15}
}
-func (m *KnownTypes) GetOptBool() *known.BoolValue {
- if m != nil {
- return m.OptBool
+func (x *KnownTypes) GetOptBool() *known.BoolValue {
+ if x != nil {
+ return x.OptBool
}
return nil
}
-func (m *KnownTypes) GetOptInt32() *known.Int32Value {
- if m != nil {
- return m.OptInt32
+func (x *KnownTypes) GetOptInt32() *known.Int32Value {
+ if x != nil {
+ return x.OptInt32
}
return nil
}
-func (m *KnownTypes) GetOptInt64() *known.Int64Value {
- if m != nil {
- return m.OptInt64
+func (x *KnownTypes) GetOptInt64() *known.Int64Value {
+ if x != nil {
+ return x.OptInt64
}
return nil
}
-func (m *KnownTypes) GetOptUint32() *known.UInt32Value {
- if m != nil {
- return m.OptUint32
+func (x *KnownTypes) GetOptUint32() *known.UInt32Value {
+ if x != nil {
+ return x.OptUint32
}
return nil
}
-func (m *KnownTypes) GetOptUint64() *known.UInt64Value {
- if m != nil {
- return m.OptUint64
+func (x *KnownTypes) GetOptUint64() *known.UInt64Value {
+ if x != nil {
+ return x.OptUint64
}
return nil
}
-func (m *KnownTypes) GetOptFloat() *known.FloatValue {
- if m != nil {
- return m.OptFloat
+func (x *KnownTypes) GetOptFloat() *known.FloatValue {
+ if x != nil {
+ return x.OptFloat
}
return nil
}
-func (m *KnownTypes) GetOptDouble() *known.DoubleValue {
- if m != nil {
- return m.OptDouble
+func (x *KnownTypes) GetOptDouble() *known.DoubleValue {
+ if x != nil {
+ return x.OptDouble
}
return nil
}
-func (m *KnownTypes) GetOptString() *known.StringValue {
- if m != nil {
- return m.OptString
+func (x *KnownTypes) GetOptString() *known.StringValue {
+ if x != nil {
+ return x.OptString
}
return nil
}
-func (m *KnownTypes) GetOptBytes() *known.BytesValue {
- if m != nil {
- return m.OptBytes
+func (x *KnownTypes) GetOptBytes() *known.BytesValue {
+ if x != nil {
+ return x.OptBytes
}
return nil
}
-func (m *KnownTypes) GetOptDuration() *known.Duration {
- if m != nil {
- return m.OptDuration
+func (x *KnownTypes) GetOptDuration() *known.Duration {
+ if x != nil {
+ return x.OptDuration
}
return nil
}
-func (m *KnownTypes) GetOptTimestamp() *known.Timestamp {
- if m != nil {
- return m.OptTimestamp
+func (x *KnownTypes) GetOptTimestamp() *known.Timestamp {
+ if x != nil {
+ return x.OptTimestamp
}
return nil
}
-func (m *KnownTypes) GetOptStruct() *known.Struct {
- if m != nil {
- return m.OptStruct
+func (x *KnownTypes) GetOptStruct() *known.Struct {
+ if x != nil {
+ return x.OptStruct
}
return nil
}
-func (m *KnownTypes) GetOptList() *known.ListValue {
- if m != nil {
- return m.OptList
+func (x *KnownTypes) GetOptList() *known.ListValue {
+ if x != nil {
+ return x.OptList
}
return nil
}
-func (m *KnownTypes) GetOptValue() *known.Value {
- if m != nil {
- return m.OptValue
+func (x *KnownTypes) GetOptValue() *known.Value {
+ if x != nil {
+ return x.OptValue
}
return nil
}
-func (m *KnownTypes) GetOptEmpty() *known.Empty {
- if m != nil {
- return m.OptEmpty
+func (x *KnownTypes) GetOptEmpty() *known.Empty {
+ if x != nil {
+ return x.OptEmpty
}
return nil
}
-func (m *KnownTypes) GetOptAny() *known.Any {
- if m != nil {
- return m.OptAny
+func (x *KnownTypes) GetOptAny() *known.Any {
+ if x != nil {
+ return x.OptAny
}
return nil
}
-func (m *KnownTypes) GetOptFieldmask() *known.FieldMask {
- if m != nil {
- return m.OptFieldmask
+func (x *KnownTypes) GetOptFieldmask() *known.FieldMask {
+ if x != nil {
+ return x.OptFieldmask
}
return nil
}
@@ -1031,35 +1145,42 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *Nests_OptGroup) ProtoReflect() protoreflect.Message {
- return xxx_File_pb2_test_proto_messageTypes[16].MessageOf(m)
+func (x *Nests_OptGroup) Reset() {
+ *x = Nests_OptGroup{}
}
-func (m *Nests_OptGroup) Reset() { *m = Nests_OptGroup{} }
-func (m *Nests_OptGroup) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*Nests_OptGroup) ProtoMessage() {}
+
+func (x *Nests_OptGroup) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Nests_OptGroup) ProtoMessage() {}
+
+func (x *Nests_OptGroup) ProtoReflect() protoreflect.Message {
+ return xxx_File_pb2_test_proto_messageTypes[16].MessageOf(x)
+}
// Deprecated: Use Nests_OptGroup.ProtoReflect.Type instead.
func (*Nests_OptGroup) Descriptor() ([]byte, []int) {
return xxx_File_pb2_test_proto_rawDescGZIP(), []int{4, 0}
}
-func (m *Nests_OptGroup) GetOptString() string {
- if m != nil && m.OptString != nil {
- return *m.OptString
+func (x *Nests_OptGroup) GetOptString() string {
+ if x != nil && x.OptString != nil {
+ return *x.OptString
}
return ""
}
-func (m *Nests_OptGroup) GetOptNested() *Nested {
- if m != nil {
- return m.OptNested
+func (x *Nests_OptGroup) GetOptNested() *Nested {
+ if x != nil {
+ return x.OptNested
}
return nil
}
-func (m *Nests_OptGroup) GetOptnestedgroup() *Nests_OptGroup_OptNestedGroup {
- if m != nil {
- return m.Optnestedgroup
+func (x *Nests_OptGroup) GetOptnestedgroup() *Nests_OptGroup_OptNestedGroup {
+ if x != nil {
+ return x.Optnestedgroup
}
return nil
}
@@ -1071,21 +1192,28 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *Nests_RptGroup) ProtoReflect() protoreflect.Message {
- return xxx_File_pb2_test_proto_messageTypes[17].MessageOf(m)
+func (x *Nests_RptGroup) Reset() {
+ *x = Nests_RptGroup{}
}
-func (m *Nests_RptGroup) Reset() { *m = Nests_RptGroup{} }
-func (m *Nests_RptGroup) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*Nests_RptGroup) ProtoMessage() {}
+
+func (x *Nests_RptGroup) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Nests_RptGroup) ProtoMessage() {}
+
+func (x *Nests_RptGroup) ProtoReflect() protoreflect.Message {
+ return xxx_File_pb2_test_proto_messageTypes[17].MessageOf(x)
+}
// Deprecated: Use Nests_RptGroup.ProtoReflect.Type instead.
func (*Nests_RptGroup) Descriptor() ([]byte, []int) {
return xxx_File_pb2_test_proto_rawDescGZIP(), []int{4, 1}
}
-func (m *Nests_RptGroup) GetRptString() []string {
- if m != nil {
- return m.RptString
+func (x *Nests_RptGroup) GetRptString() []string {
+ if x != nil {
+ return x.RptString
}
return nil
}
@@ -1097,21 +1225,28 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *Nests_OptGroup_OptNestedGroup) ProtoReflect() protoreflect.Message {
- return xxx_File_pb2_test_proto_messageTypes[18].MessageOf(m)
+func (x *Nests_OptGroup_OptNestedGroup) Reset() {
+ *x = Nests_OptGroup_OptNestedGroup{}
}
-func (m *Nests_OptGroup_OptNestedGroup) Reset() { *m = Nests_OptGroup_OptNestedGroup{} }
-func (m *Nests_OptGroup_OptNestedGroup) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*Nests_OptGroup_OptNestedGroup) ProtoMessage() {}
+
+func (x *Nests_OptGroup_OptNestedGroup) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Nests_OptGroup_OptNestedGroup) ProtoMessage() {}
+
+func (x *Nests_OptGroup_OptNestedGroup) ProtoReflect() protoreflect.Message {
+ return xxx_File_pb2_test_proto_messageTypes[18].MessageOf(x)
+}
// Deprecated: Use Nests_OptGroup_OptNestedGroup.ProtoReflect.Type instead.
func (*Nests_OptGroup_OptNestedGroup) Descriptor() ([]byte, []int) {
return xxx_File_pb2_test_proto_rawDescGZIP(), []int{4, 0, 0}
}
-func (m *Nests_OptGroup_OptNestedGroup) GetOptFixed32() uint32 {
- if m != nil && m.OptFixed32 != nil {
- return *m.OptFixed32
+func (x *Nests_OptGroup_OptNestedGroup) GetOptFixed32() uint32 {
+ if x != nil && x.OptFixed32 != nil {
+ return *x.OptFixed32
}
return 0
}
diff --git a/encoding/testprotos/pb3/test.pb.go b/encoding/testprotos/pb3/test.pb.go
index 04f3991..b879929 100644
--- a/encoding/testprotos/pb3/test.pb.go
+++ b/encoding/testprotos/pb3/test.pb.go
@@ -21,13 +21,6 @@
Enum_TEN Enum = 10
)
-func (e Enum) Type() protoreflect.EnumType {
- return xxx_File_pb3_test_proto_enumTypes[0]
-}
-func (e Enum) Number() protoreflect.EnumNumber {
- return protoreflect.EnumNumber(e)
-}
-
// Deprecated: Use Enum.Type.Values instead.
var Enum_name = map[int32]string{
0: "ZERO",
@@ -48,6 +41,14 @@
return protoimpl.X.EnumStringOf(x.Type(), protoreflect.EnumNumber(x))
}
+func (Enum) Type() protoreflect.EnumType {
+ return xxx_File_pb3_test_proto_enumTypes[0]
+}
+
+func (x Enum) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
// Deprecated: Use Enum.Type instead.
func (Enum) EnumDescriptor() ([]byte, []int) {
return xxx_File_pb3_test_proto_rawDescGZIP(), []int{0}
@@ -62,13 +63,6 @@
Enums_DIEZ Enums_NestedEnum = 10
)
-func (e Enums_NestedEnum) Type() protoreflect.EnumType {
- return xxx_File_pb3_test_proto_enumTypes[1]
-}
-func (e Enums_NestedEnum) Number() protoreflect.EnumNumber {
- return protoreflect.EnumNumber(e)
-}
-
// Deprecated: Use Enums_NestedEnum.Type.Values instead.
var Enums_NestedEnum_name = map[int32]string{
0: "CERO",
@@ -89,6 +83,14 @@
return protoimpl.X.EnumStringOf(x.Type(), protoreflect.EnumNumber(x))
}
+func (Enums_NestedEnum) Type() protoreflect.EnumType {
+ return xxx_File_pb3_test_proto_enumTypes[1]
+}
+
+func (x Enums_NestedEnum) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
// Deprecated: Use Enums_NestedEnum.Type instead.
func (Enums_NestedEnum) EnumDescriptor() ([]byte, []int) {
return xxx_File_pb3_test_proto_rawDescGZIP(), []int{1, 0}
@@ -116,119 +118,126 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *Scalars) ProtoReflect() protoreflect.Message {
- return xxx_File_pb3_test_proto_messageTypes[0].MessageOf(m)
+func (x *Scalars) Reset() {
+ *x = Scalars{}
}
-func (m *Scalars) Reset() { *m = Scalars{} }
-func (m *Scalars) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*Scalars) ProtoMessage() {}
+
+func (x *Scalars) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Scalars) ProtoMessage() {}
+
+func (x *Scalars) ProtoReflect() protoreflect.Message {
+ return xxx_File_pb3_test_proto_messageTypes[0].MessageOf(x)
+}
// Deprecated: Use Scalars.ProtoReflect.Type instead.
func (*Scalars) Descriptor() ([]byte, []int) {
return xxx_File_pb3_test_proto_rawDescGZIP(), []int{0}
}
-func (m *Scalars) GetSBool() bool {
- if m != nil {
- return m.SBool
+func (x *Scalars) GetSBool() bool {
+ if x != nil {
+ return x.SBool
}
return false
}
-func (m *Scalars) GetSInt32() int32 {
- if m != nil {
- return m.SInt32
+func (x *Scalars) GetSInt32() int32 {
+ if x != nil {
+ return x.SInt32
}
return 0
}
-func (m *Scalars) GetSInt64() int64 {
- if m != nil {
- return m.SInt64
+func (x *Scalars) GetSInt64() int64 {
+ if x != nil {
+ return x.SInt64
}
return 0
}
-func (m *Scalars) GetSUint32() uint32 {
- if m != nil {
- return m.SUint32
+func (x *Scalars) GetSUint32() uint32 {
+ if x != nil {
+ return x.SUint32
}
return 0
}
-func (m *Scalars) GetSUint64() uint64 {
- if m != nil {
- return m.SUint64
+func (x *Scalars) GetSUint64() uint64 {
+ if x != nil {
+ return x.SUint64
}
return 0
}
-func (m *Scalars) GetSSint32() int32 {
- if m != nil {
- return m.SSint32
+func (x *Scalars) GetSSint32() int32 {
+ if x != nil {
+ return x.SSint32
}
return 0
}
-func (m *Scalars) GetSSint64() int64 {
- if m != nil {
- return m.SSint64
+func (x *Scalars) GetSSint64() int64 {
+ if x != nil {
+ return x.SSint64
}
return 0
}
-func (m *Scalars) GetSFixed32() uint32 {
- if m != nil {
- return m.SFixed32
+func (x *Scalars) GetSFixed32() uint32 {
+ if x != nil {
+ return x.SFixed32
}
return 0
}
-func (m *Scalars) GetSFixed64() uint64 {
- if m != nil {
- return m.SFixed64
+func (x *Scalars) GetSFixed64() uint64 {
+ if x != nil {
+ return x.SFixed64
}
return 0
}
-func (m *Scalars) GetSSfixed32() int32 {
- if m != nil {
- return m.SSfixed32
+func (x *Scalars) GetSSfixed32() int32 {
+ if x != nil {
+ return x.SSfixed32
}
return 0
}
-func (m *Scalars) GetSSfixed64() int64 {
- if m != nil {
- return m.SSfixed64
+func (x *Scalars) GetSSfixed64() int64 {
+ if x != nil {
+ return x.SSfixed64
}
return 0
}
-func (m *Scalars) GetSFloat() float32 {
- if m != nil {
- return m.SFloat
+func (x *Scalars) GetSFloat() float32 {
+ if x != nil {
+ return x.SFloat
}
return 0
}
-func (m *Scalars) GetSDouble() float64 {
- if m != nil {
- return m.SDouble
+func (x *Scalars) GetSDouble() float64 {
+ if x != nil {
+ return x.SDouble
}
return 0
}
-func (m *Scalars) GetSBytes() []byte {
- if m != nil {
- return m.SBytes
+func (x *Scalars) GetSBytes() []byte {
+ if x != nil {
+ return x.SBytes
}
return nil
}
-func (m *Scalars) GetSString() string {
- if m != nil {
- return m.SString
+func (x *Scalars) GetSString() string {
+ if x != nil {
+ return x.SString
}
return ""
}
@@ -242,28 +251,35 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *Enums) ProtoReflect() protoreflect.Message {
- return xxx_File_pb3_test_proto_messageTypes[1].MessageOf(m)
+func (x *Enums) Reset() {
+ *x = Enums{}
}
-func (m *Enums) Reset() { *m = Enums{} }
-func (m *Enums) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*Enums) ProtoMessage() {}
+
+func (x *Enums) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Enums) ProtoMessage() {}
+
+func (x *Enums) ProtoReflect() protoreflect.Message {
+ return xxx_File_pb3_test_proto_messageTypes[1].MessageOf(x)
+}
// Deprecated: Use Enums.ProtoReflect.Type instead.
func (*Enums) Descriptor() ([]byte, []int) {
return xxx_File_pb3_test_proto_rawDescGZIP(), []int{1}
}
-func (m *Enums) GetSEnum() Enum {
- if m != nil {
- return m.SEnum
+func (x *Enums) GetSEnum() Enum {
+ if x != nil {
+ return x.SEnum
}
return Enum_ZERO
}
-func (m *Enums) GetSNestedEnum() Enums_NestedEnum {
- if m != nil {
- return m.SNestedEnum
+func (x *Enums) GetSNestedEnum() Enums_NestedEnum {
+ if x != nil {
+ return x.SNestedEnum
}
return Enums_CERO
}
@@ -276,21 +292,28 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *Nests) ProtoReflect() protoreflect.Message {
- return xxx_File_pb3_test_proto_messageTypes[2].MessageOf(m)
+func (x *Nests) Reset() {
+ *x = Nests{}
}
-func (m *Nests) Reset() { *m = Nests{} }
-func (m *Nests) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*Nests) ProtoMessage() {}
+
+func (x *Nests) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Nests) ProtoMessage() {}
+
+func (x *Nests) ProtoReflect() protoreflect.Message {
+ return xxx_File_pb3_test_proto_messageTypes[2].MessageOf(x)
+}
// Deprecated: Use Nests.ProtoReflect.Type instead.
func (*Nests) Descriptor() ([]byte, []int) {
return xxx_File_pb3_test_proto_rawDescGZIP(), []int{2}
}
-func (m *Nests) GetSNested() *Nested {
- if m != nil {
- return m.SNested
+func (x *Nests) GetSNested() *Nested {
+ if x != nil {
+ return x.SNested
}
return nil
}
@@ -304,28 +327,35 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *Nested) ProtoReflect() protoreflect.Message {
- return xxx_File_pb3_test_proto_messageTypes[3].MessageOf(m)
+func (x *Nested) Reset() {
+ *x = Nested{}
}
-func (m *Nested) Reset() { *m = Nested{} }
-func (m *Nested) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*Nested) ProtoMessage() {}
+
+func (x *Nested) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Nested) ProtoMessage() {}
+
+func (x *Nested) ProtoReflect() protoreflect.Message {
+ return xxx_File_pb3_test_proto_messageTypes[3].MessageOf(x)
+}
// Deprecated: Use Nested.ProtoReflect.Type instead.
func (*Nested) Descriptor() ([]byte, []int) {
return xxx_File_pb3_test_proto_rawDescGZIP(), []int{3}
}
-func (m *Nested) GetSString() string {
- if m != nil {
- return m.SString
+func (x *Nested) GetSString() string {
+ if x != nil {
+ return x.SString
}
return ""
}
-func (m *Nested) GetSNested() *Nested {
- if m != nil {
- return m.SNested
+func (x *Nested) GetSNested() *Nested {
+ if x != nil {
+ return x.SNested
}
return nil
}
@@ -342,12 +372,19 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *Oneofs) ProtoReflect() protoreflect.Message {
- return xxx_File_pb3_test_proto_messageTypes[4].MessageOf(m)
+func (x *Oneofs) Reset() {
+ *x = Oneofs{}
}
-func (m *Oneofs) Reset() { *m = Oneofs{} }
-func (m *Oneofs) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*Oneofs) ProtoMessage() {}
+
+func (x *Oneofs) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Oneofs) ProtoMessage() {}
+
+func (x *Oneofs) ProtoReflect() protoreflect.Message {
+ return xxx_File_pb3_test_proto_messageTypes[4].MessageOf(x)
+}
// Deprecated: Use Oneofs.ProtoReflect.Type instead.
func (*Oneofs) Descriptor() ([]byte, []int) {
@@ -383,22 +420,22 @@
return nil
}
-func (m *Oneofs) GetOneofEnum() Enum {
- if x, ok := m.GetUnion().(*Oneofs_OneofEnum); ok {
+func (x *Oneofs) GetOneofEnum() Enum {
+ if x, ok := x.GetUnion().(*Oneofs_OneofEnum); ok {
return x.OneofEnum
}
return Enum_ZERO
}
-func (m *Oneofs) GetOneofString() string {
- if x, ok := m.GetUnion().(*Oneofs_OneofString); ok {
+func (x *Oneofs) GetOneofString() string {
+ if x, ok := x.GetUnion().(*Oneofs_OneofString); ok {
return x.OneofString
}
return ""
}
-func (m *Oneofs) GetOneofNested() *Nested {
- if x, ok := m.GetUnion().(*Oneofs_OneofNested); ok {
+func (x *Oneofs) GetOneofNested() *Nested {
+ if x, ok := x.GetUnion().(*Oneofs_OneofNested); ok {
return x.OneofNested
}
return nil
@@ -425,49 +462,56 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *Maps) ProtoReflect() protoreflect.Message {
- return xxx_File_pb3_test_proto_messageTypes[5].MessageOf(m)
+func (x *Maps) Reset() {
+ *x = Maps{}
}
-func (m *Maps) Reset() { *m = Maps{} }
-func (m *Maps) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*Maps) ProtoMessage() {}
+
+func (x *Maps) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Maps) ProtoMessage() {}
+
+func (x *Maps) ProtoReflect() protoreflect.Message {
+ return xxx_File_pb3_test_proto_messageTypes[5].MessageOf(x)
+}
// Deprecated: Use Maps.ProtoReflect.Type instead.
func (*Maps) Descriptor() ([]byte, []int) {
return xxx_File_pb3_test_proto_rawDescGZIP(), []int{5}
}
-func (m *Maps) GetInt32ToStr() map[int32]string {
- if m != nil {
- return m.Int32ToStr
+func (x *Maps) GetInt32ToStr() map[int32]string {
+ if x != nil {
+ return x.Int32ToStr
}
return nil
}
-func (m *Maps) GetBoolToUint32() map[bool]uint32 {
- if m != nil {
- return m.BoolToUint32
+func (x *Maps) GetBoolToUint32() map[bool]uint32 {
+ if x != nil {
+ return x.BoolToUint32
}
return nil
}
-func (m *Maps) GetUint64ToEnum() map[uint64]Enum {
- if m != nil {
- return m.Uint64ToEnum
+func (x *Maps) GetUint64ToEnum() map[uint64]Enum {
+ if x != nil {
+ return x.Uint64ToEnum
}
return nil
}
-func (m *Maps) GetStrToNested() map[string]*Nested {
- if m != nil {
- return m.StrToNested
+func (x *Maps) GetStrToNested() map[string]*Nested {
+ if x != nil {
+ return x.StrToNested
}
return nil
}
-func (m *Maps) GetStrToOneofs() map[string]*Oneofs {
- if m != nil {
- return m.StrToOneofs
+func (x *Maps) GetStrToOneofs() map[string]*Oneofs {
+ if x != nil {
+ return x.StrToOneofs
}
return nil
}
@@ -480,21 +524,28 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *JSONNames) ProtoReflect() protoreflect.Message {
- return xxx_File_pb3_test_proto_messageTypes[6].MessageOf(m)
+func (x *JSONNames) Reset() {
+ *x = JSONNames{}
}
-func (m *JSONNames) Reset() { *m = JSONNames{} }
-func (m *JSONNames) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*JSONNames) ProtoMessage() {}
+
+func (x *JSONNames) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*JSONNames) ProtoMessage() {}
+
+func (x *JSONNames) ProtoReflect() protoreflect.Message {
+ return xxx_File_pb3_test_proto_messageTypes[6].MessageOf(x)
+}
// Deprecated: Use JSONNames.ProtoReflect.Type instead.
func (*JSONNames) Descriptor() ([]byte, []int) {
return xxx_File_pb3_test_proto_rawDescGZIP(), []int{6}
}
-func (m *JSONNames) GetSString() string {
- if m != nil {
- return m.SString
+func (x *JSONNames) GetSString() string {
+ if x != nil {
+ return x.SString
}
return ""
}
diff --git a/internal/testprotos/conformance/conformance.pb.go b/internal/testprotos/conformance/conformance.pb.go
index 13274d8..593c909 100644
--- a/internal/testprotos/conformance/conformance.pb.go
+++ b/internal/testprotos/conformance/conformance.pb.go
@@ -22,13 +22,6 @@
WireFormat_TEXT_FORMAT WireFormat = 4
)
-func (e WireFormat) Type() protoreflect.EnumType {
- return xxx_File_conformance_conformance_proto_enumTypes[0]
-}
-func (e WireFormat) Number() protoreflect.EnumNumber {
- return protoreflect.EnumNumber(e)
-}
-
// Deprecated: Use WireFormat.Type.Values instead.
var WireFormat_name = map[int32]string{
0: "UNSPECIFIED",
@@ -51,6 +44,14 @@
return protoimpl.X.EnumStringOf(x.Type(), protoreflect.EnumNumber(x))
}
+func (WireFormat) Type() protoreflect.EnumType {
+ return xxx_File_conformance_conformance_proto_enumTypes[0]
+}
+
+func (x WireFormat) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
// Deprecated: Use WireFormat.Type instead.
func (WireFormat) EnumDescriptor() ([]byte, []int) {
return xxx_File_conformance_conformance_proto_rawDescGZIP(), []int{0}
@@ -75,13 +76,6 @@
TestCategory_TEXT_FORMAT_TEST TestCategory = 5
)
-func (e TestCategory) Type() protoreflect.EnumType {
- return xxx_File_conformance_conformance_proto_enumTypes[1]
-}
-func (e TestCategory) Number() protoreflect.EnumNumber {
- return protoreflect.EnumNumber(e)
-}
-
// Deprecated: Use TestCategory.Type.Values instead.
var TestCategory_name = map[int32]string{
0: "UNSPECIFIED_TEST",
@@ -106,6 +100,14 @@
return protoimpl.X.EnumStringOf(x.Type(), protoreflect.EnumNumber(x))
}
+func (TestCategory) Type() protoreflect.EnumType {
+ return xxx_File_conformance_conformance_proto_enumTypes[1]
+}
+
+func (x TestCategory) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
// Deprecated: Use TestCategory.Type instead.
func (TestCategory) EnumDescriptor() ([]byte, []int) {
return xxx_File_conformance_conformance_proto_rawDescGZIP(), []int{1}
@@ -121,21 +123,28 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *FailureSet) ProtoReflect() protoreflect.Message {
- return xxx_File_conformance_conformance_proto_messageTypes[0].MessageOf(m)
+func (x *FailureSet) Reset() {
+ *x = FailureSet{}
}
-func (m *FailureSet) Reset() { *m = FailureSet{} }
-func (m *FailureSet) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*FailureSet) ProtoMessage() {}
+
+func (x *FailureSet) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*FailureSet) ProtoMessage() {}
+
+func (x *FailureSet) ProtoReflect() protoreflect.Message {
+ return xxx_File_conformance_conformance_proto_messageTypes[0].MessageOf(x)
+}
// Deprecated: Use FailureSet.ProtoReflect.Type instead.
func (*FailureSet) Descriptor() ([]byte, []int) {
return xxx_File_conformance_conformance_proto_rawDescGZIP(), []int{0}
}
-func (m *FailureSet) GetFailure() []string {
- if m != nil {
- return m.Failure
+func (x *FailureSet) GetFailure() []string {
+ if x != nil {
+ return x.Failure
}
return nil
}
@@ -178,12 +187,19 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *ConformanceRequest) ProtoReflect() protoreflect.Message {
- return xxx_File_conformance_conformance_proto_messageTypes[1].MessageOf(m)
+func (x *ConformanceRequest) Reset() {
+ *x = ConformanceRequest{}
}
-func (m *ConformanceRequest) Reset() { *m = ConformanceRequest{} }
-func (m *ConformanceRequest) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*ConformanceRequest) ProtoMessage() {}
+
+func (x *ConformanceRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ConformanceRequest) ProtoMessage() {}
+
+func (x *ConformanceRequest) ProtoReflect() protoreflect.Message {
+ return xxx_File_conformance_conformance_proto_messageTypes[1].MessageOf(x)
+}
// Deprecated: Use ConformanceRequest.ProtoReflect.Type instead.
func (*ConformanceRequest) Descriptor() ([]byte, []int) {
@@ -225,58 +241,58 @@
return nil
}
-func (m *ConformanceRequest) GetProtobufPayload() []byte {
- if x, ok := m.GetPayload().(*ConformanceRequest_ProtobufPayload); ok {
+func (x *ConformanceRequest) GetProtobufPayload() []byte {
+ if x, ok := x.GetPayload().(*ConformanceRequest_ProtobufPayload); ok {
return x.ProtobufPayload
}
return nil
}
-func (m *ConformanceRequest) GetJsonPayload() string {
- if x, ok := m.GetPayload().(*ConformanceRequest_JsonPayload); ok {
+func (x *ConformanceRequest) GetJsonPayload() string {
+ if x, ok := x.GetPayload().(*ConformanceRequest_JsonPayload); ok {
return x.JsonPayload
}
return ""
}
-func (m *ConformanceRequest) GetJspbPayload() string {
- if x, ok := m.GetPayload().(*ConformanceRequest_JspbPayload); ok {
+func (x *ConformanceRequest) GetJspbPayload() string {
+ if x, ok := x.GetPayload().(*ConformanceRequest_JspbPayload); ok {
return x.JspbPayload
}
return ""
}
-func (m *ConformanceRequest) GetTextPayload() string {
- if x, ok := m.GetPayload().(*ConformanceRequest_TextPayload); ok {
+func (x *ConformanceRequest) GetTextPayload() string {
+ if x, ok := x.GetPayload().(*ConformanceRequest_TextPayload); ok {
return x.TextPayload
}
return ""
}
-func (m *ConformanceRequest) GetRequestedOutputFormat() WireFormat {
- if m != nil {
- return m.RequestedOutputFormat
+func (x *ConformanceRequest) GetRequestedOutputFormat() WireFormat {
+ if x != nil {
+ return x.RequestedOutputFormat
}
return WireFormat_UNSPECIFIED
}
-func (m *ConformanceRequest) GetMessageType() string {
- if m != nil {
- return m.MessageType
+func (x *ConformanceRequest) GetMessageType() string {
+ if x != nil {
+ return x.MessageType
}
return ""
}
-func (m *ConformanceRequest) GetTestCategory() TestCategory {
- if m != nil {
- return m.TestCategory
+func (x *ConformanceRequest) GetTestCategory() TestCategory {
+ if x != nil {
+ return x.TestCategory
}
return TestCategory_UNSPECIFIED_TEST
}
-func (m *ConformanceRequest) GetJspbEncodingOptions() *JspbEncodingConfig {
- if m != nil {
- return m.JspbEncodingOptions
+func (x *ConformanceRequest) GetJspbEncodingOptions() *JspbEncodingConfig {
+ if x != nil {
+ return x.JspbEncodingOptions
}
return nil
}
@@ -330,12 +346,19 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *ConformanceResponse) ProtoReflect() protoreflect.Message {
- return xxx_File_conformance_conformance_proto_messageTypes[2].MessageOf(m)
+func (x *ConformanceResponse) Reset() {
+ *x = ConformanceResponse{}
}
-func (m *ConformanceResponse) Reset() { *m = ConformanceResponse{} }
-func (m *ConformanceResponse) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*ConformanceResponse) ProtoMessage() {}
+
+func (x *ConformanceResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ConformanceResponse) ProtoMessage() {}
+
+func (x *ConformanceResponse) ProtoReflect() protoreflect.Message {
+ return xxx_File_conformance_conformance_proto_messageTypes[2].MessageOf(x)
+}
// Deprecated: Use ConformanceResponse.ProtoReflect.Type instead.
func (*ConformanceResponse) Descriptor() ([]byte, []int) {
@@ -401,57 +424,57 @@
return nil
}
-func (m *ConformanceResponse) GetParseError() string {
- if x, ok := m.GetResult().(*ConformanceResponse_ParseError); ok {
+func (x *ConformanceResponse) GetParseError() string {
+ if x, ok := x.GetResult().(*ConformanceResponse_ParseError); ok {
return x.ParseError
}
return ""
}
-func (m *ConformanceResponse) GetSerializeError() string {
- if x, ok := m.GetResult().(*ConformanceResponse_SerializeError); ok {
+func (x *ConformanceResponse) GetSerializeError() string {
+ if x, ok := x.GetResult().(*ConformanceResponse_SerializeError); ok {
return x.SerializeError
}
return ""
}
-func (m *ConformanceResponse) GetRuntimeError() string {
- if x, ok := m.GetResult().(*ConformanceResponse_RuntimeError); ok {
+func (x *ConformanceResponse) GetRuntimeError() string {
+ if x, ok := x.GetResult().(*ConformanceResponse_RuntimeError); ok {
return x.RuntimeError
}
return ""
}
-func (m *ConformanceResponse) GetProtobufPayload() []byte {
- if x, ok := m.GetResult().(*ConformanceResponse_ProtobufPayload); ok {
+func (x *ConformanceResponse) GetProtobufPayload() []byte {
+ if x, ok := x.GetResult().(*ConformanceResponse_ProtobufPayload); ok {
return x.ProtobufPayload
}
return nil
}
-func (m *ConformanceResponse) GetJsonPayload() string {
- if x, ok := m.GetResult().(*ConformanceResponse_JsonPayload); ok {
+func (x *ConformanceResponse) GetJsonPayload() string {
+ if x, ok := x.GetResult().(*ConformanceResponse_JsonPayload); ok {
return x.JsonPayload
}
return ""
}
-func (m *ConformanceResponse) GetSkipped() string {
- if x, ok := m.GetResult().(*ConformanceResponse_Skipped); ok {
+func (x *ConformanceResponse) GetSkipped() string {
+ if x, ok := x.GetResult().(*ConformanceResponse_Skipped); ok {
return x.Skipped
}
return ""
}
-func (m *ConformanceResponse) GetJspbPayload() string {
- if x, ok := m.GetResult().(*ConformanceResponse_JspbPayload); ok {
+func (x *ConformanceResponse) GetJspbPayload() string {
+ if x, ok := x.GetResult().(*ConformanceResponse_JspbPayload); ok {
return x.JspbPayload
}
return ""
}
-func (m *ConformanceResponse) GetTextPayload() string {
- if x, ok := m.GetResult().(*ConformanceResponse_TextPayload); ok {
+func (x *ConformanceResponse) GetTextPayload() string {
+ if x, ok := x.GetResult().(*ConformanceResponse_TextPayload); ok {
return x.TextPayload
}
return ""
@@ -480,21 +503,28 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *JspbEncodingConfig) ProtoReflect() protoreflect.Message {
- return xxx_File_conformance_conformance_proto_messageTypes[3].MessageOf(m)
+func (x *JspbEncodingConfig) Reset() {
+ *x = JspbEncodingConfig{}
}
-func (m *JspbEncodingConfig) Reset() { *m = JspbEncodingConfig{} }
-func (m *JspbEncodingConfig) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*JspbEncodingConfig) ProtoMessage() {}
+
+func (x *JspbEncodingConfig) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*JspbEncodingConfig) ProtoMessage() {}
+
+func (x *JspbEncodingConfig) ProtoReflect() protoreflect.Message {
+ return xxx_File_conformance_conformance_proto_messageTypes[3].MessageOf(x)
+}
// Deprecated: Use JspbEncodingConfig.ProtoReflect.Type instead.
func (*JspbEncodingConfig) Descriptor() ([]byte, []int) {
return xxx_File_conformance_conformance_proto_rawDescGZIP(), []int{3}
}
-func (m *JspbEncodingConfig) GetUseJspbArrayAnyFormat() bool {
- if m != nil {
- return m.UseJspbArrayAnyFormat
+func (x *JspbEncodingConfig) GetUseJspbArrayAnyFormat() bool {
+ if x != nil {
+ return x.UseJspbArrayAnyFormat
}
return false
}
diff --git a/internal/testprotos/legacy/legacy.pb.go b/internal/testprotos/legacy/legacy.pb.go
index 9362d40..d394dc2 100644
--- a/internal/testprotos/legacy/legacy.pb.go
+++ b/internal/testprotos/legacy/legacy.pb.go
@@ -42,98 +42,105 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *Legacy) ProtoReflect() protoreflect.Message {
- return xxx_File_legacy_legacy_proto_messageTypes[0].MessageOf(m)
+func (x *Legacy) Reset() {
+ *x = Legacy{}
}
-func (m *Legacy) Reset() { *m = Legacy{} }
-func (m *Legacy) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*Legacy) ProtoMessage() {}
+
+func (x *Legacy) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Legacy) ProtoMessage() {}
+
+func (x *Legacy) ProtoReflect() protoreflect.Message {
+ return xxx_File_legacy_legacy_proto_messageTypes[0].MessageOf(x)
+}
// Deprecated: Use Legacy.ProtoReflect.Type instead.
func (*Legacy) Descriptor() ([]byte, []int) {
return xxx_File_legacy_legacy_proto_rawDescGZIP(), []int{0}
}
-func (m *Legacy) GetF1() *proto2_v0_0.Message {
- if m != nil {
- return m.F1
+func (x *Legacy) GetF1() *proto2_v0_0.Message {
+ if x != nil {
+ return x.F1
}
return nil
}
-func (m *Legacy) GetF2() *proto3_v0_0.Message {
- if m != nil {
- return m.F2
+func (x *Legacy) GetF2() *proto3_v0_0.Message {
+ if x != nil {
+ return x.F2
}
return nil
}
-func (m *Legacy) GetF3() *proto2_v0_01.Message {
- if m != nil {
- return m.F3
+func (x *Legacy) GetF3() *proto2_v0_01.Message {
+ if x != nil {
+ return x.F3
}
return nil
}
-func (m *Legacy) GetF4() *proto3_v0_01.Message {
- if m != nil {
- return m.F4
+func (x *Legacy) GetF4() *proto3_v0_01.Message {
+ if x != nil {
+ return x.F4
}
return nil
}
-func (m *Legacy) GetF5() *proto2_v1_0.Message {
- if m != nil {
- return m.F5
+func (x *Legacy) GetF5() *proto2_v1_0.Message {
+ if x != nil {
+ return x.F5
}
return nil
}
-func (m *Legacy) GetF6() *proto3_v1_0.Message {
- if m != nil {
- return m.F6
+func (x *Legacy) GetF6() *proto3_v1_0.Message {
+ if x != nil {
+ return x.F6
}
return nil
}
-func (m *Legacy) GetF7() *proto2_v1_1.Message {
- if m != nil {
- return m.F7
+func (x *Legacy) GetF7() *proto2_v1_1.Message {
+ if x != nil {
+ return x.F7
}
return nil
}
-func (m *Legacy) GetF8() *proto3_v1_1.Message {
- if m != nil {
- return m.F8
+func (x *Legacy) GetF8() *proto3_v1_1.Message {
+ if x != nil {
+ return x.F8
}
return nil
}
-func (m *Legacy) GetF9() *proto2_v1_2.Message {
- if m != nil {
- return m.F9
+func (x *Legacy) GetF9() *proto2_v1_2.Message {
+ if x != nil {
+ return x.F9
}
return nil
}
-func (m *Legacy) GetF10() *proto3_v1_2.Message {
- if m != nil {
- return m.F10
+func (x *Legacy) GetF10() *proto3_v1_2.Message {
+ if x != nil {
+ return x.F10
}
return nil
}
-func (m *Legacy) GetF11() *proto2_v1_21.Message {
- if m != nil {
- return m.F11
+func (x *Legacy) GetF11() *proto2_v1_21.Message {
+ if x != nil {
+ return x.F11
}
return nil
}
-func (m *Legacy) GetF12() *proto3_v1_21.Message {
- if m != nil {
- return m.F12
+func (x *Legacy) GetF12() *proto3_v1_21.Message {
+ if x != nil {
+ return x.F12
}
return nil
}
diff --git a/internal/testprotos/test/test.pb.go b/internal/testprotos/test/test.pb.go
index 982abd3..c9f3fb6 100644
--- a/internal/testprotos/test/test.pb.go
+++ b/internal/testprotos/test/test.pb.go
@@ -21,13 +21,6 @@
ForeignEnum_FOREIGN_BAZ ForeignEnum = 6
)
-func (e ForeignEnum) Type() protoreflect.EnumType {
- return xxx_File_test_test_proto_enumTypes[0]
-}
-func (e ForeignEnum) Number() protoreflect.EnumNumber {
- return protoreflect.EnumNumber(e)
-}
-
// Deprecated: Use ForeignEnum.Type.Values instead.
var ForeignEnum_name = map[int32]string{
4: "FOREIGN_FOO",
@@ -50,6 +43,14 @@
return protoimpl.X.EnumStringOf(x.Type(), protoreflect.EnumNumber(x))
}
+func (ForeignEnum) Type() protoreflect.EnumType {
+ return xxx_File_test_test_proto_enumTypes[0]
+}
+
+func (x ForeignEnum) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
// Deprecated: Do not use.
func (x *ForeignEnum) UnmarshalJSON(b []byte) error {
num, err := protoimpl.X.UnmarshalJSONEnum(x.Type(), b)
@@ -71,13 +72,6 @@
TestReservedEnumFields_RESERVED_ENUM TestReservedEnumFields = 0
)
-func (e TestReservedEnumFields) Type() protoreflect.EnumType {
- return xxx_File_test_test_proto_enumTypes[1]
-}
-func (e TestReservedEnumFields) Number() protoreflect.EnumNumber {
- return protoreflect.EnumNumber(e)
-}
-
// Deprecated: Use TestReservedEnumFields.Type.Values instead.
var TestReservedEnumFields_name = map[int32]string{
0: "RESERVED_ENUM",
@@ -96,6 +90,14 @@
return protoimpl.X.EnumStringOf(x.Type(), protoreflect.EnumNumber(x))
}
+func (TestReservedEnumFields) Type() protoreflect.EnumType {
+ return xxx_File_test_test_proto_enumTypes[1]
+}
+
+func (x TestReservedEnumFields) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
// Deprecated: Do not use.
func (x *TestReservedEnumFields) UnmarshalJSON(b []byte) error {
num, err := protoimpl.X.UnmarshalJSONEnum(x.Type(), b)
@@ -120,13 +122,6 @@
TestAllTypes_NEG TestAllTypes_NestedEnum = -1
)
-func (e TestAllTypes_NestedEnum) Type() protoreflect.EnumType {
- return xxx_File_test_test_proto_enumTypes[2]
-}
-func (e TestAllTypes_NestedEnum) Number() protoreflect.EnumNumber {
- return protoreflect.EnumNumber(e)
-}
-
// Deprecated: Use TestAllTypes_NestedEnum.Type.Values instead.
var TestAllTypes_NestedEnum_name = map[int32]string{
0: "FOO",
@@ -151,6 +146,14 @@
return protoimpl.X.EnumStringOf(x.Type(), protoreflect.EnumNumber(x))
}
+func (TestAllTypes_NestedEnum) Type() protoreflect.EnumType {
+ return xxx_File_test_test_proto_enumTypes[2]
+}
+
+func (x TestAllTypes_NestedEnum) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
// Deprecated: Do not use.
func (x *TestAllTypes_NestedEnum) UnmarshalJSON(b []byte) error {
num, err := protoimpl.X.UnmarshalJSONEnum(x.Type(), b)
@@ -171,13 +174,6 @@
TestDeprecatedMessage_DEPRECATED TestDeprecatedMessage_DeprecatedEnum = 0 // Deprecated: Do not use.
)
-func (e TestDeprecatedMessage_DeprecatedEnum) Type() protoreflect.EnumType {
- return xxx_File_test_test_proto_enumTypes[3]
-}
-func (e TestDeprecatedMessage_DeprecatedEnum) Number() protoreflect.EnumNumber {
- return protoreflect.EnumNumber(e)
-}
-
// Deprecated: Use TestDeprecatedMessage_DeprecatedEnum.Type.Values instead.
var TestDeprecatedMessage_DeprecatedEnum_name = map[int32]string{
0: "DEPRECATED",
@@ -196,6 +192,14 @@
return protoimpl.X.EnumStringOf(x.Type(), protoreflect.EnumNumber(x))
}
+func (TestDeprecatedMessage_DeprecatedEnum) Type() protoreflect.EnumType {
+ return xxx_File_test_test_proto_enumTypes[3]
+}
+
+func (x TestDeprecatedMessage_DeprecatedEnum) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
// Deprecated: Do not use.
func (x *TestDeprecatedMessage_DeprecatedEnum) UnmarshalJSON(b []byte) error {
num, err := protoimpl.X.UnmarshalJSONEnum(x.Type(), b)
@@ -307,12 +311,19 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *TestAllTypes) ProtoReflect() protoreflect.Message {
- return xxx_File_test_test_proto_messageTypes[0].MessageOf(m)
+func (x *TestAllTypes) Reset() {
+ *x = TestAllTypes{}
}
-func (m *TestAllTypes) Reset() { *m = TestAllTypes{} }
-func (m *TestAllTypes) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*TestAllTypes) ProtoMessage() {}
+
+func (x *TestAllTypes) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*TestAllTypes) ProtoMessage() {}
+
+func (x *TestAllTypes) ProtoReflect() protoreflect.Message {
+ return xxx_File_test_test_proto_messageTypes[0].MessageOf(x)
+}
// Deprecated: Use TestAllTypes.ProtoReflect.Type instead.
func (*TestAllTypes) Descriptor() ([]byte, []int) {
@@ -339,548 +350,548 @@
const Default_TestAllTypes_DefaultNestedEnum TestAllTypes_NestedEnum = TestAllTypes_BAR
const Default_TestAllTypes_DefaultForeignEnum ForeignEnum = ForeignEnum_FOREIGN_BAR
-func (m *TestAllTypes) GetOptionalInt32() int32 {
- if m != nil && m.OptionalInt32 != nil {
- return *m.OptionalInt32
+func (x *TestAllTypes) GetOptionalInt32() int32 {
+ if x != nil && x.OptionalInt32 != nil {
+ return *x.OptionalInt32
}
return 0
}
-func (m *TestAllTypes) GetOptionalInt64() int64 {
- if m != nil && m.OptionalInt64 != nil {
- return *m.OptionalInt64
+func (x *TestAllTypes) GetOptionalInt64() int64 {
+ if x != nil && x.OptionalInt64 != nil {
+ return *x.OptionalInt64
}
return 0
}
-func (m *TestAllTypes) GetOptionalUint32() uint32 {
- if m != nil && m.OptionalUint32 != nil {
- return *m.OptionalUint32
+func (x *TestAllTypes) GetOptionalUint32() uint32 {
+ if x != nil && x.OptionalUint32 != nil {
+ return *x.OptionalUint32
}
return 0
}
-func (m *TestAllTypes) GetOptionalUint64() uint64 {
- if m != nil && m.OptionalUint64 != nil {
- return *m.OptionalUint64
+func (x *TestAllTypes) GetOptionalUint64() uint64 {
+ if x != nil && x.OptionalUint64 != nil {
+ return *x.OptionalUint64
}
return 0
}
-func (m *TestAllTypes) GetOptionalSint32() int32 {
- if m != nil && m.OptionalSint32 != nil {
- return *m.OptionalSint32
+func (x *TestAllTypes) GetOptionalSint32() int32 {
+ if x != nil && x.OptionalSint32 != nil {
+ return *x.OptionalSint32
}
return 0
}
-func (m *TestAllTypes) GetOptionalSint64() int64 {
- if m != nil && m.OptionalSint64 != nil {
- return *m.OptionalSint64
+func (x *TestAllTypes) GetOptionalSint64() int64 {
+ if x != nil && x.OptionalSint64 != nil {
+ return *x.OptionalSint64
}
return 0
}
-func (m *TestAllTypes) GetOptionalFixed32() uint32 {
- if m != nil && m.OptionalFixed32 != nil {
- return *m.OptionalFixed32
+func (x *TestAllTypes) GetOptionalFixed32() uint32 {
+ if x != nil && x.OptionalFixed32 != nil {
+ return *x.OptionalFixed32
}
return 0
}
-func (m *TestAllTypes) GetOptionalFixed64() uint64 {
- if m != nil && m.OptionalFixed64 != nil {
- return *m.OptionalFixed64
+func (x *TestAllTypes) GetOptionalFixed64() uint64 {
+ if x != nil && x.OptionalFixed64 != nil {
+ return *x.OptionalFixed64
}
return 0
}
-func (m *TestAllTypes) GetOptionalSfixed32() int32 {
- if m != nil && m.OptionalSfixed32 != nil {
- return *m.OptionalSfixed32
+func (x *TestAllTypes) GetOptionalSfixed32() int32 {
+ if x != nil && x.OptionalSfixed32 != nil {
+ return *x.OptionalSfixed32
}
return 0
}
-func (m *TestAllTypes) GetOptionalSfixed64() int64 {
- if m != nil && m.OptionalSfixed64 != nil {
- return *m.OptionalSfixed64
+func (x *TestAllTypes) GetOptionalSfixed64() int64 {
+ if x != nil && x.OptionalSfixed64 != nil {
+ return *x.OptionalSfixed64
}
return 0
}
-func (m *TestAllTypes) GetOptionalFloat() float32 {
- if m != nil && m.OptionalFloat != nil {
- return *m.OptionalFloat
+func (x *TestAllTypes) GetOptionalFloat() float32 {
+ if x != nil && x.OptionalFloat != nil {
+ return *x.OptionalFloat
}
return 0
}
-func (m *TestAllTypes) GetOptionalDouble() float64 {
- if m != nil && m.OptionalDouble != nil {
- return *m.OptionalDouble
+func (x *TestAllTypes) GetOptionalDouble() float64 {
+ if x != nil && x.OptionalDouble != nil {
+ return *x.OptionalDouble
}
return 0
}
-func (m *TestAllTypes) GetOptionalBool() bool {
- if m != nil && m.OptionalBool != nil {
- return *m.OptionalBool
+func (x *TestAllTypes) GetOptionalBool() bool {
+ if x != nil && x.OptionalBool != nil {
+ return *x.OptionalBool
}
return false
}
-func (m *TestAllTypes) GetOptionalString() string {
- if m != nil && m.OptionalString != nil {
- return *m.OptionalString
+func (x *TestAllTypes) GetOptionalString() string {
+ if x != nil && x.OptionalString != nil {
+ return *x.OptionalString
}
return ""
}
-func (m *TestAllTypes) GetOptionalBytes() []byte {
- if m != nil {
- return m.OptionalBytes
+func (x *TestAllTypes) GetOptionalBytes() []byte {
+ if x != nil {
+ return x.OptionalBytes
}
return nil
}
-func (m *TestAllTypes) GetOptionalgroup() *TestAllTypes_OptionalGroup {
- if m != nil {
- return m.Optionalgroup
+func (x *TestAllTypes) GetOptionalgroup() *TestAllTypes_OptionalGroup {
+ if x != nil {
+ return x.Optionalgroup
}
return nil
}
-func (m *TestAllTypes) GetOptionalNestedMessage() *TestAllTypes_NestedMessage {
- if m != nil {
- return m.OptionalNestedMessage
+func (x *TestAllTypes) GetOptionalNestedMessage() *TestAllTypes_NestedMessage {
+ if x != nil {
+ return x.OptionalNestedMessage
}
return nil
}
-func (m *TestAllTypes) GetOptionalForeignMessage() *ForeignMessage {
- if m != nil {
- return m.OptionalForeignMessage
+func (x *TestAllTypes) GetOptionalForeignMessage() *ForeignMessage {
+ if x != nil {
+ return x.OptionalForeignMessage
}
return nil
}
-func (m *TestAllTypes) GetOptionalImportMessage() *ImportMessage {
- if m != nil {
- return m.OptionalImportMessage
+func (x *TestAllTypes) GetOptionalImportMessage() *ImportMessage {
+ if x != nil {
+ return x.OptionalImportMessage
}
return nil
}
-func (m *TestAllTypes) GetOptionalNestedEnum() TestAllTypes_NestedEnum {
- if m != nil && m.OptionalNestedEnum != nil {
- return *m.OptionalNestedEnum
+func (x *TestAllTypes) GetOptionalNestedEnum() TestAllTypes_NestedEnum {
+ if x != nil && x.OptionalNestedEnum != nil {
+ return *x.OptionalNestedEnum
}
return TestAllTypes_FOO
}
-func (m *TestAllTypes) GetOptionalForeignEnum() ForeignEnum {
- if m != nil && m.OptionalForeignEnum != nil {
- return *m.OptionalForeignEnum
+func (x *TestAllTypes) GetOptionalForeignEnum() ForeignEnum {
+ if x != nil && x.OptionalForeignEnum != nil {
+ return *x.OptionalForeignEnum
}
return ForeignEnum_FOREIGN_FOO
}
-func (m *TestAllTypes) GetOptionalImportEnum() ImportEnum {
- if m != nil && m.OptionalImportEnum != nil {
- return *m.OptionalImportEnum
+func (x *TestAllTypes) GetOptionalImportEnum() ImportEnum {
+ if x != nil && x.OptionalImportEnum != nil {
+ return *x.OptionalImportEnum
}
return ImportEnum_IMPORT_ZERO
}
-func (m *TestAllTypes) GetRepeatedInt32() []int32 {
- if m != nil {
- return m.RepeatedInt32
+func (x *TestAllTypes) GetRepeatedInt32() []int32 {
+ if x != nil {
+ return x.RepeatedInt32
}
return nil
}
-func (m *TestAllTypes) GetRepeatedInt64() []int64 {
- if m != nil {
- return m.RepeatedInt64
+func (x *TestAllTypes) GetRepeatedInt64() []int64 {
+ if x != nil {
+ return x.RepeatedInt64
}
return nil
}
-func (m *TestAllTypes) GetRepeatedUint32() []uint32 {
- if m != nil {
- return m.RepeatedUint32
+func (x *TestAllTypes) GetRepeatedUint32() []uint32 {
+ if x != nil {
+ return x.RepeatedUint32
}
return nil
}
-func (m *TestAllTypes) GetRepeatedUint64() []uint64 {
- if m != nil {
- return m.RepeatedUint64
+func (x *TestAllTypes) GetRepeatedUint64() []uint64 {
+ if x != nil {
+ return x.RepeatedUint64
}
return nil
}
-func (m *TestAllTypes) GetRepeatedSint32() []int32 {
- if m != nil {
- return m.RepeatedSint32
+func (x *TestAllTypes) GetRepeatedSint32() []int32 {
+ if x != nil {
+ return x.RepeatedSint32
}
return nil
}
-func (m *TestAllTypes) GetRepeatedSint64() []int64 {
- if m != nil {
- return m.RepeatedSint64
+func (x *TestAllTypes) GetRepeatedSint64() []int64 {
+ if x != nil {
+ return x.RepeatedSint64
}
return nil
}
-func (m *TestAllTypes) GetRepeatedFixed32() []uint32 {
- if m != nil {
- return m.RepeatedFixed32
+func (x *TestAllTypes) GetRepeatedFixed32() []uint32 {
+ if x != nil {
+ return x.RepeatedFixed32
}
return nil
}
-func (m *TestAllTypes) GetRepeatedFixed64() []uint64 {
- if m != nil {
- return m.RepeatedFixed64
+func (x *TestAllTypes) GetRepeatedFixed64() []uint64 {
+ if x != nil {
+ return x.RepeatedFixed64
}
return nil
}
-func (m *TestAllTypes) GetRepeatedSfixed32() []int32 {
- if m != nil {
- return m.RepeatedSfixed32
+func (x *TestAllTypes) GetRepeatedSfixed32() []int32 {
+ if x != nil {
+ return x.RepeatedSfixed32
}
return nil
}
-func (m *TestAllTypes) GetRepeatedSfixed64() []int64 {
- if m != nil {
- return m.RepeatedSfixed64
+func (x *TestAllTypes) GetRepeatedSfixed64() []int64 {
+ if x != nil {
+ return x.RepeatedSfixed64
}
return nil
}
-func (m *TestAllTypes) GetRepeatedFloat() []float32 {
- if m != nil {
- return m.RepeatedFloat
+func (x *TestAllTypes) GetRepeatedFloat() []float32 {
+ if x != nil {
+ return x.RepeatedFloat
}
return nil
}
-func (m *TestAllTypes) GetRepeatedDouble() []float64 {
- if m != nil {
- return m.RepeatedDouble
+func (x *TestAllTypes) GetRepeatedDouble() []float64 {
+ if x != nil {
+ return x.RepeatedDouble
}
return nil
}
-func (m *TestAllTypes) GetRepeatedBool() []bool {
- if m != nil {
- return m.RepeatedBool
+func (x *TestAllTypes) GetRepeatedBool() []bool {
+ if x != nil {
+ return x.RepeatedBool
}
return nil
}
-func (m *TestAllTypes) GetRepeatedString() []string {
- if m != nil {
- return m.RepeatedString
+func (x *TestAllTypes) GetRepeatedString() []string {
+ if x != nil {
+ return x.RepeatedString
}
return nil
}
-func (m *TestAllTypes) GetRepeatedBytes() [][]byte {
- if m != nil {
- return m.RepeatedBytes
+func (x *TestAllTypes) GetRepeatedBytes() [][]byte {
+ if x != nil {
+ return x.RepeatedBytes
}
return nil
}
-func (m *TestAllTypes) GetRepeatedgroup() []*TestAllTypes_RepeatedGroup {
- if m != nil {
- return m.Repeatedgroup
+func (x *TestAllTypes) GetRepeatedgroup() []*TestAllTypes_RepeatedGroup {
+ if x != nil {
+ return x.Repeatedgroup
}
return nil
}
-func (m *TestAllTypes) GetRepeatedNestedMessage() []*TestAllTypes_NestedMessage {
- if m != nil {
- return m.RepeatedNestedMessage
+func (x *TestAllTypes) GetRepeatedNestedMessage() []*TestAllTypes_NestedMessage {
+ if x != nil {
+ return x.RepeatedNestedMessage
}
return nil
}
-func (m *TestAllTypes) GetRepeatedForeignMessage() []*ForeignMessage {
- if m != nil {
- return m.RepeatedForeignMessage
+func (x *TestAllTypes) GetRepeatedForeignMessage() []*ForeignMessage {
+ if x != nil {
+ return x.RepeatedForeignMessage
}
return nil
}
-func (m *TestAllTypes) GetRepeatedImportmessage() []*ImportMessage {
- if m != nil {
- return m.RepeatedImportmessage
+func (x *TestAllTypes) GetRepeatedImportmessage() []*ImportMessage {
+ if x != nil {
+ return x.RepeatedImportmessage
}
return nil
}
-func (m *TestAllTypes) GetRepeatedNestedEnum() []TestAllTypes_NestedEnum {
- if m != nil {
- return m.RepeatedNestedEnum
+func (x *TestAllTypes) GetRepeatedNestedEnum() []TestAllTypes_NestedEnum {
+ if x != nil {
+ return x.RepeatedNestedEnum
}
return nil
}
-func (m *TestAllTypes) GetRepeatedForeignEnum() []ForeignEnum {
- if m != nil {
- return m.RepeatedForeignEnum
+func (x *TestAllTypes) GetRepeatedForeignEnum() []ForeignEnum {
+ if x != nil {
+ return x.RepeatedForeignEnum
}
return nil
}
-func (m *TestAllTypes) GetRepeatedImportenum() []ImportEnum {
- if m != nil {
- return m.RepeatedImportenum
+func (x *TestAllTypes) GetRepeatedImportenum() []ImportEnum {
+ if x != nil {
+ return x.RepeatedImportenum
}
return nil
}
-func (m *TestAllTypes) GetMapInt32Int32() map[int32]int32 {
- if m != nil {
- return m.MapInt32Int32
+func (x *TestAllTypes) GetMapInt32Int32() map[int32]int32 {
+ if x != nil {
+ return x.MapInt32Int32
}
return nil
}
-func (m *TestAllTypes) GetMapInt64Int64() map[int64]int64 {
- if m != nil {
- return m.MapInt64Int64
+func (x *TestAllTypes) GetMapInt64Int64() map[int64]int64 {
+ if x != nil {
+ return x.MapInt64Int64
}
return nil
}
-func (m *TestAllTypes) GetMapUint32Uint32() map[uint32]uint32 {
- if m != nil {
- return m.MapUint32Uint32
+func (x *TestAllTypes) GetMapUint32Uint32() map[uint32]uint32 {
+ if x != nil {
+ return x.MapUint32Uint32
}
return nil
}
-func (m *TestAllTypes) GetMapUint64Uint64() map[uint64]uint64 {
- if m != nil {
- return m.MapUint64Uint64
+func (x *TestAllTypes) GetMapUint64Uint64() map[uint64]uint64 {
+ if x != nil {
+ return x.MapUint64Uint64
}
return nil
}
-func (m *TestAllTypes) GetMapSint32Sint32() map[int32]int32 {
- if m != nil {
- return m.MapSint32Sint32
+func (x *TestAllTypes) GetMapSint32Sint32() map[int32]int32 {
+ if x != nil {
+ return x.MapSint32Sint32
}
return nil
}
-func (m *TestAllTypes) GetMapSint64Sint64() map[int64]int64 {
- if m != nil {
- return m.MapSint64Sint64
+func (x *TestAllTypes) GetMapSint64Sint64() map[int64]int64 {
+ if x != nil {
+ return x.MapSint64Sint64
}
return nil
}
-func (m *TestAllTypes) GetMapFixed32Fixed32() map[uint32]uint32 {
- if m != nil {
- return m.MapFixed32Fixed32
+func (x *TestAllTypes) GetMapFixed32Fixed32() map[uint32]uint32 {
+ if x != nil {
+ return x.MapFixed32Fixed32
}
return nil
}
-func (m *TestAllTypes) GetMapFixed64Fixed64() map[uint64]uint64 {
- if m != nil {
- return m.MapFixed64Fixed64
+func (x *TestAllTypes) GetMapFixed64Fixed64() map[uint64]uint64 {
+ if x != nil {
+ return x.MapFixed64Fixed64
}
return nil
}
-func (m *TestAllTypes) GetMapSfixed32Sfixed32() map[int32]int32 {
- if m != nil {
- return m.MapSfixed32Sfixed32
+func (x *TestAllTypes) GetMapSfixed32Sfixed32() map[int32]int32 {
+ if x != nil {
+ return x.MapSfixed32Sfixed32
}
return nil
}
-func (m *TestAllTypes) GetMapSfixed64Sfixed64() map[int64]int64 {
- if m != nil {
- return m.MapSfixed64Sfixed64
+func (x *TestAllTypes) GetMapSfixed64Sfixed64() map[int64]int64 {
+ if x != nil {
+ return x.MapSfixed64Sfixed64
}
return nil
}
-func (m *TestAllTypes) GetMapInt32Float() map[int32]float32 {
- if m != nil {
- return m.MapInt32Float
+func (x *TestAllTypes) GetMapInt32Float() map[int32]float32 {
+ if x != nil {
+ return x.MapInt32Float
}
return nil
}
-func (m *TestAllTypes) GetMapInt32Double() map[int32]float64 {
- if m != nil {
- return m.MapInt32Double
+func (x *TestAllTypes) GetMapInt32Double() map[int32]float64 {
+ if x != nil {
+ return x.MapInt32Double
}
return nil
}
-func (m *TestAllTypes) GetMapBoolBool() map[bool]bool {
- if m != nil {
- return m.MapBoolBool
+func (x *TestAllTypes) GetMapBoolBool() map[bool]bool {
+ if x != nil {
+ return x.MapBoolBool
}
return nil
}
-func (m *TestAllTypes) GetMapStringString() map[string]string {
- if m != nil {
- return m.MapStringString
+func (x *TestAllTypes) GetMapStringString() map[string]string {
+ if x != nil {
+ return x.MapStringString
}
return nil
}
-func (m *TestAllTypes) GetMapStringBytes() map[string][]byte {
- if m != nil {
- return m.MapStringBytes
+func (x *TestAllTypes) GetMapStringBytes() map[string][]byte {
+ if x != nil {
+ return x.MapStringBytes
}
return nil
}
-func (m *TestAllTypes) GetMapStringNestedMessage() map[string]*TestAllTypes_NestedMessage {
- if m != nil {
- return m.MapStringNestedMessage
+func (x *TestAllTypes) GetMapStringNestedMessage() map[string]*TestAllTypes_NestedMessage {
+ if x != nil {
+ return x.MapStringNestedMessage
}
return nil
}
-func (m *TestAllTypes) GetMapStringNestedEnum() map[string]TestAllTypes_NestedEnum {
- if m != nil {
- return m.MapStringNestedEnum
+func (x *TestAllTypes) GetMapStringNestedEnum() map[string]TestAllTypes_NestedEnum {
+ if x != nil {
+ return x.MapStringNestedEnum
}
return nil
}
-func (m *TestAllTypes) GetDefaultInt32() int32 {
- if m != nil && m.DefaultInt32 != nil {
- return *m.DefaultInt32
+func (x *TestAllTypes) GetDefaultInt32() int32 {
+ if x != nil && x.DefaultInt32 != nil {
+ return *x.DefaultInt32
}
return Default_TestAllTypes_DefaultInt32
}
-func (m *TestAllTypes) GetDefaultInt64() int64 {
- if m != nil && m.DefaultInt64 != nil {
- return *m.DefaultInt64
+func (x *TestAllTypes) GetDefaultInt64() int64 {
+ if x != nil && x.DefaultInt64 != nil {
+ return *x.DefaultInt64
}
return Default_TestAllTypes_DefaultInt64
}
-func (m *TestAllTypes) GetDefaultUint32() uint32 {
- if m != nil && m.DefaultUint32 != nil {
- return *m.DefaultUint32
+func (x *TestAllTypes) GetDefaultUint32() uint32 {
+ if x != nil && x.DefaultUint32 != nil {
+ return *x.DefaultUint32
}
return Default_TestAllTypes_DefaultUint32
}
-func (m *TestAllTypes) GetDefaultUint64() uint64 {
- if m != nil && m.DefaultUint64 != nil {
- return *m.DefaultUint64
+func (x *TestAllTypes) GetDefaultUint64() uint64 {
+ if x != nil && x.DefaultUint64 != nil {
+ return *x.DefaultUint64
}
return Default_TestAllTypes_DefaultUint64
}
-func (m *TestAllTypes) GetDefaultSint32() int32 {
- if m != nil && m.DefaultSint32 != nil {
- return *m.DefaultSint32
+func (x *TestAllTypes) GetDefaultSint32() int32 {
+ if x != nil && x.DefaultSint32 != nil {
+ return *x.DefaultSint32
}
return Default_TestAllTypes_DefaultSint32
}
-func (m *TestAllTypes) GetDefaultSint64() int64 {
- if m != nil && m.DefaultSint64 != nil {
- return *m.DefaultSint64
+func (x *TestAllTypes) GetDefaultSint64() int64 {
+ if x != nil && x.DefaultSint64 != nil {
+ return *x.DefaultSint64
}
return Default_TestAllTypes_DefaultSint64
}
-func (m *TestAllTypes) GetDefaultFixed32() uint32 {
- if m != nil && m.DefaultFixed32 != nil {
- return *m.DefaultFixed32
+func (x *TestAllTypes) GetDefaultFixed32() uint32 {
+ if x != nil && x.DefaultFixed32 != nil {
+ return *x.DefaultFixed32
}
return Default_TestAllTypes_DefaultFixed32
}
-func (m *TestAllTypes) GetDefaultFixed64() uint64 {
- if m != nil && m.DefaultFixed64 != nil {
- return *m.DefaultFixed64
+func (x *TestAllTypes) GetDefaultFixed64() uint64 {
+ if x != nil && x.DefaultFixed64 != nil {
+ return *x.DefaultFixed64
}
return Default_TestAllTypes_DefaultFixed64
}
-func (m *TestAllTypes) GetDefaultSfixed32() int32 {
- if m != nil && m.DefaultSfixed32 != nil {
- return *m.DefaultSfixed32
+func (x *TestAllTypes) GetDefaultSfixed32() int32 {
+ if x != nil && x.DefaultSfixed32 != nil {
+ return *x.DefaultSfixed32
}
return Default_TestAllTypes_DefaultSfixed32
}
-func (m *TestAllTypes) GetDefaultSfixed64() int64 {
- if m != nil && m.DefaultSfixed64 != nil {
- return *m.DefaultSfixed64
+func (x *TestAllTypes) GetDefaultSfixed64() int64 {
+ if x != nil && x.DefaultSfixed64 != nil {
+ return *x.DefaultSfixed64
}
return Default_TestAllTypes_DefaultSfixed64
}
-func (m *TestAllTypes) GetDefaultFloat() float32 {
- if m != nil && m.DefaultFloat != nil {
- return *m.DefaultFloat
+func (x *TestAllTypes) GetDefaultFloat() float32 {
+ if x != nil && x.DefaultFloat != nil {
+ return *x.DefaultFloat
}
return Default_TestAllTypes_DefaultFloat
}
-func (m *TestAllTypes) GetDefaultDouble() float64 {
- if m != nil && m.DefaultDouble != nil {
- return *m.DefaultDouble
+func (x *TestAllTypes) GetDefaultDouble() float64 {
+ if x != nil && x.DefaultDouble != nil {
+ return *x.DefaultDouble
}
return Default_TestAllTypes_DefaultDouble
}
-func (m *TestAllTypes) GetDefaultBool() bool {
- if m != nil && m.DefaultBool != nil {
- return *m.DefaultBool
+func (x *TestAllTypes) GetDefaultBool() bool {
+ if x != nil && x.DefaultBool != nil {
+ return *x.DefaultBool
}
return Default_TestAllTypes_DefaultBool
}
-func (m *TestAllTypes) GetDefaultString() string {
- if m != nil && m.DefaultString != nil {
- return *m.DefaultString
+func (x *TestAllTypes) GetDefaultString() string {
+ if x != nil && x.DefaultString != nil {
+ return *x.DefaultString
}
return Default_TestAllTypes_DefaultString
}
-func (m *TestAllTypes) GetDefaultBytes() []byte {
- if m != nil && m.DefaultBytes != nil {
- return m.DefaultBytes
+func (x *TestAllTypes) GetDefaultBytes() []byte {
+ if x != nil && x.DefaultBytes != nil {
+ return x.DefaultBytes
}
return append([]byte(nil), Default_TestAllTypes_DefaultBytes...)
}
-func (m *TestAllTypes) GetDefaultNestedEnum() TestAllTypes_NestedEnum {
- if m != nil && m.DefaultNestedEnum != nil {
- return *m.DefaultNestedEnum
+func (x *TestAllTypes) GetDefaultNestedEnum() TestAllTypes_NestedEnum {
+ if x != nil && x.DefaultNestedEnum != nil {
+ return *x.DefaultNestedEnum
}
return Default_TestAllTypes_DefaultNestedEnum
}
-func (m *TestAllTypes) GetDefaultForeignEnum() ForeignEnum {
- if m != nil && m.DefaultForeignEnum != nil {
- return *m.DefaultForeignEnum
+func (x *TestAllTypes) GetDefaultForeignEnum() ForeignEnum {
+ if x != nil && x.DefaultForeignEnum != nil {
+ return *x.DefaultForeignEnum
}
return Default_TestAllTypes_DefaultForeignEnum
}
@@ -950,64 +961,64 @@
return nil
}
-func (m *TestAllTypes) GetOneofUint32() uint32 {
- if x, ok := m.GetOneofField().(*TestAllTypes_OneofUint32); ok {
+func (x *TestAllTypes) GetOneofUint32() uint32 {
+ if x, ok := x.GetOneofField().(*TestAllTypes_OneofUint32); ok {
return x.OneofUint32
}
return 0
}
-func (m *TestAllTypes) GetOneofNestedMessage() *TestAllTypes_NestedMessage {
- if x, ok := m.GetOneofField().(*TestAllTypes_OneofNestedMessage); ok {
+func (x *TestAllTypes) GetOneofNestedMessage() *TestAllTypes_NestedMessage {
+ if x, ok := x.GetOneofField().(*TestAllTypes_OneofNestedMessage); ok {
return x.OneofNestedMessage
}
return nil
}
-func (m *TestAllTypes) GetOneofString() string {
- if x, ok := m.GetOneofField().(*TestAllTypes_OneofString); ok {
+func (x *TestAllTypes) GetOneofString() string {
+ if x, ok := x.GetOneofField().(*TestAllTypes_OneofString); ok {
return x.OneofString
}
return ""
}
-func (m *TestAllTypes) GetOneofBytes() []byte {
- if x, ok := m.GetOneofField().(*TestAllTypes_OneofBytes); ok {
+func (x *TestAllTypes) GetOneofBytes() []byte {
+ if x, ok := x.GetOneofField().(*TestAllTypes_OneofBytes); ok {
return x.OneofBytes
}
return nil
}
-func (m *TestAllTypes) GetOneofBool() bool {
- if x, ok := m.GetOneofField().(*TestAllTypes_OneofBool); ok {
+func (x *TestAllTypes) GetOneofBool() bool {
+ if x, ok := x.GetOneofField().(*TestAllTypes_OneofBool); ok {
return x.OneofBool
}
return false
}
-func (m *TestAllTypes) GetOneofUint64() uint64 {
- if x, ok := m.GetOneofField().(*TestAllTypes_OneofUint64); ok {
+func (x *TestAllTypes) GetOneofUint64() uint64 {
+ if x, ok := x.GetOneofField().(*TestAllTypes_OneofUint64); ok {
return x.OneofUint64
}
return 0
}
-func (m *TestAllTypes) GetOneofFloat() float32 {
- if x, ok := m.GetOneofField().(*TestAllTypes_OneofFloat); ok {
+func (x *TestAllTypes) GetOneofFloat() float32 {
+ if x, ok := x.GetOneofField().(*TestAllTypes_OneofFloat); ok {
return x.OneofFloat
}
return 0
}
-func (m *TestAllTypes) GetOneofDouble() float64 {
- if x, ok := m.GetOneofField().(*TestAllTypes_OneofDouble); ok {
+func (x *TestAllTypes) GetOneofDouble() float64 {
+ if x, ok := x.GetOneofField().(*TestAllTypes_OneofDouble); ok {
return x.OneofDouble
}
return 0
}
-func (m *TestAllTypes) GetOneofEnum() TestAllTypes_NestedEnum {
- if x, ok := m.GetOneofField().(*TestAllTypes_OneofEnum); ok {
+func (x *TestAllTypes) GetOneofEnum() TestAllTypes_NestedEnum {
+ if x, ok := x.GetOneofField().(*TestAllTypes_OneofEnum); ok {
return x.OneofEnum
}
return TestAllTypes_FOO
@@ -1039,12 +1050,19 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *TestDeprecatedMessage) ProtoReflect() protoreflect.Message {
- return xxx_File_test_test_proto_messageTypes[1].MessageOf(m)
+func (x *TestDeprecatedMessage) Reset() {
+ *x = TestDeprecatedMessage{}
}
-func (m *TestDeprecatedMessage) Reset() { *m = TestDeprecatedMessage{} }
-func (m *TestDeprecatedMessage) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*TestDeprecatedMessage) ProtoMessage() {}
+
+func (x *TestDeprecatedMessage) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*TestDeprecatedMessage) ProtoMessage() {}
+
+func (x *TestDeprecatedMessage) ProtoReflect() protoreflect.Message {
+ return xxx_File_test_test_proto_messageTypes[1].MessageOf(x)
+}
// Deprecated: Use TestDeprecatedMessage.ProtoReflect.Type instead.
func (*TestDeprecatedMessage) Descriptor() ([]byte, []int) {
@@ -1052,9 +1070,9 @@
}
// Deprecated: Do not use.
-func (m *TestDeprecatedMessage) GetDeprecatedInt32() int32 {
- if m != nil && m.DeprecatedInt32 != nil {
- return *m.DeprecatedInt32
+func (x *TestDeprecatedMessage) GetDeprecatedInt32() int32 {
+ if x != nil && x.DeprecatedInt32 != nil {
+ return *x.DeprecatedInt32
}
return 0
}
@@ -1077,8 +1095,8 @@
}
// Deprecated: Do not use.
-func (m *TestDeprecatedMessage) GetDeprecatedOneofField() int32 {
- if x, ok := m.GetDeprecatedOneof().(*TestDeprecatedMessage_DeprecatedOneofField); ok {
+func (x *TestDeprecatedMessage) GetDeprecatedOneofField() int32 {
+ if x, ok := x.GetDeprecatedOneof().(*TestDeprecatedMessage_DeprecatedOneofField); ok {
return x.DeprecatedOneofField
}
return 0
@@ -1099,28 +1117,35 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *ForeignMessage) ProtoReflect() protoreflect.Message {
- return xxx_File_test_test_proto_messageTypes[2].MessageOf(m)
+func (x *ForeignMessage) Reset() {
+ *x = ForeignMessage{}
}
-func (m *ForeignMessage) Reset() { *m = ForeignMessage{} }
-func (m *ForeignMessage) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*ForeignMessage) ProtoMessage() {}
+
+func (x *ForeignMessage) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ForeignMessage) ProtoMessage() {}
+
+func (x *ForeignMessage) ProtoReflect() protoreflect.Message {
+ return xxx_File_test_test_proto_messageTypes[2].MessageOf(x)
+}
// Deprecated: Use ForeignMessage.ProtoReflect.Type instead.
func (*ForeignMessage) Descriptor() ([]byte, []int) {
return xxx_File_test_test_proto_rawDescGZIP(), []int{2}
}
-func (m *ForeignMessage) GetC() int32 {
- if m != nil && m.C != nil {
- return *m.C
+func (x *ForeignMessage) GetC() int32 {
+ if x != nil && x.C != nil {
+ return *x.C
}
return 0
}
-func (m *ForeignMessage) GetD() int32 {
- if m != nil && m.D != nil {
- return *m.D
+func (x *ForeignMessage) GetD() int32 {
+ if x != nil && x.D != nil {
+ return *x.D
}
return 0
}
@@ -1131,12 +1156,19 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *TestReservedFields) ProtoReflect() protoreflect.Message {
- return xxx_File_test_test_proto_messageTypes[3].MessageOf(m)
+func (x *TestReservedFields) Reset() {
+ *x = TestReservedFields{}
}
-func (m *TestReservedFields) Reset() { *m = TestReservedFields{} }
-func (m *TestReservedFields) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*TestReservedFields) ProtoMessage() {}
+
+func (x *TestReservedFields) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*TestReservedFields) ProtoMessage() {}
+
+func (x *TestReservedFields) ProtoReflect() protoreflect.Message {
+ return xxx_File_test_test_proto_messageTypes[3].MessageOf(x)
+}
// Deprecated: Use TestReservedFields.ProtoReflect.Type instead.
func (*TestReservedFields) Descriptor() ([]byte, []int) {
@@ -1150,12 +1182,19 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *TestAllExtensions) ProtoReflect() protoreflect.Message {
- return xxx_File_test_test_proto_messageTypes[4].MessageOf(m)
+func (x *TestAllExtensions) Reset() {
+ *x = TestAllExtensions{}
}
-func (m *TestAllExtensions) Reset() { *m = TestAllExtensions{} }
-func (m *TestAllExtensions) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*TestAllExtensions) ProtoMessage() {}
+
+func (x *TestAllExtensions) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*TestAllExtensions) ProtoMessage() {}
+
+func (x *TestAllExtensions) ProtoReflect() protoreflect.Message {
+ return xxx_File_test_test_proto_messageTypes[4].MessageOf(x)
+}
// Deprecated: Use TestAllExtensions.ProtoReflect.Type instead.
func (*TestAllExtensions) Descriptor() ([]byte, []int) {
@@ -1178,21 +1217,28 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *OptionalGroupExtension) ProtoReflect() protoreflect.Message {
- return xxx_File_test_test_proto_messageTypes[5].MessageOf(m)
+func (x *OptionalGroupExtension) Reset() {
+ *x = OptionalGroupExtension{}
}
-func (m *OptionalGroupExtension) Reset() { *m = OptionalGroupExtension{} }
-func (m *OptionalGroupExtension) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*OptionalGroupExtension) ProtoMessage() {}
+
+func (x *OptionalGroupExtension) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*OptionalGroupExtension) ProtoMessage() {}
+
+func (x *OptionalGroupExtension) ProtoReflect() protoreflect.Message {
+ return xxx_File_test_test_proto_messageTypes[5].MessageOf(x)
+}
// Deprecated: Use OptionalGroupExtension.ProtoReflect.Type instead.
func (*OptionalGroupExtension) Descriptor() ([]byte, []int) {
return xxx_File_test_test_proto_rawDescGZIP(), []int{5}
}
-func (m *OptionalGroupExtension) GetA() int32 {
- if m != nil && m.A != nil {
- return *m.A
+func (x *OptionalGroupExtension) GetA() int32 {
+ if x != nil && x.A != nil {
+ return *x.A
}
return 0
}
@@ -1204,21 +1250,28 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *RepeatedGroupExtension) ProtoReflect() protoreflect.Message {
- return xxx_File_test_test_proto_messageTypes[6].MessageOf(m)
+func (x *RepeatedGroupExtension) Reset() {
+ *x = RepeatedGroupExtension{}
}
-func (m *RepeatedGroupExtension) Reset() { *m = RepeatedGroupExtension{} }
-func (m *RepeatedGroupExtension) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*RepeatedGroupExtension) ProtoMessage() {}
+
+func (x *RepeatedGroupExtension) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*RepeatedGroupExtension) ProtoMessage() {}
+
+func (x *RepeatedGroupExtension) ProtoReflect() protoreflect.Message {
+ return xxx_File_test_test_proto_messageTypes[6].MessageOf(x)
+}
// Deprecated: Use RepeatedGroupExtension.ProtoReflect.Type instead.
func (*RepeatedGroupExtension) Descriptor() ([]byte, []int) {
return xxx_File_test_test_proto_rawDescGZIP(), []int{6}
}
-func (m *RepeatedGroupExtension) GetA() int32 {
- if m != nil && m.A != nil {
- return *m.A
+func (x *RepeatedGroupExtension) GetA() int32 {
+ if x != nil && x.A != nil {
+ return *x.A
}
return 0
}
@@ -1229,12 +1282,19 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *TestNestedExtension) ProtoReflect() protoreflect.Message {
- return xxx_File_test_test_proto_messageTypes[7].MessageOf(m)
+func (x *TestNestedExtension) Reset() {
+ *x = TestNestedExtension{}
}
-func (m *TestNestedExtension) Reset() { *m = TestNestedExtension{} }
-func (m *TestNestedExtension) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*TestNestedExtension) ProtoMessage() {}
+
+func (x *TestNestedExtension) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*TestNestedExtension) ProtoMessage() {}
+
+func (x *TestNestedExtension) ProtoReflect() protoreflect.Message {
+ return xxx_File_test_test_proto_messageTypes[7].MessageOf(x)
+}
// Deprecated: Use TestNestedExtension.ProtoReflect.Type instead.
func (*TestNestedExtension) Descriptor() ([]byte, []int) {
@@ -1248,12 +1308,19 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *FooRequest) ProtoReflect() protoreflect.Message {
- return xxx_File_test_test_proto_messageTypes[8].MessageOf(m)
+func (x *FooRequest) Reset() {
+ *x = FooRequest{}
}
-func (m *FooRequest) Reset() { *m = FooRequest{} }
-func (m *FooRequest) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*FooRequest) ProtoMessage() {}
+
+func (x *FooRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*FooRequest) ProtoMessage() {}
+
+func (x *FooRequest) ProtoReflect() protoreflect.Message {
+ return xxx_File_test_test_proto_messageTypes[8].MessageOf(x)
+}
// Deprecated: Use FooRequest.ProtoReflect.Type instead.
func (*FooRequest) Descriptor() ([]byte, []int) {
@@ -1266,12 +1333,19 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *FooResponse) ProtoReflect() protoreflect.Message {
- return xxx_File_test_test_proto_messageTypes[9].MessageOf(m)
+func (x *FooResponse) Reset() {
+ *x = FooResponse{}
}
-func (m *FooResponse) Reset() { *m = FooResponse{} }
-func (m *FooResponse) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*FooResponse) ProtoMessage() {}
+
+func (x *FooResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*FooResponse) ProtoMessage() {}
+
+func (x *FooResponse) ProtoReflect() protoreflect.Message {
+ return xxx_File_test_test_proto_messageTypes[9].MessageOf(x)
+}
// Deprecated: Use FooResponse.ProtoReflect.Type instead.
func (*FooResponse) Descriptor() ([]byte, []int) {
@@ -1286,28 +1360,35 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *TestAllTypes_NestedMessage) ProtoReflect() protoreflect.Message {
- return xxx_File_test_test_proto_messageTypes[10].MessageOf(m)
+func (x *TestAllTypes_NestedMessage) Reset() {
+ *x = TestAllTypes_NestedMessage{}
}
-func (m *TestAllTypes_NestedMessage) Reset() { *m = TestAllTypes_NestedMessage{} }
-func (m *TestAllTypes_NestedMessage) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*TestAllTypes_NestedMessage) ProtoMessage() {}
+
+func (x *TestAllTypes_NestedMessage) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*TestAllTypes_NestedMessage) ProtoMessage() {}
+
+func (x *TestAllTypes_NestedMessage) ProtoReflect() protoreflect.Message {
+ return xxx_File_test_test_proto_messageTypes[10].MessageOf(x)
+}
// Deprecated: Use TestAllTypes_NestedMessage.ProtoReflect.Type instead.
func (*TestAllTypes_NestedMessage) Descriptor() ([]byte, []int) {
return xxx_File_test_test_proto_rawDescGZIP(), []int{0, 0}
}
-func (m *TestAllTypes_NestedMessage) GetA() int32 {
- if m != nil && m.A != nil {
- return *m.A
+func (x *TestAllTypes_NestedMessage) GetA() int32 {
+ if x != nil && x.A != nil {
+ return *x.A
}
return 0
}
-func (m *TestAllTypes_NestedMessage) GetCorecursive() *TestAllTypes {
- if m != nil {
- return m.Corecursive
+func (x *TestAllTypes_NestedMessage) GetCorecursive() *TestAllTypes {
+ if x != nil {
+ return x.Corecursive
}
return nil
}
@@ -1319,21 +1400,28 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *TestAllTypes_OptionalGroup) ProtoReflect() protoreflect.Message {
- return xxx_File_test_test_proto_messageTypes[11].MessageOf(m)
+func (x *TestAllTypes_OptionalGroup) Reset() {
+ *x = TestAllTypes_OptionalGroup{}
}
-func (m *TestAllTypes_OptionalGroup) Reset() { *m = TestAllTypes_OptionalGroup{} }
-func (m *TestAllTypes_OptionalGroup) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*TestAllTypes_OptionalGroup) ProtoMessage() {}
+
+func (x *TestAllTypes_OptionalGroup) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*TestAllTypes_OptionalGroup) ProtoMessage() {}
+
+func (x *TestAllTypes_OptionalGroup) ProtoReflect() protoreflect.Message {
+ return xxx_File_test_test_proto_messageTypes[11].MessageOf(x)
+}
// Deprecated: Use TestAllTypes_OptionalGroup.ProtoReflect.Type instead.
func (*TestAllTypes_OptionalGroup) Descriptor() ([]byte, []int) {
return xxx_File_test_test_proto_rawDescGZIP(), []int{0, 1}
}
-func (m *TestAllTypes_OptionalGroup) GetA() int32 {
- if m != nil && m.A != nil {
- return *m.A
+func (x *TestAllTypes_OptionalGroup) GetA() int32 {
+ if x != nil && x.A != nil {
+ return *x.A
}
return 0
}
@@ -1345,21 +1433,28 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *TestAllTypes_RepeatedGroup) ProtoReflect() protoreflect.Message {
- return xxx_File_test_test_proto_messageTypes[12].MessageOf(m)
+func (x *TestAllTypes_RepeatedGroup) Reset() {
+ *x = TestAllTypes_RepeatedGroup{}
}
-func (m *TestAllTypes_RepeatedGroup) Reset() { *m = TestAllTypes_RepeatedGroup{} }
-func (m *TestAllTypes_RepeatedGroup) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*TestAllTypes_RepeatedGroup) ProtoMessage() {}
+
+func (x *TestAllTypes_RepeatedGroup) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*TestAllTypes_RepeatedGroup) ProtoMessage() {}
+
+func (x *TestAllTypes_RepeatedGroup) ProtoReflect() protoreflect.Message {
+ return xxx_File_test_test_proto_messageTypes[12].MessageOf(x)
+}
// Deprecated: Use TestAllTypes_RepeatedGroup.ProtoReflect.Type instead.
func (*TestAllTypes_RepeatedGroup) Descriptor() ([]byte, []int) {
return xxx_File_test_test_proto_rawDescGZIP(), []int{0, 2}
}
-func (m *TestAllTypes_RepeatedGroup) GetA() int32 {
- if m != nil && m.A != nil {
- return *m.A
+func (x *TestAllTypes_RepeatedGroup) GetA() int32 {
+ if x != nil && x.A != nil {
+ return *x.A
}
return 0
}
diff --git a/internal/testprotos/test/test_import.pb.go b/internal/testprotos/test/test_import.pb.go
index 9de8508..8949257 100644
--- a/internal/testprotos/test/test_import.pb.go
+++ b/internal/testprotos/test/test_import.pb.go
@@ -18,13 +18,6 @@
ImportEnum_IMPORT_ZERO ImportEnum = 0
)
-func (e ImportEnum) Type() protoreflect.EnumType {
- return xxx_File_test_test_import_proto_enumTypes[0]
-}
-func (e ImportEnum) Number() protoreflect.EnumNumber {
- return protoreflect.EnumNumber(e)
-}
-
// Deprecated: Use ImportEnum.Type.Values instead.
var ImportEnum_name = map[int32]string{
0: "IMPORT_ZERO",
@@ -43,6 +36,14 @@
return protoimpl.X.EnumStringOf(x.Type(), protoreflect.EnumNumber(x))
}
+func (ImportEnum) Type() protoreflect.EnumType {
+ return xxx_File_test_test_import_proto_enumTypes[0]
+}
+
+func (x ImportEnum) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
// Deprecated: Do not use.
func (x *ImportEnum) UnmarshalJSON(b []byte) error {
num, err := protoimpl.X.UnmarshalJSONEnum(x.Type(), b)
@@ -64,12 +65,19 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *ImportMessage) ProtoReflect() protoreflect.Message {
- return xxx_File_test_test_import_proto_messageTypes[0].MessageOf(m)
+func (x *ImportMessage) Reset() {
+ *x = ImportMessage{}
}
-func (m *ImportMessage) Reset() { *m = ImportMessage{} }
-func (m *ImportMessage) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*ImportMessage) ProtoMessage() {}
+
+func (x *ImportMessage) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ImportMessage) ProtoMessage() {}
+
+func (x *ImportMessage) ProtoReflect() protoreflect.Message {
+ return xxx_File_test_test_import_proto_messageTypes[0].MessageOf(x)
+}
// Deprecated: Use ImportMessage.ProtoReflect.Type instead.
func (*ImportMessage) Descriptor() ([]byte, []int) {
diff --git a/internal/testprotos/test/test_public.pb.go b/internal/testprotos/test/test_public.pb.go
index 5632de8..fde1bd6 100644
--- a/internal/testprotos/test/test_public.pb.go
+++ b/internal/testprotos/test/test_public.pb.go
@@ -18,12 +18,19 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *PublicImportMessage) ProtoReflect() protoreflect.Message {
- return xxx_File_test_test_public_proto_messageTypes[0].MessageOf(m)
+func (x *PublicImportMessage) Reset() {
+ *x = PublicImportMessage{}
}
-func (m *PublicImportMessage) Reset() { *m = PublicImportMessage{} }
-func (m *PublicImportMessage) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*PublicImportMessage) ProtoMessage() {}
+
+func (x *PublicImportMessage) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PublicImportMessage) ProtoMessage() {}
+
+func (x *PublicImportMessage) ProtoReflect() protoreflect.Message {
+ return xxx_File_test_test_public_proto_messageTypes[0].MessageOf(x)
+}
// Deprecated: Use PublicImportMessage.ProtoReflect.Type instead.
func (*PublicImportMessage) Descriptor() ([]byte, []int) {
diff --git a/internal/testprotos/test/test_weak.pb.go b/internal/testprotos/test/test_weak.pb.go
index 7fe04bb..5f52a22 100644
--- a/internal/testprotos/test/test_weak.pb.go
+++ b/internal/testprotos/test/test_weak.pb.go
@@ -18,12 +18,19 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *WeakImportMessage) ProtoReflect() protoreflect.Message {
- return xxx_File_test_test_weak_proto_messageTypes[0].MessageOf(m)
+func (x *WeakImportMessage) Reset() {
+ *x = WeakImportMessage{}
}
-func (m *WeakImportMessage) Reset() { *m = WeakImportMessage{} }
-func (m *WeakImportMessage) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*WeakImportMessage) ProtoMessage() {}
+
+func (x *WeakImportMessage) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*WeakImportMessage) ProtoMessage() {}
+
+func (x *WeakImportMessage) ProtoReflect() protoreflect.Message {
+ return xxx_File_test_test_weak_proto_messageTypes[0].MessageOf(x)
+}
// Deprecated: Use WeakImportMessage.ProtoReflect.Type instead.
func (*WeakImportMessage) Descriptor() ([]byte, []int) {
diff --git a/internal/testprotos/test3/test.pb.go b/internal/testprotos/test3/test.pb.go
index 8af8076..c76410b 100644
--- a/internal/testprotos/test3/test.pb.go
+++ b/internal/testprotos/test3/test.pb.go
@@ -21,13 +21,6 @@
ForeignEnum_FOREIGN_BAZ ForeignEnum = 6
)
-func (e ForeignEnum) Type() protoreflect.EnumType {
- return xxx_File_test3_test_proto_enumTypes[0]
-}
-func (e ForeignEnum) Number() protoreflect.EnumNumber {
- return protoreflect.EnumNumber(e)
-}
-
// Deprecated: Use ForeignEnum.Type.Values instead.
var ForeignEnum_name = map[int32]string{
0: "FOREIGN_ZERO",
@@ -48,6 +41,14 @@
return protoimpl.X.EnumStringOf(x.Type(), protoreflect.EnumNumber(x))
}
+func (ForeignEnum) Type() protoreflect.EnumType {
+ return xxx_File_test3_test_proto_enumTypes[0]
+}
+
+func (x ForeignEnum) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
// Deprecated: Use ForeignEnum.Type instead.
func (ForeignEnum) EnumDescriptor() ([]byte, []int) {
return xxx_File_test3_test_proto_rawDescGZIP(), []int{0}
@@ -62,13 +63,6 @@
TestAllTypes_NEG TestAllTypes_NestedEnum = -1
)
-func (e TestAllTypes_NestedEnum) Type() protoreflect.EnumType {
- return xxx_File_test3_test_proto_enumTypes[1]
-}
-func (e TestAllTypes_NestedEnum) Number() protoreflect.EnumNumber {
- return protoreflect.EnumNumber(e)
-}
-
// Deprecated: Use TestAllTypes_NestedEnum.Type.Values instead.
var TestAllTypes_NestedEnum_name = map[int32]string{
0: "FOO",
@@ -89,6 +83,14 @@
return protoimpl.X.EnumStringOf(x.Type(), protoreflect.EnumNumber(x))
}
+func (TestAllTypes_NestedEnum) Type() protoreflect.EnumType {
+ return xxx_File_test3_test_proto_enumTypes[1]
+}
+
+func (x TestAllTypes_NestedEnum) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
// Deprecated: Use TestAllTypes_NestedEnum.Type instead.
func (TestAllTypes_NestedEnum) EnumDescriptor() ([]byte, []int) {
return xxx_File_test3_test_proto_rawDescGZIP(), []int{0, 0}
@@ -170,427 +172,434 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *TestAllTypes) ProtoReflect() protoreflect.Message {
- return xxx_File_test3_test_proto_messageTypes[0].MessageOf(m)
+func (x *TestAllTypes) Reset() {
+ *x = TestAllTypes{}
}
-func (m *TestAllTypes) Reset() { *m = TestAllTypes{} }
-func (m *TestAllTypes) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*TestAllTypes) ProtoMessage() {}
+
+func (x *TestAllTypes) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*TestAllTypes) ProtoMessage() {}
+
+func (x *TestAllTypes) ProtoReflect() protoreflect.Message {
+ return xxx_File_test3_test_proto_messageTypes[0].MessageOf(x)
+}
// Deprecated: Use TestAllTypes.ProtoReflect.Type instead.
func (*TestAllTypes) Descriptor() ([]byte, []int) {
return xxx_File_test3_test_proto_rawDescGZIP(), []int{0}
}
-func (m *TestAllTypes) GetOptionalInt32() int32 {
- if m != nil {
- return m.OptionalInt32
+func (x *TestAllTypes) GetOptionalInt32() int32 {
+ if x != nil {
+ return x.OptionalInt32
}
return 0
}
-func (m *TestAllTypes) GetOptionalInt64() int64 {
- if m != nil {
- return m.OptionalInt64
+func (x *TestAllTypes) GetOptionalInt64() int64 {
+ if x != nil {
+ return x.OptionalInt64
}
return 0
}
-func (m *TestAllTypes) GetOptionalUint32() uint32 {
- if m != nil {
- return m.OptionalUint32
+func (x *TestAllTypes) GetOptionalUint32() uint32 {
+ if x != nil {
+ return x.OptionalUint32
}
return 0
}
-func (m *TestAllTypes) GetOptionalUint64() uint64 {
- if m != nil {
- return m.OptionalUint64
+func (x *TestAllTypes) GetOptionalUint64() uint64 {
+ if x != nil {
+ return x.OptionalUint64
}
return 0
}
-func (m *TestAllTypes) GetOptionalSint32() int32 {
- if m != nil {
- return m.OptionalSint32
+func (x *TestAllTypes) GetOptionalSint32() int32 {
+ if x != nil {
+ return x.OptionalSint32
}
return 0
}
-func (m *TestAllTypes) GetOptionalSint64() int64 {
- if m != nil {
- return m.OptionalSint64
+func (x *TestAllTypes) GetOptionalSint64() int64 {
+ if x != nil {
+ return x.OptionalSint64
}
return 0
}
-func (m *TestAllTypes) GetOptionalFixed32() uint32 {
- if m != nil {
- return m.OptionalFixed32
+func (x *TestAllTypes) GetOptionalFixed32() uint32 {
+ if x != nil {
+ return x.OptionalFixed32
}
return 0
}
-func (m *TestAllTypes) GetOptionalFixed64() uint64 {
- if m != nil {
- return m.OptionalFixed64
+func (x *TestAllTypes) GetOptionalFixed64() uint64 {
+ if x != nil {
+ return x.OptionalFixed64
}
return 0
}
-func (m *TestAllTypes) GetOptionalSfixed32() int32 {
- if m != nil {
- return m.OptionalSfixed32
+func (x *TestAllTypes) GetOptionalSfixed32() int32 {
+ if x != nil {
+ return x.OptionalSfixed32
}
return 0
}
-func (m *TestAllTypes) GetOptionalSfixed64() int64 {
- if m != nil {
- return m.OptionalSfixed64
+func (x *TestAllTypes) GetOptionalSfixed64() int64 {
+ if x != nil {
+ return x.OptionalSfixed64
}
return 0
}
-func (m *TestAllTypes) GetOptionalFloat() float32 {
- if m != nil {
- return m.OptionalFloat
+func (x *TestAllTypes) GetOptionalFloat() float32 {
+ if x != nil {
+ return x.OptionalFloat
}
return 0
}
-func (m *TestAllTypes) GetOptionalDouble() float64 {
- if m != nil {
- return m.OptionalDouble
+func (x *TestAllTypes) GetOptionalDouble() float64 {
+ if x != nil {
+ return x.OptionalDouble
}
return 0
}
-func (m *TestAllTypes) GetOptionalBool() bool {
- if m != nil {
- return m.OptionalBool
+func (x *TestAllTypes) GetOptionalBool() bool {
+ if x != nil {
+ return x.OptionalBool
}
return false
}
-func (m *TestAllTypes) GetOptionalString() string {
- if m != nil {
- return m.OptionalString
+func (x *TestAllTypes) GetOptionalString() string {
+ if x != nil {
+ return x.OptionalString
}
return ""
}
-func (m *TestAllTypes) GetOptionalBytes() []byte {
- if m != nil {
- return m.OptionalBytes
+func (x *TestAllTypes) GetOptionalBytes() []byte {
+ if x != nil {
+ return x.OptionalBytes
}
return nil
}
-func (m *TestAllTypes) GetOptionalNestedMessage() *TestAllTypes_NestedMessage {
- if m != nil {
- return m.OptionalNestedMessage
+func (x *TestAllTypes) GetOptionalNestedMessage() *TestAllTypes_NestedMessage {
+ if x != nil {
+ return x.OptionalNestedMessage
}
return nil
}
-func (m *TestAllTypes) GetOptionalForeignMessage() *ForeignMessage {
- if m != nil {
- return m.OptionalForeignMessage
+func (x *TestAllTypes) GetOptionalForeignMessage() *ForeignMessage {
+ if x != nil {
+ return x.OptionalForeignMessage
}
return nil
}
-func (m *TestAllTypes) GetOptionalImportMessage() *ImportMessage {
- if m != nil {
- return m.OptionalImportMessage
+func (x *TestAllTypes) GetOptionalImportMessage() *ImportMessage {
+ if x != nil {
+ return x.OptionalImportMessage
}
return nil
}
-func (m *TestAllTypes) GetOptionalNestedEnum() TestAllTypes_NestedEnum {
- if m != nil {
- return m.OptionalNestedEnum
+func (x *TestAllTypes) GetOptionalNestedEnum() TestAllTypes_NestedEnum {
+ if x != nil {
+ return x.OptionalNestedEnum
}
return TestAllTypes_FOO
}
-func (m *TestAllTypes) GetOptionalForeignEnum() ForeignEnum {
- if m != nil {
- return m.OptionalForeignEnum
+func (x *TestAllTypes) GetOptionalForeignEnum() ForeignEnum {
+ if x != nil {
+ return x.OptionalForeignEnum
}
return ForeignEnum_FOREIGN_ZERO
}
-func (m *TestAllTypes) GetOptionalImportEnum() ImportEnum {
- if m != nil {
- return m.OptionalImportEnum
+func (x *TestAllTypes) GetOptionalImportEnum() ImportEnum {
+ if x != nil {
+ return x.OptionalImportEnum
}
return ImportEnum_IMPORT_ZERO
}
-func (m *TestAllTypes) GetRepeatedInt32() []int32 {
- if m != nil {
- return m.RepeatedInt32
+func (x *TestAllTypes) GetRepeatedInt32() []int32 {
+ if x != nil {
+ return x.RepeatedInt32
}
return nil
}
-func (m *TestAllTypes) GetRepeatedInt64() []int64 {
- if m != nil {
- return m.RepeatedInt64
+func (x *TestAllTypes) GetRepeatedInt64() []int64 {
+ if x != nil {
+ return x.RepeatedInt64
}
return nil
}
-func (m *TestAllTypes) GetRepeatedUint32() []uint32 {
- if m != nil {
- return m.RepeatedUint32
+func (x *TestAllTypes) GetRepeatedUint32() []uint32 {
+ if x != nil {
+ return x.RepeatedUint32
}
return nil
}
-func (m *TestAllTypes) GetRepeatedUint64() []uint64 {
- if m != nil {
- return m.RepeatedUint64
+func (x *TestAllTypes) GetRepeatedUint64() []uint64 {
+ if x != nil {
+ return x.RepeatedUint64
}
return nil
}
-func (m *TestAllTypes) GetRepeatedSint32() []int32 {
- if m != nil {
- return m.RepeatedSint32
+func (x *TestAllTypes) GetRepeatedSint32() []int32 {
+ if x != nil {
+ return x.RepeatedSint32
}
return nil
}
-func (m *TestAllTypes) GetRepeatedSint64() []int64 {
- if m != nil {
- return m.RepeatedSint64
+func (x *TestAllTypes) GetRepeatedSint64() []int64 {
+ if x != nil {
+ return x.RepeatedSint64
}
return nil
}
-func (m *TestAllTypes) GetRepeatedFixed32() []uint32 {
- if m != nil {
- return m.RepeatedFixed32
+func (x *TestAllTypes) GetRepeatedFixed32() []uint32 {
+ if x != nil {
+ return x.RepeatedFixed32
}
return nil
}
-func (m *TestAllTypes) GetRepeatedFixed64() []uint64 {
- if m != nil {
- return m.RepeatedFixed64
+func (x *TestAllTypes) GetRepeatedFixed64() []uint64 {
+ if x != nil {
+ return x.RepeatedFixed64
}
return nil
}
-func (m *TestAllTypes) GetRepeatedSfixed32() []int32 {
- if m != nil {
- return m.RepeatedSfixed32
+func (x *TestAllTypes) GetRepeatedSfixed32() []int32 {
+ if x != nil {
+ return x.RepeatedSfixed32
}
return nil
}
-func (m *TestAllTypes) GetRepeatedSfixed64() []int64 {
- if m != nil {
- return m.RepeatedSfixed64
+func (x *TestAllTypes) GetRepeatedSfixed64() []int64 {
+ if x != nil {
+ return x.RepeatedSfixed64
}
return nil
}
-func (m *TestAllTypes) GetRepeatedFloat() []float32 {
- if m != nil {
- return m.RepeatedFloat
+func (x *TestAllTypes) GetRepeatedFloat() []float32 {
+ if x != nil {
+ return x.RepeatedFloat
}
return nil
}
-func (m *TestAllTypes) GetRepeatedDouble() []float64 {
- if m != nil {
- return m.RepeatedDouble
+func (x *TestAllTypes) GetRepeatedDouble() []float64 {
+ if x != nil {
+ return x.RepeatedDouble
}
return nil
}
-func (m *TestAllTypes) GetRepeatedBool() []bool {
- if m != nil {
- return m.RepeatedBool
+func (x *TestAllTypes) GetRepeatedBool() []bool {
+ if x != nil {
+ return x.RepeatedBool
}
return nil
}
-func (m *TestAllTypes) GetRepeatedString() []string {
- if m != nil {
- return m.RepeatedString
+func (x *TestAllTypes) GetRepeatedString() []string {
+ if x != nil {
+ return x.RepeatedString
}
return nil
}
-func (m *TestAllTypes) GetRepeatedBytes() [][]byte {
- if m != nil {
- return m.RepeatedBytes
+func (x *TestAllTypes) GetRepeatedBytes() [][]byte {
+ if x != nil {
+ return x.RepeatedBytes
}
return nil
}
-func (m *TestAllTypes) GetRepeatedNestedMessage() []*TestAllTypes_NestedMessage {
- if m != nil {
- return m.RepeatedNestedMessage
+func (x *TestAllTypes) GetRepeatedNestedMessage() []*TestAllTypes_NestedMessage {
+ if x != nil {
+ return x.RepeatedNestedMessage
}
return nil
}
-func (m *TestAllTypes) GetRepeatedForeignMessage() []*ForeignMessage {
- if m != nil {
- return m.RepeatedForeignMessage
+func (x *TestAllTypes) GetRepeatedForeignMessage() []*ForeignMessage {
+ if x != nil {
+ return x.RepeatedForeignMessage
}
return nil
}
-func (m *TestAllTypes) GetRepeatedImportmessage() []*ImportMessage {
- if m != nil {
- return m.RepeatedImportmessage
+func (x *TestAllTypes) GetRepeatedImportmessage() []*ImportMessage {
+ if x != nil {
+ return x.RepeatedImportmessage
}
return nil
}
-func (m *TestAllTypes) GetRepeatedNestedEnum() []TestAllTypes_NestedEnum {
- if m != nil {
- return m.RepeatedNestedEnum
+func (x *TestAllTypes) GetRepeatedNestedEnum() []TestAllTypes_NestedEnum {
+ if x != nil {
+ return x.RepeatedNestedEnum
}
return nil
}
-func (m *TestAllTypes) GetRepeatedForeignEnum() []ForeignEnum {
- if m != nil {
- return m.RepeatedForeignEnum
+func (x *TestAllTypes) GetRepeatedForeignEnum() []ForeignEnum {
+ if x != nil {
+ return x.RepeatedForeignEnum
}
return nil
}
-func (m *TestAllTypes) GetRepeatedImportenum() []ImportEnum {
- if m != nil {
- return m.RepeatedImportenum
+func (x *TestAllTypes) GetRepeatedImportenum() []ImportEnum {
+ if x != nil {
+ return x.RepeatedImportenum
}
return nil
}
-func (m *TestAllTypes) GetMapInt32Int32() map[int32]int32 {
- if m != nil {
- return m.MapInt32Int32
+func (x *TestAllTypes) GetMapInt32Int32() map[int32]int32 {
+ if x != nil {
+ return x.MapInt32Int32
}
return nil
}
-func (m *TestAllTypes) GetMapInt64Int64() map[int64]int64 {
- if m != nil {
- return m.MapInt64Int64
+func (x *TestAllTypes) GetMapInt64Int64() map[int64]int64 {
+ if x != nil {
+ return x.MapInt64Int64
}
return nil
}
-func (m *TestAllTypes) GetMapUint32Uint32() map[uint32]uint32 {
- if m != nil {
- return m.MapUint32Uint32
+func (x *TestAllTypes) GetMapUint32Uint32() map[uint32]uint32 {
+ if x != nil {
+ return x.MapUint32Uint32
}
return nil
}
-func (m *TestAllTypes) GetMapUint64Uint64() map[uint64]uint64 {
- if m != nil {
- return m.MapUint64Uint64
+func (x *TestAllTypes) GetMapUint64Uint64() map[uint64]uint64 {
+ if x != nil {
+ return x.MapUint64Uint64
}
return nil
}
-func (m *TestAllTypes) GetMapSint32Sint32() map[int32]int32 {
- if m != nil {
- return m.MapSint32Sint32
+func (x *TestAllTypes) GetMapSint32Sint32() map[int32]int32 {
+ if x != nil {
+ return x.MapSint32Sint32
}
return nil
}
-func (m *TestAllTypes) GetMapSint64Sint64() map[int64]int64 {
- if m != nil {
- return m.MapSint64Sint64
+func (x *TestAllTypes) GetMapSint64Sint64() map[int64]int64 {
+ if x != nil {
+ return x.MapSint64Sint64
}
return nil
}
-func (m *TestAllTypes) GetMapFixed32Fixed32() map[uint32]uint32 {
- if m != nil {
- return m.MapFixed32Fixed32
+func (x *TestAllTypes) GetMapFixed32Fixed32() map[uint32]uint32 {
+ if x != nil {
+ return x.MapFixed32Fixed32
}
return nil
}
-func (m *TestAllTypes) GetMapFixed64Fixed64() map[uint64]uint64 {
- if m != nil {
- return m.MapFixed64Fixed64
+func (x *TestAllTypes) GetMapFixed64Fixed64() map[uint64]uint64 {
+ if x != nil {
+ return x.MapFixed64Fixed64
}
return nil
}
-func (m *TestAllTypes) GetMapSfixed32Sfixed32() map[int32]int32 {
- if m != nil {
- return m.MapSfixed32Sfixed32
+func (x *TestAllTypes) GetMapSfixed32Sfixed32() map[int32]int32 {
+ if x != nil {
+ return x.MapSfixed32Sfixed32
}
return nil
}
-func (m *TestAllTypes) GetMapSfixed64Sfixed64() map[int64]int64 {
- if m != nil {
- return m.MapSfixed64Sfixed64
+func (x *TestAllTypes) GetMapSfixed64Sfixed64() map[int64]int64 {
+ if x != nil {
+ return x.MapSfixed64Sfixed64
}
return nil
}
-func (m *TestAllTypes) GetMapInt32Float() map[int32]float32 {
- if m != nil {
- return m.MapInt32Float
+func (x *TestAllTypes) GetMapInt32Float() map[int32]float32 {
+ if x != nil {
+ return x.MapInt32Float
}
return nil
}
-func (m *TestAllTypes) GetMapInt32Double() map[int32]float64 {
- if m != nil {
- return m.MapInt32Double
+func (x *TestAllTypes) GetMapInt32Double() map[int32]float64 {
+ if x != nil {
+ return x.MapInt32Double
}
return nil
}
-func (m *TestAllTypes) GetMapBoolBool() map[bool]bool {
- if m != nil {
- return m.MapBoolBool
+func (x *TestAllTypes) GetMapBoolBool() map[bool]bool {
+ if x != nil {
+ return x.MapBoolBool
}
return nil
}
-func (m *TestAllTypes) GetMapStringString() map[string]string {
- if m != nil {
- return m.MapStringString
+func (x *TestAllTypes) GetMapStringString() map[string]string {
+ if x != nil {
+ return x.MapStringString
}
return nil
}
-func (m *TestAllTypes) GetMapStringBytes() map[string][]byte {
- if m != nil {
- return m.MapStringBytes
+func (x *TestAllTypes) GetMapStringBytes() map[string][]byte {
+ if x != nil {
+ return x.MapStringBytes
}
return nil
}
-func (m *TestAllTypes) GetMapStringNestedMessage() map[string]*TestAllTypes_NestedMessage {
- if m != nil {
- return m.MapStringNestedMessage
+func (x *TestAllTypes) GetMapStringNestedMessage() map[string]*TestAllTypes_NestedMessage {
+ if x != nil {
+ return x.MapStringNestedMessage
}
return nil
}
-func (m *TestAllTypes) GetMapStringNestedEnum() map[string]TestAllTypes_NestedEnum {
- if m != nil {
- return m.MapStringNestedEnum
+func (x *TestAllTypes) GetMapStringNestedEnum() map[string]TestAllTypes_NestedEnum {
+ if x != nil {
+ return x.MapStringNestedEnum
}
return nil
}
@@ -660,64 +669,64 @@
return nil
}
-func (m *TestAllTypes) GetOneofUint32() uint32 {
- if x, ok := m.GetOneofField().(*TestAllTypes_OneofUint32); ok {
+func (x *TestAllTypes) GetOneofUint32() uint32 {
+ if x, ok := x.GetOneofField().(*TestAllTypes_OneofUint32); ok {
return x.OneofUint32
}
return 0
}
-func (m *TestAllTypes) GetOneofNestedMessage() *TestAllTypes_NestedMessage {
- if x, ok := m.GetOneofField().(*TestAllTypes_OneofNestedMessage); ok {
+func (x *TestAllTypes) GetOneofNestedMessage() *TestAllTypes_NestedMessage {
+ if x, ok := x.GetOneofField().(*TestAllTypes_OneofNestedMessage); ok {
return x.OneofNestedMessage
}
return nil
}
-func (m *TestAllTypes) GetOneofString() string {
- if x, ok := m.GetOneofField().(*TestAllTypes_OneofString); ok {
+func (x *TestAllTypes) GetOneofString() string {
+ if x, ok := x.GetOneofField().(*TestAllTypes_OneofString); ok {
return x.OneofString
}
return ""
}
-func (m *TestAllTypes) GetOneofBytes() []byte {
- if x, ok := m.GetOneofField().(*TestAllTypes_OneofBytes); ok {
+func (x *TestAllTypes) GetOneofBytes() []byte {
+ if x, ok := x.GetOneofField().(*TestAllTypes_OneofBytes); ok {
return x.OneofBytes
}
return nil
}
-func (m *TestAllTypes) GetOneofBool() bool {
- if x, ok := m.GetOneofField().(*TestAllTypes_OneofBool); ok {
+func (x *TestAllTypes) GetOneofBool() bool {
+ if x, ok := x.GetOneofField().(*TestAllTypes_OneofBool); ok {
return x.OneofBool
}
return false
}
-func (m *TestAllTypes) GetOneofUint64() uint64 {
- if x, ok := m.GetOneofField().(*TestAllTypes_OneofUint64); ok {
+func (x *TestAllTypes) GetOneofUint64() uint64 {
+ if x, ok := x.GetOneofField().(*TestAllTypes_OneofUint64); ok {
return x.OneofUint64
}
return 0
}
-func (m *TestAllTypes) GetOneofFloat() float32 {
- if x, ok := m.GetOneofField().(*TestAllTypes_OneofFloat); ok {
+func (x *TestAllTypes) GetOneofFloat() float32 {
+ if x, ok := x.GetOneofField().(*TestAllTypes_OneofFloat); ok {
return x.OneofFloat
}
return 0
}
-func (m *TestAllTypes) GetOneofDouble() float64 {
- if x, ok := m.GetOneofField().(*TestAllTypes_OneofDouble); ok {
+func (x *TestAllTypes) GetOneofDouble() float64 {
+ if x, ok := x.GetOneofField().(*TestAllTypes_OneofDouble); ok {
return x.OneofDouble
}
return 0
}
-func (m *TestAllTypes) GetOneofEnum() TestAllTypes_NestedEnum {
- if x, ok := m.GetOneofField().(*TestAllTypes_OneofEnum); ok {
+func (x *TestAllTypes) GetOneofEnum() TestAllTypes_NestedEnum {
+ if x, ok := x.GetOneofField().(*TestAllTypes_OneofEnum); ok {
return x.OneofEnum
}
return TestAllTypes_FOO
@@ -746,28 +755,35 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *ForeignMessage) ProtoReflect() protoreflect.Message {
- return xxx_File_test3_test_proto_messageTypes[1].MessageOf(m)
+func (x *ForeignMessage) Reset() {
+ *x = ForeignMessage{}
}
-func (m *ForeignMessage) Reset() { *m = ForeignMessage{} }
-func (m *ForeignMessage) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*ForeignMessage) ProtoMessage() {}
+
+func (x *ForeignMessage) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ForeignMessage) ProtoMessage() {}
+
+func (x *ForeignMessage) ProtoReflect() protoreflect.Message {
+ return xxx_File_test3_test_proto_messageTypes[1].MessageOf(x)
+}
// Deprecated: Use ForeignMessage.ProtoReflect.Type instead.
func (*ForeignMessage) Descriptor() ([]byte, []int) {
return xxx_File_test3_test_proto_rawDescGZIP(), []int{1}
}
-func (m *ForeignMessage) GetC() int32 {
- if m != nil {
- return m.C
+func (x *ForeignMessage) GetC() int32 {
+ if x != nil {
+ return x.C
}
return 0
}
-func (m *ForeignMessage) GetD() int32 {
- if m != nil {
- return m.D
+func (x *ForeignMessage) GetD() int32 {
+ if x != nil {
+ return x.D
}
return 0
}
@@ -780,28 +796,35 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *TestAllTypes_NestedMessage) ProtoReflect() protoreflect.Message {
- return xxx_File_test3_test_proto_messageTypes[2].MessageOf(m)
+func (x *TestAllTypes_NestedMessage) Reset() {
+ *x = TestAllTypes_NestedMessage{}
}
-func (m *TestAllTypes_NestedMessage) Reset() { *m = TestAllTypes_NestedMessage{} }
-func (m *TestAllTypes_NestedMessage) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*TestAllTypes_NestedMessage) ProtoMessage() {}
+
+func (x *TestAllTypes_NestedMessage) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*TestAllTypes_NestedMessage) ProtoMessage() {}
+
+func (x *TestAllTypes_NestedMessage) ProtoReflect() protoreflect.Message {
+ return xxx_File_test3_test_proto_messageTypes[2].MessageOf(x)
+}
// Deprecated: Use TestAllTypes_NestedMessage.ProtoReflect.Type instead.
func (*TestAllTypes_NestedMessage) Descriptor() ([]byte, []int) {
return xxx_File_test3_test_proto_rawDescGZIP(), []int{0, 0}
}
-func (m *TestAllTypes_NestedMessage) GetA() int32 {
- if m != nil {
- return m.A
+func (x *TestAllTypes_NestedMessage) GetA() int32 {
+ if x != nil {
+ return x.A
}
return 0
}
-func (m *TestAllTypes_NestedMessage) GetCorecursive() *TestAllTypes {
- if m != nil {
- return m.Corecursive
+func (x *TestAllTypes_NestedMessage) GetCorecursive() *TestAllTypes {
+ if x != nil {
+ return x.Corecursive
}
return nil
}
diff --git a/internal/testprotos/test3/test_import.pb.go b/internal/testprotos/test3/test_import.pb.go
index fe50455..7d0b70c 100644
--- a/internal/testprotos/test3/test_import.pb.go
+++ b/internal/testprotos/test3/test_import.pb.go
@@ -18,13 +18,6 @@
ImportEnum_IMPORT_ZERO ImportEnum = 0
)
-func (e ImportEnum) Type() protoreflect.EnumType {
- return xxx_File_test3_test_import_proto_enumTypes[0]
-}
-func (e ImportEnum) Number() protoreflect.EnumNumber {
- return protoreflect.EnumNumber(e)
-}
-
// Deprecated: Use ImportEnum.Type.Values instead.
var ImportEnum_name = map[int32]string{
0: "IMPORT_ZERO",
@@ -39,6 +32,14 @@
return protoimpl.X.EnumStringOf(x.Type(), protoreflect.EnumNumber(x))
}
+func (ImportEnum) Type() protoreflect.EnumType {
+ return xxx_File_test3_test_import_proto_enumTypes[0]
+}
+
+func (x ImportEnum) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
// Deprecated: Use ImportEnum.Type instead.
func (ImportEnum) EnumDescriptor() ([]byte, []int) {
return xxx_File_test3_test_import_proto_rawDescGZIP(), []int{0}
@@ -50,12 +51,19 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *ImportMessage) ProtoReflect() protoreflect.Message {
- return xxx_File_test3_test_import_proto_messageTypes[0].MessageOf(m)
+func (x *ImportMessage) Reset() {
+ *x = ImportMessage{}
}
-func (m *ImportMessage) Reset() { *m = ImportMessage{} }
-func (m *ImportMessage) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*ImportMessage) ProtoMessage() {}
+
+func (x *ImportMessage) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ImportMessage) ProtoMessage() {}
+
+func (x *ImportMessage) ProtoReflect() protoreflect.Message {
+ return xxx_File_test3_test_import_proto_messageTypes[0].MessageOf(x)
+}
// Deprecated: Use ImportMessage.ProtoReflect.Type instead.
func (*ImportMessage) Descriptor() ([]byte, []int) {
diff --git a/reflect/protoregistry/testprotos/test.pb.go b/reflect/protoregistry/testprotos/test.pb.go
index 67ed137..69aeab1 100644
--- a/reflect/protoregistry/testprotos/test.pb.go
+++ b/reflect/protoregistry/testprotos/test.pb.go
@@ -19,13 +19,6 @@
Enum1_ONE Enum1 = 1
)
-func (e Enum1) Type() protoreflect.EnumType {
- return xxx_File_test_proto_enumTypes[0]
-}
-func (e Enum1) Number() protoreflect.EnumNumber {
- return protoreflect.EnumNumber(e)
-}
-
// Deprecated: Use Enum1.Type.Values instead.
var Enum1_name = map[int32]string{
1: "ONE",
@@ -44,6 +37,14 @@
return protoimpl.X.EnumStringOf(x.Type(), protoreflect.EnumNumber(x))
}
+func (Enum1) Type() protoreflect.EnumType {
+ return xxx_File_test_proto_enumTypes[0]
+}
+
+func (x Enum1) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
// Deprecated: Do not use.
func (x *Enum1) UnmarshalJSON(b []byte) error {
num, err := protoimpl.X.UnmarshalJSONEnum(x.Type(), b)
@@ -65,13 +66,6 @@
Enum2_UNO Enum2 = 1
)
-func (e Enum2) Type() protoreflect.EnumType {
- return xxx_File_test_proto_enumTypes[1]
-}
-func (e Enum2) Number() protoreflect.EnumNumber {
- return protoreflect.EnumNumber(e)
-}
-
// Deprecated: Use Enum2.Type.Values instead.
var Enum2_name = map[int32]string{
1: "UNO",
@@ -90,6 +84,14 @@
return protoimpl.X.EnumStringOf(x.Type(), protoreflect.EnumNumber(x))
}
+func (Enum2) Type() protoreflect.EnumType {
+ return xxx_File_test_proto_enumTypes[1]
+}
+
+func (x Enum2) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
// Deprecated: Do not use.
func (x *Enum2) UnmarshalJSON(b []byte) error {
num, err := protoimpl.X.UnmarshalJSONEnum(x.Type(), b)
@@ -111,13 +113,6 @@
Enum3_YI Enum3 = 1
)
-func (e Enum3) Type() protoreflect.EnumType {
- return xxx_File_test_proto_enumTypes[2]
-}
-func (e Enum3) Number() protoreflect.EnumNumber {
- return protoreflect.EnumNumber(e)
-}
-
// Deprecated: Use Enum3.Type.Values instead.
var Enum3_name = map[int32]string{
1: "YI",
@@ -136,6 +131,14 @@
return protoimpl.X.EnumStringOf(x.Type(), protoreflect.EnumNumber(x))
}
+func (Enum3) Type() protoreflect.EnumType {
+ return xxx_File_test_proto_enumTypes[2]
+}
+
+func (x Enum3) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
// Deprecated: Do not use.
func (x *Enum3) UnmarshalJSON(b []byte) error {
num, err := protoimpl.X.UnmarshalJSONEnum(x.Type(), b)
@@ -158,12 +161,19 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *Message1) ProtoReflect() protoreflect.Message {
- return xxx_File_test_proto_messageTypes[0].MessageOf(m)
+func (x *Message1) Reset() {
+ *x = Message1{}
}
-func (m *Message1) Reset() { *m = Message1{} }
-func (m *Message1) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*Message1) ProtoMessage() {}
+
+func (x *Message1) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Message1) ProtoMessage() {}
+
+func (x *Message1) ProtoReflect() protoreflect.Message {
+ return xxx_File_test_proto_messageTypes[0].MessageOf(x)
+}
// Deprecated: Use Message1.ProtoReflect.Type instead.
func (*Message1) Descriptor() ([]byte, []int) {
@@ -185,12 +195,19 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *Message2) ProtoReflect() protoreflect.Message {
- return xxx_File_test_proto_messageTypes[1].MessageOf(m)
+func (x *Message2) Reset() {
+ *x = Message2{}
}
-func (m *Message2) Reset() { *m = Message2{} }
-func (m *Message2) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*Message2) ProtoMessage() {}
+
+func (x *Message2) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Message2) ProtoMessage() {}
+
+func (x *Message2) ProtoReflect() protoreflect.Message {
+ return xxx_File_test_proto_messageTypes[1].MessageOf(x)
+}
// Deprecated: Use Message2.ProtoReflect.Type instead.
func (*Message2) Descriptor() ([]byte, []int) {
@@ -203,12 +220,19 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *Message3) ProtoReflect() protoreflect.Message {
- return xxx_File_test_proto_messageTypes[2].MessageOf(m)
+func (x *Message3) Reset() {
+ *x = Message3{}
}
-func (m *Message3) Reset() { *m = Message3{} }
-func (m *Message3) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*Message3) ProtoMessage() {}
+
+func (x *Message3) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Message3) ProtoMessage() {}
+
+func (x *Message3) ProtoReflect() protoreflect.Message {
+ return xxx_File_test_proto_messageTypes[2].MessageOf(x)
+}
// Deprecated: Use Message3.ProtoReflect.Type instead.
func (*Message3) Descriptor() ([]byte, []int) {
@@ -222,21 +246,28 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *Message4) ProtoReflect() protoreflect.Message {
- return xxx_File_test_proto_messageTypes[3].MessageOf(m)
+func (x *Message4) Reset() {
+ *x = Message4{}
}
-func (m *Message4) Reset() { *m = Message4{} }
-func (m *Message4) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*Message4) ProtoMessage() {}
+
+func (x *Message4) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Message4) ProtoMessage() {}
+
+func (x *Message4) ProtoReflect() protoreflect.Message {
+ return xxx_File_test_proto_messageTypes[3].MessageOf(x)
+}
// Deprecated: Use Message4.ProtoReflect.Type instead.
func (*Message4) Descriptor() ([]byte, []int) {
return xxx_File_test_proto_rawDescGZIP(), []int{3}
}
-func (m *Message4) GetBoolField() bool {
- if m != nil && m.BoolField != nil {
- return *m.BoolField
+func (x *Message4) GetBoolField() bool {
+ if x != nil && x.BoolField != nil {
+ return *x.BoolField
}
return false
}
diff --git a/types/descriptor/descriptor.pb.go b/types/descriptor/descriptor.pb.go
index 2a41d15..e128ad5 100644
--- a/types/descriptor/descriptor.pb.go
+++ b/types/descriptor/descriptor.pb.go
@@ -48,13 +48,6 @@
FieldDescriptorProto_TYPE_SINT64 FieldDescriptorProto_Type = 18
)
-func (e FieldDescriptorProto_Type) Type() protoreflect.EnumType {
- return xxx_File_google_protobuf_descriptor_proto_enumTypes[0]
-}
-func (e FieldDescriptorProto_Type) Number() protoreflect.EnumNumber {
- return protoreflect.EnumNumber(e)
-}
-
// Deprecated: Use FieldDescriptorProto_Type.Type.Values instead.
var FieldDescriptorProto_Type_name = map[int32]string{
1: "TYPE_DOUBLE",
@@ -107,6 +100,14 @@
return protoimpl.X.EnumStringOf(x.Type(), protoreflect.EnumNumber(x))
}
+func (FieldDescriptorProto_Type) Type() protoreflect.EnumType {
+ return xxx_File_google_protobuf_descriptor_proto_enumTypes[0]
+}
+
+func (x FieldDescriptorProto_Type) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
// Deprecated: Do not use.
func (x *FieldDescriptorProto_Type) UnmarshalJSON(b []byte) error {
num, err := protoimpl.X.UnmarshalJSONEnum(x.Type(), b)
@@ -131,13 +132,6 @@
FieldDescriptorProto_LABEL_REPEATED FieldDescriptorProto_Label = 3
)
-func (e FieldDescriptorProto_Label) Type() protoreflect.EnumType {
- return xxx_File_google_protobuf_descriptor_proto_enumTypes[1]
-}
-func (e FieldDescriptorProto_Label) Number() protoreflect.EnumNumber {
- return protoreflect.EnumNumber(e)
-}
-
// Deprecated: Use FieldDescriptorProto_Label.Type.Values instead.
var FieldDescriptorProto_Label_name = map[int32]string{
1: "LABEL_OPTIONAL",
@@ -160,6 +154,14 @@
return protoimpl.X.EnumStringOf(x.Type(), protoreflect.EnumNumber(x))
}
+func (FieldDescriptorProto_Label) Type() protoreflect.EnumType {
+ return xxx_File_google_protobuf_descriptor_proto_enumTypes[1]
+}
+
+func (x FieldDescriptorProto_Label) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
// Deprecated: Do not use.
func (x *FieldDescriptorProto_Label) UnmarshalJSON(b []byte) error {
num, err := protoimpl.X.UnmarshalJSONEnum(x.Type(), b)
@@ -185,13 +187,6 @@
FileOptions_LITE_RUNTIME FileOptions_OptimizeMode = 3
)
-func (e FileOptions_OptimizeMode) Type() protoreflect.EnumType {
- return xxx_File_google_protobuf_descriptor_proto_enumTypes[2]
-}
-func (e FileOptions_OptimizeMode) Number() protoreflect.EnumNumber {
- return protoreflect.EnumNumber(e)
-}
-
// Deprecated: Use FileOptions_OptimizeMode.Type.Values instead.
var FileOptions_OptimizeMode_name = map[int32]string{
1: "SPEED",
@@ -214,6 +209,14 @@
return protoimpl.X.EnumStringOf(x.Type(), protoreflect.EnumNumber(x))
}
+func (FileOptions_OptimizeMode) Type() protoreflect.EnumType {
+ return xxx_File_google_protobuf_descriptor_proto_enumTypes[2]
+}
+
+func (x FileOptions_OptimizeMode) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
// Deprecated: Do not use.
func (x *FileOptions_OptimizeMode) UnmarshalJSON(b []byte) error {
num, err := protoimpl.X.UnmarshalJSONEnum(x.Type(), b)
@@ -238,13 +241,6 @@
FieldOptions_STRING_PIECE FieldOptions_CType = 2
)
-func (e FieldOptions_CType) Type() protoreflect.EnumType {
- return xxx_File_google_protobuf_descriptor_proto_enumTypes[3]
-}
-func (e FieldOptions_CType) Number() protoreflect.EnumNumber {
- return protoreflect.EnumNumber(e)
-}
-
// Deprecated: Use FieldOptions_CType.Type.Values instead.
var FieldOptions_CType_name = map[int32]string{
0: "STRING",
@@ -267,6 +263,14 @@
return protoimpl.X.EnumStringOf(x.Type(), protoreflect.EnumNumber(x))
}
+func (FieldOptions_CType) Type() protoreflect.EnumType {
+ return xxx_File_google_protobuf_descriptor_proto_enumTypes[3]
+}
+
+func (x FieldOptions_CType) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
// Deprecated: Do not use.
func (x *FieldOptions_CType) UnmarshalJSON(b []byte) error {
num, err := protoimpl.X.UnmarshalJSONEnum(x.Type(), b)
@@ -293,13 +297,6 @@
FieldOptions_JS_NUMBER FieldOptions_JSType = 2
)
-func (e FieldOptions_JSType) Type() protoreflect.EnumType {
- return xxx_File_google_protobuf_descriptor_proto_enumTypes[4]
-}
-func (e FieldOptions_JSType) Number() protoreflect.EnumNumber {
- return protoreflect.EnumNumber(e)
-}
-
// Deprecated: Use FieldOptions_JSType.Type.Values instead.
var FieldOptions_JSType_name = map[int32]string{
0: "JS_NORMAL",
@@ -322,6 +319,14 @@
return protoimpl.X.EnumStringOf(x.Type(), protoreflect.EnumNumber(x))
}
+func (FieldOptions_JSType) Type() protoreflect.EnumType {
+ return xxx_File_google_protobuf_descriptor_proto_enumTypes[4]
+}
+
+func (x FieldOptions_JSType) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
// Deprecated: Do not use.
func (x *FieldOptions_JSType) UnmarshalJSON(b []byte) error {
num, err := protoimpl.X.UnmarshalJSONEnum(x.Type(), b)
@@ -348,13 +353,6 @@
MethodOptions_IDEMPOTENT MethodOptions_IdempotencyLevel = 2
)
-func (e MethodOptions_IdempotencyLevel) Type() protoreflect.EnumType {
- return xxx_File_google_protobuf_descriptor_proto_enumTypes[5]
-}
-func (e MethodOptions_IdempotencyLevel) Number() protoreflect.EnumNumber {
- return protoreflect.EnumNumber(e)
-}
-
// Deprecated: Use MethodOptions_IdempotencyLevel.Type.Values instead.
var MethodOptions_IdempotencyLevel_name = map[int32]string{
0: "IDEMPOTENCY_UNKNOWN",
@@ -377,6 +375,14 @@
return protoimpl.X.EnumStringOf(x.Type(), protoreflect.EnumNumber(x))
}
+func (MethodOptions_IdempotencyLevel) Type() protoreflect.EnumType {
+ return xxx_File_google_protobuf_descriptor_proto_enumTypes[5]
+}
+
+func (x MethodOptions_IdempotencyLevel) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
// Deprecated: Do not use.
func (x *MethodOptions_IdempotencyLevel) UnmarshalJSON(b []byte) error {
num, err := protoimpl.X.UnmarshalJSONEnum(x.Type(), b)
@@ -401,21 +407,28 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *FileDescriptorSet) ProtoReflect() protoreflect.Message {
- return xxx_File_google_protobuf_descriptor_proto_messageTypes[0].MessageOf(m)
+func (x *FileDescriptorSet) Reset() {
+ *x = FileDescriptorSet{}
}
-func (m *FileDescriptorSet) Reset() { *m = FileDescriptorSet{} }
-func (m *FileDescriptorSet) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*FileDescriptorSet) ProtoMessage() {}
+
+func (x *FileDescriptorSet) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*FileDescriptorSet) ProtoMessage() {}
+
+func (x *FileDescriptorSet) ProtoReflect() protoreflect.Message {
+ return xxx_File_google_protobuf_descriptor_proto_messageTypes[0].MessageOf(x)
+}
// Deprecated: Use FileDescriptorSet.ProtoReflect.Type instead.
func (*FileDescriptorSet) Descriptor() ([]byte, []int) {
return xxx_File_google_protobuf_descriptor_proto_rawDescGZIP(), []int{0}
}
-func (m *FileDescriptorSet) GetFile() []*FileDescriptorProto {
- if m != nil {
- return m.File
+func (x *FileDescriptorSet) GetFile() []*FileDescriptorProto {
+ if x != nil {
+ return x.File
}
return nil
}
@@ -450,98 +463,105 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *FileDescriptorProto) ProtoReflect() protoreflect.Message {
- return xxx_File_google_protobuf_descriptor_proto_messageTypes[1].MessageOf(m)
+func (x *FileDescriptorProto) Reset() {
+ *x = FileDescriptorProto{}
}
-func (m *FileDescriptorProto) Reset() { *m = FileDescriptorProto{} }
-func (m *FileDescriptorProto) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*FileDescriptorProto) ProtoMessage() {}
+
+func (x *FileDescriptorProto) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*FileDescriptorProto) ProtoMessage() {}
+
+func (x *FileDescriptorProto) ProtoReflect() protoreflect.Message {
+ return xxx_File_google_protobuf_descriptor_proto_messageTypes[1].MessageOf(x)
+}
// Deprecated: Use FileDescriptorProto.ProtoReflect.Type instead.
func (*FileDescriptorProto) Descriptor() ([]byte, []int) {
return xxx_File_google_protobuf_descriptor_proto_rawDescGZIP(), []int{1}
}
-func (m *FileDescriptorProto) GetName() string {
- if m != nil && m.Name != nil {
- return *m.Name
+func (x *FileDescriptorProto) GetName() string {
+ if x != nil && x.Name != nil {
+ return *x.Name
}
return ""
}
-func (m *FileDescriptorProto) GetPackage() string {
- if m != nil && m.Package != nil {
- return *m.Package
+func (x *FileDescriptorProto) GetPackage() string {
+ if x != nil && x.Package != nil {
+ return *x.Package
}
return ""
}
-func (m *FileDescriptorProto) GetDependency() []string {
- if m != nil {
- return m.Dependency
+func (x *FileDescriptorProto) GetDependency() []string {
+ if x != nil {
+ return x.Dependency
}
return nil
}
-func (m *FileDescriptorProto) GetPublicDependency() []int32 {
- if m != nil {
- return m.PublicDependency
+func (x *FileDescriptorProto) GetPublicDependency() []int32 {
+ if x != nil {
+ return x.PublicDependency
}
return nil
}
-func (m *FileDescriptorProto) GetWeakDependency() []int32 {
- if m != nil {
- return m.WeakDependency
+func (x *FileDescriptorProto) GetWeakDependency() []int32 {
+ if x != nil {
+ return x.WeakDependency
}
return nil
}
-func (m *FileDescriptorProto) GetMessageType() []*DescriptorProto {
- if m != nil {
- return m.MessageType
+func (x *FileDescriptorProto) GetMessageType() []*DescriptorProto {
+ if x != nil {
+ return x.MessageType
}
return nil
}
-func (m *FileDescriptorProto) GetEnumType() []*EnumDescriptorProto {
- if m != nil {
- return m.EnumType
+func (x *FileDescriptorProto) GetEnumType() []*EnumDescriptorProto {
+ if x != nil {
+ return x.EnumType
}
return nil
}
-func (m *FileDescriptorProto) GetService() []*ServiceDescriptorProto {
- if m != nil {
- return m.Service
+func (x *FileDescriptorProto) GetService() []*ServiceDescriptorProto {
+ if x != nil {
+ return x.Service
}
return nil
}
-func (m *FileDescriptorProto) GetExtension() []*FieldDescriptorProto {
- if m != nil {
- return m.Extension
+func (x *FileDescriptorProto) GetExtension() []*FieldDescriptorProto {
+ if x != nil {
+ return x.Extension
}
return nil
}
-func (m *FileDescriptorProto) GetOptions() *FileOptions {
- if m != nil {
- return m.Options
+func (x *FileDescriptorProto) GetOptions() *FileOptions {
+ if x != nil {
+ return x.Options
}
return nil
}
-func (m *FileDescriptorProto) GetSourceCodeInfo() *SourceCodeInfo {
- if m != nil {
- return m.SourceCodeInfo
+func (x *FileDescriptorProto) GetSourceCodeInfo() *SourceCodeInfo {
+ if x != nil {
+ return x.SourceCodeInfo
}
return nil
}
-func (m *FileDescriptorProto) GetSyntax() string {
- if m != nil && m.Syntax != nil {
- return *m.Syntax
+func (x *FileDescriptorProto) GetSyntax() string {
+ if x != nil && x.Syntax != nil {
+ return *x.Syntax
}
return ""
}
@@ -565,84 +585,91 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *DescriptorProto) ProtoReflect() protoreflect.Message {
- return xxx_File_google_protobuf_descriptor_proto_messageTypes[2].MessageOf(m)
+func (x *DescriptorProto) Reset() {
+ *x = DescriptorProto{}
}
-func (m *DescriptorProto) Reset() { *m = DescriptorProto{} }
-func (m *DescriptorProto) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*DescriptorProto) ProtoMessage() {}
+
+func (x *DescriptorProto) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DescriptorProto) ProtoMessage() {}
+
+func (x *DescriptorProto) ProtoReflect() protoreflect.Message {
+ return xxx_File_google_protobuf_descriptor_proto_messageTypes[2].MessageOf(x)
+}
// Deprecated: Use DescriptorProto.ProtoReflect.Type instead.
func (*DescriptorProto) Descriptor() ([]byte, []int) {
return xxx_File_google_protobuf_descriptor_proto_rawDescGZIP(), []int{2}
}
-func (m *DescriptorProto) GetName() string {
- if m != nil && m.Name != nil {
- return *m.Name
+func (x *DescriptorProto) GetName() string {
+ if x != nil && x.Name != nil {
+ return *x.Name
}
return ""
}
-func (m *DescriptorProto) GetField() []*FieldDescriptorProto {
- if m != nil {
- return m.Field
+func (x *DescriptorProto) GetField() []*FieldDescriptorProto {
+ if x != nil {
+ return x.Field
}
return nil
}
-func (m *DescriptorProto) GetExtension() []*FieldDescriptorProto {
- if m != nil {
- return m.Extension
+func (x *DescriptorProto) GetExtension() []*FieldDescriptorProto {
+ if x != nil {
+ return x.Extension
}
return nil
}
-func (m *DescriptorProto) GetNestedType() []*DescriptorProto {
- if m != nil {
- return m.NestedType
+func (x *DescriptorProto) GetNestedType() []*DescriptorProto {
+ if x != nil {
+ return x.NestedType
}
return nil
}
-func (m *DescriptorProto) GetEnumType() []*EnumDescriptorProto {
- if m != nil {
- return m.EnumType
+func (x *DescriptorProto) GetEnumType() []*EnumDescriptorProto {
+ if x != nil {
+ return x.EnumType
}
return nil
}
-func (m *DescriptorProto) GetExtensionRange() []*DescriptorProto_ExtensionRange {
- if m != nil {
- return m.ExtensionRange
+func (x *DescriptorProto) GetExtensionRange() []*DescriptorProto_ExtensionRange {
+ if x != nil {
+ return x.ExtensionRange
}
return nil
}
-func (m *DescriptorProto) GetOneofDecl() []*OneofDescriptorProto {
- if m != nil {
- return m.OneofDecl
+func (x *DescriptorProto) GetOneofDecl() []*OneofDescriptorProto {
+ if x != nil {
+ return x.OneofDecl
}
return nil
}
-func (m *DescriptorProto) GetOptions() *MessageOptions {
- if m != nil {
- return m.Options
+func (x *DescriptorProto) GetOptions() *MessageOptions {
+ if x != nil {
+ return x.Options
}
return nil
}
-func (m *DescriptorProto) GetReservedRange() []*DescriptorProto_ReservedRange {
- if m != nil {
- return m.ReservedRange
+func (x *DescriptorProto) GetReservedRange() []*DescriptorProto_ReservedRange {
+ if x != nil {
+ return x.ReservedRange
}
return nil
}
-func (m *DescriptorProto) GetReservedName() []string {
- if m != nil {
- return m.ReservedName
+func (x *DescriptorProto) GetReservedName() []string {
+ if x != nil {
+ return x.ReservedName
}
return nil
}
@@ -656,12 +683,19 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *ExtensionRangeOptions) ProtoReflect() protoreflect.Message {
- return xxx_File_google_protobuf_descriptor_proto_messageTypes[3].MessageOf(m)
+func (x *ExtensionRangeOptions) Reset() {
+ *x = ExtensionRangeOptions{}
}
-func (m *ExtensionRangeOptions) Reset() { *m = ExtensionRangeOptions{} }
-func (m *ExtensionRangeOptions) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*ExtensionRangeOptions) ProtoMessage() {}
+
+func (x *ExtensionRangeOptions) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ExtensionRangeOptions) ProtoMessage() {}
+
+func (x *ExtensionRangeOptions) ProtoReflect() protoreflect.Message {
+ return xxx_File_google_protobuf_descriptor_proto_messageTypes[3].MessageOf(x)
+}
// Deprecated: Use ExtensionRangeOptions.ProtoReflect.Type instead.
func (*ExtensionRangeOptions) Descriptor() ([]byte, []int) {
@@ -677,9 +711,9 @@
return extRange_ExtensionRangeOptions
}
-func (m *ExtensionRangeOptions) GetUninterpretedOption() []*UninterpretedOption {
- if m != nil {
- return m.UninterpretedOption
+func (x *ExtensionRangeOptions) GetUninterpretedOption() []*UninterpretedOption {
+ if x != nil {
+ return x.UninterpretedOption
}
return nil
}
@@ -721,84 +755,91 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *FieldDescriptorProto) ProtoReflect() protoreflect.Message {
- return xxx_File_google_protobuf_descriptor_proto_messageTypes[4].MessageOf(m)
+func (x *FieldDescriptorProto) Reset() {
+ *x = FieldDescriptorProto{}
}
-func (m *FieldDescriptorProto) Reset() { *m = FieldDescriptorProto{} }
-func (m *FieldDescriptorProto) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*FieldDescriptorProto) ProtoMessage() {}
+
+func (x *FieldDescriptorProto) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*FieldDescriptorProto) ProtoMessage() {}
+
+func (x *FieldDescriptorProto) ProtoReflect() protoreflect.Message {
+ return xxx_File_google_protobuf_descriptor_proto_messageTypes[4].MessageOf(x)
+}
// Deprecated: Use FieldDescriptorProto.ProtoReflect.Type instead.
func (*FieldDescriptorProto) Descriptor() ([]byte, []int) {
return xxx_File_google_protobuf_descriptor_proto_rawDescGZIP(), []int{4}
}
-func (m *FieldDescriptorProto) GetName() string {
- if m != nil && m.Name != nil {
- return *m.Name
+func (x *FieldDescriptorProto) GetName() string {
+ if x != nil && x.Name != nil {
+ return *x.Name
}
return ""
}
-func (m *FieldDescriptorProto) GetNumber() int32 {
- if m != nil && m.Number != nil {
- return *m.Number
+func (x *FieldDescriptorProto) GetNumber() int32 {
+ if x != nil && x.Number != nil {
+ return *x.Number
}
return 0
}
-func (m *FieldDescriptorProto) GetLabel() FieldDescriptorProto_Label {
- if m != nil && m.Label != nil {
- return *m.Label
+func (x *FieldDescriptorProto) GetLabel() FieldDescriptorProto_Label {
+ if x != nil && x.Label != nil {
+ return *x.Label
}
return FieldDescriptorProto_LABEL_OPTIONAL
}
-func (m *FieldDescriptorProto) GetType() FieldDescriptorProto_Type {
- if m != nil && m.Type != nil {
- return *m.Type
+func (x *FieldDescriptorProto) GetType() FieldDescriptorProto_Type {
+ if x != nil && x.Type != nil {
+ return *x.Type
}
return FieldDescriptorProto_TYPE_DOUBLE
}
-func (m *FieldDescriptorProto) GetTypeName() string {
- if m != nil && m.TypeName != nil {
- return *m.TypeName
+func (x *FieldDescriptorProto) GetTypeName() string {
+ if x != nil && x.TypeName != nil {
+ return *x.TypeName
}
return ""
}
-func (m *FieldDescriptorProto) GetExtendee() string {
- if m != nil && m.Extendee != nil {
- return *m.Extendee
+func (x *FieldDescriptorProto) GetExtendee() string {
+ if x != nil && x.Extendee != nil {
+ return *x.Extendee
}
return ""
}
-func (m *FieldDescriptorProto) GetDefaultValue() string {
- if m != nil && m.DefaultValue != nil {
- return *m.DefaultValue
+func (x *FieldDescriptorProto) GetDefaultValue() string {
+ if x != nil && x.DefaultValue != nil {
+ return *x.DefaultValue
}
return ""
}
-func (m *FieldDescriptorProto) GetOneofIndex() int32 {
- if m != nil && m.OneofIndex != nil {
- return *m.OneofIndex
+func (x *FieldDescriptorProto) GetOneofIndex() int32 {
+ if x != nil && x.OneofIndex != nil {
+ return *x.OneofIndex
}
return 0
}
-func (m *FieldDescriptorProto) GetJsonName() string {
- if m != nil && m.JsonName != nil {
- return *m.JsonName
+func (x *FieldDescriptorProto) GetJsonName() string {
+ if x != nil && x.JsonName != nil {
+ return *x.JsonName
}
return ""
}
-func (m *FieldDescriptorProto) GetOptions() *FieldOptions {
- if m != nil {
- return m.Options
+func (x *FieldDescriptorProto) GetOptions() *FieldOptions {
+ if x != nil {
+ return x.Options
}
return nil
}
@@ -812,28 +853,35 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *OneofDescriptorProto) ProtoReflect() protoreflect.Message {
- return xxx_File_google_protobuf_descriptor_proto_messageTypes[5].MessageOf(m)
+func (x *OneofDescriptorProto) Reset() {
+ *x = OneofDescriptorProto{}
}
-func (m *OneofDescriptorProto) Reset() { *m = OneofDescriptorProto{} }
-func (m *OneofDescriptorProto) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*OneofDescriptorProto) ProtoMessage() {}
+
+func (x *OneofDescriptorProto) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*OneofDescriptorProto) ProtoMessage() {}
+
+func (x *OneofDescriptorProto) ProtoReflect() protoreflect.Message {
+ return xxx_File_google_protobuf_descriptor_proto_messageTypes[5].MessageOf(x)
+}
// Deprecated: Use OneofDescriptorProto.ProtoReflect.Type instead.
func (*OneofDescriptorProto) Descriptor() ([]byte, []int) {
return xxx_File_google_protobuf_descriptor_proto_rawDescGZIP(), []int{5}
}
-func (m *OneofDescriptorProto) GetName() string {
- if m != nil && m.Name != nil {
- return *m.Name
+func (x *OneofDescriptorProto) GetName() string {
+ if x != nil && x.Name != nil {
+ return *x.Name
}
return ""
}
-func (m *OneofDescriptorProto) GetOptions() *OneofOptions {
- if m != nil {
- return m.Options
+func (x *OneofDescriptorProto) GetOptions() *OneofOptions {
+ if x != nil {
+ return x.Options
}
return nil
}
@@ -855,49 +903,56 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *EnumDescriptorProto) ProtoReflect() protoreflect.Message {
- return xxx_File_google_protobuf_descriptor_proto_messageTypes[6].MessageOf(m)
+func (x *EnumDescriptorProto) Reset() {
+ *x = EnumDescriptorProto{}
}
-func (m *EnumDescriptorProto) Reset() { *m = EnumDescriptorProto{} }
-func (m *EnumDescriptorProto) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*EnumDescriptorProto) ProtoMessage() {}
+
+func (x *EnumDescriptorProto) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*EnumDescriptorProto) ProtoMessage() {}
+
+func (x *EnumDescriptorProto) ProtoReflect() protoreflect.Message {
+ return xxx_File_google_protobuf_descriptor_proto_messageTypes[6].MessageOf(x)
+}
// Deprecated: Use EnumDescriptorProto.ProtoReflect.Type instead.
func (*EnumDescriptorProto) Descriptor() ([]byte, []int) {
return xxx_File_google_protobuf_descriptor_proto_rawDescGZIP(), []int{6}
}
-func (m *EnumDescriptorProto) GetName() string {
- if m != nil && m.Name != nil {
- return *m.Name
+func (x *EnumDescriptorProto) GetName() string {
+ if x != nil && x.Name != nil {
+ return *x.Name
}
return ""
}
-func (m *EnumDescriptorProto) GetValue() []*EnumValueDescriptorProto {
- if m != nil {
- return m.Value
+func (x *EnumDescriptorProto) GetValue() []*EnumValueDescriptorProto {
+ if x != nil {
+ return x.Value
}
return nil
}
-func (m *EnumDescriptorProto) GetOptions() *EnumOptions {
- if m != nil {
- return m.Options
+func (x *EnumDescriptorProto) GetOptions() *EnumOptions {
+ if x != nil {
+ return x.Options
}
return nil
}
-func (m *EnumDescriptorProto) GetReservedRange() []*EnumDescriptorProto_EnumReservedRange {
- if m != nil {
- return m.ReservedRange
+func (x *EnumDescriptorProto) GetReservedRange() []*EnumDescriptorProto_EnumReservedRange {
+ if x != nil {
+ return x.ReservedRange
}
return nil
}
-func (m *EnumDescriptorProto) GetReservedName() []string {
- if m != nil {
- return m.ReservedName
+func (x *EnumDescriptorProto) GetReservedName() []string {
+ if x != nil {
+ return x.ReservedName
}
return nil
}
@@ -912,35 +967,42 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *EnumValueDescriptorProto) ProtoReflect() protoreflect.Message {
- return xxx_File_google_protobuf_descriptor_proto_messageTypes[7].MessageOf(m)
+func (x *EnumValueDescriptorProto) Reset() {
+ *x = EnumValueDescriptorProto{}
}
-func (m *EnumValueDescriptorProto) Reset() { *m = EnumValueDescriptorProto{} }
-func (m *EnumValueDescriptorProto) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*EnumValueDescriptorProto) ProtoMessage() {}
+
+func (x *EnumValueDescriptorProto) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*EnumValueDescriptorProto) ProtoMessage() {}
+
+func (x *EnumValueDescriptorProto) ProtoReflect() protoreflect.Message {
+ return xxx_File_google_protobuf_descriptor_proto_messageTypes[7].MessageOf(x)
+}
// Deprecated: Use EnumValueDescriptorProto.ProtoReflect.Type instead.
func (*EnumValueDescriptorProto) Descriptor() ([]byte, []int) {
return xxx_File_google_protobuf_descriptor_proto_rawDescGZIP(), []int{7}
}
-func (m *EnumValueDescriptorProto) GetName() string {
- if m != nil && m.Name != nil {
- return *m.Name
+func (x *EnumValueDescriptorProto) GetName() string {
+ if x != nil && x.Name != nil {
+ return *x.Name
}
return ""
}
-func (m *EnumValueDescriptorProto) GetNumber() int32 {
- if m != nil && m.Number != nil {
- return *m.Number
+func (x *EnumValueDescriptorProto) GetNumber() int32 {
+ if x != nil && x.Number != nil {
+ return *x.Number
}
return 0
}
-func (m *EnumValueDescriptorProto) GetOptions() *EnumValueOptions {
- if m != nil {
- return m.Options
+func (x *EnumValueDescriptorProto) GetOptions() *EnumValueOptions {
+ if x != nil {
+ return x.Options
}
return nil
}
@@ -955,35 +1017,42 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *ServiceDescriptorProto) ProtoReflect() protoreflect.Message {
- return xxx_File_google_protobuf_descriptor_proto_messageTypes[8].MessageOf(m)
+func (x *ServiceDescriptorProto) Reset() {
+ *x = ServiceDescriptorProto{}
}
-func (m *ServiceDescriptorProto) Reset() { *m = ServiceDescriptorProto{} }
-func (m *ServiceDescriptorProto) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*ServiceDescriptorProto) ProtoMessage() {}
+
+func (x *ServiceDescriptorProto) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ServiceDescriptorProto) ProtoMessage() {}
+
+func (x *ServiceDescriptorProto) ProtoReflect() protoreflect.Message {
+ return xxx_File_google_protobuf_descriptor_proto_messageTypes[8].MessageOf(x)
+}
// Deprecated: Use ServiceDescriptorProto.ProtoReflect.Type instead.
func (*ServiceDescriptorProto) Descriptor() ([]byte, []int) {
return xxx_File_google_protobuf_descriptor_proto_rawDescGZIP(), []int{8}
}
-func (m *ServiceDescriptorProto) GetName() string {
- if m != nil && m.Name != nil {
- return *m.Name
+func (x *ServiceDescriptorProto) GetName() string {
+ if x != nil && x.Name != nil {
+ return *x.Name
}
return ""
}
-func (m *ServiceDescriptorProto) GetMethod() []*MethodDescriptorProto {
- if m != nil {
- return m.Method
+func (x *ServiceDescriptorProto) GetMethod() []*MethodDescriptorProto {
+ if x != nil {
+ return x.Method
}
return nil
}
-func (m *ServiceDescriptorProto) GetOptions() *ServiceOptions {
- if m != nil {
- return m.Options
+func (x *ServiceDescriptorProto) GetOptions() *ServiceOptions {
+ if x != nil {
+ return x.Options
}
return nil
}
@@ -1005,12 +1074,19 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *MethodDescriptorProto) ProtoReflect() protoreflect.Message {
- return xxx_File_google_protobuf_descriptor_proto_messageTypes[9].MessageOf(m)
+func (x *MethodDescriptorProto) Reset() {
+ *x = MethodDescriptorProto{}
}
-func (m *MethodDescriptorProto) Reset() { *m = MethodDescriptorProto{} }
-func (m *MethodDescriptorProto) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*MethodDescriptorProto) ProtoMessage() {}
+
+func (x *MethodDescriptorProto) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*MethodDescriptorProto) ProtoMessage() {}
+
+func (x *MethodDescriptorProto) ProtoReflect() protoreflect.Message {
+ return xxx_File_google_protobuf_descriptor_proto_messageTypes[9].MessageOf(x)
+}
// Deprecated: Use MethodDescriptorProto.ProtoReflect.Type instead.
func (*MethodDescriptorProto) Descriptor() ([]byte, []int) {
@@ -1020,44 +1096,44 @@
const Default_MethodDescriptorProto_ClientStreaming bool = false
const Default_MethodDescriptorProto_ServerStreaming bool = false
-func (m *MethodDescriptorProto) GetName() string {
- if m != nil && m.Name != nil {
- return *m.Name
+func (x *MethodDescriptorProto) GetName() string {
+ if x != nil && x.Name != nil {
+ return *x.Name
}
return ""
}
-func (m *MethodDescriptorProto) GetInputType() string {
- if m != nil && m.InputType != nil {
- return *m.InputType
+func (x *MethodDescriptorProto) GetInputType() string {
+ if x != nil && x.InputType != nil {
+ return *x.InputType
}
return ""
}
-func (m *MethodDescriptorProto) GetOutputType() string {
- if m != nil && m.OutputType != nil {
- return *m.OutputType
+func (x *MethodDescriptorProto) GetOutputType() string {
+ if x != nil && x.OutputType != nil {
+ return *x.OutputType
}
return ""
}
-func (m *MethodDescriptorProto) GetOptions() *MethodOptions {
- if m != nil {
- return m.Options
+func (x *MethodDescriptorProto) GetOptions() *MethodOptions {
+ if x != nil {
+ return x.Options
}
return nil
}
-func (m *MethodDescriptorProto) GetClientStreaming() bool {
- if m != nil && m.ClientStreaming != nil {
- return *m.ClientStreaming
+func (x *MethodDescriptorProto) GetClientStreaming() bool {
+ if x != nil && x.ClientStreaming != nil {
+ return *x.ClientStreaming
}
return Default_MethodDescriptorProto_ClientStreaming
}
-func (m *MethodDescriptorProto) GetServerStreaming() bool {
- if m != nil && m.ServerStreaming != nil {
- return *m.ServerStreaming
+func (x *MethodDescriptorProto) GetServerStreaming() bool {
+ if x != nil && x.ServerStreaming != nil {
+ return *x.ServerStreaming
}
return Default_MethodDescriptorProto_ServerStreaming
}
@@ -1153,12 +1229,19 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *FileOptions) ProtoReflect() protoreflect.Message {
- return xxx_File_google_protobuf_descriptor_proto_messageTypes[10].MessageOf(m)
+func (x *FileOptions) Reset() {
+ *x = FileOptions{}
}
-func (m *FileOptions) Reset() { *m = FileOptions{} }
-func (m *FileOptions) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*FileOptions) ProtoMessage() {}
+
+func (x *FileOptions) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*FileOptions) ProtoMessage() {}
+
+func (x *FileOptions) ProtoReflect() protoreflect.Message {
+ return xxx_File_google_protobuf_descriptor_proto_messageTypes[10].MessageOf(x)
+}
// Deprecated: Use FileOptions.ProtoReflect.Type instead.
func (*FileOptions) Descriptor() ([]byte, []int) {
@@ -1184,150 +1267,150 @@
const Default_FileOptions_Deprecated bool = false
const Default_FileOptions_CcEnableArenas bool = false
-func (m *FileOptions) GetJavaPackage() string {
- if m != nil && m.JavaPackage != nil {
- return *m.JavaPackage
+func (x *FileOptions) GetJavaPackage() string {
+ if x != nil && x.JavaPackage != nil {
+ return *x.JavaPackage
}
return ""
}
-func (m *FileOptions) GetJavaOuterClassname() string {
- if m != nil && m.JavaOuterClassname != nil {
- return *m.JavaOuterClassname
+func (x *FileOptions) GetJavaOuterClassname() string {
+ if x != nil && x.JavaOuterClassname != nil {
+ return *x.JavaOuterClassname
}
return ""
}
-func (m *FileOptions) GetJavaMultipleFiles() bool {
- if m != nil && m.JavaMultipleFiles != nil {
- return *m.JavaMultipleFiles
+func (x *FileOptions) GetJavaMultipleFiles() bool {
+ if x != nil && x.JavaMultipleFiles != nil {
+ return *x.JavaMultipleFiles
}
return Default_FileOptions_JavaMultipleFiles
}
// Deprecated: Do not use.
-func (m *FileOptions) GetJavaGenerateEqualsAndHash() bool {
- if m != nil && m.JavaGenerateEqualsAndHash != nil {
- return *m.JavaGenerateEqualsAndHash
+func (x *FileOptions) GetJavaGenerateEqualsAndHash() bool {
+ if x != nil && x.JavaGenerateEqualsAndHash != nil {
+ return *x.JavaGenerateEqualsAndHash
}
return false
}
-func (m *FileOptions) GetJavaStringCheckUtf8() bool {
- if m != nil && m.JavaStringCheckUtf8 != nil {
- return *m.JavaStringCheckUtf8
+func (x *FileOptions) GetJavaStringCheckUtf8() bool {
+ if x != nil && x.JavaStringCheckUtf8 != nil {
+ return *x.JavaStringCheckUtf8
}
return Default_FileOptions_JavaStringCheckUtf8
}
-func (m *FileOptions) GetOptimizeFor() FileOptions_OptimizeMode {
- if m != nil && m.OptimizeFor != nil {
- return *m.OptimizeFor
+func (x *FileOptions) GetOptimizeFor() FileOptions_OptimizeMode {
+ if x != nil && x.OptimizeFor != nil {
+ return *x.OptimizeFor
}
return Default_FileOptions_OptimizeFor
}
-func (m *FileOptions) GetGoPackage() string {
- if m != nil && m.GoPackage != nil {
- return *m.GoPackage
+func (x *FileOptions) GetGoPackage() string {
+ if x != nil && x.GoPackage != nil {
+ return *x.GoPackage
}
return ""
}
-func (m *FileOptions) GetCcGenericServices() bool {
- if m != nil && m.CcGenericServices != nil {
- return *m.CcGenericServices
+func (x *FileOptions) GetCcGenericServices() bool {
+ if x != nil && x.CcGenericServices != nil {
+ return *x.CcGenericServices
}
return Default_FileOptions_CcGenericServices
}
-func (m *FileOptions) GetJavaGenericServices() bool {
- if m != nil && m.JavaGenericServices != nil {
- return *m.JavaGenericServices
+func (x *FileOptions) GetJavaGenericServices() bool {
+ if x != nil && x.JavaGenericServices != nil {
+ return *x.JavaGenericServices
}
return Default_FileOptions_JavaGenericServices
}
-func (m *FileOptions) GetPyGenericServices() bool {
- if m != nil && m.PyGenericServices != nil {
- return *m.PyGenericServices
+func (x *FileOptions) GetPyGenericServices() bool {
+ if x != nil && x.PyGenericServices != nil {
+ return *x.PyGenericServices
}
return Default_FileOptions_PyGenericServices
}
-func (m *FileOptions) GetPhpGenericServices() bool {
- if m != nil && m.PhpGenericServices != nil {
- return *m.PhpGenericServices
+func (x *FileOptions) GetPhpGenericServices() bool {
+ if x != nil && x.PhpGenericServices != nil {
+ return *x.PhpGenericServices
}
return Default_FileOptions_PhpGenericServices
}
-func (m *FileOptions) GetDeprecated() bool {
- if m != nil && m.Deprecated != nil {
- return *m.Deprecated
+func (x *FileOptions) GetDeprecated() bool {
+ if x != nil && x.Deprecated != nil {
+ return *x.Deprecated
}
return Default_FileOptions_Deprecated
}
-func (m *FileOptions) GetCcEnableArenas() bool {
- if m != nil && m.CcEnableArenas != nil {
- return *m.CcEnableArenas
+func (x *FileOptions) GetCcEnableArenas() bool {
+ if x != nil && x.CcEnableArenas != nil {
+ return *x.CcEnableArenas
}
return Default_FileOptions_CcEnableArenas
}
-func (m *FileOptions) GetObjcClassPrefix() string {
- if m != nil && m.ObjcClassPrefix != nil {
- return *m.ObjcClassPrefix
+func (x *FileOptions) GetObjcClassPrefix() string {
+ if x != nil && x.ObjcClassPrefix != nil {
+ return *x.ObjcClassPrefix
}
return ""
}
-func (m *FileOptions) GetCsharpNamespace() string {
- if m != nil && m.CsharpNamespace != nil {
- return *m.CsharpNamespace
+func (x *FileOptions) GetCsharpNamespace() string {
+ if x != nil && x.CsharpNamespace != nil {
+ return *x.CsharpNamespace
}
return ""
}
-func (m *FileOptions) GetSwiftPrefix() string {
- if m != nil && m.SwiftPrefix != nil {
- return *m.SwiftPrefix
+func (x *FileOptions) GetSwiftPrefix() string {
+ if x != nil && x.SwiftPrefix != nil {
+ return *x.SwiftPrefix
}
return ""
}
-func (m *FileOptions) GetPhpClassPrefix() string {
- if m != nil && m.PhpClassPrefix != nil {
- return *m.PhpClassPrefix
+func (x *FileOptions) GetPhpClassPrefix() string {
+ if x != nil && x.PhpClassPrefix != nil {
+ return *x.PhpClassPrefix
}
return ""
}
-func (m *FileOptions) GetPhpNamespace() string {
- if m != nil && m.PhpNamespace != nil {
- return *m.PhpNamespace
+func (x *FileOptions) GetPhpNamespace() string {
+ if x != nil && x.PhpNamespace != nil {
+ return *x.PhpNamespace
}
return ""
}
-func (m *FileOptions) GetPhpMetadataNamespace() string {
- if m != nil && m.PhpMetadataNamespace != nil {
- return *m.PhpMetadataNamespace
+func (x *FileOptions) GetPhpMetadataNamespace() string {
+ if x != nil && x.PhpMetadataNamespace != nil {
+ return *x.PhpMetadataNamespace
}
return ""
}
-func (m *FileOptions) GetRubyPackage() string {
- if m != nil && m.RubyPackage != nil {
- return *m.RubyPackage
+func (x *FileOptions) GetRubyPackage() string {
+ if x != nil && x.RubyPackage != nil {
+ return *x.RubyPackage
}
return ""
}
-func (m *FileOptions) GetUninterpretedOption() []*UninterpretedOption {
- if m != nil {
- return m.UninterpretedOption
+func (x *FileOptions) GetUninterpretedOption() []*UninterpretedOption {
+ if x != nil {
+ return x.UninterpretedOption
}
return nil
}
@@ -1391,12 +1474,19 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *MessageOptions) ProtoReflect() protoreflect.Message {
- return xxx_File_google_protobuf_descriptor_proto_messageTypes[11].MessageOf(m)
+func (x *MessageOptions) Reset() {
+ *x = MessageOptions{}
}
-func (m *MessageOptions) Reset() { *m = MessageOptions{} }
-func (m *MessageOptions) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*MessageOptions) ProtoMessage() {}
+
+func (x *MessageOptions) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*MessageOptions) ProtoMessage() {}
+
+func (x *MessageOptions) ProtoReflect() protoreflect.Message {
+ return xxx_File_google_protobuf_descriptor_proto_messageTypes[11].MessageOf(x)
+}
// Deprecated: Use MessageOptions.ProtoReflect.Type instead.
func (*MessageOptions) Descriptor() ([]byte, []int) {
@@ -1416,37 +1506,37 @@
const Default_MessageOptions_NoStandardDescriptorAccessor bool = false
const Default_MessageOptions_Deprecated bool = false
-func (m *MessageOptions) GetMessageSetWireFormat() bool {
- if m != nil && m.MessageSetWireFormat != nil {
- return *m.MessageSetWireFormat
+func (x *MessageOptions) GetMessageSetWireFormat() bool {
+ if x != nil && x.MessageSetWireFormat != nil {
+ return *x.MessageSetWireFormat
}
return Default_MessageOptions_MessageSetWireFormat
}
-func (m *MessageOptions) GetNoStandardDescriptorAccessor() bool {
- if m != nil && m.NoStandardDescriptorAccessor != nil {
- return *m.NoStandardDescriptorAccessor
+func (x *MessageOptions) GetNoStandardDescriptorAccessor() bool {
+ if x != nil && x.NoStandardDescriptorAccessor != nil {
+ return *x.NoStandardDescriptorAccessor
}
return Default_MessageOptions_NoStandardDescriptorAccessor
}
-func (m *MessageOptions) GetDeprecated() bool {
- if m != nil && m.Deprecated != nil {
- return *m.Deprecated
+func (x *MessageOptions) GetDeprecated() bool {
+ if x != nil && x.Deprecated != nil {
+ return *x.Deprecated
}
return Default_MessageOptions_Deprecated
}
-func (m *MessageOptions) GetMapEntry() bool {
- if m != nil && m.MapEntry != nil {
- return *m.MapEntry
+func (x *MessageOptions) GetMapEntry() bool {
+ if x != nil && x.MapEntry != nil {
+ return *x.MapEntry
}
return false
}
-func (m *MessageOptions) GetUninterpretedOption() []*UninterpretedOption {
- if m != nil {
- return m.UninterpretedOption
+func (x *MessageOptions) GetUninterpretedOption() []*UninterpretedOption {
+ if x != nil {
+ return x.UninterpretedOption
}
return nil
}
@@ -1519,12 +1609,19 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *FieldOptions) ProtoReflect() protoreflect.Message {
- return xxx_File_google_protobuf_descriptor_proto_messageTypes[12].MessageOf(m)
+func (x *FieldOptions) Reset() {
+ *x = FieldOptions{}
}
-func (m *FieldOptions) Reset() { *m = FieldOptions{} }
-func (m *FieldOptions) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*FieldOptions) ProtoMessage() {}
+
+func (x *FieldOptions) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*FieldOptions) ProtoMessage() {}
+
+func (x *FieldOptions) ProtoReflect() protoreflect.Message {
+ return xxx_File_google_protobuf_descriptor_proto_messageTypes[12].MessageOf(x)
+}
// Deprecated: Use FieldOptions.ProtoReflect.Type instead.
func (*FieldOptions) Descriptor() ([]byte, []int) {
@@ -1546,51 +1643,51 @@
const Default_FieldOptions_Deprecated bool = false
const Default_FieldOptions_Weak bool = false
-func (m *FieldOptions) GetCtype() FieldOptions_CType {
- if m != nil && m.Ctype != nil {
- return *m.Ctype
+func (x *FieldOptions) GetCtype() FieldOptions_CType {
+ if x != nil && x.Ctype != nil {
+ return *x.Ctype
}
return Default_FieldOptions_Ctype
}
-func (m *FieldOptions) GetPacked() bool {
- if m != nil && m.Packed != nil {
- return *m.Packed
+func (x *FieldOptions) GetPacked() bool {
+ if x != nil && x.Packed != nil {
+ return *x.Packed
}
return false
}
-func (m *FieldOptions) GetJstype() FieldOptions_JSType {
- if m != nil && m.Jstype != nil {
- return *m.Jstype
+func (x *FieldOptions) GetJstype() FieldOptions_JSType {
+ if x != nil && x.Jstype != nil {
+ return *x.Jstype
}
return Default_FieldOptions_Jstype
}
-func (m *FieldOptions) GetLazy() bool {
- if m != nil && m.Lazy != nil {
- return *m.Lazy
+func (x *FieldOptions) GetLazy() bool {
+ if x != nil && x.Lazy != nil {
+ return *x.Lazy
}
return Default_FieldOptions_Lazy
}
-func (m *FieldOptions) GetDeprecated() bool {
- if m != nil && m.Deprecated != nil {
- return *m.Deprecated
+func (x *FieldOptions) GetDeprecated() bool {
+ if x != nil && x.Deprecated != nil {
+ return *x.Deprecated
}
return Default_FieldOptions_Deprecated
}
-func (m *FieldOptions) GetWeak() bool {
- if m != nil && m.Weak != nil {
- return *m.Weak
+func (x *FieldOptions) GetWeak() bool {
+ if x != nil && x.Weak != nil {
+ return *x.Weak
}
return Default_FieldOptions_Weak
}
-func (m *FieldOptions) GetUninterpretedOption() []*UninterpretedOption {
- if m != nil {
- return m.UninterpretedOption
+func (x *FieldOptions) GetUninterpretedOption() []*UninterpretedOption {
+ if x != nil {
+ return x.UninterpretedOption
}
return nil
}
@@ -1604,12 +1701,19 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *OneofOptions) ProtoReflect() protoreflect.Message {
- return xxx_File_google_protobuf_descriptor_proto_messageTypes[13].MessageOf(m)
+func (x *OneofOptions) Reset() {
+ *x = OneofOptions{}
}
-func (m *OneofOptions) Reset() { *m = OneofOptions{} }
-func (m *OneofOptions) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*OneofOptions) ProtoMessage() {}
+
+func (x *OneofOptions) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*OneofOptions) ProtoMessage() {}
+
+func (x *OneofOptions) ProtoReflect() protoreflect.Message {
+ return xxx_File_google_protobuf_descriptor_proto_messageTypes[13].MessageOf(x)
+}
// Deprecated: Use OneofOptions.ProtoReflect.Type instead.
func (*OneofOptions) Descriptor() ([]byte, []int) {
@@ -1625,9 +1729,9 @@
return extRange_OneofOptions
}
-func (m *OneofOptions) GetUninterpretedOption() []*UninterpretedOption {
- if m != nil {
- return m.UninterpretedOption
+func (x *OneofOptions) GetUninterpretedOption() []*UninterpretedOption {
+ if x != nil {
+ return x.UninterpretedOption
}
return nil
}
@@ -1649,12 +1753,19 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *EnumOptions) ProtoReflect() protoreflect.Message {
- return xxx_File_google_protobuf_descriptor_proto_messageTypes[14].MessageOf(m)
+func (x *EnumOptions) Reset() {
+ *x = EnumOptions{}
}
-func (m *EnumOptions) Reset() { *m = EnumOptions{} }
-func (m *EnumOptions) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*EnumOptions) ProtoMessage() {}
+
+func (x *EnumOptions) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*EnumOptions) ProtoMessage() {}
+
+func (x *EnumOptions) ProtoReflect() protoreflect.Message {
+ return xxx_File_google_protobuf_descriptor_proto_messageTypes[14].MessageOf(x)
+}
// Deprecated: Use EnumOptions.ProtoReflect.Type instead.
func (*EnumOptions) Descriptor() ([]byte, []int) {
@@ -1672,23 +1783,23 @@
const Default_EnumOptions_Deprecated bool = false
-func (m *EnumOptions) GetAllowAlias() bool {
- if m != nil && m.AllowAlias != nil {
- return *m.AllowAlias
+func (x *EnumOptions) GetAllowAlias() bool {
+ if x != nil && x.AllowAlias != nil {
+ return *x.AllowAlias
}
return false
}
-func (m *EnumOptions) GetDeprecated() bool {
- if m != nil && m.Deprecated != nil {
- return *m.Deprecated
+func (x *EnumOptions) GetDeprecated() bool {
+ if x != nil && x.Deprecated != nil {
+ return *x.Deprecated
}
return Default_EnumOptions_Deprecated
}
-func (m *EnumOptions) GetUninterpretedOption() []*UninterpretedOption {
- if m != nil {
- return m.UninterpretedOption
+func (x *EnumOptions) GetUninterpretedOption() []*UninterpretedOption {
+ if x != nil {
+ return x.UninterpretedOption
}
return nil
}
@@ -1707,12 +1818,19 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *EnumValueOptions) ProtoReflect() protoreflect.Message {
- return xxx_File_google_protobuf_descriptor_proto_messageTypes[15].MessageOf(m)
+func (x *EnumValueOptions) Reset() {
+ *x = EnumValueOptions{}
}
-func (m *EnumValueOptions) Reset() { *m = EnumValueOptions{} }
-func (m *EnumValueOptions) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*EnumValueOptions) ProtoMessage() {}
+
+func (x *EnumValueOptions) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*EnumValueOptions) ProtoMessage() {}
+
+func (x *EnumValueOptions) ProtoReflect() protoreflect.Message {
+ return xxx_File_google_protobuf_descriptor_proto_messageTypes[15].MessageOf(x)
+}
// Deprecated: Use EnumValueOptions.ProtoReflect.Type instead.
func (*EnumValueOptions) Descriptor() ([]byte, []int) {
@@ -1730,16 +1848,16 @@
const Default_EnumValueOptions_Deprecated bool = false
-func (m *EnumValueOptions) GetDeprecated() bool {
- if m != nil && m.Deprecated != nil {
- return *m.Deprecated
+func (x *EnumValueOptions) GetDeprecated() bool {
+ if x != nil && x.Deprecated != nil {
+ return *x.Deprecated
}
return Default_EnumValueOptions_Deprecated
}
-func (m *EnumValueOptions) GetUninterpretedOption() []*UninterpretedOption {
- if m != nil {
- return m.UninterpretedOption
+func (x *EnumValueOptions) GetUninterpretedOption() []*UninterpretedOption {
+ if x != nil {
+ return x.UninterpretedOption
}
return nil
}
@@ -1758,12 +1876,19 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *ServiceOptions) ProtoReflect() protoreflect.Message {
- return xxx_File_google_protobuf_descriptor_proto_messageTypes[16].MessageOf(m)
+func (x *ServiceOptions) Reset() {
+ *x = ServiceOptions{}
}
-func (m *ServiceOptions) Reset() { *m = ServiceOptions{} }
-func (m *ServiceOptions) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*ServiceOptions) ProtoMessage() {}
+
+func (x *ServiceOptions) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ServiceOptions) ProtoMessage() {}
+
+func (x *ServiceOptions) ProtoReflect() protoreflect.Message {
+ return xxx_File_google_protobuf_descriptor_proto_messageTypes[16].MessageOf(x)
+}
// Deprecated: Use ServiceOptions.ProtoReflect.Type instead.
func (*ServiceOptions) Descriptor() ([]byte, []int) {
@@ -1781,16 +1906,16 @@
const Default_ServiceOptions_Deprecated bool = false
-func (m *ServiceOptions) GetDeprecated() bool {
- if m != nil && m.Deprecated != nil {
- return *m.Deprecated
+func (x *ServiceOptions) GetDeprecated() bool {
+ if x != nil && x.Deprecated != nil {
+ return *x.Deprecated
}
return Default_ServiceOptions_Deprecated
}
-func (m *ServiceOptions) GetUninterpretedOption() []*UninterpretedOption {
- if m != nil {
- return m.UninterpretedOption
+func (x *ServiceOptions) GetUninterpretedOption() []*UninterpretedOption {
+ if x != nil {
+ return x.UninterpretedOption
}
return nil
}
@@ -1810,12 +1935,19 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *MethodOptions) ProtoReflect() protoreflect.Message {
- return xxx_File_google_protobuf_descriptor_proto_messageTypes[17].MessageOf(m)
+func (x *MethodOptions) Reset() {
+ *x = MethodOptions{}
}
-func (m *MethodOptions) Reset() { *m = MethodOptions{} }
-func (m *MethodOptions) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*MethodOptions) ProtoMessage() {}
+
+func (x *MethodOptions) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*MethodOptions) ProtoMessage() {}
+
+func (x *MethodOptions) ProtoReflect() protoreflect.Message {
+ return xxx_File_google_protobuf_descriptor_proto_messageTypes[17].MessageOf(x)
+}
// Deprecated: Use MethodOptions.ProtoReflect.Type instead.
func (*MethodOptions) Descriptor() ([]byte, []int) {
@@ -1834,23 +1966,23 @@
const Default_MethodOptions_Deprecated bool = false
const Default_MethodOptions_IdempotencyLevel MethodOptions_IdempotencyLevel = MethodOptions_IDEMPOTENCY_UNKNOWN
-func (m *MethodOptions) GetDeprecated() bool {
- if m != nil && m.Deprecated != nil {
- return *m.Deprecated
+func (x *MethodOptions) GetDeprecated() bool {
+ if x != nil && x.Deprecated != nil {
+ return *x.Deprecated
}
return Default_MethodOptions_Deprecated
}
-func (m *MethodOptions) GetIdempotencyLevel() MethodOptions_IdempotencyLevel {
- if m != nil && m.IdempotencyLevel != nil {
- return *m.IdempotencyLevel
+func (x *MethodOptions) GetIdempotencyLevel() MethodOptions_IdempotencyLevel {
+ if x != nil && x.IdempotencyLevel != nil {
+ return *x.IdempotencyLevel
}
return Default_MethodOptions_IdempotencyLevel
}
-func (m *MethodOptions) GetUninterpretedOption() []*UninterpretedOption {
- if m != nil {
- return m.UninterpretedOption
+func (x *MethodOptions) GetUninterpretedOption() []*UninterpretedOption {
+ if x != nil {
+ return x.UninterpretedOption
}
return nil
}
@@ -1876,63 +2008,70 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *UninterpretedOption) ProtoReflect() protoreflect.Message {
- return xxx_File_google_protobuf_descriptor_proto_messageTypes[18].MessageOf(m)
+func (x *UninterpretedOption) Reset() {
+ *x = UninterpretedOption{}
}
-func (m *UninterpretedOption) Reset() { *m = UninterpretedOption{} }
-func (m *UninterpretedOption) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*UninterpretedOption) ProtoMessage() {}
+
+func (x *UninterpretedOption) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UninterpretedOption) ProtoMessage() {}
+
+func (x *UninterpretedOption) ProtoReflect() protoreflect.Message {
+ return xxx_File_google_protobuf_descriptor_proto_messageTypes[18].MessageOf(x)
+}
// Deprecated: Use UninterpretedOption.ProtoReflect.Type instead.
func (*UninterpretedOption) Descriptor() ([]byte, []int) {
return xxx_File_google_protobuf_descriptor_proto_rawDescGZIP(), []int{18}
}
-func (m *UninterpretedOption) GetName() []*UninterpretedOption_NamePart {
- if m != nil {
- return m.Name
+func (x *UninterpretedOption) GetName() []*UninterpretedOption_NamePart {
+ if x != nil {
+ return x.Name
}
return nil
}
-func (m *UninterpretedOption) GetIdentifierValue() string {
- if m != nil && m.IdentifierValue != nil {
- return *m.IdentifierValue
+func (x *UninterpretedOption) GetIdentifierValue() string {
+ if x != nil && x.IdentifierValue != nil {
+ return *x.IdentifierValue
}
return ""
}
-func (m *UninterpretedOption) GetPositiveIntValue() uint64 {
- if m != nil && m.PositiveIntValue != nil {
- return *m.PositiveIntValue
+func (x *UninterpretedOption) GetPositiveIntValue() uint64 {
+ if x != nil && x.PositiveIntValue != nil {
+ return *x.PositiveIntValue
}
return 0
}
-func (m *UninterpretedOption) GetNegativeIntValue() int64 {
- if m != nil && m.NegativeIntValue != nil {
- return *m.NegativeIntValue
+func (x *UninterpretedOption) GetNegativeIntValue() int64 {
+ if x != nil && x.NegativeIntValue != nil {
+ return *x.NegativeIntValue
}
return 0
}
-func (m *UninterpretedOption) GetDoubleValue() float64 {
- if m != nil && m.DoubleValue != nil {
- return *m.DoubleValue
+func (x *UninterpretedOption) GetDoubleValue() float64 {
+ if x != nil && x.DoubleValue != nil {
+ return *x.DoubleValue
}
return 0
}
-func (m *UninterpretedOption) GetStringValue() []byte {
- if m != nil {
- return m.StringValue
+func (x *UninterpretedOption) GetStringValue() []byte {
+ if x != nil {
+ return x.StringValue
}
return nil
}
-func (m *UninterpretedOption) GetAggregateValue() string {
- if m != nil && m.AggregateValue != nil {
- return *m.AggregateValue
+func (x *UninterpretedOption) GetAggregateValue() string {
+ if x != nil && x.AggregateValue != nil {
+ return *x.AggregateValue
}
return ""
}
@@ -1989,21 +2128,28 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *SourceCodeInfo) ProtoReflect() protoreflect.Message {
- return xxx_File_google_protobuf_descriptor_proto_messageTypes[19].MessageOf(m)
+func (x *SourceCodeInfo) Reset() {
+ *x = SourceCodeInfo{}
}
-func (m *SourceCodeInfo) Reset() { *m = SourceCodeInfo{} }
-func (m *SourceCodeInfo) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*SourceCodeInfo) ProtoMessage() {}
+
+func (x *SourceCodeInfo) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SourceCodeInfo) ProtoMessage() {}
+
+func (x *SourceCodeInfo) ProtoReflect() protoreflect.Message {
+ return xxx_File_google_protobuf_descriptor_proto_messageTypes[19].MessageOf(x)
+}
// Deprecated: Use SourceCodeInfo.ProtoReflect.Type instead.
func (*SourceCodeInfo) Descriptor() ([]byte, []int) {
return xxx_File_google_protobuf_descriptor_proto_rawDescGZIP(), []int{19}
}
-func (m *SourceCodeInfo) GetLocation() []*SourceCodeInfo_Location {
- if m != nil {
- return m.Location
+func (x *SourceCodeInfo) GetLocation() []*SourceCodeInfo_Location {
+ if x != nil {
+ return x.Location
}
return nil
}
@@ -2020,21 +2166,28 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *GeneratedCodeInfo) ProtoReflect() protoreflect.Message {
- return xxx_File_google_protobuf_descriptor_proto_messageTypes[20].MessageOf(m)
+func (x *GeneratedCodeInfo) Reset() {
+ *x = GeneratedCodeInfo{}
}
-func (m *GeneratedCodeInfo) Reset() { *m = GeneratedCodeInfo{} }
-func (m *GeneratedCodeInfo) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*GeneratedCodeInfo) ProtoMessage() {}
+
+func (x *GeneratedCodeInfo) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GeneratedCodeInfo) ProtoMessage() {}
+
+func (x *GeneratedCodeInfo) ProtoReflect() protoreflect.Message {
+ return xxx_File_google_protobuf_descriptor_proto_messageTypes[20].MessageOf(x)
+}
// Deprecated: Use GeneratedCodeInfo.ProtoReflect.Type instead.
func (*GeneratedCodeInfo) Descriptor() ([]byte, []int) {
return xxx_File_google_protobuf_descriptor_proto_rawDescGZIP(), []int{20}
}
-func (m *GeneratedCodeInfo) GetAnnotation() []*GeneratedCodeInfo_Annotation {
- if m != nil {
- return m.Annotation
+func (x *GeneratedCodeInfo) GetAnnotation() []*GeneratedCodeInfo_Annotation {
+ if x != nil {
+ return x.Annotation
}
return nil
}
@@ -2048,35 +2201,42 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *DescriptorProto_ExtensionRange) ProtoReflect() protoreflect.Message {
- return xxx_File_google_protobuf_descriptor_proto_messageTypes[21].MessageOf(m)
+func (x *DescriptorProto_ExtensionRange) Reset() {
+ *x = DescriptorProto_ExtensionRange{}
}
-func (m *DescriptorProto_ExtensionRange) Reset() { *m = DescriptorProto_ExtensionRange{} }
-func (m *DescriptorProto_ExtensionRange) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*DescriptorProto_ExtensionRange) ProtoMessage() {}
+
+func (x *DescriptorProto_ExtensionRange) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DescriptorProto_ExtensionRange) ProtoMessage() {}
+
+func (x *DescriptorProto_ExtensionRange) ProtoReflect() protoreflect.Message {
+ return xxx_File_google_protobuf_descriptor_proto_messageTypes[21].MessageOf(x)
+}
// Deprecated: Use DescriptorProto_ExtensionRange.ProtoReflect.Type instead.
func (*DescriptorProto_ExtensionRange) Descriptor() ([]byte, []int) {
return xxx_File_google_protobuf_descriptor_proto_rawDescGZIP(), []int{2, 0}
}
-func (m *DescriptorProto_ExtensionRange) GetStart() int32 {
- if m != nil && m.Start != nil {
- return *m.Start
+func (x *DescriptorProto_ExtensionRange) GetStart() int32 {
+ if x != nil && x.Start != nil {
+ return *x.Start
}
return 0
}
-func (m *DescriptorProto_ExtensionRange) GetEnd() int32 {
- if m != nil && m.End != nil {
- return *m.End
+func (x *DescriptorProto_ExtensionRange) GetEnd() int32 {
+ if x != nil && x.End != nil {
+ return *x.End
}
return 0
}
-func (m *DescriptorProto_ExtensionRange) GetOptions() *ExtensionRangeOptions {
- if m != nil {
- return m.Options
+func (x *DescriptorProto_ExtensionRange) GetOptions() *ExtensionRangeOptions {
+ if x != nil {
+ return x.Options
}
return nil
}
@@ -2092,28 +2252,35 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *DescriptorProto_ReservedRange) ProtoReflect() protoreflect.Message {
- return xxx_File_google_protobuf_descriptor_proto_messageTypes[22].MessageOf(m)
+func (x *DescriptorProto_ReservedRange) Reset() {
+ *x = DescriptorProto_ReservedRange{}
}
-func (m *DescriptorProto_ReservedRange) Reset() { *m = DescriptorProto_ReservedRange{} }
-func (m *DescriptorProto_ReservedRange) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*DescriptorProto_ReservedRange) ProtoMessage() {}
+
+func (x *DescriptorProto_ReservedRange) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DescriptorProto_ReservedRange) ProtoMessage() {}
+
+func (x *DescriptorProto_ReservedRange) ProtoReflect() protoreflect.Message {
+ return xxx_File_google_protobuf_descriptor_proto_messageTypes[22].MessageOf(x)
+}
// Deprecated: Use DescriptorProto_ReservedRange.ProtoReflect.Type instead.
func (*DescriptorProto_ReservedRange) Descriptor() ([]byte, []int) {
return xxx_File_google_protobuf_descriptor_proto_rawDescGZIP(), []int{2, 1}
}
-func (m *DescriptorProto_ReservedRange) GetStart() int32 {
- if m != nil && m.Start != nil {
- return *m.Start
+func (x *DescriptorProto_ReservedRange) GetStart() int32 {
+ if x != nil && x.Start != nil {
+ return *x.Start
}
return 0
}
-func (m *DescriptorProto_ReservedRange) GetEnd() int32 {
- if m != nil && m.End != nil {
- return *m.End
+func (x *DescriptorProto_ReservedRange) GetEnd() int32 {
+ if x != nil && x.End != nil {
+ return *x.End
}
return 0
}
@@ -2132,28 +2299,35 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *EnumDescriptorProto_EnumReservedRange) ProtoReflect() protoreflect.Message {
- return xxx_File_google_protobuf_descriptor_proto_messageTypes[23].MessageOf(m)
+func (x *EnumDescriptorProto_EnumReservedRange) Reset() {
+ *x = EnumDescriptorProto_EnumReservedRange{}
}
-func (m *EnumDescriptorProto_EnumReservedRange) Reset() { *m = EnumDescriptorProto_EnumReservedRange{} }
-func (m *EnumDescriptorProto_EnumReservedRange) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*EnumDescriptorProto_EnumReservedRange) ProtoMessage() {}
+
+func (x *EnumDescriptorProto_EnumReservedRange) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*EnumDescriptorProto_EnumReservedRange) ProtoMessage() {}
+
+func (x *EnumDescriptorProto_EnumReservedRange) ProtoReflect() protoreflect.Message {
+ return xxx_File_google_protobuf_descriptor_proto_messageTypes[23].MessageOf(x)
+}
// Deprecated: Use EnumDescriptorProto_EnumReservedRange.ProtoReflect.Type instead.
func (*EnumDescriptorProto_EnumReservedRange) Descriptor() ([]byte, []int) {
return xxx_File_google_protobuf_descriptor_proto_rawDescGZIP(), []int{6, 0}
}
-func (m *EnumDescriptorProto_EnumReservedRange) GetStart() int32 {
- if m != nil && m.Start != nil {
- return *m.Start
+func (x *EnumDescriptorProto_EnumReservedRange) GetStart() int32 {
+ if x != nil && x.Start != nil {
+ return *x.Start
}
return 0
}
-func (m *EnumDescriptorProto_EnumReservedRange) GetEnd() int32 {
- if m != nil && m.End != nil {
- return *m.End
+func (x *EnumDescriptorProto_EnumReservedRange) GetEnd() int32 {
+ if x != nil && x.End != nil {
+ return *x.End
}
return 0
}
@@ -2171,28 +2345,35 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *UninterpretedOption_NamePart) ProtoReflect() protoreflect.Message {
- return xxx_File_google_protobuf_descriptor_proto_messageTypes[24].MessageOf(m)
+func (x *UninterpretedOption_NamePart) Reset() {
+ *x = UninterpretedOption_NamePart{}
}
-func (m *UninterpretedOption_NamePart) Reset() { *m = UninterpretedOption_NamePart{} }
-func (m *UninterpretedOption_NamePart) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*UninterpretedOption_NamePart) ProtoMessage() {}
+
+func (x *UninterpretedOption_NamePart) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UninterpretedOption_NamePart) ProtoMessage() {}
+
+func (x *UninterpretedOption_NamePart) ProtoReflect() protoreflect.Message {
+ return xxx_File_google_protobuf_descriptor_proto_messageTypes[24].MessageOf(x)
+}
// Deprecated: Use UninterpretedOption_NamePart.ProtoReflect.Type instead.
func (*UninterpretedOption_NamePart) Descriptor() ([]byte, []int) {
return xxx_File_google_protobuf_descriptor_proto_rawDescGZIP(), []int{18, 0}
}
-func (m *UninterpretedOption_NamePart) GetNamePart() string {
- if m != nil && m.NamePart != nil {
- return *m.NamePart
+func (x *UninterpretedOption_NamePart) GetNamePart() string {
+ if x != nil && x.NamePart != nil {
+ return *x.NamePart
}
return ""
}
-func (m *UninterpretedOption_NamePart) GetIsExtension() bool {
- if m != nil && m.IsExtension != nil {
- return *m.IsExtension
+func (x *UninterpretedOption_NamePart) GetIsExtension() bool {
+ if x != nil && x.IsExtension != nil {
+ return *x.IsExtension
}
return false
}
@@ -2283,49 +2464,56 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *SourceCodeInfo_Location) ProtoReflect() protoreflect.Message {
- return xxx_File_google_protobuf_descriptor_proto_messageTypes[25].MessageOf(m)
+func (x *SourceCodeInfo_Location) Reset() {
+ *x = SourceCodeInfo_Location{}
}
-func (m *SourceCodeInfo_Location) Reset() { *m = SourceCodeInfo_Location{} }
-func (m *SourceCodeInfo_Location) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*SourceCodeInfo_Location) ProtoMessage() {}
+
+func (x *SourceCodeInfo_Location) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SourceCodeInfo_Location) ProtoMessage() {}
+
+func (x *SourceCodeInfo_Location) ProtoReflect() protoreflect.Message {
+ return xxx_File_google_protobuf_descriptor_proto_messageTypes[25].MessageOf(x)
+}
// Deprecated: Use SourceCodeInfo_Location.ProtoReflect.Type instead.
func (*SourceCodeInfo_Location) Descriptor() ([]byte, []int) {
return xxx_File_google_protobuf_descriptor_proto_rawDescGZIP(), []int{19, 0}
}
-func (m *SourceCodeInfo_Location) GetPath() []int32 {
- if m != nil {
- return m.Path
+func (x *SourceCodeInfo_Location) GetPath() []int32 {
+ if x != nil {
+ return x.Path
}
return nil
}
-func (m *SourceCodeInfo_Location) GetSpan() []int32 {
- if m != nil {
- return m.Span
+func (x *SourceCodeInfo_Location) GetSpan() []int32 {
+ if x != nil {
+ return x.Span
}
return nil
}
-func (m *SourceCodeInfo_Location) GetLeadingComments() string {
- if m != nil && m.LeadingComments != nil {
- return *m.LeadingComments
+func (x *SourceCodeInfo_Location) GetLeadingComments() string {
+ if x != nil && x.LeadingComments != nil {
+ return *x.LeadingComments
}
return ""
}
-func (m *SourceCodeInfo_Location) GetTrailingComments() string {
- if m != nil && m.TrailingComments != nil {
- return *m.TrailingComments
+func (x *SourceCodeInfo_Location) GetTrailingComments() string {
+ if x != nil && x.TrailingComments != nil {
+ return *x.TrailingComments
}
return ""
}
-func (m *SourceCodeInfo_Location) GetLeadingDetachedComments() []string {
- if m != nil {
- return m.LeadingDetachedComments
+func (x *SourceCodeInfo_Location) GetLeadingDetachedComments() []string {
+ if x != nil {
+ return x.LeadingDetachedComments
}
return nil
}
@@ -2348,42 +2536,49 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *GeneratedCodeInfo_Annotation) ProtoReflect() protoreflect.Message {
- return xxx_File_google_protobuf_descriptor_proto_messageTypes[26].MessageOf(m)
+func (x *GeneratedCodeInfo_Annotation) Reset() {
+ *x = GeneratedCodeInfo_Annotation{}
}
-func (m *GeneratedCodeInfo_Annotation) Reset() { *m = GeneratedCodeInfo_Annotation{} }
-func (m *GeneratedCodeInfo_Annotation) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*GeneratedCodeInfo_Annotation) ProtoMessage() {}
+
+func (x *GeneratedCodeInfo_Annotation) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GeneratedCodeInfo_Annotation) ProtoMessage() {}
+
+func (x *GeneratedCodeInfo_Annotation) ProtoReflect() protoreflect.Message {
+ return xxx_File_google_protobuf_descriptor_proto_messageTypes[26].MessageOf(x)
+}
// Deprecated: Use GeneratedCodeInfo_Annotation.ProtoReflect.Type instead.
func (*GeneratedCodeInfo_Annotation) Descriptor() ([]byte, []int) {
return xxx_File_google_protobuf_descriptor_proto_rawDescGZIP(), []int{20, 0}
}
-func (m *GeneratedCodeInfo_Annotation) GetPath() []int32 {
- if m != nil {
- return m.Path
+func (x *GeneratedCodeInfo_Annotation) GetPath() []int32 {
+ if x != nil {
+ return x.Path
}
return nil
}
-func (m *GeneratedCodeInfo_Annotation) GetSourceFile() string {
- if m != nil && m.SourceFile != nil {
- return *m.SourceFile
+func (x *GeneratedCodeInfo_Annotation) GetSourceFile() string {
+ if x != nil && x.SourceFile != nil {
+ return *x.SourceFile
}
return ""
}
-func (m *GeneratedCodeInfo_Annotation) GetBegin() int32 {
- if m != nil && m.Begin != nil {
- return *m.Begin
+func (x *GeneratedCodeInfo_Annotation) GetBegin() int32 {
+ if x != nil && x.Begin != nil {
+ return *x.Begin
}
return 0
}
-func (m *GeneratedCodeInfo_Annotation) GetEnd() int32 {
- if m != nil && m.End != nil {
- return *m.End
+func (x *GeneratedCodeInfo_Annotation) GetEnd() int32 {
+ if x != nil && x.End != nil {
+ return *x.End
}
return 0
}
diff --git a/types/known/any.pb.go b/types/known/any.pb.go
index 9552c32..4fa309b 100644
--- a/types/known/any.pb.go
+++ b/types/known/any.pb.go
@@ -129,12 +129,19 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *Any) ProtoReflect() protoreflect.Message {
- return xxx_File_google_protobuf_any_proto_messageTypes[0].MessageOf(m)
+func (x *Any) Reset() {
+ *x = Any{}
}
-func (m *Any) Reset() { *m = Any{} }
-func (m *Any) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*Any) ProtoMessage() {}
+
+func (x *Any) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Any) ProtoMessage() {}
+
+func (x *Any) ProtoReflect() protoreflect.Message {
+ return xxx_File_google_protobuf_any_proto_messageTypes[0].MessageOf(x)
+}
// Deprecated: Use Any.ProtoReflect.Type instead.
func (*Any) Descriptor() ([]byte, []int) {
@@ -143,16 +150,16 @@
func (*Any) XXX_WellKnownType() string { return "Any" }
-func (m *Any) GetTypeUrl() string {
- if m != nil {
- return m.TypeUrl
+func (x *Any) GetTypeUrl() string {
+ if x != nil {
+ return x.TypeUrl
}
return ""
}
-func (m *Any) GetValue() []byte {
- if m != nil {
- return m.Value
+func (x *Any) GetValue() []byte {
+ if x != nil {
+ return x.Value
}
return nil
}
diff --git a/types/known/api.pb.go b/types/known/api.pb.go
index 7620827..b1162cc 100644
--- a/types/known/api.pb.go
+++ b/types/known/api.pb.go
@@ -63,63 +63,70 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *Api) ProtoReflect() protoreflect.Message {
- return xxx_File_google_protobuf_api_proto_messageTypes[0].MessageOf(m)
+func (x *Api) Reset() {
+ *x = Api{}
}
-func (m *Api) Reset() { *m = Api{} }
-func (m *Api) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*Api) ProtoMessage() {}
+
+func (x *Api) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Api) ProtoMessage() {}
+
+func (x *Api) ProtoReflect() protoreflect.Message {
+ return xxx_File_google_protobuf_api_proto_messageTypes[0].MessageOf(x)
+}
// Deprecated: Use Api.ProtoReflect.Type instead.
func (*Api) Descriptor() ([]byte, []int) {
return xxx_File_google_protobuf_api_proto_rawDescGZIP(), []int{0}
}
-func (m *Api) GetName() string {
- if m != nil {
- return m.Name
+func (x *Api) GetName() string {
+ if x != nil {
+ return x.Name
}
return ""
}
-func (m *Api) GetMethods() []*Method {
- if m != nil {
- return m.Methods
+func (x *Api) GetMethods() []*Method {
+ if x != nil {
+ return x.Methods
}
return nil
}
-func (m *Api) GetOptions() []*Option {
- if m != nil {
- return m.Options
+func (x *Api) GetOptions() []*Option {
+ if x != nil {
+ return x.Options
}
return nil
}
-func (m *Api) GetVersion() string {
- if m != nil {
- return m.Version
+func (x *Api) GetVersion() string {
+ if x != nil {
+ return x.Version
}
return ""
}
-func (m *Api) GetSourceContext() *SourceContext {
- if m != nil {
- return m.SourceContext
+func (x *Api) GetSourceContext() *SourceContext {
+ if x != nil {
+ return x.SourceContext
}
return nil
}
-func (m *Api) GetMixins() []*Mixin {
- if m != nil {
- return m.Mixins
+func (x *Api) GetMixins() []*Mixin {
+ if x != nil {
+ return x.Mixins
}
return nil
}
-func (m *Api) GetSyntax() Syntax {
- if m != nil {
- return m.Syntax
+func (x *Api) GetSyntax() Syntax {
+ if x != nil {
+ return x.Syntax
}
return Syntax_SYNTAX_PROTO2
}
@@ -145,63 +152,70 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *Method) ProtoReflect() protoreflect.Message {
- return xxx_File_google_protobuf_api_proto_messageTypes[1].MessageOf(m)
+func (x *Method) Reset() {
+ *x = Method{}
}
-func (m *Method) Reset() { *m = Method{} }
-func (m *Method) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*Method) ProtoMessage() {}
+
+func (x *Method) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Method) ProtoMessage() {}
+
+func (x *Method) ProtoReflect() protoreflect.Message {
+ return xxx_File_google_protobuf_api_proto_messageTypes[1].MessageOf(x)
+}
// Deprecated: Use Method.ProtoReflect.Type instead.
func (*Method) Descriptor() ([]byte, []int) {
return xxx_File_google_protobuf_api_proto_rawDescGZIP(), []int{1}
}
-func (m *Method) GetName() string {
- if m != nil {
- return m.Name
+func (x *Method) GetName() string {
+ if x != nil {
+ return x.Name
}
return ""
}
-func (m *Method) GetRequestTypeUrl() string {
- if m != nil {
- return m.RequestTypeUrl
+func (x *Method) GetRequestTypeUrl() string {
+ if x != nil {
+ return x.RequestTypeUrl
}
return ""
}
-func (m *Method) GetRequestStreaming() bool {
- if m != nil {
- return m.RequestStreaming
+func (x *Method) GetRequestStreaming() bool {
+ if x != nil {
+ return x.RequestStreaming
}
return false
}
-func (m *Method) GetResponseTypeUrl() string {
- if m != nil {
- return m.ResponseTypeUrl
+func (x *Method) GetResponseTypeUrl() string {
+ if x != nil {
+ return x.ResponseTypeUrl
}
return ""
}
-func (m *Method) GetResponseStreaming() bool {
- if m != nil {
- return m.ResponseStreaming
+func (x *Method) GetResponseStreaming() bool {
+ if x != nil {
+ return x.ResponseStreaming
}
return false
}
-func (m *Method) GetOptions() []*Option {
- if m != nil {
- return m.Options
+func (x *Method) GetOptions() []*Option {
+ if x != nil {
+ return x.Options
}
return nil
}
-func (m *Method) GetSyntax() Syntax {
- if m != nil {
- return m.Syntax
+func (x *Method) GetSyntax() Syntax {
+ if x != nil {
+ return x.Syntax
}
return Syntax_SYNTAX_PROTO2
}
@@ -295,28 +309,35 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *Mixin) ProtoReflect() protoreflect.Message {
- return xxx_File_google_protobuf_api_proto_messageTypes[2].MessageOf(m)
+func (x *Mixin) Reset() {
+ *x = Mixin{}
}
-func (m *Mixin) Reset() { *m = Mixin{} }
-func (m *Mixin) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*Mixin) ProtoMessage() {}
+
+func (x *Mixin) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Mixin) ProtoMessage() {}
+
+func (x *Mixin) ProtoReflect() protoreflect.Message {
+ return xxx_File_google_protobuf_api_proto_messageTypes[2].MessageOf(x)
+}
// Deprecated: Use Mixin.ProtoReflect.Type instead.
func (*Mixin) Descriptor() ([]byte, []int) {
return xxx_File_google_protobuf_api_proto_rawDescGZIP(), []int{2}
}
-func (m *Mixin) GetName() string {
- if m != nil {
- return m.Name
+func (x *Mixin) GetName() string {
+ if x != nil {
+ return x.Name
}
return ""
}
-func (m *Mixin) GetRoot() string {
- if m != nil {
- return m.Root
+func (x *Mixin) GetRoot() string {
+ if x != nil {
+ return x.Root
}
return ""
}
diff --git a/types/known/duration.pb.go b/types/known/duration.pb.go
index d5e1075..736c9a9 100644
--- a/types/known/duration.pb.go
+++ b/types/known/duration.pb.go
@@ -89,12 +89,19 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *Duration) ProtoReflect() protoreflect.Message {
- return xxx_File_google_protobuf_duration_proto_messageTypes[0].MessageOf(m)
+func (x *Duration) Reset() {
+ *x = Duration{}
}
-func (m *Duration) Reset() { *m = Duration{} }
-func (m *Duration) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*Duration) ProtoMessage() {}
+
+func (x *Duration) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Duration) ProtoMessage() {}
+
+func (x *Duration) ProtoReflect() protoreflect.Message {
+ return xxx_File_google_protobuf_duration_proto_messageTypes[0].MessageOf(x)
+}
// Deprecated: Use Duration.ProtoReflect.Type instead.
func (*Duration) Descriptor() ([]byte, []int) {
@@ -103,16 +110,16 @@
func (*Duration) XXX_WellKnownType() string { return "Duration" }
-func (m *Duration) GetSeconds() int64 {
- if m != nil {
- return m.Seconds
+func (x *Duration) GetSeconds() int64 {
+ if x != nil {
+ return x.Seconds
}
return 0
}
-func (m *Duration) GetNanos() int32 {
- if m != nil {
- return m.Nanos
+func (x *Duration) GetNanos() int32 {
+ if x != nil {
+ return x.Nanos
}
return 0
}
diff --git a/types/known/empty.pb.go b/types/known/empty.pb.go
index f1e89b6..db7ee9e 100644
--- a/types/known/empty.pb.go
+++ b/types/known/empty.pb.go
@@ -27,12 +27,19 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *Empty) ProtoReflect() protoreflect.Message {
- return xxx_File_google_protobuf_empty_proto_messageTypes[0].MessageOf(m)
+func (x *Empty) Reset() {
+ *x = Empty{}
}
-func (m *Empty) Reset() { *m = Empty{} }
-func (m *Empty) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*Empty) ProtoMessage() {}
+
+func (x *Empty) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Empty) ProtoMessage() {}
+
+func (x *Empty) ProtoReflect() protoreflect.Message {
+ return xxx_File_google_protobuf_empty_proto_messageTypes[0].MessageOf(x)
+}
// Deprecated: Use Empty.ProtoReflect.Type instead.
func (*Empty) Descriptor() ([]byte, []int) {
diff --git a/types/known/field_mask.pb.go b/types/known/field_mask.pb.go
index 360e583..dbeee7f 100644
--- a/types/known/field_mask.pb.go
+++ b/types/known/field_mask.pb.go
@@ -219,21 +219,28 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *FieldMask) ProtoReflect() protoreflect.Message {
- return xxx_File_google_protobuf_field_mask_proto_messageTypes[0].MessageOf(m)
+func (x *FieldMask) Reset() {
+ *x = FieldMask{}
}
-func (m *FieldMask) Reset() { *m = FieldMask{} }
-func (m *FieldMask) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*FieldMask) ProtoMessage() {}
+
+func (x *FieldMask) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*FieldMask) ProtoMessage() {}
+
+func (x *FieldMask) ProtoReflect() protoreflect.Message {
+ return xxx_File_google_protobuf_field_mask_proto_messageTypes[0].MessageOf(x)
+}
// Deprecated: Use FieldMask.ProtoReflect.Type instead.
func (*FieldMask) Descriptor() ([]byte, []int) {
return xxx_File_google_protobuf_field_mask_proto_rawDescGZIP(), []int{0}
}
-func (m *FieldMask) GetPaths() []string {
- if m != nil {
- return m.Paths
+func (x *FieldMask) GetPaths() []string {
+ if x != nil {
+ return x.Paths
}
return nil
}
diff --git a/types/known/source_context.pb.go b/types/known/source_context.pb.go
index 0202e57..9a875ee 100644
--- a/types/known/source_context.pb.go
+++ b/types/known/source_context.pb.go
@@ -23,21 +23,28 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *SourceContext) ProtoReflect() protoreflect.Message {
- return xxx_File_google_protobuf_source_context_proto_messageTypes[0].MessageOf(m)
+func (x *SourceContext) Reset() {
+ *x = SourceContext{}
}
-func (m *SourceContext) Reset() { *m = SourceContext{} }
-func (m *SourceContext) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*SourceContext) ProtoMessage() {}
+
+func (x *SourceContext) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SourceContext) ProtoMessage() {}
+
+func (x *SourceContext) ProtoReflect() protoreflect.Message {
+ return xxx_File_google_protobuf_source_context_proto_messageTypes[0].MessageOf(x)
+}
// Deprecated: Use SourceContext.ProtoReflect.Type instead.
func (*SourceContext) Descriptor() ([]byte, []int) {
return xxx_File_google_protobuf_source_context_proto_rawDescGZIP(), []int{0}
}
-func (m *SourceContext) GetFileName() string {
- if m != nil {
- return m.FileName
+func (x *SourceContext) GetFileName() string {
+ if x != nil {
+ return x.FileName
}
return ""
}
diff --git a/types/known/struct.pb.go b/types/known/struct.pb.go
index 393f59f..9d4a208 100644
--- a/types/known/struct.pb.go
+++ b/types/known/struct.pb.go
@@ -23,13 +23,6 @@
NullValue_NULL_VALUE NullValue = 0
)
-func (e NullValue) Type() protoreflect.EnumType {
- return xxx_File_google_protobuf_struct_proto_enumTypes[0]
-}
-func (e NullValue) Number() protoreflect.EnumNumber {
- return protoreflect.EnumNumber(e)
-}
-
// Deprecated: Use NullValue.Type.Values instead.
var NullValue_name = map[int32]string{
0: "NULL_VALUE",
@@ -44,6 +37,14 @@
return protoimpl.X.EnumStringOf(x.Type(), protoreflect.EnumNumber(x))
}
+func (NullValue) Type() protoreflect.EnumType {
+ return xxx_File_google_protobuf_struct_proto_enumTypes[0]
+}
+
+func (x NullValue) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
// Deprecated: Use NullValue.Type instead.
func (NullValue) EnumDescriptor() ([]byte, []int) {
return xxx_File_google_protobuf_struct_proto_rawDescGZIP(), []int{0}
@@ -67,12 +68,19 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *Struct) ProtoReflect() protoreflect.Message {
- return xxx_File_google_protobuf_struct_proto_messageTypes[0].MessageOf(m)
+func (x *Struct) Reset() {
+ *x = Struct{}
}
-func (m *Struct) Reset() { *m = Struct{} }
-func (m *Struct) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*Struct) ProtoMessage() {}
+
+func (x *Struct) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Struct) ProtoMessage() {}
+
+func (x *Struct) ProtoReflect() protoreflect.Message {
+ return xxx_File_google_protobuf_struct_proto_messageTypes[0].MessageOf(x)
+}
// Deprecated: Use Struct.ProtoReflect.Type instead.
func (*Struct) Descriptor() ([]byte, []int) {
@@ -81,9 +89,9 @@
func (*Struct) XXX_WellKnownType() string { return "Struct" }
-func (m *Struct) GetFields() map[string]*Value {
- if m != nil {
- return m.Fields
+func (x *Struct) GetFields() map[string]*Value {
+ if x != nil {
+ return x.Fields
}
return nil
}
@@ -116,12 +124,19 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *Value) ProtoReflect() protoreflect.Message {
- return xxx_File_google_protobuf_struct_proto_messageTypes[1].MessageOf(m)
+func (x *Value) Reset() {
+ *x = Value{}
}
-func (m *Value) Reset() { *m = Value{} }
-func (m *Value) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*Value) ProtoMessage() {}
+
+func (x *Value) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Value) ProtoMessage() {}
+
+func (x *Value) ProtoReflect() protoreflect.Message {
+ return xxx_File_google_protobuf_struct_proto_messageTypes[1].MessageOf(x)
+}
// Deprecated: Use Value.ProtoReflect.Type instead.
func (*Value) Descriptor() ([]byte, []int) {
@@ -177,43 +192,43 @@
return nil
}
-func (m *Value) GetNullValue() NullValue {
- if x, ok := m.GetKind().(*Value_NullValue); ok {
+func (x *Value) GetNullValue() NullValue {
+ if x, ok := x.GetKind().(*Value_NullValue); ok {
return x.NullValue
}
return NullValue_NULL_VALUE
}
-func (m *Value) GetNumberValue() float64 {
- if x, ok := m.GetKind().(*Value_NumberValue); ok {
+func (x *Value) GetNumberValue() float64 {
+ if x, ok := x.GetKind().(*Value_NumberValue); ok {
return x.NumberValue
}
return 0
}
-func (m *Value) GetStringValue() string {
- if x, ok := m.GetKind().(*Value_StringValue); ok {
+func (x *Value) GetStringValue() string {
+ if x, ok := x.GetKind().(*Value_StringValue); ok {
return x.StringValue
}
return ""
}
-func (m *Value) GetBoolValue() bool {
- if x, ok := m.GetKind().(*Value_BoolValue); ok {
+func (x *Value) GetBoolValue() bool {
+ if x, ok := x.GetKind().(*Value_BoolValue); ok {
return x.BoolValue
}
return false
}
-func (m *Value) GetStructValue() *Struct {
- if x, ok := m.GetKind().(*Value_StructValue); ok {
+func (x *Value) GetStructValue() *Struct {
+ if x, ok := x.GetKind().(*Value_StructValue); ok {
return x.StructValue
}
return nil
}
-func (m *Value) GetListValue() *ListValue {
- if x, ok := m.GetKind().(*Value_ListValue); ok {
+func (x *Value) GetListValue() *ListValue {
+ if x, ok := x.GetKind().(*Value_ListValue); ok {
return x.ListValue
}
return nil
@@ -242,12 +257,19 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *ListValue) ProtoReflect() protoreflect.Message {
- return xxx_File_google_protobuf_struct_proto_messageTypes[2].MessageOf(m)
+func (x *ListValue) Reset() {
+ *x = ListValue{}
}
-func (m *ListValue) Reset() { *m = ListValue{} }
-func (m *ListValue) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*ListValue) ProtoMessage() {}
+
+func (x *ListValue) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListValue) ProtoMessage() {}
+
+func (x *ListValue) ProtoReflect() protoreflect.Message {
+ return xxx_File_google_protobuf_struct_proto_messageTypes[2].MessageOf(x)
+}
// Deprecated: Use ListValue.ProtoReflect.Type instead.
func (*ListValue) Descriptor() ([]byte, []int) {
@@ -256,9 +278,9 @@
func (*ListValue) XXX_WellKnownType() string { return "ListValue" }
-func (m *ListValue) GetValues() []*Value {
- if m != nil {
- return m.Values
+func (x *ListValue) GetValues() []*Value {
+ if x != nil {
+ return x.Values
}
return nil
}
diff --git a/types/known/timestamp.pb.go b/types/known/timestamp.pb.go
index 7e60fde..a4a1307 100644
--- a/types/known/timestamp.pb.go
+++ b/types/known/timestamp.pb.go
@@ -109,12 +109,19 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *Timestamp) ProtoReflect() protoreflect.Message {
- return xxx_File_google_protobuf_timestamp_proto_messageTypes[0].MessageOf(m)
+func (x *Timestamp) Reset() {
+ *x = Timestamp{}
}
-func (m *Timestamp) Reset() { *m = Timestamp{} }
-func (m *Timestamp) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*Timestamp) ProtoMessage() {}
+
+func (x *Timestamp) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Timestamp) ProtoMessage() {}
+
+func (x *Timestamp) ProtoReflect() protoreflect.Message {
+ return xxx_File_google_protobuf_timestamp_proto_messageTypes[0].MessageOf(x)
+}
// Deprecated: Use Timestamp.ProtoReflect.Type instead.
func (*Timestamp) Descriptor() ([]byte, []int) {
@@ -123,16 +130,16 @@
func (*Timestamp) XXX_WellKnownType() string { return "Timestamp" }
-func (m *Timestamp) GetSeconds() int64 {
- if m != nil {
- return m.Seconds
+func (x *Timestamp) GetSeconds() int64 {
+ if x != nil {
+ return x.Seconds
}
return 0
}
-func (m *Timestamp) GetNanos() int32 {
- if m != nil {
- return m.Nanos
+func (x *Timestamp) GetNanos() int32 {
+ if x != nil {
+ return x.Nanos
}
return 0
}
diff --git a/types/known/type.pb.go b/types/known/type.pb.go
index e54b1ff..12b5617 100644
--- a/types/known/type.pb.go
+++ b/types/known/type.pb.go
@@ -22,13 +22,6 @@
Syntax_SYNTAX_PROTO3 Syntax = 1
)
-func (e Syntax) Type() protoreflect.EnumType {
- return xxx_File_google_protobuf_type_proto_enumTypes[0]
-}
-func (e Syntax) Number() protoreflect.EnumNumber {
- return protoreflect.EnumNumber(e)
-}
-
// Deprecated: Use Syntax.Type.Values instead.
var Syntax_name = map[int32]string{
0: "SYNTAX_PROTO2",
@@ -45,6 +38,14 @@
return protoimpl.X.EnumStringOf(x.Type(), protoreflect.EnumNumber(x))
}
+func (Syntax) Type() protoreflect.EnumType {
+ return xxx_File_google_protobuf_type_proto_enumTypes[0]
+}
+
+func (x Syntax) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
// Deprecated: Use Syntax.Type instead.
func (Syntax) EnumDescriptor() ([]byte, []int) {
return xxx_File_google_protobuf_type_proto_rawDescGZIP(), []int{0}
@@ -94,13 +95,6 @@
Field_TYPE_SINT64 Field_Kind = 18
)
-func (e Field_Kind) Type() protoreflect.EnumType {
- return xxx_File_google_protobuf_type_proto_enumTypes[1]
-}
-func (e Field_Kind) Number() protoreflect.EnumNumber {
- return protoreflect.EnumNumber(e)
-}
-
// Deprecated: Use Field_Kind.Type.Values instead.
var Field_Kind_name = map[int32]string{
0: "TYPE_UNKNOWN",
@@ -151,6 +145,14 @@
return protoimpl.X.EnumStringOf(x.Type(), protoreflect.EnumNumber(x))
}
+func (Field_Kind) Type() protoreflect.EnumType {
+ return xxx_File_google_protobuf_type_proto_enumTypes[1]
+}
+
+func (x Field_Kind) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
// Deprecated: Use Field_Kind.Type instead.
func (Field_Kind) EnumDescriptor() ([]byte, []int) {
return xxx_File_google_protobuf_type_proto_rawDescGZIP(), []int{1, 0}
@@ -170,13 +172,6 @@
Field_CARDINALITY_REPEATED Field_Cardinality = 3
)
-func (e Field_Cardinality) Type() protoreflect.EnumType {
- return xxx_File_google_protobuf_type_proto_enumTypes[2]
-}
-func (e Field_Cardinality) Number() protoreflect.EnumNumber {
- return protoreflect.EnumNumber(e)
-}
-
// Deprecated: Use Field_Cardinality.Type.Values instead.
var Field_Cardinality_name = map[int32]string{
0: "CARDINALITY_UNKNOWN",
@@ -197,6 +192,14 @@
return protoimpl.X.EnumStringOf(x.Type(), protoreflect.EnumNumber(x))
}
+func (Field_Cardinality) Type() protoreflect.EnumType {
+ return xxx_File_google_protobuf_type_proto_enumTypes[2]
+}
+
+func (x Field_Cardinality) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
// Deprecated: Use Field_Cardinality.Type instead.
func (Field_Cardinality) EnumDescriptor() ([]byte, []int) {
return xxx_File_google_protobuf_type_proto_rawDescGZIP(), []int{1, 1}
@@ -221,56 +224,63 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *Type) ProtoReflect() protoreflect.Message {
- return xxx_File_google_protobuf_type_proto_messageTypes[0].MessageOf(m)
+func (x *Type) Reset() {
+ *x = Type{}
}
-func (m *Type) Reset() { *m = Type{} }
-func (m *Type) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*Type) ProtoMessage() {}
+
+func (x *Type) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Type) ProtoMessage() {}
+
+func (x *Type) ProtoReflect() protoreflect.Message {
+ return xxx_File_google_protobuf_type_proto_messageTypes[0].MessageOf(x)
+}
// Deprecated: Use Type.ProtoReflect.Type instead.
func (*Type) Descriptor() ([]byte, []int) {
return xxx_File_google_protobuf_type_proto_rawDescGZIP(), []int{0}
}
-func (m *Type) GetName() string {
- if m != nil {
- return m.Name
+func (x *Type) GetName() string {
+ if x != nil {
+ return x.Name
}
return ""
}
-func (m *Type) GetFields() []*Field {
- if m != nil {
- return m.Fields
+func (x *Type) GetFields() []*Field {
+ if x != nil {
+ return x.Fields
}
return nil
}
-func (m *Type) GetOneofs() []string {
- if m != nil {
- return m.Oneofs
+func (x *Type) GetOneofs() []string {
+ if x != nil {
+ return x.Oneofs
}
return nil
}
-func (m *Type) GetOptions() []*Option {
- if m != nil {
- return m.Options
+func (x *Type) GetOptions() []*Option {
+ if x != nil {
+ return x.Options
}
return nil
}
-func (m *Type) GetSourceContext() *SourceContext {
- if m != nil {
- return m.SourceContext
+func (x *Type) GetSourceContext() *SourceContext {
+ if x != nil {
+ return x.SourceContext
}
return nil
}
-func (m *Type) GetSyntax() Syntax {
- if m != nil {
- return m.Syntax
+func (x *Type) GetSyntax() Syntax {
+ if x != nil {
+ return x.Syntax
}
return Syntax_SYNTAX_PROTO2
}
@@ -304,84 +314,91 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *Field) ProtoReflect() protoreflect.Message {
- return xxx_File_google_protobuf_type_proto_messageTypes[1].MessageOf(m)
+func (x *Field) Reset() {
+ *x = Field{}
}
-func (m *Field) Reset() { *m = Field{} }
-func (m *Field) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*Field) ProtoMessage() {}
+
+func (x *Field) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Field) ProtoMessage() {}
+
+func (x *Field) ProtoReflect() protoreflect.Message {
+ return xxx_File_google_protobuf_type_proto_messageTypes[1].MessageOf(x)
+}
// Deprecated: Use Field.ProtoReflect.Type instead.
func (*Field) Descriptor() ([]byte, []int) {
return xxx_File_google_protobuf_type_proto_rawDescGZIP(), []int{1}
}
-func (m *Field) GetKind() Field_Kind {
- if m != nil {
- return m.Kind
+func (x *Field) GetKind() Field_Kind {
+ if x != nil {
+ return x.Kind
}
return Field_TYPE_UNKNOWN
}
-func (m *Field) GetCardinality() Field_Cardinality {
- if m != nil {
- return m.Cardinality
+func (x *Field) GetCardinality() Field_Cardinality {
+ if x != nil {
+ return x.Cardinality
}
return Field_CARDINALITY_UNKNOWN
}
-func (m *Field) GetNumber() int32 {
- if m != nil {
- return m.Number
+func (x *Field) GetNumber() int32 {
+ if x != nil {
+ return x.Number
}
return 0
}
-func (m *Field) GetName() string {
- if m != nil {
- return m.Name
+func (x *Field) GetName() string {
+ if x != nil {
+ return x.Name
}
return ""
}
-func (m *Field) GetTypeUrl() string {
- if m != nil {
- return m.TypeUrl
+func (x *Field) GetTypeUrl() string {
+ if x != nil {
+ return x.TypeUrl
}
return ""
}
-func (m *Field) GetOneofIndex() int32 {
- if m != nil {
- return m.OneofIndex
+func (x *Field) GetOneofIndex() int32 {
+ if x != nil {
+ return x.OneofIndex
}
return 0
}
-func (m *Field) GetPacked() bool {
- if m != nil {
- return m.Packed
+func (x *Field) GetPacked() bool {
+ if x != nil {
+ return x.Packed
}
return false
}
-func (m *Field) GetOptions() []*Option {
- if m != nil {
- return m.Options
+func (x *Field) GetOptions() []*Option {
+ if x != nil {
+ return x.Options
}
return nil
}
-func (m *Field) GetJsonName() string {
- if m != nil {
- return m.JsonName
+func (x *Field) GetJsonName() string {
+ if x != nil {
+ return x.JsonName
}
return ""
}
-func (m *Field) GetDefaultValue() string {
- if m != nil {
- return m.DefaultValue
+func (x *Field) GetDefaultValue() string {
+ if x != nil {
+ return x.DefaultValue
}
return ""
}
@@ -403,49 +420,56 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *Enum) ProtoReflect() protoreflect.Message {
- return xxx_File_google_protobuf_type_proto_messageTypes[2].MessageOf(m)
+func (x *Enum) Reset() {
+ *x = Enum{}
}
-func (m *Enum) Reset() { *m = Enum{} }
-func (m *Enum) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*Enum) ProtoMessage() {}
+
+func (x *Enum) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Enum) ProtoMessage() {}
+
+func (x *Enum) ProtoReflect() protoreflect.Message {
+ return xxx_File_google_protobuf_type_proto_messageTypes[2].MessageOf(x)
+}
// Deprecated: Use Enum.ProtoReflect.Type instead.
func (*Enum) Descriptor() ([]byte, []int) {
return xxx_File_google_protobuf_type_proto_rawDescGZIP(), []int{2}
}
-func (m *Enum) GetName() string {
- if m != nil {
- return m.Name
+func (x *Enum) GetName() string {
+ if x != nil {
+ return x.Name
}
return ""
}
-func (m *Enum) GetEnumvalue() []*EnumValue {
- if m != nil {
- return m.Enumvalue
+func (x *Enum) GetEnumvalue() []*EnumValue {
+ if x != nil {
+ return x.Enumvalue
}
return nil
}
-func (m *Enum) GetOptions() []*Option {
- if m != nil {
- return m.Options
+func (x *Enum) GetOptions() []*Option {
+ if x != nil {
+ return x.Options
}
return nil
}
-func (m *Enum) GetSourceContext() *SourceContext {
- if m != nil {
- return m.SourceContext
+func (x *Enum) GetSourceContext() *SourceContext {
+ if x != nil {
+ return x.SourceContext
}
return nil
}
-func (m *Enum) GetSyntax() Syntax {
- if m != nil {
- return m.Syntax
+func (x *Enum) GetSyntax() Syntax {
+ if x != nil {
+ return x.Syntax
}
return Syntax_SYNTAX_PROTO2
}
@@ -463,35 +487,42 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *EnumValue) ProtoReflect() protoreflect.Message {
- return xxx_File_google_protobuf_type_proto_messageTypes[3].MessageOf(m)
+func (x *EnumValue) Reset() {
+ *x = EnumValue{}
}
-func (m *EnumValue) Reset() { *m = EnumValue{} }
-func (m *EnumValue) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*EnumValue) ProtoMessage() {}
+
+func (x *EnumValue) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*EnumValue) ProtoMessage() {}
+
+func (x *EnumValue) ProtoReflect() protoreflect.Message {
+ return xxx_File_google_protobuf_type_proto_messageTypes[3].MessageOf(x)
+}
// Deprecated: Use EnumValue.ProtoReflect.Type instead.
func (*EnumValue) Descriptor() ([]byte, []int) {
return xxx_File_google_protobuf_type_proto_rawDescGZIP(), []int{3}
}
-func (m *EnumValue) GetName() string {
- if m != nil {
- return m.Name
+func (x *EnumValue) GetName() string {
+ if x != nil {
+ return x.Name
}
return ""
}
-func (m *EnumValue) GetNumber() int32 {
- if m != nil {
- return m.Number
+func (x *EnumValue) GetNumber() int32 {
+ if x != nil {
+ return x.Number
}
return 0
}
-func (m *EnumValue) GetOptions() []*Option {
- if m != nil {
- return m.Options
+func (x *EnumValue) GetOptions() []*Option {
+ if x != nil {
+ return x.Options
}
return nil
}
@@ -514,28 +545,35 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *Option) ProtoReflect() protoreflect.Message {
- return xxx_File_google_protobuf_type_proto_messageTypes[4].MessageOf(m)
+func (x *Option) Reset() {
+ *x = Option{}
}
-func (m *Option) Reset() { *m = Option{} }
-func (m *Option) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*Option) ProtoMessage() {}
+
+func (x *Option) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Option) ProtoMessage() {}
+
+func (x *Option) ProtoReflect() protoreflect.Message {
+ return xxx_File_google_protobuf_type_proto_messageTypes[4].MessageOf(x)
+}
// Deprecated: Use Option.ProtoReflect.Type instead.
func (*Option) Descriptor() ([]byte, []int) {
return xxx_File_google_protobuf_type_proto_rawDescGZIP(), []int{4}
}
-func (m *Option) GetName() string {
- if m != nil {
- return m.Name
+func (x *Option) GetName() string {
+ if x != nil {
+ return x.Name
}
return ""
}
-func (m *Option) GetValue() *Any {
- if m != nil {
- return m.Value
+func (x *Option) GetValue() *Any {
+ if x != nil {
+ return x.Value
}
return nil
}
diff --git a/types/known/wrappers.pb.go b/types/known/wrappers.pb.go
index 0f8cd6a..08ce6d8 100644
--- a/types/known/wrappers.pb.go
+++ b/types/known/wrappers.pb.go
@@ -23,12 +23,19 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *DoubleValue) ProtoReflect() protoreflect.Message {
- return xxx_File_google_protobuf_wrappers_proto_messageTypes[0].MessageOf(m)
+func (x *DoubleValue) Reset() {
+ *x = DoubleValue{}
}
-func (m *DoubleValue) Reset() { *m = DoubleValue{} }
-func (m *DoubleValue) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*DoubleValue) ProtoMessage() {}
+
+func (x *DoubleValue) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DoubleValue) ProtoMessage() {}
+
+func (x *DoubleValue) ProtoReflect() protoreflect.Message {
+ return xxx_File_google_protobuf_wrappers_proto_messageTypes[0].MessageOf(x)
+}
// Deprecated: Use DoubleValue.ProtoReflect.Type instead.
func (*DoubleValue) Descriptor() ([]byte, []int) {
@@ -37,9 +44,9 @@
func (*DoubleValue) XXX_WellKnownType() string { return "DoubleValue" }
-func (m *DoubleValue) GetValue() float64 {
- if m != nil {
- return m.Value
+func (x *DoubleValue) GetValue() float64 {
+ if x != nil {
+ return x.Value
}
return 0
}
@@ -55,12 +62,19 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *FloatValue) ProtoReflect() protoreflect.Message {
- return xxx_File_google_protobuf_wrappers_proto_messageTypes[1].MessageOf(m)
+func (x *FloatValue) Reset() {
+ *x = FloatValue{}
}
-func (m *FloatValue) Reset() { *m = FloatValue{} }
-func (m *FloatValue) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*FloatValue) ProtoMessage() {}
+
+func (x *FloatValue) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*FloatValue) ProtoMessage() {}
+
+func (x *FloatValue) ProtoReflect() protoreflect.Message {
+ return xxx_File_google_protobuf_wrappers_proto_messageTypes[1].MessageOf(x)
+}
// Deprecated: Use FloatValue.ProtoReflect.Type instead.
func (*FloatValue) Descriptor() ([]byte, []int) {
@@ -69,9 +83,9 @@
func (*FloatValue) XXX_WellKnownType() string { return "FloatValue" }
-func (m *FloatValue) GetValue() float32 {
- if m != nil {
- return m.Value
+func (x *FloatValue) GetValue() float32 {
+ if x != nil {
+ return x.Value
}
return 0
}
@@ -87,12 +101,19 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *Int64Value) ProtoReflect() protoreflect.Message {
- return xxx_File_google_protobuf_wrappers_proto_messageTypes[2].MessageOf(m)
+func (x *Int64Value) Reset() {
+ *x = Int64Value{}
}
-func (m *Int64Value) Reset() { *m = Int64Value{} }
-func (m *Int64Value) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*Int64Value) ProtoMessage() {}
+
+func (x *Int64Value) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Int64Value) ProtoMessage() {}
+
+func (x *Int64Value) ProtoReflect() protoreflect.Message {
+ return xxx_File_google_protobuf_wrappers_proto_messageTypes[2].MessageOf(x)
+}
// Deprecated: Use Int64Value.ProtoReflect.Type instead.
func (*Int64Value) Descriptor() ([]byte, []int) {
@@ -101,9 +122,9 @@
func (*Int64Value) XXX_WellKnownType() string { return "Int64Value" }
-func (m *Int64Value) GetValue() int64 {
- if m != nil {
- return m.Value
+func (x *Int64Value) GetValue() int64 {
+ if x != nil {
+ return x.Value
}
return 0
}
@@ -119,12 +140,19 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *UInt64Value) ProtoReflect() protoreflect.Message {
- return xxx_File_google_protobuf_wrappers_proto_messageTypes[3].MessageOf(m)
+func (x *UInt64Value) Reset() {
+ *x = UInt64Value{}
}
-func (m *UInt64Value) Reset() { *m = UInt64Value{} }
-func (m *UInt64Value) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*UInt64Value) ProtoMessage() {}
+
+func (x *UInt64Value) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UInt64Value) ProtoMessage() {}
+
+func (x *UInt64Value) ProtoReflect() protoreflect.Message {
+ return xxx_File_google_protobuf_wrappers_proto_messageTypes[3].MessageOf(x)
+}
// Deprecated: Use UInt64Value.ProtoReflect.Type instead.
func (*UInt64Value) Descriptor() ([]byte, []int) {
@@ -133,9 +161,9 @@
func (*UInt64Value) XXX_WellKnownType() string { return "UInt64Value" }
-func (m *UInt64Value) GetValue() uint64 {
- if m != nil {
- return m.Value
+func (x *UInt64Value) GetValue() uint64 {
+ if x != nil {
+ return x.Value
}
return 0
}
@@ -151,12 +179,19 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *Int32Value) ProtoReflect() protoreflect.Message {
- return xxx_File_google_protobuf_wrappers_proto_messageTypes[4].MessageOf(m)
+func (x *Int32Value) Reset() {
+ *x = Int32Value{}
}
-func (m *Int32Value) Reset() { *m = Int32Value{} }
-func (m *Int32Value) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*Int32Value) ProtoMessage() {}
+
+func (x *Int32Value) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Int32Value) ProtoMessage() {}
+
+func (x *Int32Value) ProtoReflect() protoreflect.Message {
+ return xxx_File_google_protobuf_wrappers_proto_messageTypes[4].MessageOf(x)
+}
// Deprecated: Use Int32Value.ProtoReflect.Type instead.
func (*Int32Value) Descriptor() ([]byte, []int) {
@@ -165,9 +200,9 @@
func (*Int32Value) XXX_WellKnownType() string { return "Int32Value" }
-func (m *Int32Value) GetValue() int32 {
- if m != nil {
- return m.Value
+func (x *Int32Value) GetValue() int32 {
+ if x != nil {
+ return x.Value
}
return 0
}
@@ -183,12 +218,19 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *UInt32Value) ProtoReflect() protoreflect.Message {
- return xxx_File_google_protobuf_wrappers_proto_messageTypes[5].MessageOf(m)
+func (x *UInt32Value) Reset() {
+ *x = UInt32Value{}
}
-func (m *UInt32Value) Reset() { *m = UInt32Value{} }
-func (m *UInt32Value) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*UInt32Value) ProtoMessage() {}
+
+func (x *UInt32Value) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UInt32Value) ProtoMessage() {}
+
+func (x *UInt32Value) ProtoReflect() protoreflect.Message {
+ return xxx_File_google_protobuf_wrappers_proto_messageTypes[5].MessageOf(x)
+}
// Deprecated: Use UInt32Value.ProtoReflect.Type instead.
func (*UInt32Value) Descriptor() ([]byte, []int) {
@@ -197,9 +239,9 @@
func (*UInt32Value) XXX_WellKnownType() string { return "UInt32Value" }
-func (m *UInt32Value) GetValue() uint32 {
- if m != nil {
- return m.Value
+func (x *UInt32Value) GetValue() uint32 {
+ if x != nil {
+ return x.Value
}
return 0
}
@@ -215,12 +257,19 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *BoolValue) ProtoReflect() protoreflect.Message {
- return xxx_File_google_protobuf_wrappers_proto_messageTypes[6].MessageOf(m)
+func (x *BoolValue) Reset() {
+ *x = BoolValue{}
}
-func (m *BoolValue) Reset() { *m = BoolValue{} }
-func (m *BoolValue) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*BoolValue) ProtoMessage() {}
+
+func (x *BoolValue) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*BoolValue) ProtoMessage() {}
+
+func (x *BoolValue) ProtoReflect() protoreflect.Message {
+ return xxx_File_google_protobuf_wrappers_proto_messageTypes[6].MessageOf(x)
+}
// Deprecated: Use BoolValue.ProtoReflect.Type instead.
func (*BoolValue) Descriptor() ([]byte, []int) {
@@ -229,9 +278,9 @@
func (*BoolValue) XXX_WellKnownType() string { return "BoolValue" }
-func (m *BoolValue) GetValue() bool {
- if m != nil {
- return m.Value
+func (x *BoolValue) GetValue() bool {
+ if x != nil {
+ return x.Value
}
return false
}
@@ -247,12 +296,19 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *StringValue) ProtoReflect() protoreflect.Message {
- return xxx_File_google_protobuf_wrappers_proto_messageTypes[7].MessageOf(m)
+func (x *StringValue) Reset() {
+ *x = StringValue{}
}
-func (m *StringValue) Reset() { *m = StringValue{} }
-func (m *StringValue) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*StringValue) ProtoMessage() {}
+
+func (x *StringValue) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*StringValue) ProtoMessage() {}
+
+func (x *StringValue) ProtoReflect() protoreflect.Message {
+ return xxx_File_google_protobuf_wrappers_proto_messageTypes[7].MessageOf(x)
+}
// Deprecated: Use StringValue.ProtoReflect.Type instead.
func (*StringValue) Descriptor() ([]byte, []int) {
@@ -261,9 +317,9 @@
func (*StringValue) XXX_WellKnownType() string { return "StringValue" }
-func (m *StringValue) GetValue() string {
- if m != nil {
- return m.Value
+func (x *StringValue) GetValue() string {
+ if x != nil {
+ return x.Value
}
return ""
}
@@ -279,12 +335,19 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *BytesValue) ProtoReflect() protoreflect.Message {
- return xxx_File_google_protobuf_wrappers_proto_messageTypes[8].MessageOf(m)
+func (x *BytesValue) Reset() {
+ *x = BytesValue{}
}
-func (m *BytesValue) Reset() { *m = BytesValue{} }
-func (m *BytesValue) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*BytesValue) ProtoMessage() {}
+
+func (x *BytesValue) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*BytesValue) ProtoMessage() {}
+
+func (x *BytesValue) ProtoReflect() protoreflect.Message {
+ return xxx_File_google_protobuf_wrappers_proto_messageTypes[8].MessageOf(x)
+}
// Deprecated: Use BytesValue.ProtoReflect.Type instead.
func (*BytesValue) Descriptor() ([]byte, []int) {
@@ -293,9 +356,9 @@
func (*BytesValue) XXX_WellKnownType() string { return "BytesValue" }
-func (m *BytesValue) GetValue() []byte {
- if m != nil {
- return m.Value
+func (x *BytesValue) GetValue() []byte {
+ if x != nil {
+ return x.Value
}
return nil
}
diff --git a/types/plugin/plugin.pb.go b/types/plugin/plugin.pb.go
index 8883197..639634c 100644
--- a/types/plugin/plugin.pb.go
+++ b/types/plugin/plugin.pb.go
@@ -26,42 +26,49 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *Version) ProtoReflect() protoreflect.Message {
- return xxx_File_google_protobuf_compiler_plugin_proto_messageTypes[0].MessageOf(m)
+func (x *Version) Reset() {
+ *x = Version{}
}
-func (m *Version) Reset() { *m = Version{} }
-func (m *Version) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*Version) ProtoMessage() {}
+
+func (x *Version) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Version) ProtoMessage() {}
+
+func (x *Version) ProtoReflect() protoreflect.Message {
+ return xxx_File_google_protobuf_compiler_plugin_proto_messageTypes[0].MessageOf(x)
+}
// Deprecated: Use Version.ProtoReflect.Type instead.
func (*Version) Descriptor() ([]byte, []int) {
return xxx_File_google_protobuf_compiler_plugin_proto_rawDescGZIP(), []int{0}
}
-func (m *Version) GetMajor() int32 {
- if m != nil && m.Major != nil {
- return *m.Major
+func (x *Version) GetMajor() int32 {
+ if x != nil && x.Major != nil {
+ return *x.Major
}
return 0
}
-func (m *Version) GetMinor() int32 {
- if m != nil && m.Minor != nil {
- return *m.Minor
+func (x *Version) GetMinor() int32 {
+ if x != nil && x.Minor != nil {
+ return *x.Minor
}
return 0
}
-func (m *Version) GetPatch() int32 {
- if m != nil && m.Patch != nil {
- return *m.Patch
+func (x *Version) GetPatch() int32 {
+ if x != nil && x.Patch != nil {
+ return *x.Patch
}
return 0
}
-func (m *Version) GetSuffix() string {
- if m != nil && m.Suffix != nil {
- return *m.Suffix
+func (x *Version) GetSuffix() string {
+ if x != nil && x.Suffix != nil {
+ return *x.Suffix
}
return ""
}
@@ -96,42 +103,49 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *CodeGeneratorRequest) ProtoReflect() protoreflect.Message {
- return xxx_File_google_protobuf_compiler_plugin_proto_messageTypes[1].MessageOf(m)
+func (x *CodeGeneratorRequest) Reset() {
+ *x = CodeGeneratorRequest{}
}
-func (m *CodeGeneratorRequest) Reset() { *m = CodeGeneratorRequest{} }
-func (m *CodeGeneratorRequest) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*CodeGeneratorRequest) ProtoMessage() {}
+
+func (x *CodeGeneratorRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CodeGeneratorRequest) ProtoMessage() {}
+
+func (x *CodeGeneratorRequest) ProtoReflect() protoreflect.Message {
+ return xxx_File_google_protobuf_compiler_plugin_proto_messageTypes[1].MessageOf(x)
+}
// Deprecated: Use CodeGeneratorRequest.ProtoReflect.Type instead.
func (*CodeGeneratorRequest) Descriptor() ([]byte, []int) {
return xxx_File_google_protobuf_compiler_plugin_proto_rawDescGZIP(), []int{1}
}
-func (m *CodeGeneratorRequest) GetFileToGenerate() []string {
- if m != nil {
- return m.FileToGenerate
+func (x *CodeGeneratorRequest) GetFileToGenerate() []string {
+ if x != nil {
+ return x.FileToGenerate
}
return nil
}
-func (m *CodeGeneratorRequest) GetParameter() string {
- if m != nil && m.Parameter != nil {
- return *m.Parameter
+func (x *CodeGeneratorRequest) GetParameter() string {
+ if x != nil && x.Parameter != nil {
+ return *x.Parameter
}
return ""
}
-func (m *CodeGeneratorRequest) GetProtoFile() []*descriptor.FileDescriptorProto {
- if m != nil {
- return m.ProtoFile
+func (x *CodeGeneratorRequest) GetProtoFile() []*descriptor.FileDescriptorProto {
+ if x != nil {
+ return x.ProtoFile
}
return nil
}
-func (m *CodeGeneratorRequest) GetCompilerVersion() *Version {
- if m != nil {
- return m.CompilerVersion
+func (x *CodeGeneratorRequest) GetCompilerVersion() *Version {
+ if x != nil {
+ return x.CompilerVersion
}
return nil
}
@@ -153,28 +167,35 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *CodeGeneratorResponse) ProtoReflect() protoreflect.Message {
- return xxx_File_google_protobuf_compiler_plugin_proto_messageTypes[2].MessageOf(m)
+func (x *CodeGeneratorResponse) Reset() {
+ *x = CodeGeneratorResponse{}
}
-func (m *CodeGeneratorResponse) Reset() { *m = CodeGeneratorResponse{} }
-func (m *CodeGeneratorResponse) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*CodeGeneratorResponse) ProtoMessage() {}
+
+func (x *CodeGeneratorResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CodeGeneratorResponse) ProtoMessage() {}
+
+func (x *CodeGeneratorResponse) ProtoReflect() protoreflect.Message {
+ return xxx_File_google_protobuf_compiler_plugin_proto_messageTypes[2].MessageOf(x)
+}
// Deprecated: Use CodeGeneratorResponse.ProtoReflect.Type instead.
func (*CodeGeneratorResponse) Descriptor() ([]byte, []int) {
return xxx_File_google_protobuf_compiler_plugin_proto_rawDescGZIP(), []int{2}
}
-func (m *CodeGeneratorResponse) GetError() string {
- if m != nil && m.Error != nil {
- return *m.Error
+func (x *CodeGeneratorResponse) GetError() string {
+ if x != nil && x.Error != nil {
+ return *x.Error
}
return ""
}
-func (m *CodeGeneratorResponse) GetFile() []*CodeGeneratorResponse_File {
- if m != nil {
- return m.File
+func (x *CodeGeneratorResponse) GetFile() []*CodeGeneratorResponse_File {
+ if x != nil {
+ return x.File
}
return nil
}
@@ -238,35 +259,42 @@
XXX_sizecache int32 `json:"-"`
}
-func (m *CodeGeneratorResponse_File) ProtoReflect() protoreflect.Message {
- return xxx_File_google_protobuf_compiler_plugin_proto_messageTypes[3].MessageOf(m)
+func (x *CodeGeneratorResponse_File) Reset() {
+ *x = CodeGeneratorResponse_File{}
}
-func (m *CodeGeneratorResponse_File) Reset() { *m = CodeGeneratorResponse_File{} }
-func (m *CodeGeneratorResponse_File) String() string { return protoimpl.X.MessageStringOf(m) }
-func (*CodeGeneratorResponse_File) ProtoMessage() {}
+
+func (x *CodeGeneratorResponse_File) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CodeGeneratorResponse_File) ProtoMessage() {}
+
+func (x *CodeGeneratorResponse_File) ProtoReflect() protoreflect.Message {
+ return xxx_File_google_protobuf_compiler_plugin_proto_messageTypes[3].MessageOf(x)
+}
// Deprecated: Use CodeGeneratorResponse_File.ProtoReflect.Type instead.
func (*CodeGeneratorResponse_File) Descriptor() ([]byte, []int) {
return xxx_File_google_protobuf_compiler_plugin_proto_rawDescGZIP(), []int{2, 0}
}
-func (m *CodeGeneratorResponse_File) GetName() string {
- if m != nil && m.Name != nil {
- return *m.Name
+func (x *CodeGeneratorResponse_File) GetName() string {
+ if x != nil && x.Name != nil {
+ return *x.Name
}
return ""
}
-func (m *CodeGeneratorResponse_File) GetInsertionPoint() string {
- if m != nil && m.InsertionPoint != nil {
- return *m.InsertionPoint
+func (x *CodeGeneratorResponse_File) GetInsertionPoint() string {
+ if x != nil && x.InsertionPoint != nil {
+ return *x.InsertionPoint
}
return ""
}
-func (m *CodeGeneratorResponse_File) GetContent() string {
- if m != nil && m.Content != nil {
- return *m.Content
+func (x *CodeGeneratorResponse_File) GetContent() string {
+ if x != nil && x.Content != nil {
+ return *x.Content
}
return ""
}