All Downloads are FREE. Search and download functionalities are using the official Maven repository.

info.tomfi.hebcal.shabbat.response.AutoValue_ResponseLocation Maven / Gradle / Ivy

There is a newer version: 2.1.9
Show newest version
package info.tomfi.hebcal.shabbat.response;

import info.tomfi.hebcal.shabbat.internal.Nullable;
import java.util.Optional;

// Generated by com.google.auto.value.processor.AutoValueProcessor
final class AutoValue_ResponseLocation extends ResponseLocation {

  private final Optional admin1;

  private final Optional asciiname;

  private final String city;

  private final String country;

  private final String geo;

  private final int geonameid;

  private final Double latitude;

  private final Double longitude;

  private final Optional cc;

  private final String title;

  private final Optional tzid;

  private AutoValue_ResponseLocation(
      Optional admin1,
      Optional asciiname,
      String city,
      String country,
      String geo,
      int geonameid,
      Double latitude,
      Double longitude,
      Optional cc,
      String title,
      Optional tzid) {
    this.admin1 = admin1;
    this.asciiname = asciiname;
    this.city = city;
    this.country = country;
    this.geo = geo;
    this.geonameid = geonameid;
    this.latitude = latitude;
    this.longitude = longitude;
    this.cc = cc;
    this.title = title;
    this.tzid = tzid;
  }

  @Override
  public Optional admin1() {
    return admin1;
  }

  @Override
  public Optional asciiname() {
    return asciiname;
  }

  @Override
  public String city() {
    return city;
  }

  @Override
  public String country() {
    return country;
  }

  @Override
  public String geo() {
    return geo;
  }

  @Override
  public int geonameid() {
    return geonameid;
  }

  @Override
  public Double latitude() {
    return latitude;
  }

  @Override
  public Double longitude() {
    return longitude;
  }

  @Override
  public Optional cc() {
    return cc;
  }

  @Override
  public String title() {
    return title;
  }

  @Override
  public Optional tzid() {
    return tzid;
  }

  @Override
  public String toString() {
    return "ResponseLocation{"
        + "admin1=" + admin1 + ", "
        + "asciiname=" + asciiname + ", "
        + "city=" + city + ", "
        + "country=" + country + ", "
        + "geo=" + geo + ", "
        + "geonameid=" + geonameid + ", "
        + "latitude=" + latitude + ", "
        + "longitude=" + longitude + ", "
        + "cc=" + cc + ", "
        + "title=" + title + ", "
        + "tzid=" + tzid
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof ResponseLocation) {
      ResponseLocation that = (ResponseLocation) o;
      return this.admin1.equals(that.admin1())
          && this.asciiname.equals(that.asciiname())
          && this.city.equals(that.city())
          && this.country.equals(that.country())
          && this.geo.equals(that.geo())
          && this.geonameid == that.geonameid()
          && this.latitude.equals(that.latitude())
          && this.longitude.equals(that.longitude())
          && this.cc.equals(that.cc())
          && this.title.equals(that.title())
          && this.tzid.equals(that.tzid());
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= admin1.hashCode();
    h$ *= 1000003;
    h$ ^= asciiname.hashCode();
    h$ *= 1000003;
    h$ ^= city.hashCode();
    h$ *= 1000003;
    h$ ^= country.hashCode();
    h$ *= 1000003;
    h$ ^= geo.hashCode();
    h$ *= 1000003;
    h$ ^= geonameid;
    h$ *= 1000003;
    h$ ^= latitude.hashCode();
    h$ *= 1000003;
    h$ ^= longitude.hashCode();
    h$ *= 1000003;
    h$ ^= cc.hashCode();
    h$ *= 1000003;
    h$ ^= title.hashCode();
    h$ *= 1000003;
    h$ ^= tzid.hashCode();
    return h$;
  }

  static final class Builder extends ResponseLocation.Builder {
    private Optional admin1 = Optional.empty();
    private Optional asciiname = Optional.empty();
    private String city;
    private String country;
    private String geo;
    private Integer geonameid;
    private Double latitude;
    private Double longitude;
    private Optional cc = Optional.empty();
    private String title;
    private Optional tzid = Optional.empty();
    Builder() {
    }
    @Override
    public ResponseLocation.Builder admin1(@Nullable String admin1) {
      this.admin1 = Optional.ofNullable(admin1);
      return this;
    }
    @Override
    public ResponseLocation.Builder asciiname(@Nullable String asciiname) {
      this.asciiname = Optional.ofNullable(asciiname);
      return this;
    }
    @Override
    public ResponseLocation.Builder city(String city) {
      if (city == null) {
        throw new NullPointerException("Null city");
      }
      this.city = city;
      return this;
    }
    @Override
    public ResponseLocation.Builder country(String country) {
      if (country == null) {
        throw new NullPointerException("Null country");
      }
      this.country = country;
      return this;
    }
    @Override
    public ResponseLocation.Builder geo(String geo) {
      if (geo == null) {
        throw new NullPointerException("Null geo");
      }
      this.geo = geo;
      return this;
    }
    @Override
    public ResponseLocation.Builder geonameid(int geonameid) {
      this.geonameid = geonameid;
      return this;
    }
    @Override
    public ResponseLocation.Builder latitude(Double latitude) {
      if (latitude == null) {
        throw new NullPointerException("Null latitude");
      }
      this.latitude = latitude;
      return this;
    }
    @Override
    public ResponseLocation.Builder longitude(Double longitude) {
      if (longitude == null) {
        throw new NullPointerException("Null longitude");
      }
      this.longitude = longitude;
      return this;
    }
    @Override
    public ResponseLocation.Builder cc(@Nullable String cc) {
      this.cc = Optional.ofNullable(cc);
      return this;
    }
    @Override
    public ResponseLocation.Builder title(String title) {
      if (title == null) {
        throw new NullPointerException("Null title");
      }
      this.title = title;
      return this;
    }
    @Override
    public ResponseLocation.Builder tzid(@Nullable String tzid) {
      this.tzid = Optional.ofNullable(tzid);
      return this;
    }
    @Override
    public ResponseLocation build() {
      if (this.city == null
          || this.country == null
          || this.geo == null
          || this.geonameid == null
          || this.latitude == null
          || this.longitude == null
          || this.title == null) {
        StringBuilder missing = new StringBuilder();
        if (this.city == null) {
          missing.append(" city");
        }
        if (this.country == null) {
          missing.append(" country");
        }
        if (this.geo == null) {
          missing.append(" geo");
        }
        if (this.geonameid == null) {
          missing.append(" geonameid");
        }
        if (this.latitude == null) {
          missing.append(" latitude");
        }
        if (this.longitude == null) {
          missing.append(" longitude");
        }
        if (this.title == null) {
          missing.append(" title");
        }
        throw new IllegalStateException("Missing required properties:" + missing);
      }
      return new AutoValue_ResponseLocation(
          this.admin1,
          this.asciiname,
          this.city,
          this.country,
          this.geo,
          this.geonameid,
          this.latitude,
          this.longitude,
          this.cc,
          this.title,
          this.tzid);
    }
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy