// Path: src/main/java/com/squareup/protoparser/Utils.java
// static void appendDocumentation(StringBuilder builder, String documentation) {
//   if (documentation.isEmpty()) {
//     return;
//   }
//   for (String line : documentation.split("\n")) {
//     builder.append("// ").append(line).append('\n');
//   }
// }
// 
// Path: src/main/java/com/squareup/protoparser/Utils.java
// static void appendIndented(StringBuilder builder, String value) {
//   for (String line : value.split("\n")) {
//     builder.append("  ").append(line).append('\n');
//   }
// }
// 
// Path: src/main/java/com/squareup/protoparser/Utils.java
// static <T> T checkNotNull(T value, String name) {
//   if (value == null) {
//     throw new NullPointerException(name + " == null");
//   }
//   return value;
// }
// 
// Path: src/main/java/com/squareup/protoparser/Utils.java
// static <T> List<T> immutableCopyOf(List<T> list) {
//   return unmodifiableList(new ArrayList<>(list));
// }


import com.google.auto.value.AutoValue;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Set;
import static com.squareup.protoparser.Utils.appendDocumentation;
import static com.squareup.protoparser.Utils.appendIndented;
import static com.squareup.protoparser.Utils.checkNotNull;
import static com.squareup.protoparser.Utils.immutableCopyOf;
      }
    }
  }

  public static Builder builder() {
    return new Builder();
  }

  EnumElement() {
  }

  @Override public abstract String name();
  @Override public abstract String qualifiedName();
  @Override public abstract String documentation();
  public abstract List<EnumConstantElement> constants();
  @Override public abstract List<OptionElement> options();

  @Override public final List<TypeElement> nestedElements() {
    return Collections.emptyList(); // Enums do not allow nested type declarations.
  }

  @Override public final String toSchema() {
    StringBuilder builder = new StringBuilder();
    appendDocumentation(builder, documentation());
    builder.append("enum ")
        .append(name())
        .append(" {");
    if (!options().isEmpty()) {
      builder.append('\n');
      for (OptionElement option : options()) {
// Path: src/main/java/com/squareup/protoparser/Utils.java
// static void appendDocumentation(StringBuilder builder, String documentation) {
//   if (documentation.isEmpty()) {
//     return;
//   }
//   for (String line : documentation.split("\n")) {
//     builder.append("// ").append(line).append('\n');
//   }
// }
// 
// Path: src/main/java/com/squareup/protoparser/Utils.java
// static void appendIndented(StringBuilder builder, String value) {
//   for (String line : value.split("\n")) {
//     builder.append("  ").append(line).append('\n');
//   }
// }
// 
// Path: src/main/java/com/squareup/protoparser/Utils.java
// static <T> T checkNotNull(T value, String name) {
//   if (value == null) {
//     throw new NullPointerException(name + " == null");
//   }
//   return value;
// }
// 
// Path: src/main/java/com/squareup/protoparser/Utils.java
// static <T> List<T> immutableCopyOf(List<T> list) {
//   return unmodifiableList(new ArrayList<>(list));
// }


// Path: src/main/java/com/squareup/protoparser/EnumElement.java
import com.google.auto.value.AutoValue;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Set;
import static com.squareup.protoparser.Utils.appendDocumentation;
import static com.squareup.protoparser.Utils.appendIndented;
import static com.squareup.protoparser.Utils.checkNotNull;
import static com.squareup.protoparser.Utils.immutableCopyOf;

      }
    }
  }

  public static Builder builder() {
    return new Builder();
  }

  EnumElement() {
  }

  @Override public abstract String name();
  @Override public abstract String qualifiedName();
  @Override public abstract String documentation();
  public abstract List<EnumConstantElement> constants();
  @Override public abstract List<OptionElement> options();

  @Override public final List<TypeElement> nestedElements() {
    return Collections.emptyList(); // Enums do not allow nested type declarations.
  }

  @Override public final String toSchema() {
    StringBuilder builder = new StringBuilder();
    appendDocumentation(builder, documentation());
    builder.append("enum ")
        .append(name())
        .append(" {");
    if (!options().isEmpty()) {
      builder.append('\n');
      for (OptionElement option : options()) {
        appendIndented(builder, option.toSchemaDeclaration());