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;
}