FileDescriptorProto constructor

FileDescriptorProto({
  1. String? name,
  2. String? package,
  3. Iterable<String>? dependency,
  4. Iterable<DescriptorProto>? messageType,
  5. Iterable<EnumDescriptorProto>? enumType,
  6. Iterable<ServiceDescriptorProto>? service,
  7. Iterable<FieldDescriptorProto>? extension,
  8. FileOptions? options,
  9. SourceCodeInfo? sourceCodeInfo,
  10. Iterable<int>? publicDependency,
  11. Iterable<int>? weakDependency,
  12. String? syntax,
})

Implementation

factory FileDescriptorProto({
  $core.String? name,
  $core.String? package,
  $core.Iterable<$core.String>? dependency,
  $core.Iterable<DescriptorProto>? messageType,
  $core.Iterable<EnumDescriptorProto>? enumType,
  $core.Iterable<ServiceDescriptorProto>? service,
  $core.Iterable<FieldDescriptorProto>? extension,
  FileOptions? options,
  SourceCodeInfo? sourceCodeInfo,
  $core.Iterable<$core.int>? publicDependency,
  $core.Iterable<$core.int>? weakDependency,
  $core.String? syntax,
}) {
  final _result = create();
  if (name != null) {
    _result.name = name;
  }
  if (package != null) {
    _result.package = package;
  }
  if (dependency != null) {
    _result.dependency.addAll(dependency);
  }
  if (messageType != null) {
    _result.messageType.addAll(messageType);
  }
  if (enumType != null) {
    _result.enumType.addAll(enumType);
  }
  if (service != null) {
    _result.service.addAll(service);
  }
  if (extension != null) {
    _result.extension.addAll(extension);
  }
  if (options != null) {
    _result.options = options;
  }
  if (sourceCodeInfo != null) {
    _result.sourceCodeInfo = sourceCodeInfo;
  }
  if (publicDependency != null) {
    _result.publicDependency.addAll(publicDependency);
  }
  if (weakDependency != null) {
    _result.weakDependency.addAll(weakDependency);
  }
  if (syntax != null) {
    _result.syntax = syntax;
  }
  return _result;
}