// Path: src/main/java/com/squareup/protoparser/ProtoFile.java
// static boolean isValidTag(int value) {
//   return (value >= MIN_TAG_VALUE && value < RESERVED_TAG_VALUE_START)
//       || (value > RESERVED_TAG_VALUE_END && value <= MAX_TAG_VALUE);
// }
// 
// 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 checkArgument(boolean condition, String message, Object... messageArgs) {
//   if (!condition) {
//     if (messageArgs.length > 0) {
//       message = String.format(message, messageArgs);
//     }
//     throw new IllegalArgumentException(message);
//   }
// }


import com.google.auto.value.AutoValue;
import static com.squareup.protoparser.ProtoFile.isValidTag;
import static com.squareup.protoparser.Utils.appendDocumentation;
import static com.squareup.protoparser.Utils.checkArgument;
// Copyright 2013 Square, Inc.
package com.squareup.protoparser;



@AutoValue
public abstract class ExtensionsElement {
  public static ExtensionsElement create(int start, int end) {
    return create(start, end, "");
  }

  public static ExtensionsElement create(int start, int end, String documentation) {
    checkArgument(isValidTag(start), "Invalid start value: %s", start);
    checkArgument(isValidTag(end), "Invalid end value: %s", end);

    return new AutoValue_ExtensionsElement(documentation, start, end);
  }

  ExtensionsElement() {
  }

  public abstract String documentation();
  public abstract int start();
  public abstract int end();

  public final String toSchema() {
    StringBuilder builder = new StringBuilder();
    appendDocumentation(builder, documentation());
    builder.append("extensions ")
        .append(start());
    if (start() != end()) {
      builder.append(" to ");
      if (end() < ProtoFile.MAX_TAG_VALUE) {
        builder.append(end());
// Path: src/main/java/com/squareup/protoparser/ProtoFile.java
// static boolean isValidTag(int value) {
//   return (value >= MIN_TAG_VALUE && value < RESERVED_TAG_VALUE_START)
//       || (value > RESERVED_TAG_VALUE_END && value <= MAX_TAG_VALUE);
// }
// 
// 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 checkArgument(boolean condition, String message, Object... messageArgs) {
//   if (!condition) {
//     if (messageArgs.length > 0) {
//       message = String.format(message, messageArgs);
//     }
//     throw new IllegalArgumentException(message);
//   }
// }


// Path: src/main/java/com/squareup/protoparser/ExtensionsElement.java
import com.google.auto.value.AutoValue;
import static com.squareup.protoparser.ProtoFile.isValidTag;
import static com.squareup.protoparser.Utils.appendDocumentation;
import static com.squareup.protoparser.Utils.checkArgument;

// Copyright 2013 Square, Inc.
package com.squareup.protoparser;



@AutoValue
public abstract class ExtensionsElement {
  public static ExtensionsElement create(int start, int end) {
    return create(start, end, "");
  }

  public static ExtensionsElement create(int start, int end, String documentation) {
    checkArgument(isValidTag(start), "Invalid start value: %s", start);
    checkArgument(isValidTag(end), "Invalid end value: %s", end);

    return new AutoValue_ExtensionsElement(documentation, start, end);
  }

  ExtensionsElement() {
  }

  public abstract String documentation();
  public abstract int start();
  public abstract int end();

  public final String toSchema() {
    StringBuilder builder = new StringBuilder();
    appendDocumentation(builder, documentation());
    builder.append("extensions ")
        .append(start());
    if (start() != end()) {
      builder.append(" to ");
      if (end() < ProtoFile.MAX_TAG_VALUE) {
        builder.append(end());
      } else {