/*
 * ThingPark things management Devices API
 * REST interface for Devices 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.appserver;

import java.util.Objects;

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

/**
 * GTP tunnel settings
 */
@JsonPropertyOrder({ AppServersRoutingProfileCellularGtpTunnel.JSON_PROPERTY_SUBNET,
    AppServersRoutingProfileCellularGtpTunnel.JSON_PROPERTY_DHCP_POOL,
    AppServersRoutingProfileCellularGtpTunnel.JSON_PROPERTY_DNS1,
    AppServersRoutingProfileCellularGtpTunnel.JSON_PROPERTY_DNS2 })
@JsonTypeName("AppServersRoutingProfileCellular_gtpTunnel")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-05-29T11:38:36.048437806+02:00[Europe/Paris]", comments = "Generator version: 7.6.0")
public class AppServersRoutingProfileCellularGtpTunnel {
  public static final String JSON_PROPERTY_SUBNET = "subnet";
  private String subnet = "10.20.0.0/16";

  public static final String JSON_PROPERTY_DHCP_POOL = "dhcpPool";
  private String dhcpPool = "10.20.0.1-10.20.255.254";

  public static final String JSON_PROPERTY_DNS1 = "dns1";
  private String dns1 = "10.10.0.1";

  public static final String JSON_PROPERTY_DNS2 = "dns2";
  private String dns2;

  public AppServersRoutingProfileCellularGtpTunnel() {
  }

  public AppServersRoutingProfileCellularGtpTunnel subnet(String subnet) {

    this.subnet = subnet;
    return this;
  }

  /**
   * IPv4 subnet Syntax: CIDR
   * 
   * @return subnet
   **/
  @javax.annotation.Nonnull
  @JsonProperty(JSON_PROPERTY_SUBNET)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)

  public String getSubnet() {
    return subnet;
  }

  @JsonProperty(JSON_PROPERTY_SUBNET)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setSubnet(String subnet) {
    this.subnet = subnet;
  }

  public AppServersRoutingProfileCellularGtpTunnel dhcpPool(String dhcpPool) {

    this.dhcpPool = dhcpPool;
    return this;
  }

  /**
   * DHCP IPv4 pool Syntax: IP address range
   * 
   * @return dhcpPool
   **/
  @javax.annotation.Nonnull
  @JsonProperty(JSON_PROPERTY_DHCP_POOL)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)

  public String getDhcpPool() {
    return dhcpPool;
  }

  @JsonProperty(JSON_PROPERTY_DHCP_POOL)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setDhcpPool(String dhcpPool) {
    this.dhcpPool = dhcpPool;
  }

  public AppServersRoutingProfileCellularGtpTunnel dns1(String dns1) {

    this.dns1 = dns1;
    return this;
  }

  /**
   * DNS IPv4 address 1 Syntax: IP Address
   * 
   * @return dns1
   **/
  @javax.annotation.Nonnull
  @JsonProperty(JSON_PROPERTY_DNS1)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)

  public String getDns1() {
    return dns1;
  }

  @JsonProperty(JSON_PROPERTY_DNS1)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setDns1(String dns1) {
    this.dns1 = dns1;
  }

  public AppServersRoutingProfileCellularGtpTunnel dns2(String dns2) {

    this.dns2 = dns2;
    return this;
  }

  /**
   * DNS IPv4 address 2 Syntax: IP Address
   * 
   * @return dns2
   **/
  @javax.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_DNS2)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getDns2() {
    return dns2;
  }

  @JsonProperty(JSON_PROPERTY_DNS2)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setDns2(String dns2) {
    this.dns2 = dns2;
  }

  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    AppServersRoutingProfileCellularGtpTunnel appServersRoutingProfileCellularGtpTunnel = (AppServersRoutingProfileCellularGtpTunnel) o;
    return Objects.equals(this.subnet, appServersRoutingProfileCellularGtpTunnel.subnet)
            && Objects.equals(this.dhcpPool, appServersRoutingProfileCellularGtpTunnel.dhcpPool)
            && Objects.equals(this.dns1, appServersRoutingProfileCellularGtpTunnel.dns1)
            && Objects.equals(this.dns2, appServersRoutingProfileCellularGtpTunnel.dns2);
  }

  @Override
  public int hashCode() {
    return Objects.hash(subnet, dhcpPool, dns1, dns2);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class AppServersRoutingProfileCellularGtpTunnel {\n");
    sb.append("    subnet: ").append(toIndentedString(subnet)).append("\n");
    sb.append("    dhcpPool: ").append(toIndentedString(dhcpPool)).append("\n");
    sb.append("    dns1: ").append(toIndentedString(dns1)).append("\n");
    sb.append("    dns2: ").append(toIndentedString(dns2)).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    ");
  }

}
