/*
 * ThingPark things management Networks API
 * REST interface for networks management. 
 *
 * The version of the OpenAPI document: 7.3
 * 
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */

package lora.ns.actility.api.model.common;

import java.math.BigDecimal;
import java.util.Objects;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;

/**
 * Geographical coordinates
 */
@JsonPropertyOrder({ Coordinates.JSON_PROPERTY_LAT, Coordinates.JSON_PROPERTY_LNG })
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-05-31T22:23:57.813651038+02:00[Europe/Paris]", comments = "Generator version: 7.6.0")
public class Coordinates {
  public static final String JSON_PROPERTY_LAT = "lat";
  private BigDecimal lat;

  public static final String JSON_PROPERTY_LNG = "lng";
  private BigDecimal lng;

  public Coordinates() {
  }

  public Coordinates lat(BigDecimal lat) {

    this.lat = lat;
    return this;
  }

  /**
   * Latitude minimum: -90 maximum: 90
   * 
   * @return lat
   **/
  @javax.annotation.Nonnull
  @JsonProperty(JSON_PROPERTY_LAT)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)

  public BigDecimal getLat() {
    return lat;
  }

  @JsonProperty(JSON_PROPERTY_LAT)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setLat(BigDecimal lat) {
    this.lat = lat;
  }

  public Coordinates lng(BigDecimal lng) {

    this.lng = lng;
    return this;
  }

  /**
   * Longitude minimum: -180 maximum: 180
   * 
   * @return lng
   **/
  @javax.annotation.Nonnull
  @JsonProperty(JSON_PROPERTY_LNG)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)

  public BigDecimal getLng() {
    return lng;
  }

  @JsonProperty(JSON_PROPERTY_LNG)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setLng(BigDecimal lng) {
    this.lng = lng;
  }

  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    Coordinates coordinates = (Coordinates) o;
    return Objects.equals(this.lat, coordinates.lat) && Objects.equals(this.lng, coordinates.lng);
  }

  @Override
  public int hashCode() {
    return Objects.hash(lat, lng);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class Coordinates {\n");
    sb.append("    lat: ").append(toIndentedString(lat)).append("\n");
    sb.append("    lng: ").append(toIndentedString(lng)).append("\n");
    sb.append("}");
    return sb.toString();
  }

  /**
   * Convert the given object to string with each line indented by 4 spaces
   * (except the first line).
   */
  private String toIndentedString(Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }

}
