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

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

import javax.validation.Valid;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

/**
 * WireguardPeerDetailOpenApiVo
 */
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-12-04T11:32:19.054+08:00[Asia/Shanghai]")

public class WireguardPeerDetailOpenApiVo   {
  @JsonProperty("id")
  private String id;

  @JsonProperty("name")
  private String name;

  @JsonProperty("status")
  private Boolean status;

  @JsonProperty("interfaceId")
  private String interfaceId;

  @JsonProperty("interfaceName")
  private String interfaceName;

  @JsonProperty("publicKey")
  private String publicKey;

  @JsonProperty("endPoint")
  private String endPoint;

  @JsonProperty("endPointPort")
  private Integer endPointPort;

  @JsonProperty("allowAddress")
  @Valid
  private List<String> allowAddress = null;

  @JsonProperty("presharedKey")
  private String presharedKey;

  @JsonProperty("keepAlive")
  private Integer keepAlive;

  @JsonProperty("comment")
  private String comment;

  public WireguardPeerDetailOpenApiVo id(String id) {
    this.id = id;
    return this;
  }

  /**
   * The ID of WireGuard peer.
   * @return id
  */
  @ApiModelProperty(value = "The ID of WireGuard peer.")


  public String getId() {
    return id;
  }

  public void setId(String id) {
    this.id = id;
  }

  public WireguardPeerDetailOpenApiVo name(String name) {
    this.name = name;
    return this;
  }

  /**
   * The name of WireGuard peer should contain 1 to 64 characters.
   * @return name
  */
  @ApiModelProperty(value = "The name of WireGuard peer should contain 1 to 64 characters.")


  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public WireguardPeerDetailOpenApiVo status(Boolean status) {
    this.status = status;
    return this;
  }

  /**
   * The status of WireGuard peer.
   * @return status
  */
  @ApiModelProperty(value = "The status of WireGuard peer.")


  public Boolean getStatus() {
    return status;
  }

  public void setStatus(Boolean status) {
    this.status = status;
  }

  public WireguardPeerDetailOpenApiVo interfaceId(String interfaceId) {
    this.interfaceId = interfaceId;
    return this;
  }

  /**
   * The ID of WireGuard VPN to which this WireGuard peer binds. The ID can be obtained from 'Get all wireguard's id and name info' interface.
   * @return interfaceId
  */
  @ApiModelProperty(value = "The ID of WireGuard VPN to which this WireGuard peer binds. The ID can be obtained from 'Get all wireguard's id and name info' interface.")


  public String getInterfaceId() {
    return interfaceId;
  }

  public void setInterfaceId(String interfaceId) {
    this.interfaceId = interfaceId;
  }

  public WireguardPeerDetailOpenApiVo interfaceName(String interfaceName) {
    this.interfaceName = interfaceName;
    return this;
  }

  /**
   * The name of WireGuard VPN to which this WireGuard peer binds.
   * @return interfaceName
  */
  @ApiModelProperty(value = "The name of WireGuard VPN to which this WireGuard peer binds.")


  public String getInterfaceName() {
    return interfaceName;
  }

  public void setInterfaceName(String interfaceName) {
    this.interfaceName = interfaceName;
  }

  public WireguardPeerDetailOpenApiVo publicKey(String publicKey) {
    this.publicKey = publicKey;
    return this;
  }

  /**
   * The public key of WireGuard peer must have 44 character of base64 and end with '='.
   * @return publicKey
  */
  @ApiModelProperty(value = "The public key of WireGuard peer must have 44 character of base64 and end with '='.")


  public String getPublicKey() {
    return publicKey;
  }

  public void setPublicKey(String publicKey) {
    this.publicKey = publicKey;
  }

  public WireguardPeerDetailOpenApiVo endPoint(String endPoint) {
    this.endPoint = endPoint;
    return this;
  }

  /**
   * The end point of WireGuard peer.
   * @return endPoint
  */
  @ApiModelProperty(value = "The end point of WireGuard peer.")


  public String getEndPoint() {
    return endPoint;
  }

  public void setEndPoint(String endPoint) {
    this.endPoint = endPoint;
  }

  public WireguardPeerDetailOpenApiVo endPointPort(Integer endPointPort) {
    this.endPointPort = endPointPort;
    return this;
  }

  /**
   * The end point port of WireGuard peer should be within the range of 1-65535.
   * @return endPointPort
  */
  @ApiModelProperty(value = "The end point port of WireGuard peer should be within the range of 1-65535.")


  public Integer getEndPointPort() {
    return endPointPort;
  }

  public void setEndPointPort(Integer endPointPort) {
    this.endPointPort = endPointPort;
  }

  public WireguardPeerDetailOpenApiVo allowAddress(List<String> allowAddress) {
    this.allowAddress = allowAddress;
    return this;
  }

  public WireguardPeerDetailOpenApiVo addAllowAddressItem(String allowAddressItem) {
    if (this.allowAddress == null) {
      this.allowAddress = new ArrayList<>();
    }
    this.allowAddress.add(allowAddressItem);
    return this;
  }

  /**
   * IP address list of WireGuard peer allowed.
   * @return allowAddress
  */
  @ApiModelProperty(value = "IP address list of WireGuard peer allowed.")


  public List<String> getAllowAddress() {
    return allowAddress;
  }

  public void setAllowAddress(List<String> allowAddress) {
    this.allowAddress = allowAddress;
  }

  public WireguardPeerDetailOpenApiVo presharedKey(String presharedKey) {
    this.presharedKey = presharedKey;
    return this;
  }

  /**
   * The presharedKey of WireGuard peer must have 44 character of base64 and end with '='.
   * @return presharedKey
  */
  @ApiModelProperty(value = "The presharedKey of WireGuard peer must have 44 character of base64 and end with '='.")


  public String getPresharedKey() {
    return presharedKey;
  }

  public void setPresharedKey(String presharedKey) {
    this.presharedKey = presharedKey;
  }

  public WireguardPeerDetailOpenApiVo keepAlive(Integer keepAlive) {
    this.keepAlive = keepAlive;
    return this;
  }

  /**
   * The keepalive second of WireGuard peer should be within the range of 0-65535.
   * @return keepAlive
  */
  @ApiModelProperty(value = "The keepalive second of WireGuard peer should be within the range of 0-65535.")


  public Integer getKeepAlive() {
    return keepAlive;
  }

  public void setKeepAlive(Integer keepAlive) {
    this.keepAlive = keepAlive;
  }

  public WireguardPeerDetailOpenApiVo comment(String comment) {
    this.comment = comment;
    return this;
  }

  /**
   * The comment of WireGuard peer should contain 0 to 128 characters.
   * @return comment
  */
  @ApiModelProperty(value = "The comment of WireGuard peer should contain 0 to 128 characters.")


  public String getComment() {
    return comment;
  }

  public void setComment(String comment) {
    this.comment = comment;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    WireguardPeerDetailOpenApiVo wireguardPeerDetailOpenApiVo = (WireguardPeerDetailOpenApiVo) o;
    return Objects.equals(this.id, wireguardPeerDetailOpenApiVo.id) &&
        Objects.equals(this.name, wireguardPeerDetailOpenApiVo.name) &&
        Objects.equals(this.status, wireguardPeerDetailOpenApiVo.status) &&
        Objects.equals(this.interfaceId, wireguardPeerDetailOpenApiVo.interfaceId) &&
        Objects.equals(this.interfaceName, wireguardPeerDetailOpenApiVo.interfaceName) &&
        Objects.equals(this.publicKey, wireguardPeerDetailOpenApiVo.publicKey) &&
        Objects.equals(this.endPoint, wireguardPeerDetailOpenApiVo.endPoint) &&
        Objects.equals(this.endPointPort, wireguardPeerDetailOpenApiVo.endPointPort) &&
        Objects.equals(this.allowAddress, wireguardPeerDetailOpenApiVo.allowAddress) &&
        Objects.equals(this.presharedKey, wireguardPeerDetailOpenApiVo.presharedKey) &&
        Objects.equals(this.keepAlive, wireguardPeerDetailOpenApiVo.keepAlive) &&
        Objects.equals(this.comment, wireguardPeerDetailOpenApiVo.comment);
  }

  @Override
  public int hashCode() {
    return Objects.hash(id, name, status, interfaceId, interfaceName, publicKey, endPoint, endPointPort, allowAddress, presharedKey, keepAlive, comment);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class WireguardPeerDetailOpenApiVo {\n");
    
    sb.append("    id: ").append(toIndentedString(id)).append("\n");
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    status: ").append(toIndentedString(status)).append("\n");
    sb.append("    interfaceId: ").append(toIndentedString(interfaceId)).append("\n");
    sb.append("    interfaceName: ").append(toIndentedString(interfaceName)).append("\n");
    sb.append("    publicKey: ").append(toIndentedString(publicKey)).append("\n");
    sb.append("    endPoint: ").append(toIndentedString(endPoint)).append("\n");
    sb.append("    endPointPort: ").append(toIndentedString(endPointPort)).append("\n");
    sb.append("    allowAddress: ").append(toIndentedString(allowAddress)).append("\n");
    sb.append("    presharedKey: ").append(toIndentedString(presharedKey)).append("\n");
    sb.append("    keepAlive: ").append(toIndentedString(keepAlive)).append("\n");
    sb.append("    comment: ").append(toIndentedString(comment)).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    ");
  }
}

