github.com/cosmos/cosmos-proto@v1.0.0-beta.3/testpb/2.pulsar.go (about)

     1  // Code generated by protoc-gen-go-pulsar. DO NOT EDIT.
     2  package testpb
     3  
     4  import (
     5  	fmt "fmt"
     6  	runtime "github.com/cosmos/cosmos-proto/runtime"
     7  	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
     8  	protoiface "google.golang.org/protobuf/runtime/protoiface"
     9  	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
    10  	io "io"
    11  	reflect "reflect"
    12  	sync "sync"
    13  )
    14  
    15  var (
    16  	md_ImportedMessage protoreflect.MessageDescriptor
    17  )
    18  
    19  func init() {
    20  	file_testpb_2_proto_init()
    21  	md_ImportedMessage = File_testpb_2_proto.Messages().ByName("ImportedMessage")
    22  }
    23  
    24  var _ protoreflect.Message = (*fastReflection_ImportedMessage)(nil)
    25  
    26  type fastReflection_ImportedMessage ImportedMessage
    27  
    28  func (x *ImportedMessage) ProtoReflect() protoreflect.Message {
    29  	return (*fastReflection_ImportedMessage)(x)
    30  }
    31  
    32  func (x *ImportedMessage) slowProtoReflect() protoreflect.Message {
    33  	mi := &file_testpb_2_proto_msgTypes[0]
    34  	if protoimpl.UnsafeEnabled && x != nil {
    35  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    36  		if ms.LoadMessageInfo() == nil {
    37  			ms.StoreMessageInfo(mi)
    38  		}
    39  		return ms
    40  	}
    41  	return mi.MessageOf(x)
    42  }
    43  
    44  var _fastReflection_ImportedMessage_messageType fastReflection_ImportedMessage_messageType
    45  var _ protoreflect.MessageType = fastReflection_ImportedMessage_messageType{}
    46  
    47  type fastReflection_ImportedMessage_messageType struct{}
    48  
    49  func (x fastReflection_ImportedMessage_messageType) Zero() protoreflect.Message {
    50  	return (*fastReflection_ImportedMessage)(nil)
    51  }
    52  func (x fastReflection_ImportedMessage_messageType) New() protoreflect.Message {
    53  	return new(fastReflection_ImportedMessage)
    54  }
    55  func (x fastReflection_ImportedMessage_messageType) Descriptor() protoreflect.MessageDescriptor {
    56  	return md_ImportedMessage
    57  }
    58  
    59  // Descriptor returns message descriptor, which contains only the protobuf
    60  // type information for the message.
    61  func (x *fastReflection_ImportedMessage) Descriptor() protoreflect.MessageDescriptor {
    62  	return md_ImportedMessage
    63  }
    64  
    65  // Type returns the message type, which encapsulates both Go and protobuf
    66  // type information. If the Go type information is not needed,
    67  // it is recommended that the message descriptor be used instead.
    68  func (x *fastReflection_ImportedMessage) Type() protoreflect.MessageType {
    69  	return _fastReflection_ImportedMessage_messageType
    70  }
    71  
    72  // New returns a newly allocated and mutable empty message.
    73  func (x *fastReflection_ImportedMessage) New() protoreflect.Message {
    74  	return new(fastReflection_ImportedMessage)
    75  }
    76  
    77  // Interface unwraps the message reflection interface and
    78  // returns the underlying ProtoMessage interface.
    79  func (x *fastReflection_ImportedMessage) Interface() protoreflect.ProtoMessage {
    80  	return (*ImportedMessage)(x)
    81  }
    82  
    83  // Range iterates over every populated field in an undefined order,
    84  // calling f for each field descriptor and value encountered.
    85  // Range returns immediately if f returns false.
    86  // While iterating, mutating operations may only be performed
    87  // on the current field descriptor.
    88  func (x *fastReflection_ImportedMessage) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) {
    89  }
    90  
    91  // Has reports whether a field is populated.
    92  //
    93  // Some fields have the property of nullability where it is possible to
    94  // distinguish between the default value of a field and whether the field
    95  // was explicitly populated with the default value. Singular message fields,
    96  // member fields of a oneof, and proto2 scalar fields are nullable. Such
    97  // fields are populated only if explicitly set.
    98  //
    99  // In other cases (aside from the nullable cases above),
   100  // a proto3 scalar field is populated if it contains a non-zero value, and
   101  // a repeated field is populated if it is non-empty.
   102  func (x *fastReflection_ImportedMessage) Has(fd protoreflect.FieldDescriptor) bool {
   103  	switch fd.FullName() {
   104  	default:
   105  		if fd.IsExtension() {
   106  			panic(fmt.Errorf("proto3 declared messages do not support extensions: ImportedMessage"))
   107  		}
   108  		panic(fmt.Errorf("message ImportedMessage does not contain field %s", fd.FullName()))
   109  	}
   110  }
   111  
   112  // Clear clears the field such that a subsequent Has call reports false.
   113  //
   114  // Clearing an extension field clears both the extension type and value
   115  // associated with the given field number.
   116  //
   117  // Clear is a mutating operation and unsafe for concurrent use.
   118  func (x *fastReflection_ImportedMessage) Clear(fd protoreflect.FieldDescriptor) {
   119  	switch fd.FullName() {
   120  	default:
   121  		if fd.IsExtension() {
   122  			panic(fmt.Errorf("proto3 declared messages do not support extensions: ImportedMessage"))
   123  		}
   124  		panic(fmt.Errorf("message ImportedMessage does not contain field %s", fd.FullName()))
   125  	}
   126  }
   127  
   128  // Get retrieves the value for a field.
   129  //
   130  // For unpopulated scalars, it returns the default value, where
   131  // the default value of a bytes scalar is guaranteed to be a copy.
   132  // For unpopulated composite types, it returns an empty, read-only view
   133  // of the value; to obtain a mutable reference, use Mutable.
   134  func (x *fastReflection_ImportedMessage) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value {
   135  	switch descriptor.FullName() {
   136  	default:
   137  		if descriptor.IsExtension() {
   138  			panic(fmt.Errorf("proto3 declared messages do not support extensions: ImportedMessage"))
   139  		}
   140  		panic(fmt.Errorf("message ImportedMessage does not contain field %s", descriptor.FullName()))
   141  	}
   142  }
   143  
   144  // Set stores the value for a field.
   145  //
   146  // For a field belonging to a oneof, it implicitly clears any other field
   147  // that may be currently set within the same oneof.
   148  // For extension fields, it implicitly stores the provided ExtensionType.
   149  // When setting a composite type, it is unspecified whether the stored value
   150  // aliases the source's memory in any way. If the composite value is an
   151  // empty, read-only value, then it panics.
   152  //
   153  // Set is a mutating operation and unsafe for concurrent use.
   154  func (x *fastReflection_ImportedMessage) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) {
   155  	switch fd.FullName() {
   156  	default:
   157  		if fd.IsExtension() {
   158  			panic(fmt.Errorf("proto3 declared messages do not support extensions: ImportedMessage"))
   159  		}
   160  		panic(fmt.Errorf("message ImportedMessage does not contain field %s", fd.FullName()))
   161  	}
   162  }
   163  
   164  // Mutable returns a mutable reference to a composite type.
   165  //
   166  // If the field is unpopulated, it may allocate a composite value.
   167  // For a field belonging to a oneof, it implicitly clears any other field
   168  // that may be currently set within the same oneof.
   169  // For extension fields, it implicitly stores the provided ExtensionType
   170  // if not already stored.
   171  // It panics if the field does not contain a composite type.
   172  //
   173  // Mutable is a mutating operation and unsafe for concurrent use.
   174  func (x *fastReflection_ImportedMessage) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value {
   175  	switch fd.FullName() {
   176  	default:
   177  		if fd.IsExtension() {
   178  			panic(fmt.Errorf("proto3 declared messages do not support extensions: ImportedMessage"))
   179  		}
   180  		panic(fmt.Errorf("message ImportedMessage does not contain field %s", fd.FullName()))
   181  	}
   182  }
   183  
   184  // NewField returns a new value that is assignable to the field
   185  // for the given descriptor. For scalars, this returns the default value.
   186  // For lists, maps, and messages, this returns a new, empty, mutable value.
   187  func (x *fastReflection_ImportedMessage) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value {
   188  	switch fd.FullName() {
   189  	default:
   190  		if fd.IsExtension() {
   191  			panic(fmt.Errorf("proto3 declared messages do not support extensions: ImportedMessage"))
   192  		}
   193  		panic(fmt.Errorf("message ImportedMessage does not contain field %s", fd.FullName()))
   194  	}
   195  }
   196  
   197  // WhichOneof reports which field within the oneof is populated,
   198  // returning nil if none are populated.
   199  // It panics if the oneof descriptor does not belong to this message.
   200  func (x *fastReflection_ImportedMessage) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
   201  	switch d.FullName() {
   202  	default:
   203  		panic(fmt.Errorf("%s is not a oneof field in ImportedMessage", d.FullName()))
   204  	}
   205  	panic("unreachable")
   206  }
   207  
   208  // GetUnknown retrieves the entire list of unknown fields.
   209  // The caller may only mutate the contents of the RawFields
   210  // if the mutated bytes are stored back into the message with SetUnknown.
   211  func (x *fastReflection_ImportedMessage) GetUnknown() protoreflect.RawFields {
   212  	return x.unknownFields
   213  }
   214  
   215  // SetUnknown stores an entire list of unknown fields.
   216  // The raw fields must be syntactically valid according to the wire format.
   217  // An implementation may panic if this is not the case.
   218  // Once stored, the caller must not mutate the content of the RawFields.
   219  // An empty RawFields may be passed to clear the fields.
   220  //
   221  // SetUnknown is a mutating operation and unsafe for concurrent use.
   222  func (x *fastReflection_ImportedMessage) SetUnknown(fields protoreflect.RawFields) {
   223  	x.unknownFields = fields
   224  }
   225  
   226  // IsValid reports whether the message is valid.
   227  //
   228  // An invalid message is an empty, read-only value.
   229  //
   230  // An invalid message often corresponds to a nil pointer of the concrete
   231  // message type, but the details are implementation dependent.
   232  // Validity is not part of the protobuf data model, and may not
   233  // be preserved in marshaling or other operations.
   234  func (x *fastReflection_ImportedMessage) IsValid() bool {
   235  	return x != nil
   236  }
   237  
   238  // ProtoMethods returns optional fastReflectionFeature-path implementations of various operations.
   239  // This method may return nil.
   240  //
   241  // The returned methods type is identical to
   242  // "google.golang.org/protobuf/runtime/protoiface".Methods.
   243  // Consult the protoiface package documentation for details.
   244  func (x *fastReflection_ImportedMessage) ProtoMethods() *protoiface.Methods {
   245  	size := func(input protoiface.SizeInput) protoiface.SizeOutput {
   246  		x := input.Message.Interface().(*ImportedMessage)
   247  		if x == nil {
   248  			return protoiface.SizeOutput{
   249  				NoUnkeyedLiterals: input.NoUnkeyedLiterals,
   250  				Size:              0,
   251  			}
   252  		}
   253  		options := runtime.SizeInputToOptions(input)
   254  		_ = options
   255  		var n int
   256  		var l int
   257  		_ = l
   258  		if x.unknownFields != nil {
   259  			n += len(x.unknownFields)
   260  		}
   261  		return protoiface.SizeOutput{
   262  			NoUnkeyedLiterals: input.NoUnkeyedLiterals,
   263  			Size:              n,
   264  		}
   265  	}
   266  
   267  	marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) {
   268  		x := input.Message.Interface().(*ImportedMessage)
   269  		if x == nil {
   270  			return protoiface.MarshalOutput{
   271  				NoUnkeyedLiterals: input.NoUnkeyedLiterals,
   272  				Buf:               input.Buf,
   273  			}, nil
   274  		}
   275  		options := runtime.MarshalInputToOptions(input)
   276  		_ = options
   277  		size := options.Size(x)
   278  		dAtA := make([]byte, size)
   279  		i := len(dAtA)
   280  		_ = i
   281  		var l int
   282  		_ = l
   283  		if x.unknownFields != nil {
   284  			i -= len(x.unknownFields)
   285  			copy(dAtA[i:], x.unknownFields)
   286  		}
   287  		if input.Buf != nil {
   288  			input.Buf = append(input.Buf, dAtA...)
   289  		} else {
   290  			input.Buf = dAtA
   291  		}
   292  		return protoiface.MarshalOutput{
   293  			NoUnkeyedLiterals: input.NoUnkeyedLiterals,
   294  			Buf:               input.Buf,
   295  		}, nil
   296  	}
   297  	unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) {
   298  		x := input.Message.Interface().(*ImportedMessage)
   299  		if x == nil {
   300  			return protoiface.UnmarshalOutput{
   301  				NoUnkeyedLiterals: input.NoUnkeyedLiterals,
   302  				Flags:             input.Flags,
   303  			}, nil
   304  		}
   305  		options := runtime.UnmarshalInputToOptions(input)
   306  		_ = options
   307  		dAtA := input.Buf
   308  		l := len(dAtA)
   309  		iNdEx := 0
   310  		for iNdEx < l {
   311  			preIndex := iNdEx
   312  			var wire uint64
   313  			for shift := uint(0); ; shift += 7 {
   314  				if shift >= 64 {
   315  					return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
   316  				}
   317  				if iNdEx >= l {
   318  					return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
   319  				}
   320  				b := dAtA[iNdEx]
   321  				iNdEx++
   322  				wire |= uint64(b&0x7F) << shift
   323  				if b < 0x80 {
   324  					break
   325  				}
   326  			}
   327  			fieldNum := int32(wire >> 3)
   328  			wireType := int(wire & 0x7)
   329  			if wireType == 4 {
   330  				return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ImportedMessage: wiretype end group for non-group")
   331  			}
   332  			if fieldNum <= 0 {
   333  				return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ImportedMessage: illegal tag %d (wire type %d)", fieldNum, wire)
   334  			}
   335  			switch fieldNum {
   336  			default:
   337  				iNdEx = preIndex
   338  				skippy, err := runtime.Skip(dAtA[iNdEx:])
   339  				if err != nil {
   340  					return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err
   341  				}
   342  				if (skippy < 0) || (iNdEx+skippy) < 0 {
   343  					return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
   344  				}
   345  				if (iNdEx + skippy) > l {
   346  					return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
   347  				}
   348  				if !options.DiscardUnknown {
   349  					x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
   350  				}
   351  				iNdEx += skippy
   352  			}
   353  		}
   354  
   355  		if iNdEx > l {
   356  			return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
   357  		}
   358  		return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil
   359  	}
   360  	return &protoiface.Methods{
   361  		NoUnkeyedLiterals: struct{}{},
   362  		Flags:             protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown,
   363  		Size:              size,
   364  		Marshal:           marshal,
   365  		Unmarshal:         unmarshal,
   366  		Merge:             nil,
   367  		CheckInitialized:  nil,
   368  	}
   369  }
   370  
   371  // Code generated by protoc-gen-go. DO NOT EDIT.
   372  // versions:
   373  // 	protoc-gen-go v1.27.0
   374  // 	protoc        v3.18.1
   375  // source: testpb/2.proto
   376  
   377  const (
   378  	// Verify that this generated code is sufficiently up-to-date.
   379  	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
   380  	// Verify that runtime/protoimpl is sufficiently up-to-date.
   381  	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
   382  )
   383  
   384  type ImportedMessage struct {
   385  	state         protoimpl.MessageState
   386  	sizeCache     protoimpl.SizeCache
   387  	unknownFields protoimpl.UnknownFields
   388  }
   389  
   390  func (x *ImportedMessage) Reset() {
   391  	*x = ImportedMessage{}
   392  	if protoimpl.UnsafeEnabled {
   393  		mi := &file_testpb_2_proto_msgTypes[0]
   394  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   395  		ms.StoreMessageInfo(mi)
   396  	}
   397  }
   398  
   399  func (x *ImportedMessage) String() string {
   400  	return protoimpl.X.MessageStringOf(x)
   401  }
   402  
   403  func (*ImportedMessage) ProtoMessage() {}
   404  
   405  // Deprecated: Use ImportedMessage.ProtoReflect.Descriptor instead.
   406  func (*ImportedMessage) Descriptor() ([]byte, []int) {
   407  	return file_testpb_2_proto_rawDescGZIP(), []int{0}
   408  }
   409  
   410  var File_testpb_2_proto protoreflect.FileDescriptor
   411  
   412  var file_testpb_2_proto_rawDesc = []byte{
   413  	0x0a, 0x0e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, 0x2f, 0x32, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
   414  	0x22, 0x11, 0x0a, 0x0f, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73,
   415  	0x61, 0x67, 0x65, 0x42, 0x27, 0x5a, 0x25, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f,
   416  	0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d,
   417  	0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72,
   418  	0x6f, 0x74, 0x6f, 0x33,
   419  }
   420  
   421  var (
   422  	file_testpb_2_proto_rawDescOnce sync.Once
   423  	file_testpb_2_proto_rawDescData = file_testpb_2_proto_rawDesc
   424  )
   425  
   426  func file_testpb_2_proto_rawDescGZIP() []byte {
   427  	file_testpb_2_proto_rawDescOnce.Do(func() {
   428  		file_testpb_2_proto_rawDescData = protoimpl.X.CompressGZIP(file_testpb_2_proto_rawDescData)
   429  	})
   430  	return file_testpb_2_proto_rawDescData
   431  }
   432  
   433  var file_testpb_2_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
   434  var file_testpb_2_proto_goTypes = []interface{}{
   435  	(*ImportedMessage)(nil), // 0: ImportedMessage
   436  }
   437  var file_testpb_2_proto_depIdxs = []int32{
   438  	0, // [0:0] is the sub-list for method output_type
   439  	0, // [0:0] is the sub-list for method input_type
   440  	0, // [0:0] is the sub-list for extension type_name
   441  	0, // [0:0] is the sub-list for extension extendee
   442  	0, // [0:0] is the sub-list for field type_name
   443  }
   444  
   445  func init() { file_testpb_2_proto_init() }
   446  func file_testpb_2_proto_init() {
   447  	if File_testpb_2_proto != nil {
   448  		return
   449  	}
   450  	if !protoimpl.UnsafeEnabled {
   451  		file_testpb_2_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
   452  			switch v := v.(*ImportedMessage); i {
   453  			case 0:
   454  				return &v.state
   455  			case 1:
   456  				return &v.sizeCache
   457  			case 2:
   458  				return &v.unknownFields
   459  			default:
   460  				return nil
   461  			}
   462  		}
   463  	}
   464  	type x struct{}
   465  	out := protoimpl.TypeBuilder{
   466  		File: protoimpl.DescBuilder{
   467  			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
   468  			RawDescriptor: file_testpb_2_proto_rawDesc,
   469  			NumEnums:      0,
   470  			NumMessages:   1,
   471  			NumExtensions: 0,
   472  			NumServices:   0,
   473  		},
   474  		GoTypes:           file_testpb_2_proto_goTypes,
   475  		DependencyIndexes: file_testpb_2_proto_depIdxs,
   476  		MessageInfos:      file_testpb_2_proto_msgTypes,
   477  	}.Build()
   478  	File_testpb_2_proto = out.File
   479  	file_testpb_2_proto_rawDesc = nil
   480  	file_testpb_2_proto_goTypes = nil
   481  	file_testpb_2_proto_depIdxs = nil
   482  }