DescriptorProto constructor

DescriptorProto({
  1. String? name,
  2. Iterable<FieldDescriptorProto>? field,
  3. Iterable<DescriptorProto>? nestedType,
  4. Iterable<EnumDescriptorProto>? enumType,
  5. Iterable<DescriptorProto_ExtensionRange>? extensionRange,
  6. Iterable<FieldDescriptorProto>? extension,
  7. MessageOptions? options,
  8. Iterable<OneofDescriptorProto>? oneofDecl,
  9. Iterable<DescriptorProto_ReservedRange>? reservedRange,
  10. Iterable<String>? reservedName,
})

Implementation

factory DescriptorProto({
  $core.String? name,
  $core.Iterable<FieldDescriptorProto>? field,
  $core.Iterable<DescriptorProto>? nestedType,
  $core.Iterable<EnumDescriptorProto>? enumType,
  $core.Iterable<DescriptorProto_ExtensionRange>? extensionRange,
  $core.Iterable<FieldDescriptorProto>? extension,
  MessageOptions? options,
  $core.Iterable<OneofDescriptorProto>? oneofDecl,
  $core.Iterable<DescriptorProto_ReservedRange>? reservedRange,
  $core.Iterable<$core.String>? reservedName,
}) {
  final _result = create();
  if (name != null) {
    _result.name = name;
  }
  if (field != null) {
    _result.field.addAll(field);
  }
  if (nestedType != null) {
    _result.nestedType.addAll(nestedType);
  }
  if (enumType != null) {
    _result.enumType.addAll(enumType);
  }
  if (extensionRange != null) {
    _result.extensionRange.addAll(extensionRange);
  }
  if (extension != null) {
    _result.extension.addAll(extension);
  }
  if (options != null) {
    _result.options = options;
  }
  if (oneofDecl != null) {
    _result.oneofDecl.addAll(oneofDecl);
  }
  if (reservedRange != null) {
    _result.reservedRange.addAll(reservedRange);
  }
  if (reservedName != null) {
    _result.reservedName.addAll(reservedName);
  }
  return _result;
}