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,
  13. Edition? edition,
})

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,
  Edition? edition,
}) {
  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;
  }
  if (edition != null) {
    $result.edition = edition;
  }
  return $result;
}