// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. package testdata_pulsar import ( fmt "fmt" runtime "github.com/cosmos/cosmos-proto/runtime" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" anypb "google.golang.org/protobuf/types/known/anypb" io "io" reflect "reflect" sync "sync" ) var ( md_EchoRequest protoreflect.MessageDescriptor fd_EchoRequest_message protoreflect.FieldDescriptor ) func init() { file_query_proto_init() md_EchoRequest = File_query_proto.Messages().ByName("EchoRequest") fd_EchoRequest_message = md_EchoRequest.Fields().ByName("message") } var _ protoreflect.Message = (*fastReflection_EchoRequest)(nil) type fastReflection_EchoRequest EchoRequest func (x *EchoRequest) ProtoReflect() protoreflect.Message { return (*fastReflection_EchoRequest)(x) } func (x *EchoRequest) slowProtoReflect() protoreflect.Message { mi := &file_query_proto_msgTypes[0] 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) } var _fastReflection_EchoRequest_messageType fastReflection_EchoRequest_messageType var _ protoreflect.MessageType = fastReflection_EchoRequest_messageType{} type fastReflection_EchoRequest_messageType struct{} func (x fastReflection_EchoRequest_messageType) Zero() protoreflect.Message { return (*fastReflection_EchoRequest)(nil) } func (x fastReflection_EchoRequest_messageType) New() protoreflect.Message { return new(fastReflection_EchoRequest) } func (x fastReflection_EchoRequest_messageType) Descriptor() protoreflect.MessageDescriptor { return md_EchoRequest } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_EchoRequest) Descriptor() protoreflect.MessageDescriptor { return md_EchoRequest } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_EchoRequest) Type() protoreflect.MessageType { return _fastReflection_EchoRequest_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_EchoRequest) New() protoreflect.Message { return new(fastReflection_EchoRequest) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_EchoRequest) Interface() protoreflect.ProtoMessage { return (*EchoRequest)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_EchoRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Message != "" { value := protoreflect.ValueOfString(x.Message) if !f(fd_EchoRequest_message, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_EchoRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "testdata.EchoRequest.message": return x.Message != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.EchoRequest")) } panic(fmt.Errorf("message testdata.EchoRequest does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_EchoRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "testdata.EchoRequest.message": x.Message = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.EchoRequest")) } panic(fmt.Errorf("message testdata.EchoRequest does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_EchoRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "testdata.EchoRequest.message": value := x.Message return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.EchoRequest")) } panic(fmt.Errorf("message testdata.EchoRequest does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_EchoRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "testdata.EchoRequest.message": x.Message = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.EchoRequest")) } panic(fmt.Errorf("message testdata.EchoRequest does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_EchoRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "testdata.EchoRequest.message": panic(fmt.Errorf("field message of message testdata.EchoRequest is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.EchoRequest")) } panic(fmt.Errorf("message testdata.EchoRequest does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_EchoRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "testdata.EchoRequest.message": return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.EchoRequest")) } panic(fmt.Errorf("message testdata.EchoRequest does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_EchoRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in testdata.EchoRequest", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_EchoRequest) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_EchoRequest) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_EchoRequest) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_EchoRequest) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*EchoRequest) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Message) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*EchoRequest) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.Message) > 0 { i -= len(x.Message) copy(dAtA[i:], x.Message) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Message))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*EchoRequest) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EchoRequest: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EchoRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Message = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_EchoResponse protoreflect.MessageDescriptor fd_EchoResponse_message protoreflect.FieldDescriptor ) func init() { file_query_proto_init() md_EchoResponse = File_query_proto.Messages().ByName("EchoResponse") fd_EchoResponse_message = md_EchoResponse.Fields().ByName("message") } var _ protoreflect.Message = (*fastReflection_EchoResponse)(nil) type fastReflection_EchoResponse EchoResponse func (x *EchoResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_EchoResponse)(x) } func (x *EchoResponse) slowProtoReflect() protoreflect.Message { mi := &file_query_proto_msgTypes[1] 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) } var _fastReflection_EchoResponse_messageType fastReflection_EchoResponse_messageType var _ protoreflect.MessageType = fastReflection_EchoResponse_messageType{} type fastReflection_EchoResponse_messageType struct{} func (x fastReflection_EchoResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_EchoResponse)(nil) } func (x fastReflection_EchoResponse_messageType) New() protoreflect.Message { return new(fastReflection_EchoResponse) } func (x fastReflection_EchoResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_EchoResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_EchoResponse) Descriptor() protoreflect.MessageDescriptor { return md_EchoResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_EchoResponse) Type() protoreflect.MessageType { return _fastReflection_EchoResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_EchoResponse) New() protoreflect.Message { return new(fastReflection_EchoResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_EchoResponse) Interface() protoreflect.ProtoMessage { return (*EchoResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_EchoResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Message != "" { value := protoreflect.ValueOfString(x.Message) if !f(fd_EchoResponse_message, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_EchoResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "testdata.EchoResponse.message": return x.Message != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.EchoResponse")) } panic(fmt.Errorf("message testdata.EchoResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_EchoResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "testdata.EchoResponse.message": x.Message = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.EchoResponse")) } panic(fmt.Errorf("message testdata.EchoResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_EchoResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "testdata.EchoResponse.message": value := x.Message return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.EchoResponse")) } panic(fmt.Errorf("message testdata.EchoResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_EchoResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "testdata.EchoResponse.message": x.Message = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.EchoResponse")) } panic(fmt.Errorf("message testdata.EchoResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_EchoResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "testdata.EchoResponse.message": panic(fmt.Errorf("field message of message testdata.EchoResponse is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.EchoResponse")) } panic(fmt.Errorf("message testdata.EchoResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_EchoResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "testdata.EchoResponse.message": return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.EchoResponse")) } panic(fmt.Errorf("message testdata.EchoResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_EchoResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in testdata.EchoResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_EchoResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_EchoResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_EchoResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_EchoResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*EchoResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Message) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*EchoResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.Message) > 0 { i -= len(x.Message) copy(dAtA[i:], x.Message) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Message))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*EchoResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EchoResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EchoResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Message = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_SayHelloRequest protoreflect.MessageDescriptor fd_SayHelloRequest_name protoreflect.FieldDescriptor ) func init() { file_query_proto_init() md_SayHelloRequest = File_query_proto.Messages().ByName("SayHelloRequest") fd_SayHelloRequest_name = md_SayHelloRequest.Fields().ByName("name") } var _ protoreflect.Message = (*fastReflection_SayHelloRequest)(nil) type fastReflection_SayHelloRequest SayHelloRequest func (x *SayHelloRequest) ProtoReflect() protoreflect.Message { return (*fastReflection_SayHelloRequest)(x) } func (x *SayHelloRequest) slowProtoReflect() protoreflect.Message { mi := &file_query_proto_msgTypes[2] 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) } var _fastReflection_SayHelloRequest_messageType fastReflection_SayHelloRequest_messageType var _ protoreflect.MessageType = fastReflection_SayHelloRequest_messageType{} type fastReflection_SayHelloRequest_messageType struct{} func (x fastReflection_SayHelloRequest_messageType) Zero() protoreflect.Message { return (*fastReflection_SayHelloRequest)(nil) } func (x fastReflection_SayHelloRequest_messageType) New() protoreflect.Message { return new(fastReflection_SayHelloRequest) } func (x fastReflection_SayHelloRequest_messageType) Descriptor() protoreflect.MessageDescriptor { return md_SayHelloRequest } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_SayHelloRequest) Descriptor() protoreflect.MessageDescriptor { return md_SayHelloRequest } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_SayHelloRequest) Type() protoreflect.MessageType { return _fastReflection_SayHelloRequest_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_SayHelloRequest) New() protoreflect.Message { return new(fastReflection_SayHelloRequest) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_SayHelloRequest) Interface() protoreflect.ProtoMessage { return (*SayHelloRequest)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_SayHelloRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Name != "" { value := protoreflect.ValueOfString(x.Name) if !f(fd_SayHelloRequest_name, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_SayHelloRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "testdata.SayHelloRequest.name": return x.Name != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.SayHelloRequest")) } panic(fmt.Errorf("message testdata.SayHelloRequest does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_SayHelloRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "testdata.SayHelloRequest.name": x.Name = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.SayHelloRequest")) } panic(fmt.Errorf("message testdata.SayHelloRequest does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_SayHelloRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "testdata.SayHelloRequest.name": value := x.Name return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.SayHelloRequest")) } panic(fmt.Errorf("message testdata.SayHelloRequest does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_SayHelloRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "testdata.SayHelloRequest.name": x.Name = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.SayHelloRequest")) } panic(fmt.Errorf("message testdata.SayHelloRequest does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_SayHelloRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "testdata.SayHelloRequest.name": panic(fmt.Errorf("field name of message testdata.SayHelloRequest is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.SayHelloRequest")) } panic(fmt.Errorf("message testdata.SayHelloRequest does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_SayHelloRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "testdata.SayHelloRequest.name": return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.SayHelloRequest")) } panic(fmt.Errorf("message testdata.SayHelloRequest does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_SayHelloRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in testdata.SayHelloRequest", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_SayHelloRequest) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_SayHelloRequest) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_SayHelloRequest) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_SayHelloRequest) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*SayHelloRequest) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Name) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*SayHelloRequest) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.Name) > 0 { i -= len(x.Name) copy(dAtA[i:], x.Name) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Name))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*SayHelloRequest) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SayHelloRequest: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SayHelloRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_SayHelloResponse protoreflect.MessageDescriptor fd_SayHelloResponse_greeting protoreflect.FieldDescriptor ) func init() { file_query_proto_init() md_SayHelloResponse = File_query_proto.Messages().ByName("SayHelloResponse") fd_SayHelloResponse_greeting = md_SayHelloResponse.Fields().ByName("greeting") } var _ protoreflect.Message = (*fastReflection_SayHelloResponse)(nil) type fastReflection_SayHelloResponse SayHelloResponse func (x *SayHelloResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_SayHelloResponse)(x) } func (x *SayHelloResponse) slowProtoReflect() protoreflect.Message { mi := &file_query_proto_msgTypes[3] 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) } var _fastReflection_SayHelloResponse_messageType fastReflection_SayHelloResponse_messageType var _ protoreflect.MessageType = fastReflection_SayHelloResponse_messageType{} type fastReflection_SayHelloResponse_messageType struct{} func (x fastReflection_SayHelloResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_SayHelloResponse)(nil) } func (x fastReflection_SayHelloResponse_messageType) New() protoreflect.Message { return new(fastReflection_SayHelloResponse) } func (x fastReflection_SayHelloResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_SayHelloResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_SayHelloResponse) Descriptor() protoreflect.MessageDescriptor { return md_SayHelloResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_SayHelloResponse) Type() protoreflect.MessageType { return _fastReflection_SayHelloResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_SayHelloResponse) New() protoreflect.Message { return new(fastReflection_SayHelloResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_SayHelloResponse) Interface() protoreflect.ProtoMessage { return (*SayHelloResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_SayHelloResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Greeting != "" { value := protoreflect.ValueOfString(x.Greeting) if !f(fd_SayHelloResponse_greeting, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_SayHelloResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "testdata.SayHelloResponse.greeting": return x.Greeting != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.SayHelloResponse")) } panic(fmt.Errorf("message testdata.SayHelloResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_SayHelloResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "testdata.SayHelloResponse.greeting": x.Greeting = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.SayHelloResponse")) } panic(fmt.Errorf("message testdata.SayHelloResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_SayHelloResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "testdata.SayHelloResponse.greeting": value := x.Greeting return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.SayHelloResponse")) } panic(fmt.Errorf("message testdata.SayHelloResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_SayHelloResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "testdata.SayHelloResponse.greeting": x.Greeting = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.SayHelloResponse")) } panic(fmt.Errorf("message testdata.SayHelloResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_SayHelloResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "testdata.SayHelloResponse.greeting": panic(fmt.Errorf("field greeting of message testdata.SayHelloResponse is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.SayHelloResponse")) } panic(fmt.Errorf("message testdata.SayHelloResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_SayHelloResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "testdata.SayHelloResponse.greeting": return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.SayHelloResponse")) } panic(fmt.Errorf("message testdata.SayHelloResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_SayHelloResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in testdata.SayHelloResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_SayHelloResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_SayHelloResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_SayHelloResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_SayHelloResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*SayHelloResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l l = len(x.Greeting) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*SayHelloResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if len(x.Greeting) > 0 { i -= len(x.Greeting) copy(dAtA[i:], x.Greeting) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Greeting))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*SayHelloResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SayHelloResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SayHelloResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Greeting", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } x.Greeting = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_TestAnyRequest protoreflect.MessageDescriptor fd_TestAnyRequest_any_animal protoreflect.FieldDescriptor ) func init() { file_query_proto_init() md_TestAnyRequest = File_query_proto.Messages().ByName("TestAnyRequest") fd_TestAnyRequest_any_animal = md_TestAnyRequest.Fields().ByName("any_animal") } var _ protoreflect.Message = (*fastReflection_TestAnyRequest)(nil) type fastReflection_TestAnyRequest TestAnyRequest func (x *TestAnyRequest) ProtoReflect() protoreflect.Message { return (*fastReflection_TestAnyRequest)(x) } func (x *TestAnyRequest) slowProtoReflect() protoreflect.Message { mi := &file_query_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) } var _fastReflection_TestAnyRequest_messageType fastReflection_TestAnyRequest_messageType var _ protoreflect.MessageType = fastReflection_TestAnyRequest_messageType{} type fastReflection_TestAnyRequest_messageType struct{} func (x fastReflection_TestAnyRequest_messageType) Zero() protoreflect.Message { return (*fastReflection_TestAnyRequest)(nil) } func (x fastReflection_TestAnyRequest_messageType) New() protoreflect.Message { return new(fastReflection_TestAnyRequest) } func (x fastReflection_TestAnyRequest_messageType) Descriptor() protoreflect.MessageDescriptor { return md_TestAnyRequest } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_TestAnyRequest) Descriptor() protoreflect.MessageDescriptor { return md_TestAnyRequest } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_TestAnyRequest) Type() protoreflect.MessageType { return _fastReflection_TestAnyRequest_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_TestAnyRequest) New() protoreflect.Message { return new(fastReflection_TestAnyRequest) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_TestAnyRequest) Interface() protoreflect.ProtoMessage { return (*TestAnyRequest)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_TestAnyRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.AnyAnimal != nil { value := protoreflect.ValueOfMessage(x.AnyAnimal.ProtoReflect()) if !f(fd_TestAnyRequest_any_animal, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_TestAnyRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "testdata.TestAnyRequest.any_animal": return x.AnyAnimal != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestAnyRequest")) } panic(fmt.Errorf("message testdata.TestAnyRequest does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_TestAnyRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "testdata.TestAnyRequest.any_animal": x.AnyAnimal = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestAnyRequest")) } panic(fmt.Errorf("message testdata.TestAnyRequest does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_TestAnyRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "testdata.TestAnyRequest.any_animal": value := x.AnyAnimal return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestAnyRequest")) } panic(fmt.Errorf("message testdata.TestAnyRequest does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_TestAnyRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "testdata.TestAnyRequest.any_animal": x.AnyAnimal = value.Message().Interface().(*anypb.Any) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestAnyRequest")) } panic(fmt.Errorf("message testdata.TestAnyRequest does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_TestAnyRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "testdata.TestAnyRequest.any_animal": if x.AnyAnimal == nil { x.AnyAnimal = new(anypb.Any) } return protoreflect.ValueOfMessage(x.AnyAnimal.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestAnyRequest")) } panic(fmt.Errorf("message testdata.TestAnyRequest does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_TestAnyRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "testdata.TestAnyRequest.any_animal": m := new(anypb.Any) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestAnyRequest")) } panic(fmt.Errorf("message testdata.TestAnyRequest does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_TestAnyRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in testdata.TestAnyRequest", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_TestAnyRequest) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_TestAnyRequest) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_TestAnyRequest) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_TestAnyRequest) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*TestAnyRequest) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.AnyAnimal != nil { l = options.Size(x.AnyAnimal) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*TestAnyRequest) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.AnyAnimal != nil { encoded, err := options.Marshal(x.AnyAnimal) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*TestAnyRequest) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TestAnyRequest: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TestAnyRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AnyAnimal", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.AnyAnimal == nil { x.AnyAnimal = &anypb.Any{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.AnyAnimal); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } var ( md_TestAnyResponse protoreflect.MessageDescriptor fd_TestAnyResponse_has_animal protoreflect.FieldDescriptor ) func init() { file_query_proto_init() md_TestAnyResponse = File_query_proto.Messages().ByName("TestAnyResponse") fd_TestAnyResponse_has_animal = md_TestAnyResponse.Fields().ByName("has_animal") } var _ protoreflect.Message = (*fastReflection_TestAnyResponse)(nil) type fastReflection_TestAnyResponse TestAnyResponse func (x *TestAnyResponse) ProtoReflect() protoreflect.Message { return (*fastReflection_TestAnyResponse)(x) } func (x *TestAnyResponse) slowProtoReflect() protoreflect.Message { mi := &file_query_proto_msgTypes[5] 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) } var _fastReflection_TestAnyResponse_messageType fastReflection_TestAnyResponse_messageType var _ protoreflect.MessageType = fastReflection_TestAnyResponse_messageType{} type fastReflection_TestAnyResponse_messageType struct{} func (x fastReflection_TestAnyResponse_messageType) Zero() protoreflect.Message { return (*fastReflection_TestAnyResponse)(nil) } func (x fastReflection_TestAnyResponse_messageType) New() protoreflect.Message { return new(fastReflection_TestAnyResponse) } func (x fastReflection_TestAnyResponse_messageType) Descriptor() protoreflect.MessageDescriptor { return md_TestAnyResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. func (x *fastReflection_TestAnyResponse) Descriptor() protoreflect.MessageDescriptor { return md_TestAnyResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. func (x *fastReflection_TestAnyResponse) Type() protoreflect.MessageType { return _fastReflection_TestAnyResponse_messageType } // New returns a newly allocated and mutable empty message. func (x *fastReflection_TestAnyResponse) New() protoreflect.Message { return new(fastReflection_TestAnyResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. func (x *fastReflection_TestAnyResponse) Interface() protoreflect.ProtoMessage { return (*TestAnyResponse)(x) } // Range iterates over every populated field in an undefined order, // calling f for each field descriptor and value encountered. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_TestAnyResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.HasAnimal != nil { value := protoreflect.ValueOfMessage(x.HasAnimal.ProtoReflect()) if !f(fd_TestAnyResponse_has_animal, value) { return } } } // Has reports whether a field is populated. // // Some fields have the property of nullability where it is possible to // distinguish between the default value of a field and whether the field // was explicitly populated with the default value. Singular message fields, // member fields of a oneof, and proto2 scalar fields are nullable. Such // fields are populated only if explicitly set. // // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. func (x *fastReflection_TestAnyResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "testdata.TestAnyResponse.has_animal": return x.HasAnimal != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestAnyResponse")) } panic(fmt.Errorf("message testdata.TestAnyResponse does not contain field %s", fd.FullName())) } } // Clear clears the field such that a subsequent Has call reports false. // // Clearing an extension field clears both the extension type and value // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_TestAnyResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "testdata.TestAnyResponse.has_animal": x.HasAnimal = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestAnyResponse")) } panic(fmt.Errorf("message testdata.TestAnyResponse does not contain field %s", fd.FullName())) } } // Get retrieves the value for a field. // // For unpopulated scalars, it returns the default value, where // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_TestAnyResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { case "testdata.TestAnyResponse.has_animal": value := x.HasAnimal return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestAnyResponse")) } panic(fmt.Errorf("message testdata.TestAnyResponse does not contain field %s", descriptor.FullName())) } } // Set stores the value for a field. // // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType. // When setting a composite type, it is unspecified whether the stored value // aliases the source's memory in any way. If the composite value is an // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_TestAnyResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "testdata.TestAnyResponse.has_animal": x.HasAnimal = value.Message().Interface().(*HasAnimal) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestAnyResponse")) } panic(fmt.Errorf("message testdata.TestAnyResponse does not contain field %s", fd.FullName())) } } // Mutable returns a mutable reference to a composite type. // // If the field is unpopulated, it may allocate a composite value. // For a field belonging to a oneof, it implicitly clears any other field // that may be currently set within the same oneof. // For extension fields, it implicitly stores the provided ExtensionType // if not already stored. // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_TestAnyResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "testdata.TestAnyResponse.has_animal": if x.HasAnimal == nil { x.HasAnimal = new(HasAnimal) } return protoreflect.ValueOfMessage(x.HasAnimal.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestAnyResponse")) } panic(fmt.Errorf("message testdata.TestAnyResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_TestAnyResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "testdata.TestAnyResponse.has_animal": m := new(HasAnimal) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: testdata.TestAnyResponse")) } panic(fmt.Errorf("message testdata.TestAnyResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. func (x *fastReflection_TestAnyResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: panic(fmt.Errorf("%s is not a oneof field in testdata.TestAnyResponse", d.FullName())) } panic("unreachable") } // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. func (x *fastReflection_TestAnyResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } // SetUnknown stores an entire list of unknown fields. // The raw fields must be syntactically valid according to the wire format. // An implementation may panic if this is not the case. // Once stored, the caller must not mutate the content of the RawFields. // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. func (x *fastReflection_TestAnyResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } // IsValid reports whether the message is valid. // // An invalid message is an empty, read-only value. // // An invalid message often corresponds to a nil pointer of the concrete // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. func (x *fastReflection_TestAnyResponse) IsValid() bool { return x != nil } // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. func (x *fastReflection_TestAnyResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { x := input.Message.Interface().(*TestAnyResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: 0, } } options := runtime.SizeInputToOptions(input) _ = options var n int var l int _ = l if x.HasAnimal != nil { l = options.Size(x.HasAnimal) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) } return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Size: n, } } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { x := input.Message.Interface().(*TestAnyResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } options := runtime.MarshalInputToOptions(input) _ = options size := options.Size(x) dAtA := make([]byte, size) i := len(dAtA) _ = i var l int _ = l if x.unknownFields != nil { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } if x.HasAnimal != nil { encoded, err := options.Marshal(x.HasAnimal) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, err } i -= len(encoded) copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { input.Buf = dAtA } return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Buf: input.Buf, }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { x := input.Message.Interface().(*TestAnyResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags, }, nil } options := runtime.UnmarshalInputToOptions(input) _ = options dAtA := input.Buf l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TestAnyResponse: wiretype end group for non-group") } if fieldNum <= 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TestAnyResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field HasAnimal", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.HasAnimal == nil { x.HasAnimal = &HasAnimal{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.HasAnimal); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) if err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } if (skippy < 0) || (iNdEx+skippy) < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if (iNdEx + skippy) > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if !options.DiscardUnknown { x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) } iNdEx += skippy } } if iNdEx > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil } return &protoiface.Methods{ NoUnkeyedLiterals: struct{}{}, Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, Size: size, Marshal: marshal, Unmarshal: unmarshal, Merge: nil, CheckInitialized: nil, } } // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 // protoc (unknown) // source: query.proto const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) type EchoRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` } func (x *EchoRequest) Reset() { *x = EchoRequest{} if protoimpl.UnsafeEnabled { mi := &file_query_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *EchoRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*EchoRequest) ProtoMessage() {} // Deprecated: Use EchoRequest.ProtoReflect.Descriptor instead. func (*EchoRequest) Descriptor() ([]byte, []int) { return file_query_proto_rawDescGZIP(), []int{0} } func (x *EchoRequest) GetMessage() string { if x != nil { return x.Message } return "" } type EchoResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` } func (x *EchoResponse) Reset() { *x = EchoResponse{} if protoimpl.UnsafeEnabled { mi := &file_query_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *EchoResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*EchoResponse) ProtoMessage() {} // Deprecated: Use EchoResponse.ProtoReflect.Descriptor instead. func (*EchoResponse) Descriptor() ([]byte, []int) { return file_query_proto_rawDescGZIP(), []int{1} } func (x *EchoResponse) GetMessage() string { if x != nil { return x.Message } return "" } type SayHelloRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` } func (x *SayHelloRequest) Reset() { *x = SayHelloRequest{} if protoimpl.UnsafeEnabled { mi := &file_query_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *SayHelloRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*SayHelloRequest) ProtoMessage() {} // Deprecated: Use SayHelloRequest.ProtoReflect.Descriptor instead. func (*SayHelloRequest) Descriptor() ([]byte, []int) { return file_query_proto_rawDescGZIP(), []int{2} } func (x *SayHelloRequest) GetName() string { if x != nil { return x.Name } return "" } type SayHelloResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Greeting string `protobuf:"bytes,1,opt,name=greeting,proto3" json:"greeting,omitempty"` } func (x *SayHelloResponse) Reset() { *x = SayHelloResponse{} if protoimpl.UnsafeEnabled { mi := &file_query_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *SayHelloResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*SayHelloResponse) ProtoMessage() {} // Deprecated: Use SayHelloResponse.ProtoReflect.Descriptor instead. func (*SayHelloResponse) Descriptor() ([]byte, []int) { return file_query_proto_rawDescGZIP(), []int{3} } func (x *SayHelloResponse) GetGreeting() string { if x != nil { return x.Greeting } return "" } type TestAnyRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields AnyAnimal *anypb.Any `protobuf:"bytes,1,opt,name=any_animal,json=anyAnimal,proto3" json:"any_animal,omitempty"` } func (x *TestAnyRequest) Reset() { *x = TestAnyRequest{} if protoimpl.UnsafeEnabled { mi := &file_query_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *TestAnyRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*TestAnyRequest) ProtoMessage() {} // Deprecated: Use TestAnyRequest.ProtoReflect.Descriptor instead. func (*TestAnyRequest) Descriptor() ([]byte, []int) { return file_query_proto_rawDescGZIP(), []int{4} } func (x *TestAnyRequest) GetAnyAnimal() *anypb.Any { if x != nil { return x.AnyAnimal } return nil } type TestAnyResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields HasAnimal *HasAnimal `protobuf:"bytes,1,opt,name=has_animal,json=hasAnimal,proto3" json:"has_animal,omitempty"` } func (x *TestAnyResponse) Reset() { *x = TestAnyResponse{} if protoimpl.UnsafeEnabled { mi := &file_query_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *TestAnyResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*TestAnyResponse) ProtoMessage() {} // Deprecated: Use TestAnyResponse.ProtoReflect.Descriptor instead. func (*TestAnyResponse) Descriptor() ([]byte, []int) { return file_query_proto_rawDescGZIP(), []int{5} } func (x *TestAnyResponse) GetHasAnimal() *HasAnimal { if x != nil { return x.HasAnimal } return nil } var File_query_proto protoreflect.FileDescriptor var file_query_proto_rawDesc = []byte{ 0x0a, 0x0b, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x27, 0x0a, 0x0b, 0x45, 0x63, 0x68, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x28, 0x0a, 0x0c, 0x45, 0x63, 0x68, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x25, 0x0a, 0x0f, 0x53, 0x61, 0x79, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x2e, 0x0a, 0x10, 0x53, 0x61, 0x79, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x67, 0x72, 0x65, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x67, 0x72, 0x65, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x22, 0x45, 0x0a, 0x0e, 0x54, 0x65, 0x73, 0x74, 0x41, 0x6e, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x33, 0x0a, 0x0a, 0x61, 0x6e, 0x79, 0x5f, 0x61, 0x6e, 0x69, 0x6d, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x09, 0x61, 0x6e, 0x79, 0x41, 0x6e, 0x69, 0x6d, 0x61, 0x6c, 0x22, 0x45, 0x0a, 0x0f, 0x54, 0x65, 0x73, 0x74, 0x41, 0x6e, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x0a, 0x68, 0x61, 0x73, 0x5f, 0x61, 0x6e, 0x69, 0x6d, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x48, 0x61, 0x73, 0x41, 0x6e, 0x69, 0x6d, 0x61, 0x6c, 0x52, 0x09, 0x68, 0x61, 0x73, 0x41, 0x6e, 0x69, 0x6d, 0x61, 0x6c, 0x32, 0xc1, 0x01, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x35, 0x0a, 0x04, 0x45, 0x63, 0x68, 0x6f, 0x12, 0x15, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x45, 0x63, 0x68, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x45, 0x63, 0x68, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x08, 0x53, 0x61, 0x79, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x12, 0x19, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x61, 0x79, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x61, 0x79, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x07, 0x54, 0x65, 0x73, 0x74, 0x41, 0x6e, 0x79, 0x12, 0x18, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x41, 0x6e, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x41, 0x6e, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x91, 0x01, 0x0a, 0x0c, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x75, 0x74, 0x69, 0x6c, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x70, 0x75, 0x6c, 0x73, 0x61, 0x72, 0xa2, 0x02, 0x03, 0x54, 0x58, 0x58, 0xaa, 0x02, 0x08, 0x54, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0xca, 0x02, 0x08, 0x54, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0xe2, 0x02, 0x14, 0x54, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x08, 0x54, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( file_query_proto_rawDescOnce sync.Once file_query_proto_rawDescData = file_query_proto_rawDesc ) func file_query_proto_rawDescGZIP() []byte { file_query_proto_rawDescOnce.Do(func() { file_query_proto_rawDescData = protoimpl.X.CompressGZIP(file_query_proto_rawDescData) }) return file_query_proto_rawDescData } var file_query_proto_msgTypes = make([]protoimpl.MessageInfo, 6) var file_query_proto_goTypes = []interface{}{ (*EchoRequest)(nil), // 0: testdata.EchoRequest (*EchoResponse)(nil), // 1: testdata.EchoResponse (*SayHelloRequest)(nil), // 2: testdata.SayHelloRequest (*SayHelloResponse)(nil), // 3: testdata.SayHelloResponse (*TestAnyRequest)(nil), // 4: testdata.TestAnyRequest (*TestAnyResponse)(nil), // 5: testdata.TestAnyResponse (*anypb.Any)(nil), // 6: google.protobuf.Any (*HasAnimal)(nil), // 7: testdata.HasAnimal } var file_query_proto_depIdxs = []int32{ 6, // 0: testdata.TestAnyRequest.any_animal:type_name -> google.protobuf.Any 7, // 1: testdata.TestAnyResponse.has_animal:type_name -> testdata.HasAnimal 0, // 2: testdata.Query.Echo:input_type -> testdata.EchoRequest 2, // 3: testdata.Query.SayHello:input_type -> testdata.SayHelloRequest 4, // 4: testdata.Query.TestAny:input_type -> testdata.TestAnyRequest 1, // 5: testdata.Query.Echo:output_type -> testdata.EchoResponse 3, // 6: testdata.Query.SayHello:output_type -> testdata.SayHelloResponse 5, // 7: testdata.Query.TestAny:output_type -> testdata.TestAnyResponse 5, // [5:8] is the sub-list for method output_type 2, // [2:5] is the sub-list for method input_type 2, // [2:2] is the sub-list for extension type_name 2, // [2:2] is the sub-list for extension extendee 0, // [0:2] is the sub-list for field type_name } func init() { file_query_proto_init() } func file_query_proto_init() { if File_query_proto != nil { return } file_testdata_proto_init() if !protoimpl.UnsafeEnabled { file_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*EchoRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_query_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*EchoResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_query_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SayHelloRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_query_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SayHelloResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_query_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TestAnyRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_query_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TestAnyResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_query_proto_rawDesc, NumEnums: 0, NumMessages: 6, NumExtensions: 0, NumServices: 1, }, GoTypes: file_query_proto_goTypes, DependencyIndexes: file_query_proto_depIdxs, MessageInfos: file_query_proto_msgTypes, }.Build() File_query_proto = out.File file_query_proto_rawDesc = nil file_query_proto_goTypes = nil file_query_proto_depIdxs = nil }