google-protobuf 4.31.1-x86_64-linux-musl → 4.32.0.rc.1-x86_64-linux-musl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -93,9 +93,15 @@ const upb_DefPool* DescriptorPool_GetSymtab(VALUE desc_pool_rb) {
93
93
  return pool->symtab;
94
94
  }
95
95
 
96
+ /**
97
+ * ruby-doc: DescriptorPool
98
+ *
99
+ * A DescriptorPool is the registry of all known Protobuf descriptor objects.
100
+ *
101
+ */
102
+
96
103
  /*
97
- * call-seq:
98
- * DescriptorPool.new => pool
104
+ * ruby-doc: DescriptorPool.new
99
105
  *
100
106
  * Creates a new, empty, descriptor pool.
101
107
  */
@@ -112,10 +118,14 @@ static VALUE DescriptorPool_alloc(VALUE klass) {
112
118
  }
113
119
 
114
120
  /*
115
- * call-seq:
116
- * DescriptorPool.add_serialized_file(serialized_file_proto)
121
+ * ruby-doc: DescriptorPool#add_serialized_file
122
+ *
123
+ * Adds the given serialized
124
+ * {https://protobuf.com/docs/descriptors#file-descriptors FileDescriptorProto}
125
+ * to the pool.
117
126
  *
118
- * Adds the given serialized FileDescriptorProto to the pool.
127
+ * @param serialized_file_proto [String]
128
+ * @return [FileDescriptor]
119
129
  */
120
130
  VALUE DescriptorPool_add_serialized_file(VALUE _self,
121
131
  VALUE serialized_file_proto) {
@@ -143,11 +153,14 @@ VALUE DescriptorPool_add_serialized_file(VALUE _self,
143
153
  }
144
154
 
145
155
  /*
146
- * call-seq:
147
- * DescriptorPool.lookup(name) => descriptor
156
+ * ruby-doc: DescriptorPool#lookup
148
157
  *
149
- * Finds a Descriptor, EnumDescriptor, FieldDescriptor or ServiceDescriptor by
158
+ * Finds a {Descriptor}, {EnumDescriptor},
159
+ * {FieldDescriptor} or {ServiceDescriptor} by
150
160
  * name and returns it, or nil if none exists with the given name.
161
+ *
162
+ * @param name [String]
163
+ * @return [Descriptor,EnumDescriptor,FieldDescriptor,ServiceDescriptor]
151
164
  */
152
165
  static VALUE DescriptorPool_lookup(VALUE _self, VALUE name) {
153
166
  DescriptorPool* self = ruby_to_DescriptorPool(_self);
@@ -187,13 +200,14 @@ static VALUE DescriptorPool_lookup(VALUE _self, VALUE name) {
187
200
  }
188
201
 
189
202
  /*
190
- * call-seq:
191
- * DescriptorPool.generated_pool => descriptor_pool
203
+ * ruby-doc: DescriptorPool.generated_pool
192
204
  *
193
- * Class method that returns the global DescriptorPool. This is a singleton into
194
- * which generated-code message and enum types are registered. The user may also
195
- * register types in this pool for convenience so that they do not have to hold
196
- * a reference to a private pool instance.
205
+ * Class method that returns the global {DescriptorPool}. This is a singleton
206
+ * into which generated-code message and enum types are registered. The user may
207
+ * also register types in this pool for convenience so that they do not have to
208
+ * hold a reference to a private pool instance.
209
+ *
210
+ * @return [DescriptorPool]
197
211
  */
198
212
  static VALUE DescriptorPool_generated_pool(VALUE _self) {
199
213
  return generated_pool;
@@ -290,8 +304,13 @@ static VALUE decode_options(VALUE self, const char* option_type, int size,
290
304
  }
291
305
 
292
306
  /*
293
- * call-seq:
294
- * Descriptor.new => descriptor
307
+ * ruby-doc: Descriptor
308
+ *
309
+ * A Descriptor provides information about a given Protobuf definition.
310
+ */
311
+
312
+ /*
313
+ * ruby-doc: Descriptor.initialize
295
314
  *
296
315
  * Creates a new, empty, message type descriptor. At a minimum, its name must be
297
316
  * set before it is added to a pool. It cannot be used to create messages until
@@ -329,10 +348,11 @@ static VALUE Descriptor_initialize(VALUE _self, VALUE cookie,
329
348
  }
330
349
 
331
350
  /*
332
- * call-seq:
333
- * Descriptor.file_descriptor
351
+ * ruby-doc: Descriptor#file_descriptor
334
352
  *
335
- * Returns the FileDescriptor object this message belongs to.
353
+ * Returns the {FileDescriptor} object this message belongs to.
354
+ *
355
+ * @return [FileDescriptor]
336
356
  */
337
357
  static VALUE Descriptor_file_descriptor(VALUE _self) {
338
358
  Descriptor* self = ruby_to_Descriptor(_self);
@@ -341,11 +361,12 @@ static VALUE Descriptor_file_descriptor(VALUE _self) {
341
361
  }
342
362
 
343
363
  /*
344
- * call-seq:
345
- * Descriptor.name => name
364
+ * ruby-doc: Descriptor#name
346
365
  *
347
366
  * Returns the name of this message type as a fully-qualified string (e.g.,
348
367
  * My.Package.MessageType).
368
+ *
369
+ * @return [String]
349
370
  */
350
371
  static VALUE Descriptor_name(VALUE _self) {
351
372
  Descriptor* self = ruby_to_Descriptor(_self);
@@ -353,10 +374,12 @@ static VALUE Descriptor_name(VALUE _self) {
353
374
  }
354
375
 
355
376
  /*
356
- * call-seq:
357
- * Descriptor.each(&block)
377
+ * ruby-doc: Descriptor#each
358
378
  *
359
379
  * Iterates over fields in this message type, yielding to the block on each one.
380
+ *
381
+ * @yield [FieldDescriptor]
382
+ * @return [nil]
360
383
  */
361
384
  static VALUE Descriptor_each(VALUE _self) {
362
385
  Descriptor* self = ruby_to_Descriptor(_self);
@@ -371,11 +394,13 @@ static VALUE Descriptor_each(VALUE _self) {
371
394
  }
372
395
 
373
396
  /*
374
- * call-seq:
375
- * Descriptor.lookup(name) => FieldDescriptor
397
+ * ruby-doc: Descriptor#lookup
376
398
  *
377
399
  * Returns the field descriptor for the field with the given name, if present,
378
400
  * or nil if none.
401
+ *
402
+ * @param name [String]
403
+ * @return [FieldDescriptor]
379
404
  */
380
405
  static VALUE Descriptor_lookup(VALUE _self, VALUE name) {
381
406
  Descriptor* self = ruby_to_Descriptor(_self);
@@ -388,11 +413,13 @@ static VALUE Descriptor_lookup(VALUE _self, VALUE name) {
388
413
  }
389
414
 
390
415
  /*
391
- * call-seq:
392
- * Descriptor.each_oneof(&block) => nil
416
+ * ruby-doc: Descriptor#each_oneof
393
417
  *
394
418
  * Invokes the given block for each oneof in this message type, passing the
395
- * corresponding OneofDescriptor.
419
+ * corresponding {OneofDescriptor}.
420
+ *
421
+ * @yield [OneofDescriptor]
422
+ * @return [nil]
396
423
  */
397
424
  static VALUE Descriptor_each_oneof(VALUE _self) {
398
425
  Descriptor* self = ruby_to_Descriptor(_self);
@@ -407,11 +434,13 @@ static VALUE Descriptor_each_oneof(VALUE _self) {
407
434
  }
408
435
 
409
436
  /*
410
- * call-seq:
411
- * Descriptor.lookup_oneof(name) => OneofDescriptor
437
+ * ruby-doc: Descriptor#lookup_oneof
412
438
  *
413
439
  * Returns the oneof descriptor for the oneof with the given name, if present,
414
440
  * or nil if none.
441
+ *
442
+ * @param name [String]
443
+ * @return [OneofDescriptor]
415
444
  */
416
445
  static VALUE Descriptor_lookup_oneof(VALUE _self, VALUE name) {
417
446
  Descriptor* self = ruby_to_Descriptor(_self);
@@ -424,10 +453,11 @@ static VALUE Descriptor_lookup_oneof(VALUE _self, VALUE name) {
424
453
  }
425
454
 
426
455
  /*
427
- * call-seq:
428
- * Descriptor.msgclass => message_klass
456
+ * ruby-doc: Descriptor#msgclass
429
457
  *
430
458
  * Returns the Ruby class created for this message type.
459
+ *
460
+ * @return [Class<Google::Protobuf::AbstractMessage>]
431
461
  */
432
462
  static VALUE Descriptor_msgclass(VALUE _self) {
433
463
  Descriptor* self = ruby_to_Descriptor(_self);
@@ -438,10 +468,13 @@ static VALUE Descriptor_msgclass(VALUE _self) {
438
468
  }
439
469
 
440
470
  /*
441
- * call-seq:
442
- * Descriptor.options => options
471
+ * ruby-doc: Descriptor#options
443
472
  *
444
- * Returns the `MessageOptions` for this `Descriptor`.
473
+ * Returns the
474
+ * {https://github.com/protocolbuffers/protobuf/blob/v30.2/src/google/protobuf/descriptor.proto#L571
475
+ * MessageOptions} for this {Descriptor}.
476
+ *
477
+ * @return [MessageOptions]
445
478
  */
446
479
  static VALUE Descriptor_options(VALUE _self) {
447
480
  Descriptor* self = ruby_to_Descriptor(_self);
@@ -458,10 +491,13 @@ static VALUE Descriptor_options(VALUE _self) {
458
491
  }
459
492
 
460
493
  /*
461
- * call-seq:
462
- * Descriptor.to_proto => DescriptorProto
494
+ * ruby-doc: Descriptor#to_proto
463
495
  *
464
- * Returns the `DescriptorProto` of this `Descriptor`.
496
+ * Returns the
497
+ * {https://github.com/protocolbuffers/protobuf/blob/v30.2/src/google/protobuf/descriptor.proto#L147
498
+ * DescriptorProto} of this {Descriptor}.
499
+ *
500
+ * @return [DescriptorProto]
465
501
  */
466
502
  static VALUE Descriptor_to_proto(VALUE _self) {
467
503
  Descriptor* self = ruby_to_Descriptor(_self);
@@ -534,9 +570,15 @@ static VALUE FileDescriptor_alloc(VALUE klass) {
534
570
  return ret;
535
571
  }
536
572
 
573
+ /**
574
+ * ruby-doc: FileDescriptor
575
+ *
576
+ * A FileDescriptor provides information about all Protobuf definitions in a
577
+ * particular file.
578
+ */
579
+
537
580
  /*
538
- * call-seq:
539
- * FileDescriptor.new => file
581
+ * ruby-doc: FileDescriptor#initialize
540
582
  *
541
583
  * Returns a new file descriptor. May
542
584
  * to a builder.
@@ -557,10 +599,11 @@ static VALUE FileDescriptor_initialize(VALUE _self, VALUE cookie,
557
599
  }
558
600
 
559
601
  /*
560
- * call-seq:
561
- * FileDescriptor.name => name
602
+ * ruby-doc: FileDescriptor#name
562
603
  *
563
604
  * Returns the name of the file.
605
+ *
606
+ * @return [String]
564
607
  */
565
608
  static VALUE FileDescriptor_name(VALUE _self) {
566
609
  FileDescriptor* self = ruby_to_FileDescriptor(_self);
@@ -569,10 +612,13 @@ static VALUE FileDescriptor_name(VALUE _self) {
569
612
  }
570
613
 
571
614
  /*
572
- * call-seq:
573
- * FileDescriptor.options => options
615
+ * ruby-doc: FileDescriptor#options
616
+ *
617
+ * Returns the
618
+ * {https://github.com/protocolbuffers/protobuf/blob/v30.2/src/google/protobuf/descriptor.proto#L442
619
+ * FileOptions} for this {FileDescriptor}.
574
620
  *
575
- * Returns the `FileOptions` for this `FileDescriptor`.
621
+ * @return [FileOptions]
576
622
  */
577
623
  static VALUE FileDescriptor_options(VALUE _self) {
578
624
  FileDescriptor* self = ruby_to_FileDescriptor(_self);
@@ -587,10 +633,13 @@ static VALUE FileDescriptor_options(VALUE _self) {
587
633
  }
588
634
 
589
635
  /*
590
- * call-seq:
591
- * FileDescriptor.to_proto => FileDescriptorProto
636
+ * ruby-doc: FileDescriptor#to_proto
637
+ *
638
+ * Returns the
639
+ * {https://github.com/protocolbuffers/protobuf/blob/v30.2/src/google/protobuf/descriptor.proto#L104
640
+ * FileDescriptorProto} of this {FileDescriptor}.
592
641
  *
593
- * Returns the `FileDescriptorProto` of this `FileDescriptor`.
642
+ * @return [FileDescriptorProto]
594
643
  */
595
644
  static VALUE FileDescriptor_to_proto(VALUE _self) {
596
645
  FileDescriptor* self = ruby_to_FileDescriptor(_self);
@@ -651,9 +700,15 @@ static FieldDescriptor* ruby_to_FieldDescriptor(VALUE val) {
651
700
  return ret;
652
701
  }
653
702
 
703
+ /**
704
+ * ruby-doc: FieldDescriptor
705
+ *
706
+ * A FieldDescriptor provides information about the Protobuf definition of a
707
+ * field inside a {Descriptor}.
708
+ */
709
+
654
710
  /*
655
- * call-seq:
656
- * FieldDescriptor.new => field
711
+ * ruby-doc: FieldDescriptor#initialize
657
712
  *
658
713
  * Returns a new field descriptor. Its name, type, etc. must be set before it is
659
714
  * added to a message type.
@@ -687,10 +742,11 @@ static VALUE FieldDescriptor_initialize(VALUE _self, VALUE cookie,
687
742
  }
688
743
 
689
744
  /*
690
- * call-seq:
691
- * FieldDescriptor.name => name
745
+ * ruby-doc: FieldDescriptor#name
692
746
  *
693
747
  * Returns the name of this field.
748
+ *
749
+ * @return [String]
694
750
  */
695
751
  static VALUE FieldDescriptor_name(VALUE _self) {
696
752
  FieldDescriptor* self = ruby_to_FieldDescriptor(_self);
@@ -755,14 +811,15 @@ static VALUE descriptortype_to_ruby(upb_FieldType type) {
755
811
  }
756
812
 
757
813
  /*
758
- * call-seq:
759
- * FieldDescriptor.type => type
814
+ * ruby-doc: FieldDescriptor#type
760
815
  *
761
816
  * Returns this field's type, as a Ruby symbol, or nil if not yet set.
762
817
  *
763
818
  * Valid field types are:
764
819
  * :int32, :int64, :uint32, :uint64, :float, :double, :bool, :string,
765
820
  * :bytes, :message.
821
+ *
822
+ * @return [Symbol]
766
823
  */
767
824
  static VALUE FieldDescriptor__type(VALUE _self) {
768
825
  FieldDescriptor* self = ruby_to_FieldDescriptor(_self);
@@ -770,10 +827,11 @@ static VALUE FieldDescriptor__type(VALUE _self) {
770
827
  }
771
828
 
772
829
  /*
773
- * call-seq:
774
- * FieldDescriptor.default => default
830
+ * ruby-doc: FieldDescriptor#default
775
831
  *
776
832
  * Returns this field's default, as a Ruby object, or nil if not yet set.
833
+ *
834
+ * @return [Object,nil]
777
835
  */
778
836
  static VALUE FieldDescriptor_default(VALUE _self) {
779
837
  FieldDescriptor* self = ruby_to_FieldDescriptor(_self);
@@ -788,10 +846,11 @@ static VALUE FieldDescriptor_default(VALUE _self) {
788
846
  }
789
847
 
790
848
  /*
791
- * call-seq:
792
- * FieldDescriptor.has_presence? => bool
849
+ * ruby-doc: FieldDescriptor.has_presence?
793
850
  *
794
851
  * Returns whether this field tracks presence.
852
+ *
853
+ * @return [Boolean]
795
854
  */
796
855
  static VALUE FieldDescriptor_has_presence(VALUE _self) {
797
856
  FieldDescriptor* self = ruby_to_FieldDescriptor(_self);
@@ -799,10 +858,11 @@ static VALUE FieldDescriptor_has_presence(VALUE _self) {
799
858
  }
800
859
 
801
860
  /*
802
- * call-seq:
803
- * FieldDescriptor.required? => bool
861
+ * ruby-doc: FieldDescriptor#required?
804
862
  *
805
863
  * Returns whether this is a required field.
864
+ *
865
+ * @return [Boolean]
806
866
  */
807
867
  static VALUE FieldDescriptor_is_required(VALUE _self) {
808
868
  FieldDescriptor* self = ruby_to_FieldDescriptor(_self);
@@ -810,10 +870,10 @@ static VALUE FieldDescriptor_is_required(VALUE _self) {
810
870
  }
811
871
 
812
872
  /*
813
- * call-seq:
814
- * FieldDescriptor.repeated? => bool
873
+ * ruby-doc: FieldDescriptor#repeated?
815
874
  *
816
875
  * Returns whether this is a repeated field.
876
+ * @return [Boolean]
817
877
  */
818
878
  static VALUE FieldDescriptor_is_repeated(VALUE _self) {
819
879
  FieldDescriptor* self = ruby_to_FieldDescriptor(_self);
@@ -821,10 +881,10 @@ static VALUE FieldDescriptor_is_repeated(VALUE _self) {
821
881
  }
822
882
 
823
883
  /*
824
- * call-seq:
825
- * FieldDescriptor.is_packed? => bool
884
+ * ruby-doc: FieldDescriptor#is_packed?
826
885
  *
827
886
  * Returns whether this is a repeated field that uses packed encoding.
887
+ * @return [Boolean]
828
888
  */
829
889
  static VALUE FieldDescriptor_is_packed(VALUE _self) {
830
890
  FieldDescriptor* self = ruby_to_FieldDescriptor(_self);
@@ -832,10 +892,11 @@ static VALUE FieldDescriptor_is_packed(VALUE _self) {
832
892
  }
833
893
 
834
894
  /*
835
- * call-seq:
836
- * FieldDescriptor.json_name => json_name
895
+ * ruby-doc: FieldDescriptor#json_name
837
896
  *
838
897
  * Returns this field's json_name, as a Ruby string, or nil if not yet set.
898
+ *
899
+ * @return [String,nil]
839
900
  */
840
901
  static VALUE FieldDescriptor_json_name(VALUE _self) {
841
902
  FieldDescriptor* self = ruby_to_FieldDescriptor(_self);
@@ -845,15 +906,14 @@ static VALUE FieldDescriptor_json_name(VALUE _self) {
845
906
  }
846
907
 
847
908
  /*
848
- * DEPRECATED: Use repeated? or required? instead.
849
- *
850
- * call-seq:
851
- * FieldDescriptor.label => label
909
+ * ruby-doc: FieldDescriptor#label
852
910
  *
853
911
  * Returns this field's label (i.e., plurality), as a Ruby symbol.
854
- *
855
912
  * Valid field labels are:
856
- * :optional, :repeated
913
+ * :optional, :repeated
914
+ *
915
+ * @return [Symbol]
916
+ * @deprecated Use {#repeated?} or {#required?} instead.
857
917
  */
858
918
  static VALUE FieldDescriptor_label(VALUE _self) {
859
919
  FieldDescriptor* self = ruby_to_FieldDescriptor(_self);
@@ -873,10 +933,11 @@ static VALUE FieldDescriptor_label(VALUE _self) {
873
933
  }
874
934
 
875
935
  /*
876
- * call-seq:
877
- * FieldDescriptor.number => number
936
+ * ruby-doc: FieldDescriptor#number
878
937
  *
879
938
  * Returns the tag number for this field.
939
+ *
940
+ * @return [Integer]
880
941
  */
881
942
  static VALUE FieldDescriptor_number(VALUE _self) {
882
943
  FieldDescriptor* self = ruby_to_FieldDescriptor(_self);
@@ -884,13 +945,14 @@ static VALUE FieldDescriptor_number(VALUE _self) {
884
945
  }
885
946
 
886
947
  /*
887
- * call-seq:
888
- * FieldDescriptor.submsg_name => submsg_name
948
+ * ruby-doc: FieldDescriptor#submsg_name
889
949
  *
890
950
  * Returns the name of the message or enum type corresponding to this field, if
891
951
  * it is a message or enum field (respectively), or nil otherwise. This type
892
952
  * name will be resolved within the context of the pool to which the containing
893
953
  * message type is added.
954
+ *
955
+ * @return [String,nil]
894
956
  */
895
957
  static VALUE FieldDescriptor_submsg_name(VALUE _self) {
896
958
  FieldDescriptor* self = ruby_to_FieldDescriptor(_self);
@@ -907,13 +969,14 @@ static VALUE FieldDescriptor_submsg_name(VALUE _self) {
907
969
  }
908
970
 
909
971
  /*
910
- * call-seq:
911
- * FieldDescriptor.subtype => message_or_enum_descriptor
972
+ * ruby-doc: FieldDescriptor#subtype
912
973
  *
913
974
  * Returns the message or enum descriptor corresponding to this field's type if
914
975
  * it is a message or enum field, respectively, or nil otherwise. Cannot be
915
976
  * called *until* the containing message type is added to a pool (and thus
916
977
  * resolved).
978
+ *
979
+ * @return [Descriptor,EnumDescriptor,nil]
917
980
  */
918
981
  static VALUE FieldDescriptor_subtype(VALUE _self) {
919
982
  FieldDescriptor* self = ruby_to_FieldDescriptor(_self);
@@ -930,11 +993,13 @@ static VALUE FieldDescriptor_subtype(VALUE _self) {
930
993
  }
931
994
 
932
995
  /*
933
- * call-seq:
934
- * FieldDescriptor.get(message) => value
996
+ * ruby-doc: FieldDescriptor#get
935
997
  *
936
998
  * Returns the value set for this field on the given message. Raises an
937
999
  * exception if message is of the wrong type.
1000
+ *
1001
+ * @param message [AbstractMessage]
1002
+ * @return [Object]
938
1003
  */
939
1004
  static VALUE FieldDescriptor_get(VALUE _self, VALUE msg_rb) {
940
1005
  FieldDescriptor* self = ruby_to_FieldDescriptor(_self);
@@ -950,11 +1015,13 @@ static VALUE FieldDescriptor_get(VALUE _self, VALUE msg_rb) {
950
1015
  }
951
1016
 
952
1017
  /*
953
- * call-seq:
954
- * FieldDescriptor.has?(message) => boolean
1018
+ * ruby-doc: FieldDescriptor.has?
955
1019
  *
956
1020
  * Returns whether the value is set on the given message. Raises an
957
1021
  * exception when calling for fields that do not have presence.
1022
+ *
1023
+ * @param message [AbstractMessage]
1024
+ * @return [Boolean]
958
1025
  */
959
1026
  static VALUE FieldDescriptor_has(VALUE _self, VALUE msg_rb) {
960
1027
  FieldDescriptor* self = ruby_to_FieldDescriptor(_self);
@@ -971,10 +1038,12 @@ static VALUE FieldDescriptor_has(VALUE _self, VALUE msg_rb) {
971
1038
  }
972
1039
 
973
1040
  /*
974
- * call-seq:
975
- * FieldDescriptor.clear(message)
1041
+ * ruby-doc: FieldDescriptor#clear
976
1042
  *
977
1043
  * Clears the field from the message if it's set.
1044
+ *
1045
+ * @param message [AbstractMessage]
1046
+ * @return [nil]
978
1047
  */
979
1048
  static VALUE FieldDescriptor_clear(VALUE _self, VALUE msg_rb) {
980
1049
  FieldDescriptor* self = ruby_to_FieldDescriptor(_self);
@@ -990,12 +1059,14 @@ static VALUE FieldDescriptor_clear(VALUE _self, VALUE msg_rb) {
990
1059
  }
991
1060
 
992
1061
  /*
993
- * call-seq:
994
- * FieldDescriptor.set(message, value)
1062
+ * ruby-doc: FieldDescriptor#set
995
1063
  *
996
1064
  * Sets the value corresponding to this field to the given value on the given
997
1065
  * message. Raises an exception if message is of the wrong type. Performs the
998
1066
  * ordinary type-checks for field setting.
1067
+ *
1068
+ * @param message [AbstractMessage]
1069
+ * @param value [Object]
999
1070
  */
1000
1071
  static VALUE FieldDescriptor_set(VALUE _self, VALUE msg_rb, VALUE value) {
1001
1072
  FieldDescriptor* self = ruby_to_FieldDescriptor(_self);
@@ -1015,10 +1086,13 @@ static VALUE FieldDescriptor_set(VALUE _self, VALUE msg_rb, VALUE value) {
1015
1086
  }
1016
1087
 
1017
1088
  /*
1018
- * call-seq:
1019
- * FieldDescriptor.options => options
1089
+ * ruby-doc: FieldDescriptor#options
1090
+ *
1091
+ * Returns the
1092
+ * {https://github.com/protocolbuffers/protobuf/blob/v30.2/src/google/protobuf/descriptor.proto#L656
1093
+ * FieldOptions} for this {FieldDescriptor}.
1020
1094
  *
1021
- * Returns the `FieldOptions` for this `FieldDescriptor`.
1095
+ * @return [FieldOptions]
1022
1096
  */
1023
1097
  static VALUE FieldDescriptor_options(VALUE _self) {
1024
1098
  FieldDescriptor* self = ruby_to_FieldDescriptor(_self);
@@ -1034,10 +1108,13 @@ static VALUE FieldDescriptor_options(VALUE _self) {
1034
1108
  }
1035
1109
 
1036
1110
  /*
1037
- * call-seq:
1038
- * FieldDescriptor.to_proto => FieldDescriptorProto
1111
+ * ruby-doc: FieldDescriptor#to_proto
1112
+ *
1113
+ * Returns the
1114
+ * {https://github.com/protocolbuffers/protobuf/blob/v30.2/src/google/protobuf/descriptor.proto#L236
1115
+ * FieldDescriptorProto} of this {FieldDescriptor}.
1039
1116
  *
1040
- * Returns the `FieldDescriptorProto` of this `FieldDescriptor`.
1117
+ * @return [FieldDescriptorProto]
1041
1118
  */
1042
1119
  static VALUE FieldDescriptor_to_proto(VALUE _self) {
1043
1120
  FieldDescriptor* self = ruby_to_FieldDescriptor(_self);
@@ -1110,9 +1187,15 @@ static OneofDescriptor* ruby_to_OneofDescriptor(VALUE val) {
1110
1187
  return ret;
1111
1188
  }
1112
1189
 
1190
+ /**
1191
+ * ruby-doc: OneofDescriptor
1192
+ *
1193
+ * A OneofDescriptor provides information about the Protobuf definition of a
1194
+ * oneof inside a {Descriptor}.
1195
+ */
1196
+
1113
1197
  /*
1114
- * call-seq:
1115
- * OneofDescriptor.new => oneof_descriptor
1198
+ * ruby-doc: OneofDescriptor#initialize
1116
1199
  *
1117
1200
  * Creates a new, empty, oneof descriptor. The oneof may only be modified prior
1118
1201
  * to being added to a message descriptor which is subsequently added to a pool.
@@ -1147,10 +1230,11 @@ static VALUE OneofDescriptor_initialize(VALUE _self, VALUE cookie,
1147
1230
  }
1148
1231
 
1149
1232
  /*
1150
- * call-seq:
1151
- * OneofDescriptor.name => name
1233
+ * ruby-doc: OneofDescriptor#name
1152
1234
  *
1153
1235
  * Returns the name of this oneof.
1236
+ *
1237
+ * @return [String]
1154
1238
  */
1155
1239
  static VALUE OneofDescriptor_name(VALUE _self) {
1156
1240
  OneofDescriptor* self = ruby_to_OneofDescriptor(_self);
@@ -1158,10 +1242,12 @@ static VALUE OneofDescriptor_name(VALUE _self) {
1158
1242
  }
1159
1243
 
1160
1244
  /*
1161
- * call-seq:
1162
- * OneofDescriptor.each(&block) => nil
1245
+ * ruby-doc: OneofDescriptor#each
1163
1246
  *
1164
1247
  * Iterates through fields in this oneof, yielding to the block on each one.
1248
+ *
1249
+ * @yield [FieldDescriptor]
1250
+ * @return [nil]
1165
1251
  */
1166
1252
  static VALUE OneofDescriptor_each(VALUE _self) {
1167
1253
  OneofDescriptor* self = ruby_to_OneofDescriptor(_self);
@@ -1176,10 +1262,13 @@ static VALUE OneofDescriptor_each(VALUE _self) {
1176
1262
  }
1177
1263
 
1178
1264
  /*
1179
- * call-seq:
1180
- * OneofDescriptor.options => options
1265
+ * ruby-doc: OneofDescriptor#options
1266
+ *
1267
+ * Returns the
1268
+ * {https://github.com/protocolbuffers/protobuf/blob/v30.2/src/google/protobuf/descriptor.proto#L824
1269
+ * OneofOptions} for this {OneofDescriptor}.
1181
1270
  *
1182
- * Returns the `OneofOptions` for this `OneofDescriptor`.
1271
+ * @return [OneofOptions]
1183
1272
  */
1184
1273
  static VALUE OneOfDescriptor_options(VALUE _self) {
1185
1274
  OneofDescriptor* self = ruby_to_OneofDescriptor(_self);
@@ -1195,10 +1284,13 @@ static VALUE OneOfDescriptor_options(VALUE _self) {
1195
1284
  }
1196
1285
 
1197
1286
  /*
1198
- * call-seq:
1199
- * OneofDescriptor.to_proto => OneofDescriptorProto
1287
+ * ruby-doc: OneofDescriptor#to_proto
1288
+ *
1289
+ * Returns the
1290
+ * {https://github.com/protocolbuffers/protobuf/blob/v30.2/src/google/protobuf/descriptor.proto#L343
1291
+ * OneofDescriptorProto} of this {OneofDescriptor}.
1200
1292
  *
1201
- * Returns the `OneofDescriptorProto` of this `OneofDescriptor`.
1293
+ * @return [OneofDescriptorProto]
1202
1294
  */
1203
1295
  static VALUE OneOfDescriptor_to_proto(VALUE _self) {
1204
1296
  OneofDescriptor* self = ruby_to_OneofDescriptor(_self);
@@ -1275,6 +1367,13 @@ const upb_EnumDef* EnumDescriptor_GetEnumDef(VALUE enum_desc_rb) {
1275
1367
  return desc->enumdef;
1276
1368
  }
1277
1369
 
1370
+ /**
1371
+ * ruby-doc: EnumDescriptor
1372
+ *
1373
+ * An EnumDescriptor provides information about the Protobuf definition of an
1374
+ * enum inside a {Descriptor}.
1375
+ */
1376
+
1278
1377
  /*
1279
1378
  * call-seq:
1280
1379
  * EnumDescriptor.new(c_only_cookie, ptr) => EnumDescriptor
@@ -1297,10 +1396,11 @@ static VALUE EnumDescriptor_initialize(VALUE _self, VALUE cookie,
1297
1396
  }
1298
1397
 
1299
1398
  /*
1300
- * call-seq:
1301
- * EnumDescriptor.file_descriptor
1399
+ * ruby-doc: EnumDescriptor#file_descriptor
1302
1400
  *
1303
- * Returns the FileDescriptor object this enum belongs to.
1401
+ * Returns the {FileDescriptor} object this enum belongs to.
1402
+ *
1403
+ * @return [FileDescriptor]
1304
1404
  */
1305
1405
  static VALUE EnumDescriptor_file_descriptor(VALUE _self) {
1306
1406
  EnumDescriptor* self = ruby_to_EnumDescriptor(_self);
@@ -1309,10 +1409,11 @@ static VALUE EnumDescriptor_file_descriptor(VALUE _self) {
1309
1409
  }
1310
1410
 
1311
1411
  /*
1312
- * call-seq:
1313
- * EnumDescriptor.is_closed? => bool
1412
+ * ruby-doc: EnumDescriptor#is_closed?
1314
1413
  *
1315
1414
  * Returns whether this enum is open or closed.
1415
+ *
1416
+ * @return [Boolean]
1316
1417
  */
1317
1418
  static VALUE EnumDescriptor_is_closed(VALUE _self) {
1318
1419
  EnumDescriptor* self = ruby_to_EnumDescriptor(_self);
@@ -1320,10 +1421,11 @@ static VALUE EnumDescriptor_is_closed(VALUE _self) {
1320
1421
  }
1321
1422
 
1322
1423
  /*
1323
- * call-seq:
1324
- * EnumDescriptor.name => name
1424
+ * ruby-doc: EnumDescriptor#name
1325
1425
  *
1326
1426
  * Returns the name of this enum type.
1427
+ *
1428
+ * @return [String]
1327
1429
  */
1328
1430
  static VALUE EnumDescriptor_name(VALUE _self) {
1329
1431
  EnumDescriptor* self = ruby_to_EnumDescriptor(_self);
@@ -1331,11 +1433,13 @@ static VALUE EnumDescriptor_name(VALUE _self) {
1331
1433
  }
1332
1434
 
1333
1435
  /*
1334
- * call-seq:
1335
- * EnumDescriptor.lookup_name(name) => value
1436
+ * ruby-doc: EnumDescriptor#lookup_name
1336
1437
  *
1337
1438
  * Returns the numeric value corresponding to the given key name (as a Ruby
1338
1439
  * symbol), or nil if none.
1440
+ *
1441
+ * @param name [Symbol]
1442
+ * @return [Integer,nil]
1339
1443
  */
1340
1444
  static VALUE EnumDescriptor_lookup_name(VALUE _self, VALUE name) {
1341
1445
  EnumDescriptor* self = ruby_to_EnumDescriptor(_self);
@@ -1350,11 +1454,13 @@ static VALUE EnumDescriptor_lookup_name(VALUE _self, VALUE name) {
1350
1454
  }
1351
1455
 
1352
1456
  /*
1353
- * call-seq:
1354
- * EnumDescriptor.lookup_value(name) => value
1457
+ * ruby-doc: EnumDescriptor#lookup_value
1355
1458
  *
1356
1459
  * Returns the key name (as a Ruby symbol) corresponding to the integer value,
1357
1460
  * or nil if none.
1461
+ *
1462
+ * @param name [Integer]
1463
+ * @return [Symbol,nil]
1358
1464
  */
1359
1465
  static VALUE EnumDescriptor_lookup_value(VALUE _self, VALUE number) {
1360
1466
  EnumDescriptor* self = ruby_to_EnumDescriptor(_self);
@@ -1369,11 +1475,13 @@ static VALUE EnumDescriptor_lookup_value(VALUE _self, VALUE number) {
1369
1475
  }
1370
1476
 
1371
1477
  /*
1372
- * call-seq:
1373
- * EnumDescriptor.each(&block)
1478
+ * ruby-doc: EnumDescriptor#each
1374
1479
  *
1375
1480
  * Iterates over key => value mappings in this enum's definition, yielding to
1376
1481
  * the block with (key, value) arguments for each one.
1482
+ *
1483
+ * @yield [Symbol, Integer]
1484
+ * @return [nil]
1377
1485
  */
1378
1486
  static VALUE EnumDescriptor_each(VALUE _self) {
1379
1487
  EnumDescriptor* self = ruby_to_EnumDescriptor(_self);
@@ -1390,10 +1498,11 @@ static VALUE EnumDescriptor_each(VALUE _self) {
1390
1498
  }
1391
1499
 
1392
1500
  /*
1393
- * call-seq:
1394
- * EnumDescriptor.enummodule => module
1501
+ * ruby-doc: EnumDescriptor#enummodule
1395
1502
  *
1396
1503
  * Returns the Ruby module corresponding to this enum type.
1504
+ *
1505
+ * @return [Module]
1397
1506
  */
1398
1507
  static VALUE EnumDescriptor_enummodule(VALUE _self) {
1399
1508
  EnumDescriptor* self = ruby_to_EnumDescriptor(_self);
@@ -1404,10 +1513,13 @@ static VALUE EnumDescriptor_enummodule(VALUE _self) {
1404
1513
  }
1405
1514
 
1406
1515
  /*
1407
- * call-seq:
1408
- * EnumDescriptor.options => options
1516
+ * ruby-doc: EnumDescriptor#options
1409
1517
  *
1410
- * Returns the `EnumOptions` for this `EnumDescriptor`.
1518
+ * Returns the
1519
+ * {https://github.com/protocolbuffers/protobuf/blob/v30.2/src/google/protobuf/descriptor.proto#L838
1520
+ * EnumOptions} for this {EnumDescriptor}.
1521
+ *
1522
+ * @return [EnumOptions]
1411
1523
  */
1412
1524
  static VALUE EnumDescriptor_options(VALUE _self) {
1413
1525
  EnumDescriptor* self = ruby_to_EnumDescriptor(_self);
@@ -1422,10 +1534,12 @@ static VALUE EnumDescriptor_options(VALUE _self) {
1422
1534
  }
1423
1535
 
1424
1536
  /*
1425
- * call-seq:
1426
- * EnumDescriptor.to_proto => EnumDescriptorProto
1537
+ * ruby-doc: EnumDescriptor#to_proto
1427
1538
  *
1428
- * Returns the `EnumDescriptorProto` of this `EnumDescriptor`.
1539
+ * Returns the
1540
+ * {https://github.com/protocolbuffers/protobuf/blob/v30.2/src/google/protobuf/descriptor.proto#L349
1541
+ * EnumDescriptorProto} of this {EnumDescriptor}.
1542
+ * @return [EnumDescriptorProto]
1429
1543
  */
1430
1544
  static VALUE EnumDescriptor_to_proto(VALUE _self) {
1431
1545
  EnumDescriptor* self = ruby_to_EnumDescriptor(_self);
@@ -1503,6 +1617,13 @@ static VALUE ServiceDescriptor_alloc(VALUE klass) {
1503
1617
  return ret;
1504
1618
  }
1505
1619
 
1620
+ /**
1621
+ * ruby-doc: ServiceDescriptor
1622
+ *
1623
+ * A ServiceDescriptor provides information about the Protobuf definition of an
1624
+ * RPC service.
1625
+ */
1626
+
1506
1627
  /*
1507
1628
  * call-seq:
1508
1629
  * ServiceDescriptor.new(c_only_cookie, ptr) => ServiceDescriptor
@@ -1525,10 +1646,11 @@ static VALUE ServiceDescriptor_initialize(VALUE _self, VALUE cookie,
1525
1646
  }
1526
1647
 
1527
1648
  /*
1528
- * call-seq:
1529
- * ServiceDescriptor.name => name
1649
+ * ruby-doc: ServiceDescriptor#name
1530
1650
  *
1531
1651
  * Returns the name of this service.
1652
+ *
1653
+ * @return [String]
1532
1654
  */
1533
1655
  static VALUE ServiceDescriptor_name(VALUE _self) {
1534
1656
  ServiceDescriptor* self = ruby_to_ServiceDescriptor(_self);
@@ -1536,10 +1658,10 @@ static VALUE ServiceDescriptor_name(VALUE _self) {
1536
1658
  }
1537
1659
 
1538
1660
  /*
1539
- * call-seq:
1540
- * ServiceDescriptor.file_descriptor
1661
+ * ruby-doc: ServiceDescriptor#file_descriptor
1541
1662
  *
1542
- * Returns the FileDescriptor object this service belongs to.
1663
+ * Returns the {FileDescriptor} object this service belongs to.
1664
+ * @return [FileDescriptor]
1543
1665
  */
1544
1666
  static VALUE ServiceDescriptor_file_descriptor(VALUE _self) {
1545
1667
  ServiceDescriptor* self = ruby_to_ServiceDescriptor(_self);
@@ -1548,10 +1670,12 @@ static VALUE ServiceDescriptor_file_descriptor(VALUE _self) {
1548
1670
  }
1549
1671
 
1550
1672
  /*
1551
- * call-seq:
1552
- * ServiceDescriptor.each(&block)
1673
+ * ruby-doc: ServiceDescriptor#each
1553
1674
  *
1554
1675
  * Iterates over methods in this service, yielding to the block on each one.
1676
+ *
1677
+ * @yield [MethodDescriptor]
1678
+ * @return [nil]
1555
1679
  */
1556
1680
  static VALUE ServiceDescriptor_each(VALUE _self) {
1557
1681
  ServiceDescriptor* self = ruby_to_ServiceDescriptor(_self);
@@ -1566,10 +1690,13 @@ static VALUE ServiceDescriptor_each(VALUE _self) {
1566
1690
  }
1567
1691
 
1568
1692
  /*
1569
- * call-seq:
1570
- * ServiceDescriptor.options => options
1693
+ * ruby-doc: ServiceDescriptor#options
1571
1694
  *
1572
- * Returns the `ServiceOptions` for this `ServiceDescriptor`.
1695
+ * Returns the
1696
+ * {https://github.com/protocolbuffers/protobuf/blob/v30.2/src/google/protobuf/descriptor.proto#L901
1697
+ * ServiceOptions} for this {ServiceDescriptor}.
1698
+ *
1699
+ * @return [ServiceOptions]
1573
1700
  */
1574
1701
  static VALUE ServiceDescriptor_options(VALUE _self) {
1575
1702
  ServiceDescriptor* self = ruby_to_ServiceDescriptor(_self);
@@ -1586,10 +1713,13 @@ static VALUE ServiceDescriptor_options(VALUE _self) {
1586
1713
  }
1587
1714
 
1588
1715
  /*
1589
- * call-seq:
1590
- * ServiceDescriptor.to_proto => ServiceDescriptorProto
1716
+ * ruby-doc: ServiceDescriptor#to_proto
1591
1717
  *
1592
- * Returns the `ServiceDescriptorProto` of this `ServiceDescriptor`.
1718
+ * Returns the
1719
+ * {https://github.com/protocolbuffers/protobuf/blob/v30.2/src/google/protobuf/descriptor.proto#L386
1720
+ * ServiceDescriptorProto} of this {ServiceDescriptor}.
1721
+ *
1722
+ * @return [ServiceDescriptorProto]
1593
1723
  */
1594
1724
  static VALUE ServiceDescriptor_to_proto(VALUE _self) {
1595
1725
  ServiceDescriptor* self = ruby_to_ServiceDescriptor(_self);
@@ -1662,6 +1792,13 @@ static VALUE MethodDescriptor_alloc(VALUE klass) {
1662
1792
  return ret;
1663
1793
  }
1664
1794
 
1795
+ /**
1796
+ * ruby-doc: MethodDescriptor
1797
+ *
1798
+ * A MethodDescriptor provides information about the Protobuf definition of a
1799
+ * method inside an RPC service.
1800
+ */
1801
+
1665
1802
  /*
1666
1803
  * call-seq:
1667
1804
  * MethodDescriptor.new(c_only_cookie, ptr) => MethodDescriptor
@@ -1684,10 +1821,11 @@ static VALUE MethodDescriptor_initialize(VALUE _self, VALUE cookie,
1684
1821
  }
1685
1822
 
1686
1823
  /*
1687
- * call-seq:
1688
- * MethodDescriptor.name => name
1824
+ * ruby-doc: MethodDescriptor#name
1689
1825
  *
1690
1826
  * Returns the name of this method
1827
+ *
1828
+ * @return [String]
1691
1829
  */
1692
1830
  static VALUE MethodDescriptor_name(VALUE _self) {
1693
1831
  MethodDescriptor* self = ruby_to_MethodDescriptor(_self);
@@ -1695,10 +1833,13 @@ static VALUE MethodDescriptor_name(VALUE _self) {
1695
1833
  }
1696
1834
 
1697
1835
  /*
1698
- * call-seq:
1699
- * MethodDescriptor.options => options
1836
+ * ruby-doc: MethodDescriptor#options
1700
1837
  *
1701
- * Returns the `MethodOptions` for this `MethodDescriptor`.
1838
+ * Returns the
1839
+ * {https://github.com/protocolbuffers/protobuf/blob/v30.2/src/google/protobuf/descriptor.proto#L927
1840
+ * MethodOptions} for this {MethodDescriptor}.
1841
+ *
1842
+ * @return [MethodOptions]
1702
1843
  */
1703
1844
  static VALUE MethodDescriptor_options(VALUE _self) {
1704
1845
  MethodDescriptor* self = ruby_to_MethodDescriptor(_self);
@@ -1715,10 +1856,11 @@ static VALUE MethodDescriptor_options(VALUE _self) {
1715
1856
  }
1716
1857
 
1717
1858
  /*
1718
- * call-seq:
1719
- * MethodDescriptor.input_type => Descriptor
1859
+ * ruby-doc: MethodDescriptor#input_type
1720
1860
  *
1721
- * Returns the `Descriptor` for the request message type of this method
1861
+ * Returns the {Descriptor} for the request message type of this method
1862
+ *
1863
+ * @return [Descriptor]
1722
1864
  */
1723
1865
  static VALUE MethodDescriptor_input_type(VALUE _self) {
1724
1866
  MethodDescriptor* self = ruby_to_MethodDescriptor(_self);
@@ -1727,10 +1869,11 @@ static VALUE MethodDescriptor_input_type(VALUE _self) {
1727
1869
  }
1728
1870
 
1729
1871
  /*
1730
- * call-seq:
1731
- * MethodDescriptor.output_type => Descriptor
1872
+ * ruby-doc: MethodDescriptor#output_type
1873
+ *
1874
+ * Returns the {Descriptor} for the response message type of this method
1732
1875
  *
1733
- * Returns the `Descriptor` for the response message type of this method
1876
+ * @return [Descriptor]
1734
1877
  */
1735
1878
  static VALUE MethodDescriptor_output_type(VALUE _self) {
1736
1879
  MethodDescriptor* self = ruby_to_MethodDescriptor(_self);
@@ -1739,10 +1882,11 @@ static VALUE MethodDescriptor_output_type(VALUE _self) {
1739
1882
  }
1740
1883
 
1741
1884
  /*
1742
- * call-seq:
1743
- * MethodDescriptor.client_streaming => bool
1885
+ * ruby-doc: MethodDescriptor#client_streaming
1744
1886
  *
1745
1887
  * Returns whether or not this is a streaming request method
1888
+ *
1889
+ * @return [Boolean]
1746
1890
  */
1747
1891
  static VALUE MethodDescriptor_client_streaming(VALUE _self) {
1748
1892
  MethodDescriptor* self = ruby_to_MethodDescriptor(_self);
@@ -1750,10 +1894,13 @@ static VALUE MethodDescriptor_client_streaming(VALUE _self) {
1750
1894
  }
1751
1895
 
1752
1896
  /*
1753
- * call-seq:
1754
- * MethodDescriptor.to_proto => MethodDescriptorProto
1897
+ * ruby-doc: MethodDescriptor#to_proto
1898
+ *
1899
+ * Returns the
1900
+ * {https://github.com/protocolbuffers/protobuf/blob/v30.2/src/google/protobuf/descriptor.proto#L394
1901
+ * MethodDescriptorProto} of this {MethodDescriptor}.
1755
1902
  *
1756
- * Returns the `MethodDescriptorProto` of this `MethodDescriptor`.
1903
+ * @return [MethodDescriptorProto]
1757
1904
  */
1758
1905
  static VALUE MethodDescriptor_to_proto(VALUE _self) {
1759
1906
  MethodDescriptor* self = ruby_to_MethodDescriptor(_self);
@@ -1771,10 +1918,11 @@ static VALUE MethodDescriptor_to_proto(VALUE _self) {
1771
1918
  }
1772
1919
 
1773
1920
  /*
1774
- * call-seq:
1775
- * MethodDescriptor.server_streaming => bool
1921
+ * ruby-doc: MethodDescriptor#server_streaming
1776
1922
  *
1777
1923
  * Returns whether or not this is a streaming response method
1924
+ *
1925
+ * @return [Boolean]
1778
1926
  */
1779
1927
  static VALUE MethodDescriptor_server_streaming(VALUE _self) {
1780
1928
  MethodDescriptor* self = ruby_to_MethodDescriptor(_self);