cmd/protoc-gen-go: used named types for special fields
Using a named fields gives us the flexibility to change the underlying
representation of special fields without needing to regenerate user code.
We add a named type for ExtensionFields, UnknownFields, and SizeCache.
Change-Id: I107cf82899850ea76665310ce79def60f0f7ab97
Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/172402
Reviewed-by: Damien Neil <dneil@google.com>
diff --git a/encoding/testprotos/pb2/test.pb.go b/encoding/testprotos/pb2/test.pb.go
index eda6866..f5b9f40 100644
--- a/encoding/testprotos/pb2/test.pb.go
+++ b/encoding/testprotos/pb2/test.pb.go
@@ -126,24 +126,24 @@
// Scalars contains optional scalar fields.
type Scalars struct {
- OptBool *bool `protobuf:"varint,1,opt,name=opt_bool,json=optBool" json:"opt_bool,omitempty"`
- OptInt32 *int32 `protobuf:"varint,2,opt,name=opt_int32,json=optInt32" json:"opt_int32,omitempty"`
- OptInt64 *int64 `protobuf:"varint,3,opt,name=opt_int64,json=optInt64" json:"opt_int64,omitempty"`
- OptUint32 *uint32 `protobuf:"varint,4,opt,name=opt_uint32,json=optUint32" json:"opt_uint32,omitempty"`
- OptUint64 *uint64 `protobuf:"varint,5,opt,name=opt_uint64,json=optUint64" json:"opt_uint64,omitempty"`
- OptSint32 *int32 `protobuf:"zigzag32,6,opt,name=opt_sint32,json=optSint32" json:"opt_sint32,omitempty"`
- OptSint64 *int64 `protobuf:"zigzag64,7,opt,name=opt_sint64,json=optSint64" json:"opt_sint64,omitempty"`
- OptFixed32 *uint32 `protobuf:"fixed32,8,opt,name=opt_fixed32,json=optFixed32" json:"opt_fixed32,omitempty"`
- OptFixed64 *uint64 `protobuf:"fixed64,9,opt,name=opt_fixed64,json=optFixed64" json:"opt_fixed64,omitempty"`
- OptSfixed32 *int32 `protobuf:"fixed32,10,opt,name=opt_sfixed32,json=optSfixed32" json:"opt_sfixed32,omitempty"`
- OptSfixed64 *int64 `protobuf:"fixed64,11,opt,name=opt_sfixed64,json=optSfixed64" json:"opt_sfixed64,omitempty"`
- OptFloat *float32 `protobuf:"fixed32,20,opt,name=opt_float,json=optFloat" json:"opt_float,omitempty"`
- OptDouble *float64 `protobuf:"fixed64,21,opt,name=opt_double,json=optDouble" json:"opt_double,omitempty"`
- OptBytes []byte `protobuf:"bytes,14,opt,name=opt_bytes,json=optBytes" json:"opt_bytes,omitempty"`
- OptString *string `protobuf:"bytes,13,opt,name=opt_string,json=optString" json:"opt_string,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ OptBool *bool `protobuf:"varint,1,opt,name=opt_bool,json=optBool" json:"opt_bool,omitempty"`
+ OptInt32 *int32 `protobuf:"varint,2,opt,name=opt_int32,json=optInt32" json:"opt_int32,omitempty"`
+ OptInt64 *int64 `protobuf:"varint,3,opt,name=opt_int64,json=optInt64" json:"opt_int64,omitempty"`
+ OptUint32 *uint32 `protobuf:"varint,4,opt,name=opt_uint32,json=optUint32" json:"opt_uint32,omitempty"`
+ OptUint64 *uint64 `protobuf:"varint,5,opt,name=opt_uint64,json=optUint64" json:"opt_uint64,omitempty"`
+ OptSint32 *int32 `protobuf:"zigzag32,6,opt,name=opt_sint32,json=optSint32" json:"opt_sint32,omitempty"`
+ OptSint64 *int64 `protobuf:"zigzag64,7,opt,name=opt_sint64,json=optSint64" json:"opt_sint64,omitempty"`
+ OptFixed32 *uint32 `protobuf:"fixed32,8,opt,name=opt_fixed32,json=optFixed32" json:"opt_fixed32,omitempty"`
+ OptFixed64 *uint64 `protobuf:"fixed64,9,opt,name=opt_fixed64,json=optFixed64" json:"opt_fixed64,omitempty"`
+ OptSfixed32 *int32 `protobuf:"fixed32,10,opt,name=opt_sfixed32,json=optSfixed32" json:"opt_sfixed32,omitempty"`
+ OptSfixed64 *int64 `protobuf:"fixed64,11,opt,name=opt_sfixed64,json=optSfixed64" json:"opt_sfixed64,omitempty"`
+ OptFloat *float32 `protobuf:"fixed32,20,opt,name=opt_float,json=optFloat" json:"opt_float,omitempty"`
+ OptDouble *float64 `protobuf:"fixed64,21,opt,name=opt_double,json=optDouble" json:"opt_double,omitempty"`
+ OptBytes []byte `protobuf:"bytes,14,opt,name=opt_bytes,json=optBytes" json:"opt_bytes,omitempty"`
+ OptString *string `protobuf:"bytes,13,opt,name=opt_string,json=optString" json:"opt_string,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized protoimpl.UnknownFields `json:"-"`
+ XXX_sizecache protoimpl.SizeCache `json:"-"`
}
func (x *Scalars) Reset() {
@@ -276,13 +276,13 @@
// Message contains enum fields.
type Enums struct {
- OptEnum *Enum `protobuf:"varint,1,opt,name=opt_enum,json=optEnum,enum=pb2.Enum" json:"opt_enum,omitempty"`
- RptEnum []Enum `protobuf:"varint,2,rep,name=rpt_enum,json=rptEnum,enum=pb2.Enum" json:"rpt_enum,omitempty"`
- OptNestedEnum *Enums_NestedEnum `protobuf:"varint,3,opt,name=opt_nested_enum,json=optNestedEnum,enum=pb2.Enums_NestedEnum" json:"opt_nested_enum,omitempty"`
- RptNestedEnum []Enums_NestedEnum `protobuf:"varint,4,rep,name=rpt_nested_enum,json=rptNestedEnum,enum=pb2.Enums_NestedEnum" json:"rpt_nested_enum,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ OptEnum *Enum `protobuf:"varint,1,opt,name=opt_enum,json=optEnum,enum=pb2.Enum" json:"opt_enum,omitempty"`
+ RptEnum []Enum `protobuf:"varint,2,rep,name=rpt_enum,json=rptEnum,enum=pb2.Enum" json:"rpt_enum,omitempty"`
+ OptNestedEnum *Enums_NestedEnum `protobuf:"varint,3,opt,name=opt_nested_enum,json=optNestedEnum,enum=pb2.Enums_NestedEnum" json:"opt_nested_enum,omitempty"`
+ RptNestedEnum []Enums_NestedEnum `protobuf:"varint,4,rep,name=rpt_nested_enum,json=rptNestedEnum,enum=pb2.Enums_NestedEnum" json:"rpt_nested_enum,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized protoimpl.UnknownFields `json:"-"`
+ XXX_sizecache protoimpl.SizeCache `json:"-"`
}
func (x *Enums) Reset() {
@@ -338,18 +338,18 @@
// Message contains repeated fields.
type Repeats struct {
- RptBool []bool `protobuf:"varint,1,rep,name=rpt_bool,json=rptBool" json:"rpt_bool,omitempty"`
- RptInt32 []int32 `protobuf:"varint,2,rep,name=rpt_int32,json=rptInt32" json:"rpt_int32,omitempty"`
- RptInt64 []int64 `protobuf:"varint,3,rep,name=rpt_int64,json=rptInt64" json:"rpt_int64,omitempty"`
- RptUint32 []uint32 `protobuf:"varint,4,rep,name=rpt_uint32,json=rptUint32" json:"rpt_uint32,omitempty"`
- RptUint64 []uint64 `protobuf:"varint,5,rep,name=rpt_uint64,json=rptUint64" json:"rpt_uint64,omitempty"`
- RptFloat []float32 `protobuf:"fixed32,6,rep,name=rpt_float,json=rptFloat" json:"rpt_float,omitempty"`
- RptDouble []float64 `protobuf:"fixed64,7,rep,name=rpt_double,json=rptDouble" json:"rpt_double,omitempty"`
- RptString []string `protobuf:"bytes,8,rep,name=rpt_string,json=rptString" json:"rpt_string,omitempty"`
- RptBytes [][]byte `protobuf:"bytes,9,rep,name=rpt_bytes,json=rptBytes" json:"rpt_bytes,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ RptBool []bool `protobuf:"varint,1,rep,name=rpt_bool,json=rptBool" json:"rpt_bool,omitempty"`
+ RptInt32 []int32 `protobuf:"varint,2,rep,name=rpt_int32,json=rptInt32" json:"rpt_int32,omitempty"`
+ RptInt64 []int64 `protobuf:"varint,3,rep,name=rpt_int64,json=rptInt64" json:"rpt_int64,omitempty"`
+ RptUint32 []uint32 `protobuf:"varint,4,rep,name=rpt_uint32,json=rptUint32" json:"rpt_uint32,omitempty"`
+ RptUint64 []uint64 `protobuf:"varint,5,rep,name=rpt_uint64,json=rptUint64" json:"rpt_uint64,omitempty"`
+ RptFloat []float32 `protobuf:"fixed32,6,rep,name=rpt_float,json=rptFloat" json:"rpt_float,omitempty"`
+ RptDouble []float64 `protobuf:"fixed64,7,rep,name=rpt_double,json=rptDouble" json:"rpt_double,omitempty"`
+ RptString []string `protobuf:"bytes,8,rep,name=rpt_string,json=rptString" json:"rpt_string,omitempty"`
+ RptBytes [][]byte `protobuf:"bytes,9,rep,name=rpt_bytes,json=rptBytes" json:"rpt_bytes,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized protoimpl.UnknownFields `json:"-"`
+ XXX_sizecache protoimpl.SizeCache `json:"-"`
}
func (x *Repeats) Reset() {
@@ -440,11 +440,11 @@
// Message type used as submessage.
type Nested struct {
- OptString *string `protobuf:"bytes,1,opt,name=opt_string,json=optString" json:"opt_string,omitempty"`
- OptNested *Nested `protobuf:"bytes,2,opt,name=opt_nested,json=optNested" json:"opt_nested,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ OptString *string `protobuf:"bytes,1,opt,name=opt_string,json=optString" json:"opt_string,omitempty"`
+ OptNested *Nested `protobuf:"bytes,2,opt,name=opt_nested,json=optNested" json:"opt_nested,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized protoimpl.UnknownFields `json:"-"`
+ XXX_sizecache protoimpl.SizeCache `json:"-"`
}
func (x *Nested) Reset() {
@@ -486,13 +486,13 @@
// Message contains message and group fields.
type Nests struct {
- OptNested *Nested `protobuf:"bytes,1,opt,name=opt_nested,json=optNested" json:"opt_nested,omitempty"`
- Optgroup *Nests_OptGroup `protobuf:"group,2,opt,name=OptGroup,json=optgroup" json:"optgroup,omitempty"`
- RptNested []*Nested `protobuf:"bytes,4,rep,name=rpt_nested,json=rptNested" json:"rpt_nested,omitempty"`
- Rptgroup []*Nests_RptGroup `protobuf:"group,5,rep,name=RptGroup,json=rptgroup" json:"rptgroup,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ OptNested *Nested `protobuf:"bytes,1,opt,name=opt_nested,json=optNested" json:"opt_nested,omitempty"`
+ Optgroup *Nests_OptGroup `protobuf:"group,2,opt,name=OptGroup,json=optgroup" json:"optgroup,omitempty"`
+ RptNested []*Nested `protobuf:"bytes,4,rep,name=rpt_nested,json=rptNested" json:"rpt_nested,omitempty"`
+ Rptgroup []*Nests_RptGroup `protobuf:"group,5,rep,name=RptGroup,json=rptgroup" json:"rptgroup,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized protoimpl.UnknownFields `json:"-"`
+ XXX_sizecache protoimpl.SizeCache `json:"-"`
}
func (x *Nests) Reset() {
@@ -548,15 +548,15 @@
// Message contains required fields.
type Requireds struct {
- ReqBool *bool `protobuf:"varint,1,req,name=req_bool,json=reqBool" json:"req_bool,omitempty"`
- ReqSfixed64 *int64 `protobuf:"fixed64,2,req,name=req_sfixed64,json=reqSfixed64" json:"req_sfixed64,omitempty"`
- ReqDouble *float64 `protobuf:"fixed64,3,req,name=req_double,json=reqDouble" json:"req_double,omitempty"`
- ReqString *string `protobuf:"bytes,4,req,name=req_string,json=reqString" json:"req_string,omitempty"`
- ReqEnum *Enum `protobuf:"varint,5,req,name=req_enum,json=reqEnum,enum=pb2.Enum" json:"req_enum,omitempty"`
- ReqNested *Nested `protobuf:"bytes,6,req,name=req_nested,json=reqNested" json:"req_nested,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ ReqBool *bool `protobuf:"varint,1,req,name=req_bool,json=reqBool" json:"req_bool,omitempty"`
+ ReqSfixed64 *int64 `protobuf:"fixed64,2,req,name=req_sfixed64,json=reqSfixed64" json:"req_sfixed64,omitempty"`
+ ReqDouble *float64 `protobuf:"fixed64,3,req,name=req_double,json=reqDouble" json:"req_double,omitempty"`
+ ReqString *string `protobuf:"bytes,4,req,name=req_string,json=reqString" json:"req_string,omitempty"`
+ ReqEnum *Enum `protobuf:"varint,5,req,name=req_enum,json=reqEnum,enum=pb2.Enum" json:"req_enum,omitempty"`
+ ReqNested *Nested `protobuf:"bytes,6,req,name=req_nested,json=reqNested" json:"req_nested,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized protoimpl.UnknownFields `json:"-"`
+ XXX_sizecache protoimpl.SizeCache `json:"-"`
}
func (x *Requireds) Reset() {
@@ -626,11 +626,11 @@
// Message contains both required and optional fields.
type PartialRequired struct {
- ReqString *string `protobuf:"bytes,1,req,name=req_string,json=reqString" json:"req_string,omitempty"`
- OptString *string `protobuf:"bytes,2,opt,name=opt_string,json=optString" json:"opt_string,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ ReqString *string `protobuf:"bytes,1,req,name=req_string,json=reqString" json:"req_string,omitempty"`
+ OptString *string `protobuf:"bytes,2,opt,name=opt_string,json=optString" json:"opt_string,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized protoimpl.UnknownFields `json:"-"`
+ XXX_sizecache protoimpl.SizeCache `json:"-"`
}
func (x *PartialRequired) Reset() {
@@ -671,10 +671,10 @@
}
type NestedWithRequired struct {
- ReqString *string `protobuf:"bytes,1,req,name=req_string,json=reqString" json:"req_string,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ ReqString *string `protobuf:"bytes,1,req,name=req_string,json=reqString" json:"req_string,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized protoimpl.UnknownFields `json:"-"`
+ XXX_sizecache protoimpl.SizeCache `json:"-"`
}
func (x *NestedWithRequired) Reset() {
@@ -715,8 +715,8 @@
// *IndirectRequired_OneofNested
Union isIndirectRequired_Union `protobuf_oneof:"union"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ XXX_unrecognized protoimpl.UnknownFields `json:"-"`
+ XXX_sizecache protoimpl.SizeCache `json:"-"`
}
func (x *IndirectRequired) Reset() {
@@ -795,13 +795,13 @@
func (*IndirectRequired_OneofNested) isIndirectRequired_Union() {}
type Extensions struct {
- OptString *string `protobuf:"bytes,1,opt,name=opt_string,json=optString" json:"opt_string,omitempty"`
- OptBool *bool `protobuf:"varint,101,opt,name=opt_bool,json=optBool" json:"opt_bool,omitempty"`
- OptInt32 *int32 `protobuf:"varint,2,opt,name=opt_int32,json=optInt32" json:"opt_int32,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_InternalExtensions protoimpl.ExtensionFieldsV1 `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ OptString *string `protobuf:"bytes,1,opt,name=opt_string,json=optString" json:"opt_string,omitempty"`
+ OptBool *bool `protobuf:"varint,101,opt,name=opt_bool,json=optBool" json:"opt_bool,omitempty"`
+ OptInt32 *int32 `protobuf:"varint,2,opt,name=opt_int32,json=optInt32" json:"opt_int32,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_InternalExtensions protoimpl.ExtensionFields `json:"-"`
+ XXX_unrecognized protoimpl.UnknownFields `json:"-"`
+ XXX_sizecache protoimpl.SizeCache `json:"-"`
}
func (x *Extensions) Reset() {
@@ -858,9 +858,9 @@
}
type ExtensionsContainer struct {
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized protoimpl.UnknownFields `json:"-"`
+ XXX_sizecache protoimpl.SizeCache `json:"-"`
}
func (x *ExtensionsContainer) Reset() {
@@ -887,10 +887,10 @@
}
type MessageSet struct {
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_InternalExtensions protoimpl.ExtensionFieldsV1 `protobuf_messageset:"1" json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_InternalExtensions protoimpl.ExtensionFields `protobuf_messageset:"1" json:"-"`
+ XXX_unrecognized protoimpl.UnknownFields `json:"-"`
+ XXX_sizecache protoimpl.SizeCache `json:"-"`
}
func (x *MessageSet) Reset() {
@@ -926,10 +926,10 @@
}
type MessageSetExtension struct {
- OptString *string `protobuf:"bytes,1,opt,name=opt_string,json=optString" json:"opt_string,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ OptString *string `protobuf:"bytes,1,opt,name=opt_string,json=optString" json:"opt_string,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized protoimpl.UnknownFields `json:"-"`
+ XXX_sizecache protoimpl.SizeCache `json:"-"`
}
func (x *MessageSetExtension) Reset() {
@@ -963,10 +963,10 @@
}
type FakeMessageSet struct {
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_InternalExtensions protoimpl.ExtensionFieldsV1 `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_InternalExtensions protoimpl.ExtensionFields `json:"-"`
+ XXX_unrecognized protoimpl.UnknownFields `json:"-"`
+ XXX_sizecache protoimpl.SizeCache `json:"-"`
}
func (x *FakeMessageSet) Reset() {
@@ -1002,10 +1002,10 @@
}
type FakeMessageSetExtension struct {
- OptString *string `protobuf:"bytes,1,opt,name=opt_string,json=optString" json:"opt_string,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ OptString *string `protobuf:"bytes,1,opt,name=opt_string,json=optString" json:"opt_string,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized protoimpl.UnknownFields `json:"-"`
+ XXX_sizecache protoimpl.SizeCache `json:"-"`
}
func (x *FakeMessageSetExtension) Reset() {
@@ -1040,27 +1040,27 @@
// Message contains well-known type fields.
type KnownTypes struct {
- OptBool *known.BoolValue `protobuf:"bytes,1,opt,name=opt_bool,json=optBool" json:"opt_bool,omitempty"`
- OptInt32 *known.Int32Value `protobuf:"bytes,2,opt,name=opt_int32,json=optInt32" json:"opt_int32,omitempty"`
- OptInt64 *known.Int64Value `protobuf:"bytes,3,opt,name=opt_int64,json=optInt64" json:"opt_int64,omitempty"`
- OptUint32 *known.UInt32Value `protobuf:"bytes,4,opt,name=opt_uint32,json=optUint32" json:"opt_uint32,omitempty"`
- OptUint64 *known.UInt64Value `protobuf:"bytes,5,opt,name=opt_uint64,json=optUint64" json:"opt_uint64,omitempty"`
- OptFloat *known.FloatValue `protobuf:"bytes,6,opt,name=opt_float,json=optFloat" json:"opt_float,omitempty"`
- OptDouble *known.DoubleValue `protobuf:"bytes,7,opt,name=opt_double,json=optDouble" json:"opt_double,omitempty"`
- OptString *known.StringValue `protobuf:"bytes,8,opt,name=opt_string,json=optString" json:"opt_string,omitempty"`
- OptBytes *known.BytesValue `protobuf:"bytes,9,opt,name=opt_bytes,json=optBytes" json:"opt_bytes,omitempty"`
- OptDuration *known.Duration `protobuf:"bytes,20,opt,name=opt_duration,json=optDuration" json:"opt_duration,omitempty"`
- OptTimestamp *known.Timestamp `protobuf:"bytes,21,opt,name=opt_timestamp,json=optTimestamp" json:"opt_timestamp,omitempty"`
- OptStruct *known.Struct `protobuf:"bytes,25,opt,name=opt_struct,json=optStruct" json:"opt_struct,omitempty"`
- OptList *known.ListValue `protobuf:"bytes,26,opt,name=opt_list,json=optList" json:"opt_list,omitempty"`
- OptValue *known.Value `protobuf:"bytes,27,opt,name=opt_value,json=optValue" json:"opt_value,omitempty"`
- OptNull *known.NullValue `protobuf:"varint,28,opt,name=opt_null,json=optNull,enum=google.protobuf.NullValue" json:"opt_null,omitempty"`
- OptEmpty *known.Empty `protobuf:"bytes,30,opt,name=opt_empty,json=optEmpty" json:"opt_empty,omitempty"`
- OptAny *known.Any `protobuf:"bytes,32,opt,name=opt_any,json=optAny" json:"opt_any,omitempty"`
- OptFieldmask *known.FieldMask `protobuf:"bytes,40,opt,name=opt_fieldmask,json=optFieldmask" json:"opt_fieldmask,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ OptBool *known.BoolValue `protobuf:"bytes,1,opt,name=opt_bool,json=optBool" json:"opt_bool,omitempty"`
+ OptInt32 *known.Int32Value `protobuf:"bytes,2,opt,name=opt_int32,json=optInt32" json:"opt_int32,omitempty"`
+ OptInt64 *known.Int64Value `protobuf:"bytes,3,opt,name=opt_int64,json=optInt64" json:"opt_int64,omitempty"`
+ OptUint32 *known.UInt32Value `protobuf:"bytes,4,opt,name=opt_uint32,json=optUint32" json:"opt_uint32,omitempty"`
+ OptUint64 *known.UInt64Value `protobuf:"bytes,5,opt,name=opt_uint64,json=optUint64" json:"opt_uint64,omitempty"`
+ OptFloat *known.FloatValue `protobuf:"bytes,6,opt,name=opt_float,json=optFloat" json:"opt_float,omitempty"`
+ OptDouble *known.DoubleValue `protobuf:"bytes,7,opt,name=opt_double,json=optDouble" json:"opt_double,omitempty"`
+ OptString *known.StringValue `protobuf:"bytes,8,opt,name=opt_string,json=optString" json:"opt_string,omitempty"`
+ OptBytes *known.BytesValue `protobuf:"bytes,9,opt,name=opt_bytes,json=optBytes" json:"opt_bytes,omitempty"`
+ OptDuration *known.Duration `protobuf:"bytes,20,opt,name=opt_duration,json=optDuration" json:"opt_duration,omitempty"`
+ OptTimestamp *known.Timestamp `protobuf:"bytes,21,opt,name=opt_timestamp,json=optTimestamp" json:"opt_timestamp,omitempty"`
+ OptStruct *known.Struct `protobuf:"bytes,25,opt,name=opt_struct,json=optStruct" json:"opt_struct,omitempty"`
+ OptList *known.ListValue `protobuf:"bytes,26,opt,name=opt_list,json=optList" json:"opt_list,omitempty"`
+ OptValue *known.Value `protobuf:"bytes,27,opt,name=opt_value,json=optValue" json:"opt_value,omitempty"`
+ OptNull *known.NullValue `protobuf:"varint,28,opt,name=opt_null,json=optNull,enum=google.protobuf.NullValue" json:"opt_null,omitempty"`
+ OptEmpty *known.Empty `protobuf:"bytes,30,opt,name=opt_empty,json=optEmpty" json:"opt_empty,omitempty"`
+ OptAny *known.Any `protobuf:"bytes,32,opt,name=opt_any,json=optAny" json:"opt_any,omitempty"`
+ OptFieldmask *known.FieldMask `protobuf:"bytes,40,opt,name=opt_fieldmask,json=optFieldmask" json:"opt_fieldmask,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized protoimpl.UnknownFields `json:"-"`
+ XXX_sizecache protoimpl.SizeCache `json:"-"`
}
func (x *KnownTypes) Reset() {
@@ -1217,8 +1217,8 @@
OptNested *Nested `protobuf:"bytes,2,opt,name=opt_nested,json=optNested" json:"opt_nested,omitempty"`
Optnestedgroup *Nests_OptGroup_OptNestedGroup `protobuf:"group,3,opt,name=OptNestedGroup,json=optnestedgroup" json:"optnestedgroup,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ XXX_unrecognized protoimpl.UnknownFields `json:"-"`
+ XXX_sizecache protoimpl.SizeCache `json:"-"`
}
func (x *Nests_OptGroup) Reset() {
@@ -1266,10 +1266,10 @@
}
type Nests_RptGroup struct {
- RptString []string `protobuf:"bytes,1,rep,name=rpt_string,json=rptString" json:"rpt_string,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ RptString []string `protobuf:"bytes,1,rep,name=rpt_string,json=rptString" json:"rpt_string,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized protoimpl.UnknownFields `json:"-"`
+ XXX_sizecache protoimpl.SizeCache `json:"-"`
}
func (x *Nests_RptGroup) Reset() {
@@ -1303,10 +1303,10 @@
}
type Nests_OptGroup_OptNestedGroup struct {
- OptFixed32 *uint32 `protobuf:"fixed32,1,opt,name=opt_fixed32,json=optFixed32" json:"opt_fixed32,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ OptFixed32 *uint32 `protobuf:"fixed32,1,opt,name=opt_fixed32,json=optFixed32" json:"opt_fixed32,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized protoimpl.UnknownFields `json:"-"`
+ XXX_sizecache protoimpl.SizeCache `json:"-"`
}
func (x *Nests_OptGroup_OptNestedGroup) Reset() {