package org.wfc.omada.api.organization.model;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.Pattern;
import java.util.Objects;

/**
 * NTP server address; Up to 5 entries are allowed for the NTP server address list.
 */
@ApiModel(description = "NTP server address; Up to 5 entries are allowed for the NTP server address list.")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-12-04T11:17:18.430+08:00[Asia/Shanghai]")

public class NtpServer   {
  @JsonProperty("address")
  private String address;

  public NtpServer address(String address) {
    this.address = address;
    return this;
  }

  /**
   * NTP server address.
   * @return address
  */
  @ApiModelProperty(value = "NTP server address.")

@Pattern(regexp="(?=^.{3,64}$)[a-zA-Z0-9][-a-zA-Z0-9]{0,62}(\\.[a-zA-Z0-9][-a-zA-Z0-9]{0,62})+") 
  public String getAddress() {
    return address;
  }

  public void setAddress(String address) {
    this.address = address;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    NtpServer ntpServer = (NtpServer) o;
    return Objects.equals(this.address, ntpServer.address);
  }

  @Override
  public int hashCode() {
    return Objects.hash(address);
  }

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

