package my;

import java.lang.Object;
import java.lang.Override;
import java.lang.String;
import java.lang.StringBuilder;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
import java.util.regex.Pattern;
import org.pkl.config.java.mapper.Named;
import org.pkl.config.java.mapper.NonNull;
import org.pkl.core.DataSize;
import org.pkl.core.DataSizeUnit;
import org.pkl.core.Duration;
import org.pkl.core.DurationUnit;
import org.pkl.core.Pair;

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 PropertyTypes {
    public final boolean _boolean;

    public final long _int;

    public final double _float;

    public final @NonNull String string;

    public final @NonNull Duration duration;

    public final @NonNull DurationUnit durationUnit;

    public final @NonNull DataSize dataSize;

    public final @NonNull DataSizeUnit dataSizeUnit;

    public final String nullable;

    public final String nullable2;

    public final @NonNull Pair<Object, Object> pair;

    public final @NonNull Pair<@NonNull String, @NonNull Other> pair2;

    public final @NonNull Collection<Object> coll;

    public final @NonNull Collection<@NonNull Other> coll2;

    public final @NonNull List<Object> list;

    public final @NonNull List<@NonNull Other> list2;

    public final @NonNull Set<Object> set;

    public final @NonNull Set<@NonNull Other> set2;

    public final @NonNull Map<Object, Object> map;

    public final @NonNull Map<@NonNull String, @NonNull Other> map2;

    public final @NonNull Map<Object, Object> container;

    public final @NonNull Map<@NonNull String, @NonNull Other> container2;

    public final @NonNull Other other;

    public final @NonNull Pattern regex;

    public final Object any;

    public final @NonNull Object nonNull;

    public final @NonNull Direction _enum;

    public PropertyTypes(@Named("boolean") boolean _boolean, @Named("int") long _int,
        @Named("float") double _float, @Named("string") @NonNull String string,
        @Named("duration") @NonNull Duration duration,
        @Named("durationUnit") @NonNull DurationUnit durationUnit,
        @Named("dataSize") @NonNull DataSize dataSize,
        @Named("dataSizeUnit") @NonNull DataSizeUnit dataSizeUnit,
        @Named("nullable") String nullable, @Named("nullable2") String nullable2,
        @Named("pair") @NonNull Pair<Object, Object> pair,
        @Named("pair2") @NonNull Pair<@NonNull String, @NonNull Other> pair2,
        @Named("coll") @NonNull Collection<Object> coll,
        @Named("coll2") @NonNull Collection<@NonNull Other> coll2,
        @Named("list") @NonNull List<Object> list,
        @Named("list2") @NonNull List<@NonNull Other> list2, @Named("set") @NonNull Set<Object> set,
        @Named("set2") @NonNull Set<@NonNull Other> set2,
        @Named("map") @NonNull Map<Object, Object> map,
        @Named("map2") @NonNull Map<@NonNull String, @NonNull Other> map2,
        @Named("container") @NonNull Map<Object, Object> container,
        @Named("container2") @NonNull Map<@NonNull String, @NonNull Other> container2,
        @Named("other") @NonNull Other other, @Named("regex") @NonNull Pattern regex,
        @Named("any") Object any, @Named("nonNull") @NonNull Object nonNull,
        @Named("enum") @NonNull Direction _enum) {
      this._boolean = _boolean;
      this._int = _int;
      this._float = _float;
      this.string = string;
      this.duration = duration;
      this.durationUnit = durationUnit;
      this.dataSize = dataSize;
      this.dataSizeUnit = dataSizeUnit;
      this.nullable = nullable;
      this.nullable2 = nullable2;
      this.pair = pair;
      this.pair2 = pair2;
      this.coll = coll;
      this.coll2 = coll2;
      this.list = list;
      this.list2 = list2;
      this.set = set;
      this.set2 = set2;
      this.map = map;
      this.map2 = map2;
      this.container = container;
      this.container2 = container2;
      this.other = other;
      this.regex = regex;
      this.any = any;
      this.nonNull = nonNull;
      this._enum = _enum;
    }

    public PropertyTypes withBoolean(boolean _boolean) {
      return new PropertyTypes(_boolean, _int, _float, string, duration, durationUnit, dataSize, dataSizeUnit, nullable, nullable2, pair, pair2, coll, coll2, list, list2, set, set2, map, map2, container, container2, other, regex, any, nonNull, _enum);
    }

    public PropertyTypes withInt(long _int) {
      return new PropertyTypes(_boolean, _int, _float, string, duration, durationUnit, dataSize, dataSizeUnit, nullable, nullable2, pair, pair2, coll, coll2, list, list2, set, set2, map, map2, container, container2, other, regex, any, nonNull, _enum);
    }

    public PropertyTypes withFloat(double _float) {
      return new PropertyTypes(_boolean, _int, _float, string, duration, durationUnit, dataSize, dataSizeUnit, nullable, nullable2, pair, pair2, coll, coll2, list, list2, set, set2, map, map2, container, container2, other, regex, any, nonNull, _enum);
    }

    public PropertyTypes withString(@NonNull String string) {
      return new PropertyTypes(_boolean, _int, _float, string, duration, durationUnit, dataSize, dataSizeUnit, nullable, nullable2, pair, pair2, coll, coll2, list, list2, set, set2, map, map2, container, container2, other, regex, any, nonNull, _enum);
    }

    public PropertyTypes withDuration(@NonNull Duration duration) {
      return new PropertyTypes(_boolean, _int, _float, string, duration, durationUnit, dataSize, dataSizeUnit, nullable, nullable2, pair, pair2, coll, coll2, list, list2, set, set2, map, map2, container, container2, other, regex, any, nonNull, _enum);
    }

    public PropertyTypes withDurationUnit(@NonNull DurationUnit durationUnit) {
      return new PropertyTypes(_boolean, _int, _float, string, duration, durationUnit, dataSize, dataSizeUnit, nullable, nullable2, pair, pair2, coll, coll2, list, list2, set, set2, map, map2, container, container2, other, regex, any, nonNull, _enum);
    }

    public PropertyTypes withDataSize(@NonNull DataSize dataSize) {
      return new PropertyTypes(_boolean, _int, _float, string, duration, durationUnit, dataSize, dataSizeUnit, nullable, nullable2, pair, pair2, coll, coll2, list, list2, set, set2, map, map2, container, container2, other, regex, any, nonNull, _enum);
    }

    public PropertyTypes withDataSizeUnit(@NonNull DataSizeUnit dataSizeUnit) {
      return new PropertyTypes(_boolean, _int, _float, string, duration, durationUnit, dataSize, dataSizeUnit, nullable, nullable2, pair, pair2, coll, coll2, list, list2, set, set2, map, map2, container, container2, other, regex, any, nonNull, _enum);
    }

    public PropertyTypes withNullable(String nullable) {
      return new PropertyTypes(_boolean, _int, _float, string, duration, durationUnit, dataSize, dataSizeUnit, nullable, nullable2, pair, pair2, coll, coll2, list, list2, set, set2, map, map2, container, container2, other, regex, any, nonNull, _enum);
    }

    public PropertyTypes withNullable2(String nullable2) {
      return new PropertyTypes(_boolean, _int, _float, string, duration, durationUnit, dataSize, dataSizeUnit, nullable, nullable2, pair, pair2, coll, coll2, list, list2, set, set2, map, map2, container, container2, other, regex, any, nonNull, _enum);
    }

    public PropertyTypes withPair(@NonNull Pair<Object, Object> pair) {
      return new PropertyTypes(_boolean, _int, _float, string, duration, durationUnit, dataSize, dataSizeUnit, nullable, nullable2, pair, pair2, coll, coll2, list, list2, set, set2, map, map2, container, container2, other, regex, any, nonNull, _enum);
    }

    public PropertyTypes withPair2(@NonNull Pair<@NonNull String, @NonNull Other> pair2) {
      return new PropertyTypes(_boolean, _int, _float, string, duration, durationUnit, dataSize, dataSizeUnit, nullable, nullable2, pair, pair2, coll, coll2, list, list2, set, set2, map, map2, container, container2, other, regex, any, nonNull, _enum);
    }

    public PropertyTypes withColl(@NonNull Collection<Object> coll) {
      return new PropertyTypes(_boolean, _int, _float, string, duration, durationUnit, dataSize, dataSizeUnit, nullable, nullable2, pair, pair2, coll, coll2, list, list2, set, set2, map, map2, container, container2, other, regex, any, nonNull, _enum);
    }

    public PropertyTypes withColl2(@NonNull Collection<@NonNull Other> coll2) {
      return new PropertyTypes(_boolean, _int, _float, string, duration, durationUnit, dataSize, dataSizeUnit, nullable, nullable2, pair, pair2, coll, coll2, list, list2, set, set2, map, map2, container, container2, other, regex, any, nonNull, _enum);
    }

    public PropertyTypes withList(@NonNull List<Object> list) {
      return new PropertyTypes(_boolean, _int, _float, string, duration, durationUnit, dataSize, dataSizeUnit, nullable, nullable2, pair, pair2, coll, coll2, list, list2, set, set2, map, map2, container, container2, other, regex, any, nonNull, _enum);
    }

    public PropertyTypes withList2(@NonNull List<@NonNull Other> list2) {
      return new PropertyTypes(_boolean, _int, _float, string, duration, durationUnit, dataSize, dataSizeUnit, nullable, nullable2, pair, pair2, coll, coll2, list, list2, set, set2, map, map2, container, container2, other, regex, any, nonNull, _enum);
    }

    public PropertyTypes withSet(@NonNull Set<Object> set) {
      return new PropertyTypes(_boolean, _int, _float, string, duration, durationUnit, dataSize, dataSizeUnit, nullable, nullable2, pair, pair2, coll, coll2, list, list2, set, set2, map, map2, container, container2, other, regex, any, nonNull, _enum);
    }

    public PropertyTypes withSet2(@NonNull Set<@NonNull Other> set2) {
      return new PropertyTypes(_boolean, _int, _float, string, duration, durationUnit, dataSize, dataSizeUnit, nullable, nullable2, pair, pair2, coll, coll2, list, list2, set, set2, map, map2, container, container2, other, regex, any, nonNull, _enum);
    }

    public PropertyTypes withMap(@NonNull Map<Object, Object> map) {
      return new PropertyTypes(_boolean, _int, _float, string, duration, durationUnit, dataSize, dataSizeUnit, nullable, nullable2, pair, pair2, coll, coll2, list, list2, set, set2, map, map2, container, container2, other, regex, any, nonNull, _enum);
    }

    public PropertyTypes withMap2(@NonNull Map<@NonNull String, @NonNull Other> map2) {
      return new PropertyTypes(_boolean, _int, _float, string, duration, durationUnit, dataSize, dataSizeUnit, nullable, nullable2, pair, pair2, coll, coll2, list, list2, set, set2, map, map2, container, container2, other, regex, any, nonNull, _enum);
    }

    public PropertyTypes withContainer(@NonNull Map<Object, Object> container) {
      return new PropertyTypes(_boolean, _int, _float, string, duration, durationUnit, dataSize, dataSizeUnit, nullable, nullable2, pair, pair2, coll, coll2, list, list2, set, set2, map, map2, container, container2, other, regex, any, nonNull, _enum);
    }

    public PropertyTypes withContainer2(@NonNull Map<@NonNull String, @NonNull Other> container2) {
      return new PropertyTypes(_boolean, _int, _float, string, duration, durationUnit, dataSize, dataSizeUnit, nullable, nullable2, pair, pair2, coll, coll2, list, list2, set, set2, map, map2, container, container2, other, regex, any, nonNull, _enum);
    }

    public PropertyTypes withOther(@NonNull Other other) {
      return new PropertyTypes(_boolean, _int, _float, string, duration, durationUnit, dataSize, dataSizeUnit, nullable, nullable2, pair, pair2, coll, coll2, list, list2, set, set2, map, map2, container, container2, other, regex, any, nonNull, _enum);
    }

    public PropertyTypes withRegex(@NonNull Pattern regex) {
      return new PropertyTypes(_boolean, _int, _float, string, duration, durationUnit, dataSize, dataSizeUnit, nullable, nullable2, pair, pair2, coll, coll2, list, list2, set, set2, map, map2, container, container2, other, regex, any, nonNull, _enum);
    }

    public PropertyTypes withAny(Object any) {
      return new PropertyTypes(_boolean, _int, _float, string, duration, durationUnit, dataSize, dataSizeUnit, nullable, nullable2, pair, pair2, coll, coll2, list, list2, set, set2, map, map2, container, container2, other, regex, any, nonNull, _enum);
    }

    public PropertyTypes withNonNull(@NonNull Object nonNull) {
      return new PropertyTypes(_boolean, _int, _float, string, duration, durationUnit, dataSize, dataSizeUnit, nullable, nullable2, pair, pair2, coll, coll2, list, list2, set, set2, map, map2, container, container2, other, regex, any, nonNull, _enum);
    }

    public PropertyTypes withEnum(@NonNull Direction _enum) {
      return new PropertyTypes(_boolean, _int, _float, string, duration, durationUnit, dataSize, dataSizeUnit, nullable, nullable2, pair, pair2, coll, coll2, list, list2, set, set2, map, map2, container, container2, other, regex, any, nonNull, _enum);
    }

    @Override
    public boolean equals(Object obj) {
      if (this == obj) return true;
      if (obj == null) return false;
      if (this.getClass() != obj.getClass()) return false;
      PropertyTypes other = (PropertyTypes) obj;
      if (!Objects.equals(this._boolean, other._boolean)) return false;
      if (!Objects.equals(this._int, other._int)) return false;
      if (!Objects.equals(this._float, other._float)) return false;
      if (!Objects.equals(this.string, other.string)) return false;
      if (!Objects.equals(this.duration, other.duration)) return false;
      if (!Objects.equals(this.durationUnit, other.durationUnit)) return false;
      if (!Objects.equals(this.dataSize, other.dataSize)) return false;
      if (!Objects.equals(this.dataSizeUnit, other.dataSizeUnit)) return false;
      if (!Objects.equals(this.nullable, other.nullable)) return false;
      if (!Objects.equals(this.nullable2, other.nullable2)) return false;
      if (!Objects.equals(this.pair, other.pair)) return false;
      if (!Objects.equals(this.pair2, other.pair2)) return false;
      if (!Objects.equals(this.coll, other.coll)) return false;
      if (!Objects.equals(this.coll2, other.coll2)) return false;
      if (!Objects.equals(this.list, other.list)) return false;
      if (!Objects.equals(this.list2, other.list2)) return false;
      if (!Objects.equals(this.set, other.set)) return false;
      if (!Objects.equals(this.set2, other.set2)) return false;
      if (!Objects.equals(this.map, other.map)) return false;
      if (!Objects.equals(this.map2, other.map2)) return false;
      if (!Objects.equals(this.container, other.container)) return false;
      if (!Objects.equals(this.container2, other.container2)) return false;
      if (!Objects.equals(this.other, other.other)) return false;
      if (!Objects.equals(this.regex.pattern(), other.regex.pattern())) return false;
      if (!Objects.equals(this.any, other.any)) return false;
      if (!Objects.equals(this.nonNull, other.nonNull)) return false;
      if (!Objects.equals(this._enum, other._enum)) return false;
      return true;
    }

    @Override
    public int hashCode() {
      int result = 1;
      result = 31 * result + Objects.hashCode(this._boolean);
      result = 31 * result + Objects.hashCode(this._int);
      result = 31 * result + Objects.hashCode(this._float);
      result = 31 * result + Objects.hashCode(this.string);
      result = 31 * result + Objects.hashCode(this.duration);
      result = 31 * result + Objects.hashCode(this.durationUnit);
      result = 31 * result + Objects.hashCode(this.dataSize);
      result = 31 * result + Objects.hashCode(this.dataSizeUnit);
      result = 31 * result + Objects.hashCode(this.nullable);
      result = 31 * result + Objects.hashCode(this.nullable2);
      result = 31 * result + Objects.hashCode(this.pair);
      result = 31 * result + Objects.hashCode(this.pair2);
      result = 31 * result + Objects.hashCode(this.coll);
      result = 31 * result + Objects.hashCode(this.coll2);
      result = 31 * result + Objects.hashCode(this.list);
      result = 31 * result + Objects.hashCode(this.list2);
      result = 31 * result + Objects.hashCode(this.set);
      result = 31 * result + Objects.hashCode(this.set2);
      result = 31 * result + Objects.hashCode(this.map);
      result = 31 * result + Objects.hashCode(this.map2);
      result = 31 * result + Objects.hashCode(this.container);
      result = 31 * result + Objects.hashCode(this.container2);
      result = 31 * result + Objects.hashCode(this.other);
      result = 31 * result + Objects.hashCode(this.regex);
      result = 31 * result + Objects.hashCode(this.any);
      result = 31 * result + Objects.hashCode(this.nonNull);
      result = 31 * result + Objects.hashCode(this._enum);
      return result;
    }

    @Override
    public String toString() {
      StringBuilder builder = new StringBuilder(1400);
      builder.append(PropertyTypes.class.getSimpleName()).append(" {");
      appendProperty(builder, "_boolean", this._boolean);
      appendProperty(builder, "_int", this._int);
      appendProperty(builder, "_float", this._float);
      appendProperty(builder, "string", this.string);
      appendProperty(builder, "duration", this.duration);
      appendProperty(builder, "durationUnit", this.durationUnit);
      appendProperty(builder, "dataSize", this.dataSize);
      appendProperty(builder, "dataSizeUnit", this.dataSizeUnit);
      appendProperty(builder, "nullable", this.nullable);
      appendProperty(builder, "nullable2", this.nullable2);
      appendProperty(builder, "pair", this.pair);
      appendProperty(builder, "pair2", this.pair2);
      appendProperty(builder, "coll", this.coll);
      appendProperty(builder, "coll2", this.coll2);
      appendProperty(builder, "list", this.list);
      appendProperty(builder, "list2", this.list2);
      appendProperty(builder, "set", this.set);
      appendProperty(builder, "set2", this.set2);
      appendProperty(builder, "map", this.map);
      appendProperty(builder, "map2", this.map2);
      appendProperty(builder, "container", this.container);
      appendProperty(builder, "container2", this.container2);
      appendProperty(builder, "other", this.other);
      appendProperty(builder, "regex", this.regex);
      appendProperty(builder, "any", this.any);
      appendProperty(builder, "nonNull", this.nonNull);
      appendProperty(builder, "_enum", this._enum);
      builder.append("\n}");
      return builder.toString();
    }
  }

  public static final class Other {
    public final @NonNull String name;

    public Other(@Named("name") @NonNull String name) {
      this.name = name;
    }

    public Other withName(@NonNull String name) {
      return new Other(name);
    }

    @Override
    public boolean equals(Object obj) {
      if (this == obj) return true;
      if (obj == null) return false;
      if (this.getClass() != obj.getClass()) return false;
      Other other = (Other) obj;
      if (!Objects.equals(this.name, other.name)) return false;
      return true;
    }

    @Override
    public int hashCode() {
      int result = 1;
      result = 31 * result + Objects.hashCode(this.name);
      return result;
    }

    @Override
    public String toString() {
      StringBuilder builder = new StringBuilder(100);
      builder.append(Other.class.getSimpleName()).append(" {");
      appendProperty(builder, "name", this.name);
      builder.append("\n}");
      return builder.toString();
    }
  }

  public enum Direction {
    NORTH("north"),

    EAST("east"),

    SOUTH("south"),

    WEST("west");

    private String value;

    private Direction(String value) {
      this.value = value;
    }

    @Override
    public String toString() {
      return this.value;
    }
  }
}
