package my;

import java.lang.Object;
import java.lang.Override;
import java.lang.String;
import java.lang.StringBuilder;
import java.util.Objects;
import org.pkl.config.java.mapper.Named;
import org.pkl.config.java.mapper.NonNull;
import org.pkl.core.DataSize;
import org.pkl.core.Duration;

public final class Mod {
  private Mod() {
  }

  private static void appendProperty(StringBuilder builder, String name, Object value) {
    builder.append("\n  ").append(name).append(" = ");
    String[] lines = Objects.toString(value).split("\n");
    builder.append(lines[0]);
    for (int i = 1; i < lines.length; i++) {
      builder.append("\n  ").append(lines[i]);
    }
  }

  public static final class GenerateGetters {
    private final boolean urgent;

    private final @NonNull String url;

    private final @NonNull DataSize diskSize;

    private final @NonNull Duration ETA;

    private final @NonNull String _package;

    public GenerateGetters(@Named("urgent") boolean urgent, @Named("url") @NonNull String url,
        @Named("diskSize") @NonNull DataSize diskSize, @Named("ETA") @NonNull Duration ETA,
        @Named("package") @NonNull String _package) {
      this.urgent = urgent;
      this.url = url;
      this.diskSize = diskSize;
      this.ETA = ETA;
      this._package = _package;
    }

    public boolean isUrgent() {
      return urgent;
    }

    public GenerateGetters withUrgent(boolean urgent) {
      return new GenerateGetters(urgent, url, diskSize, ETA, _package);
    }

    public @NonNull String getUrl() {
      return url;
    }

    public GenerateGetters withUrl(@NonNull String url) {
      return new GenerateGetters(urgent, url, diskSize, ETA, _package);
    }

    public @NonNull DataSize getDiskSize() {
      return diskSize;
    }

    public GenerateGetters withDiskSize(@NonNull DataSize diskSize) {
      return new GenerateGetters(urgent, url, diskSize, ETA, _package);
    }

    public @NonNull Duration getETA() {
      return ETA;
    }

    public GenerateGetters withETA(@NonNull Duration ETA) {
      return new GenerateGetters(urgent, url, diskSize, ETA, _package);
    }

    public @NonNull String getPackage() {
      return _package;
    }

    public GenerateGetters withPackage(@NonNull String _package) {
      return new GenerateGetters(urgent, url, diskSize, ETA, _package);
    }

    @Override
    public boolean equals(Object obj) {
      if (this == obj) return true;
      if (obj == null) return false;
      if (this.getClass() != obj.getClass()) return false;
      GenerateGetters other = (GenerateGetters) obj;
      if (!Objects.equals(this.urgent, other.urgent)) return false;
      if (!Objects.equals(this.url, other.url)) return false;
      if (!Objects.equals(this.diskSize, other.diskSize)) return false;
      if (!Objects.equals(this.ETA, other.ETA)) return false;
      if (!Objects.equals(this._package, other._package)) return false;
      return true;
    }

    @Override
    public int hashCode() {
      int result = 1;
      result = 31 * result + Objects.hashCode(this.urgent);
      result = 31 * result + Objects.hashCode(this.url);
      result = 31 * result + Objects.hashCode(this.diskSize);
      result = 31 * result + Objects.hashCode(this.ETA);
      result = 31 * result + Objects.hashCode(this._package);
      return result;
    }

    @Override
    public String toString() {
      StringBuilder builder = new StringBuilder(300);
      builder.append(GenerateGetters.class.getSimpleName()).append(" {");
      appendProperty(builder, "urgent", this.urgent);
      appendProperty(builder, "url", this.url);
      appendProperty(builder, "diskSize", this.diskSize);
      appendProperty(builder, "ETA", this.ETA);
      appendProperty(builder, "_package", this._package);
      builder.append("\n}");
      return builder.toString();
    }
  }
}
