From d6ee40c73b2649ad28c281460980205fd804f53a Mon Sep 17 00:00:00 2001 From: shollyman Date: Wed, 10 Apr 2024 09:42:08 -0700 Subject: [PATCH] testing(bigquery/storage/managedwriter): add a range type test (#9676) * testing(bigquery/storage/managedwriter): add a range type test This PR is minimal, but does validate we can specify a range schema, and send a proto message containing a range value without error. Towards https://github.com/googleapis/google-cloud-go/issues/9017 --- .../adapt/protoconversion_test.go | 27 ++ .../storage/managedwriter/integration_test.go | 3 + .../storage/managedwriter/testdata/schemas.go | 8 + .../managedwriter/testdata/testing.pb.go | 316 +++++++++++------- .../managedwriter/testdata/testing.proto | 7 + 5 files changed, 246 insertions(+), 115 deletions(-) diff --git a/bigquery/storage/managedwriter/adapt/protoconversion_test.go b/bigquery/storage/managedwriter/adapt/protoconversion_test.go index 7413c9aa2c62..31b4f344f18b 100644 --- a/bigquery/storage/managedwriter/adapt/protoconversion_test.go +++ b/bigquery/storage/managedwriter/adapt/protoconversion_test.go @@ -1042,6 +1042,14 @@ func TestNormalizeDescriptor(t *testing.T) { Type: descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum(), Label: descriptorpb.FieldDescriptorProto_LABEL_OPTIONAL.Enum(), }, + { + Name: proto.String("range_type"), + JsonName: proto.String("rangeType"), + Number: proto.Int32(3), + TypeName: proto.String("testdata_RangeTypeTimestamp"), + Type: descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum(), + Label: descriptorpb.FieldDescriptorProto_LABEL_OPTIONAL.Enum(), + }, }, NestedType: []*descriptorpb.DescriptorProto{ { @@ -1069,6 +1077,25 @@ func TestNormalizeDescriptor(t *testing.T) { }, }, }, + { + Name: proto.String("testdata_RangeTypeTimestamp"), + Field: []*descriptorpb.FieldDescriptorProto{ + { + Name: proto.String("start"), + JsonName: proto.String("start"), + Number: proto.Int32(1), + Type: descriptorpb.FieldDescriptorProto_TYPE_INT64.Enum(), + Label: descriptorpb.FieldDescriptorProto_LABEL_OPTIONAL.Enum(), + }, + { + Name: proto.String("end"), + JsonName: proto.String("end"), + Number: proto.Int32(2), + Type: descriptorpb.FieldDescriptorProto_TYPE_INT64.Enum(), + Label: descriptorpb.FieldDescriptorProto_LABEL_OPTIONAL.Enum(), + }, + }, + }, }, }, }, diff --git a/bigquery/storage/managedwriter/integration_test.go b/bigquery/storage/managedwriter/integration_test.go index 3943f378cd5a..4a7f2470a6ad 100644 --- a/bigquery/storage/managedwriter/integration_test.go +++ b/bigquery/storage/managedwriter/integration_test.go @@ -1401,6 +1401,9 @@ func TestIntegration_ProtoNormalization(t *testing.T) { InnerType: &testdata.InnerType{ Value: []string{"top"}, }, + RangeType: &testdata.RangeTypeTimestamp{ + End: proto.Int64(time.Now().UnixNano()), + }, } b, err := proto.Marshal(mesg) if err != nil { diff --git a/bigquery/storage/managedwriter/testdata/schemas.go b/bigquery/storage/managedwriter/testdata/schemas.go index 8d949a288196..2d76bdf6a181 100644 --- a/bigquery/storage/managedwriter/testdata/schemas.go +++ b/bigquery/storage/managedwriter/testdata/schemas.go @@ -91,6 +91,14 @@ var ( {Name: "value", Type: bigquery.StringFieldType, Repeated: true}, }, }, + { + // range is a compound representation, but not quite a struct. + Name: "range_type", + Type: bigquery.RangeFieldType, + RangeElementType: &bigquery.RangeElementType{ + Type: bigquery.TimestampFieldType, + }, + }, } // We currently follow proto2 rules here, hence the well known types getting treated as records. diff --git a/bigquery/storage/managedwriter/testdata/testing.pb.go b/bigquery/storage/managedwriter/testdata/testing.pb.go index 992da63955b3..d9a580431e88 100644 --- a/bigquery/storage/managedwriter/testdata/testing.pb.go +++ b/bigquery/storage/managedwriter/testdata/testing.pb.go @@ -376,19 +376,76 @@ func (x *NestedType) GetInnerType() []*InnerType { return nil } +// This representation allows sending a Range value. +type RangeTypeTimestamp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Start *int64 `protobuf:"varint,1,opt,name=start" json:"start,omitempty"` + End *int64 `protobuf:"varint,2,opt,name=end" json:"end,omitempty"` +} + +func (x *RangeTypeTimestamp) Reset() { + *x = RangeTypeTimestamp{} + if protoimpl.UnsafeEnabled { + mi := &file_testing_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RangeTypeTimestamp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RangeTypeTimestamp) ProtoMessage() {} + +func (x *RangeTypeTimestamp) ProtoReflect() protoreflect.Message { + mi := &file_testing_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RangeTypeTimestamp.ProtoReflect.Descriptor instead. +func (*RangeTypeTimestamp) Descriptor() ([]byte, []int) { + return file_testing_proto_rawDescGZIP(), []int{4} +} + +func (x *RangeTypeTimestamp) GetStart() int64 { + if x != nil && x.Start != nil { + return *x.Start + } + return 0 +} + +func (x *RangeTypeTimestamp) GetEnd() int64 { + if x != nil && x.End != nil { + return *x.End + } + return 0 +} + type ComplexType struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - NestedRepeatedType []*NestedType `protobuf:"bytes,1,rep,name=nested_repeated_type,json=nestedRepeatedType" json:"nested_repeated_type,omitempty"` - InnerType *InnerType `protobuf:"bytes,2,opt,name=inner_type,json=innerType" json:"inner_type,omitempty"` + NestedRepeatedType []*NestedType `protobuf:"bytes,1,rep,name=nested_repeated_type,json=nestedRepeatedType" json:"nested_repeated_type,omitempty"` + InnerType *InnerType `protobuf:"bytes,2,opt,name=inner_type,json=innerType" json:"inner_type,omitempty"` + RangeType *RangeTypeTimestamp `protobuf:"bytes,3,opt,name=range_type,json=rangeType" json:"range_type,omitempty"` } func (x *ComplexType) Reset() { *x = ComplexType{} if protoimpl.UnsafeEnabled { - mi := &file_testing_proto_msgTypes[4] + mi := &file_testing_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -401,7 +458,7 @@ func (x *ComplexType) String() string { func (*ComplexType) ProtoMessage() {} func (x *ComplexType) ProtoReflect() protoreflect.Message { - mi := &file_testing_proto_msgTypes[4] + mi := &file_testing_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -414,7 +471,7 @@ func (x *ComplexType) ProtoReflect() protoreflect.Message { // Deprecated: Use ComplexType.ProtoReflect.Descriptor instead. func (*ComplexType) Descriptor() ([]byte, []int) { - return file_testing_proto_rawDescGZIP(), []int{4} + return file_testing_proto_rawDescGZIP(), []int{5} } func (x *ComplexType) GetNestedRepeatedType() []*NestedType { @@ -431,6 +488,13 @@ func (x *ComplexType) GetInnerType() *InnerType { return nil } +func (x *ComplexType) GetRangeType() *RangeTypeTimestamp { + if x != nil { + return x.RangeType + } + return nil +} + type ContainsRecursive struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -442,7 +506,7 @@ type ContainsRecursive struct { func (x *ContainsRecursive) Reset() { *x = ContainsRecursive{} if protoimpl.UnsafeEnabled { - mi := &file_testing_proto_msgTypes[5] + mi := &file_testing_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -455,7 +519,7 @@ func (x *ContainsRecursive) String() string { func (*ContainsRecursive) ProtoMessage() {} func (x *ContainsRecursive) ProtoReflect() protoreflect.Message { - mi := &file_testing_proto_msgTypes[5] + mi := &file_testing_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -468,7 +532,7 @@ func (x *ContainsRecursive) ProtoReflect() protoreflect.Message { // Deprecated: Use ContainsRecursive.ProtoReflect.Descriptor instead. func (*ContainsRecursive) Descriptor() ([]byte, []int) { - return file_testing_proto_rawDescGZIP(), []int{5} + return file_testing_proto_rawDescGZIP(), []int{6} } func (x *ContainsRecursive) GetField() *RecursiveType { @@ -489,7 +553,7 @@ type RecursiveType struct { func (x *RecursiveType) Reset() { *x = RecursiveType{} if protoimpl.UnsafeEnabled { - mi := &file_testing_proto_msgTypes[6] + mi := &file_testing_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -502,7 +566,7 @@ func (x *RecursiveType) String() string { func (*RecursiveType) ProtoMessage() {} func (x *RecursiveType) ProtoReflect() protoreflect.Message { - mi := &file_testing_proto_msgTypes[6] + mi := &file_testing_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -515,7 +579,7 @@ func (x *RecursiveType) ProtoReflect() protoreflect.Message { // Deprecated: Use RecursiveType.ProtoReflect.Descriptor instead. func (*RecursiveType) Descriptor() ([]byte, []int) { - return file_testing_proto_rawDescGZIP(), []int{6} + return file_testing_proto_rawDescGZIP(), []int{7} } func (x *RecursiveType) GetField() *ContainsRecursive { @@ -536,7 +600,7 @@ type RecursiveTypeTopMessage struct { func (x *RecursiveTypeTopMessage) Reset() { *x = RecursiveTypeTopMessage{} if protoimpl.UnsafeEnabled { - mi := &file_testing_proto_msgTypes[7] + mi := &file_testing_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -549,7 +613,7 @@ func (x *RecursiveTypeTopMessage) String() string { func (*RecursiveTypeTopMessage) ProtoMessage() {} func (x *RecursiveTypeTopMessage) ProtoReflect() protoreflect.Message { - mi := &file_testing_proto_msgTypes[7] + mi := &file_testing_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -562,7 +626,7 @@ func (x *RecursiveTypeTopMessage) ProtoReflect() protoreflect.Message { // Deprecated: Use RecursiveTypeTopMessage.ProtoReflect.Descriptor instead. func (*RecursiveTypeTopMessage) Descriptor() ([]byte, []int) { - return file_testing_proto_rawDescGZIP(), []int{7} + return file_testing_proto_rawDescGZIP(), []int{8} } func (x *RecursiveTypeTopMessage) GetField() *RecursiveTypeTopMessage { @@ -587,7 +651,7 @@ type WithOneOf struct { func (x *WithOneOf) Reset() { *x = WithOneOf{} if protoimpl.UnsafeEnabled { - mi := &file_testing_proto_msgTypes[8] + mi := &file_testing_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -600,7 +664,7 @@ func (x *WithOneOf) String() string { func (*WithOneOf) ProtoMessage() {} func (x *WithOneOf) ProtoReflect() protoreflect.Message { - mi := &file_testing_proto_msgTypes[8] + mi := &file_testing_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -613,7 +677,7 @@ func (x *WithOneOf) ProtoReflect() protoreflect.Message { // Deprecated: Use WithOneOf.ProtoReflect.Descriptor instead. func (*WithOneOf) Descriptor() ([]byte, []int) { - return file_testing_proto_rawDescGZIP(), []int{8} + return file_testing_proto_rawDescGZIP(), []int{9} } func (x *WithOneOf) GetInt32Value() int32 { @@ -677,7 +741,7 @@ type DefaultValues struct { func (x *DefaultValues) Reset() { *x = DefaultValues{} if protoimpl.UnsafeEnabled { - mi := &file_testing_proto_msgTypes[9] + mi := &file_testing_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -690,7 +754,7 @@ func (x *DefaultValues) String() string { func (*DefaultValues) ProtoMessage() {} func (x *DefaultValues) ProtoReflect() protoreflect.Message { - mi := &file_testing_proto_msgTypes[9] + mi := &file_testing_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -703,7 +767,7 @@ func (x *DefaultValues) ProtoReflect() protoreflect.Message { // Deprecated: Use DefaultValues.ProtoReflect.Descriptor instead. func (*DefaultValues) Descriptor() ([]byte, []int) { - return file_testing_proto_rawDescGZIP(), []int{9} + return file_testing_proto_rawDescGZIP(), []int{10} } func (x *DefaultValues) GetId() string { @@ -770,7 +834,7 @@ type DefaultValuesPartialSchema struct { func (x *DefaultValuesPartialSchema) Reset() { *x = DefaultValuesPartialSchema{} if protoimpl.UnsafeEnabled { - mi := &file_testing_proto_msgTypes[10] + mi := &file_testing_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -783,7 +847,7 @@ func (x *DefaultValuesPartialSchema) String() string { func (*DefaultValuesPartialSchema) ProtoMessage() {} func (x *DefaultValuesPartialSchema) ProtoReflect() protoreflect.Message { - mi := &file_testing_proto_msgTypes[10] + mi := &file_testing_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -796,7 +860,7 @@ func (x *DefaultValuesPartialSchema) ProtoReflect() protoreflect.Message { // Deprecated: Use DefaultValuesPartialSchema.ProtoReflect.Descriptor instead. func (*DefaultValuesPartialSchema) Descriptor() ([]byte, []int) { - return file_testing_proto_rawDescGZIP(), []int{10} + return file_testing_proto_rawDescGZIP(), []int{11} } func (x *DefaultValuesPartialSchema) GetId() string { @@ -884,70 +948,78 @@ var file_testing_proto_rawDesc = []byte{ 0x73, 0x74, 0x65, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x32, 0x0a, 0x0a, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x49, 0x6e, 0x6e, 0x65, 0x72, 0x54, 0x79, 0x70, - 0x65, 0x52, 0x09, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x22, 0x89, 0x01, 0x0a, - 0x0b, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x78, 0x54, 0x79, 0x70, 0x65, 0x12, 0x46, 0x0a, 0x14, - 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, - 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x74, 0x65, 0x73, - 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x54, 0x79, 0x70, 0x65, - 0x52, 0x12, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, - 0x54, 0x79, 0x70, 0x65, 0x12, 0x32, 0x0a, 0x0a, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x5f, 0x74, 0x79, - 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, - 0x61, 0x74, 0x61, 0x2e, 0x49, 0x6e, 0x6e, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x52, 0x09, 0x69, - 0x6e, 0x6e, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x22, 0x42, 0x0a, 0x11, 0x43, 0x6f, 0x6e, 0x74, - 0x61, 0x69, 0x6e, 0x73, 0x52, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, 0x12, 0x2d, 0x0a, - 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x74, - 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, - 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x22, 0x42, 0x0a, 0x0d, - 0x52, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x31, 0x0a, - 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x74, - 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, - 0x52, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, 0x52, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, - 0x22, 0x52, 0x0a, 0x17, 0x52, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, 0x54, 0x79, 0x70, - 0x65, 0x54, 0x6f, 0x70, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x37, 0x0a, 0x05, 0x66, - 0x69, 0x65, 0x6c, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x74, 0x65, 0x73, - 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, 0x54, - 0x79, 0x70, 0x65, 0x54, 0x6f, 0x70, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x05, 0x66, - 0x69, 0x65, 0x6c, 0x64, 0x22, 0x85, 0x01, 0x0a, 0x09, 0x57, 0x69, 0x74, 0x68, 0x4f, 0x6e, 0x65, - 0x4f, 0x66, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x12, 0x23, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x74, 0x72, - 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x23, 0x0a, 0x0c, 0x64, 0x6f, 0x75, 0x62, - 0x6c, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x48, 0x00, - 0x52, 0x0b, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0d, 0x0a, - 0x0b, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xe4, 0x01, 0x0a, - 0x0d, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x0e, - 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, - 0x0a, 0x06, 0x73, 0x74, 0x72, 0x63, 0x6f, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x73, 0x74, 0x72, 0x63, 0x6f, 0x6c, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x74, 0x72, 0x63, 0x6f, 0x6c, - 0x5f, 0x77, 0x69, 0x74, 0x68, 0x64, 0x65, 0x66, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, - 0x73, 0x74, 0x72, 0x63, 0x6f, 0x6c, 0x57, 0x69, 0x74, 0x68, 0x64, 0x65, 0x66, 0x12, 0x16, 0x0a, - 0x06, 0x69, 0x6e, 0x74, 0x63, 0x6f, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x69, - 0x6e, 0x74, 0x63, 0x6f, 0x6c, 0x12, 0x25, 0x0a, 0x0e, 0x69, 0x6e, 0x74, 0x63, 0x6f, 0x6c, 0x5f, - 0x77, 0x69, 0x74, 0x68, 0x64, 0x65, 0x66, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x69, - 0x6e, 0x74, 0x63, 0x6f, 0x6c, 0x57, 0x69, 0x74, 0x68, 0x64, 0x65, 0x66, 0x12, 0x1a, 0x0a, 0x08, - 0x6f, 0x74, 0x68, 0x65, 0x72, 0x73, 0x74, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x6f, 0x74, 0x68, 0x65, 0x72, 0x73, 0x74, 0x72, 0x12, 0x29, 0x0a, 0x10, 0x6f, 0x74, 0x68, 0x65, - 0x72, 0x73, 0x74, 0x72, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x07, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0f, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x73, 0x74, 0x72, 0x44, 0x65, 0x66, 0x61, - 0x75, 0x6c, 0x74, 0x22, 0xaa, 0x01, 0x0a, 0x1a, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x73, 0x50, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x53, 0x63, 0x68, 0x65, - 0x6d, 0x61, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, - 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x72, 0x63, 0x6f, 0x6c, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x72, 0x63, 0x6f, 0x6c, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x74, - 0x72, 0x63, 0x6f, 0x6c, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x64, 0x65, 0x66, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0d, 0x73, 0x74, 0x72, 0x63, 0x6f, 0x6c, 0x57, 0x69, 0x74, 0x68, 0x64, 0x65, - 0x66, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x6e, 0x74, 0x63, 0x6f, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x06, 0x69, 0x6e, 0x74, 0x63, 0x6f, 0x6c, 0x12, 0x25, 0x0a, 0x0e, 0x69, 0x6e, 0x74, - 0x63, 0x6f, 0x6c, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x64, 0x65, 0x66, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x0d, 0x69, 0x6e, 0x74, 0x63, 0x6f, 0x6c, 0x57, 0x69, 0x74, 0x68, 0x64, 0x65, 0x66, - 0x2a, 0x28, 0x0a, 0x08, 0x54, 0x65, 0x73, 0x74, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0d, 0x0a, 0x09, - 0x54, 0x65, 0x73, 0x74, 0x45, 0x6e, 0x75, 0x6d, 0x30, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x54, - 0x65, 0x73, 0x74, 0x45, 0x6e, 0x75, 0x6d, 0x31, 0x10, 0x01, 0x42, 0x3d, 0x5a, 0x3b, 0x63, 0x6c, - 0x6f, 0x75, 0x64, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, - 0x6f, 0x2f, 0x62, 0x69, 0x67, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x61, - 0x67, 0x65, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x64, 0x77, 0x72, 0x69, 0x74, 0x65, 0x72, - 0x2f, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, + 0x65, 0x52, 0x09, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x22, 0x3c, 0x0a, 0x12, + 0x52, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x22, 0xc6, 0x01, 0x0a, 0x0b, 0x43, + 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x78, 0x54, 0x79, 0x70, 0x65, 0x12, 0x46, 0x0a, 0x14, 0x6e, 0x65, + 0x73, 0x74, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x74, 0x79, + 0x70, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, + 0x61, 0x74, 0x61, 0x2e, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x54, 0x79, 0x70, 0x65, 0x52, 0x12, + 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x54, 0x79, + 0x70, 0x65, 0x12, 0x32, 0x0a, 0x0a, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, + 0x61, 0x2e, 0x49, 0x6e, 0x6e, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x52, 0x09, 0x69, 0x6e, 0x6e, + 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x3b, 0x0a, 0x0a, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x74, 0x65, 0x73, + 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x54, + 0x79, 0x70, 0x65, 0x22, 0x42, 0x0a, 0x11, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x52, + 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, 0x12, 0x2d, 0x0a, 0x05, 0x66, 0x69, 0x65, 0x6c, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, + 0x74, 0x61, 0x2e, 0x52, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, 0x54, 0x79, 0x70, 0x65, + 0x52, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x22, 0x42, 0x0a, 0x0d, 0x52, 0x65, 0x63, 0x75, 0x72, + 0x73, 0x69, 0x76, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x31, 0x0a, 0x05, 0x66, 0x69, 0x65, 0x6c, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, + 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x52, 0x65, 0x63, 0x75, 0x72, + 0x73, 0x69, 0x76, 0x65, 0x52, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x22, 0x52, 0x0a, 0x17, 0x52, + 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, 0x54, 0x79, 0x70, 0x65, 0x54, 0x6f, 0x70, 0x4d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x37, 0x0a, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, + 0x2e, 0x52, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, 0x54, 0x79, 0x70, 0x65, 0x54, 0x6f, + 0x70, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x22, + 0x85, 0x01, 0x0a, 0x09, 0x57, 0x69, 0x74, 0x68, 0x4f, 0x6e, 0x65, 0x4f, 0x66, 0x12, 0x1f, 0x0a, + 0x0b, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x0a, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x23, + 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x12, 0x23, 0x0a, 0x0c, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x5f, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x48, 0x00, 0x52, 0x0b, 0x64, 0x6f, 0x75, + 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0d, 0x0a, 0x0b, 0x6f, 0x6e, 0x65, 0x6f, + 0x66, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xe4, 0x01, 0x0a, 0x0d, 0x44, 0x65, 0x66, 0x61, + 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x72, + 0x63, 0x6f, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x72, 0x63, 0x6f, + 0x6c, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x74, 0x72, 0x63, 0x6f, 0x6c, 0x5f, 0x77, 0x69, 0x74, 0x68, + 0x64, 0x65, 0x66, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x74, 0x72, 0x63, 0x6f, + 0x6c, 0x57, 0x69, 0x74, 0x68, 0x64, 0x65, 0x66, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x6e, 0x74, 0x63, + 0x6f, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x69, 0x6e, 0x74, 0x63, 0x6f, 0x6c, + 0x12, 0x25, 0x0a, 0x0e, 0x69, 0x6e, 0x74, 0x63, 0x6f, 0x6c, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x64, + 0x65, 0x66, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x69, 0x6e, 0x74, 0x63, 0x6f, 0x6c, + 0x57, 0x69, 0x74, 0x68, 0x64, 0x65, 0x66, 0x12, 0x1a, 0x0a, 0x08, 0x6f, 0x74, 0x68, 0x65, 0x72, + 0x73, 0x74, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6f, 0x74, 0x68, 0x65, 0x72, + 0x73, 0x74, 0x72, 0x12, 0x29, 0x0a, 0x10, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x73, 0x74, 0x72, 0x5f, + 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6f, + 0x74, 0x68, 0x65, 0x72, 0x73, 0x74, 0x72, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x22, 0xaa, + 0x01, 0x0a, 0x1a, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, + 0x50, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x0e, 0x0a, + 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, + 0x06, 0x73, 0x74, 0x72, 0x63, 0x6f, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, + 0x74, 0x72, 0x63, 0x6f, 0x6c, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x74, 0x72, 0x63, 0x6f, 0x6c, 0x5f, + 0x77, 0x69, 0x74, 0x68, 0x64, 0x65, 0x66, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, + 0x74, 0x72, 0x63, 0x6f, 0x6c, 0x57, 0x69, 0x74, 0x68, 0x64, 0x65, 0x66, 0x12, 0x16, 0x0a, 0x06, + 0x69, 0x6e, 0x74, 0x63, 0x6f, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x69, 0x6e, + 0x74, 0x63, 0x6f, 0x6c, 0x12, 0x25, 0x0a, 0x0e, 0x69, 0x6e, 0x74, 0x63, 0x6f, 0x6c, 0x5f, 0x77, + 0x69, 0x74, 0x68, 0x64, 0x65, 0x66, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x69, 0x6e, + 0x74, 0x63, 0x6f, 0x6c, 0x57, 0x69, 0x74, 0x68, 0x64, 0x65, 0x66, 0x2a, 0x28, 0x0a, 0x08, 0x54, + 0x65, 0x73, 0x74, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x65, 0x73, 0x74, 0x45, + 0x6e, 0x75, 0x6d, 0x30, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x65, 0x73, 0x74, 0x45, 0x6e, + 0x75, 0x6d, 0x31, 0x10, 0x01, 0x42, 0x3d, 0x5a, 0x3b, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2f, 0x62, 0x69, 0x67, + 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2f, 0x6d, 0x61, + 0x6e, 0x61, 0x67, 0x65, 0x64, 0x77, 0x72, 0x69, 0x74, 0x65, 0x72, 0x2f, 0x74, 0x65, 0x73, 0x74, + 0x64, 0x61, 0x74, 0x61, } var ( @@ -963,38 +1035,40 @@ func file_testing_proto_rawDescGZIP() []byte { } var file_testing_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_testing_proto_msgTypes = make([]protoimpl.MessageInfo, 11) +var file_testing_proto_msgTypes = make([]protoimpl.MessageInfo, 12) var file_testing_proto_goTypes = []interface{}{ (TestEnum)(0), // 0: testdata.TestEnum (*AllSupportedTypes)(nil), // 1: testdata.AllSupportedTypes (*WithWellKnownTypes)(nil), // 2: testdata.WithWellKnownTypes (*InnerType)(nil), // 3: testdata.InnerType (*NestedType)(nil), // 4: testdata.NestedType - (*ComplexType)(nil), // 5: testdata.ComplexType - (*ContainsRecursive)(nil), // 6: testdata.ContainsRecursive - (*RecursiveType)(nil), // 7: testdata.RecursiveType - (*RecursiveTypeTopMessage)(nil), // 8: testdata.RecursiveTypeTopMessage - (*WithOneOf)(nil), // 9: testdata.WithOneOf - (*DefaultValues)(nil), // 10: testdata.DefaultValues - (*DefaultValuesPartialSchema)(nil), // 11: testdata.DefaultValuesPartialSchema - (*wrapperspb.Int64Value)(nil), // 12: google.protobuf.Int64Value - (*wrapperspb.StringValue)(nil), // 13: google.protobuf.StringValue + (*RangeTypeTimestamp)(nil), // 5: testdata.RangeTypeTimestamp + (*ComplexType)(nil), // 6: testdata.ComplexType + (*ContainsRecursive)(nil), // 7: testdata.ContainsRecursive + (*RecursiveType)(nil), // 8: testdata.RecursiveType + (*RecursiveTypeTopMessage)(nil), // 9: testdata.RecursiveTypeTopMessage + (*WithOneOf)(nil), // 10: testdata.WithOneOf + (*DefaultValues)(nil), // 11: testdata.DefaultValues + (*DefaultValuesPartialSchema)(nil), // 12: testdata.DefaultValuesPartialSchema + (*wrapperspb.Int64Value)(nil), // 13: google.protobuf.Int64Value + (*wrapperspb.StringValue)(nil), // 14: google.protobuf.StringValue } var file_testing_proto_depIdxs = []int32{ 0, // 0: testdata.AllSupportedTypes.enum_value:type_name -> testdata.TestEnum - 12, // 1: testdata.WithWellKnownTypes.wrapped_int64:type_name -> google.protobuf.Int64Value - 13, // 2: testdata.WithWellKnownTypes.wrapped_string:type_name -> google.protobuf.StringValue + 13, // 1: testdata.WithWellKnownTypes.wrapped_int64:type_name -> google.protobuf.Int64Value + 14, // 2: testdata.WithWellKnownTypes.wrapped_string:type_name -> google.protobuf.StringValue 3, // 3: testdata.NestedType.inner_type:type_name -> testdata.InnerType 4, // 4: testdata.ComplexType.nested_repeated_type:type_name -> testdata.NestedType 3, // 5: testdata.ComplexType.inner_type:type_name -> testdata.InnerType - 7, // 6: testdata.ContainsRecursive.field:type_name -> testdata.RecursiveType - 6, // 7: testdata.RecursiveType.field:type_name -> testdata.ContainsRecursive - 8, // 8: testdata.RecursiveTypeTopMessage.field:type_name -> testdata.RecursiveTypeTopMessage - 9, // [9:9] is the sub-list for method output_type - 9, // [9:9] is the sub-list for method input_type - 9, // [9:9] is the sub-list for extension type_name - 9, // [9:9] is the sub-list for extension extendee - 0, // [0:9] is the sub-list for field type_name + 5, // 6: testdata.ComplexType.range_type:type_name -> testdata.RangeTypeTimestamp + 8, // 7: testdata.ContainsRecursive.field:type_name -> testdata.RecursiveType + 7, // 8: testdata.RecursiveType.field:type_name -> testdata.ContainsRecursive + 9, // 9: testdata.RecursiveTypeTopMessage.field:type_name -> testdata.RecursiveTypeTopMessage + 10, // [10:10] is the sub-list for method output_type + 10, // [10:10] is the sub-list for method input_type + 10, // [10:10] is the sub-list for extension type_name + 10, // [10:10] is the sub-list for extension extendee + 0, // [0:10] is the sub-list for field type_name } func init() { file_testing_proto_init() } @@ -1052,7 +1126,7 @@ func file_testing_proto_init() { } } file_testing_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ComplexType); i { + switch v := v.(*RangeTypeTimestamp); i { case 0: return &v.state case 1: @@ -1064,7 +1138,7 @@ func file_testing_proto_init() { } } file_testing_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ContainsRecursive); i { + switch v := v.(*ComplexType); i { case 0: return &v.state case 1: @@ -1076,7 +1150,7 @@ func file_testing_proto_init() { } } file_testing_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RecursiveType); i { + switch v := v.(*ContainsRecursive); i { case 0: return &v.state case 1: @@ -1088,7 +1162,7 @@ func file_testing_proto_init() { } } file_testing_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RecursiveTypeTopMessage); i { + switch v := v.(*RecursiveType); i { case 0: return &v.state case 1: @@ -1100,7 +1174,7 @@ func file_testing_proto_init() { } } file_testing_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WithOneOf); i { + switch v := v.(*RecursiveTypeTopMessage); i { case 0: return &v.state case 1: @@ -1112,7 +1186,7 @@ func file_testing_proto_init() { } } file_testing_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DefaultValues); i { + switch v := v.(*WithOneOf); i { case 0: return &v.state case 1: @@ -1124,6 +1198,18 @@ func file_testing_proto_init() { } } file_testing_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DefaultValues); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_testing_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DefaultValuesPartialSchema); i { case 0: return &v.state @@ -1136,7 +1222,7 @@ func file_testing_proto_init() { } } } - file_testing_proto_msgTypes[8].OneofWrappers = []interface{}{ + file_testing_proto_msgTypes[9].OneofWrappers = []interface{}{ (*WithOneOf_StringValue)(nil), (*WithOneOf_DoubleValue)(nil), } @@ -1146,7 +1232,7 @@ func file_testing_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_testing_proto_rawDesc, NumEnums: 1, - NumMessages: 11, + NumMessages: 12, NumExtensions: 0, NumServices: 0, }, diff --git a/bigquery/storage/managedwriter/testdata/testing.proto b/bigquery/storage/managedwriter/testdata/testing.proto index 79055b0a64f6..6012e9bc0e63 100644 --- a/bigquery/storage/managedwriter/testdata/testing.proto +++ b/bigquery/storage/managedwriter/testdata/testing.proto @@ -50,9 +50,16 @@ message NestedType { repeated InnerType inner_type = 1; } +// This representation allows sending a Range value. +message RangeTypeTimestamp { + optional int64 start = 1; + optional int64 end = 2; +} + message ComplexType { repeated NestedType nested_repeated_type = 1; optional InnerType inner_type = 2; + optional RangeTypeTimestamp range_type = 3; } message ContainsRecursive {