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

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

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

/**
 * MDNS rule gateway config, valid when parameter [type] is 1
 */
@ApiModel(description = "MDNS rule gateway config, valid when parameter [type] is 1")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-12-04T11:32:19.054+08:00[Asia/Shanghai]")

public class OsgMdnsRuleOpenApiVo   {
  @JsonProperty("serviceNetworks")
  @Valid
  private List<String> serviceNetworks = new ArrayList<>();

  @JsonProperty("clientNetworks")
  @Valid
  private List<String> clientNetworks = new ArrayList<>();

  public OsgMdnsRuleOpenApiVo serviceNetworks(List<String> serviceNetworks) {
    this.serviceNetworks = serviceNetworks;
    return this;
  }

  public OsgMdnsRuleOpenApiVo addServiceNetworksItem(String serviceNetworksItem) {
    this.serviceNetworks.add(serviceNetworksItem);
    return this;
  }

  /**
   * LAN Network ID list of selected service networks. LAN Network can be created using 'Create LAN network' interface, and LAN Network ID can be obtained from 'Get LAN network list' interface
   * @return serviceNetworks
  */
  @ApiModelProperty(required = true, value = "LAN Network ID list of selected service networks. LAN Network can be created using 'Create LAN network' interface, and LAN Network ID can be obtained from 'Get LAN network list' interface")
  @NotNull


  public List<String> getServiceNetworks() {
    return serviceNetworks;
  }

  public void setServiceNetworks(List<String> serviceNetworks) {
    this.serviceNetworks = serviceNetworks;
  }

  public OsgMdnsRuleOpenApiVo clientNetworks(List<String> clientNetworks) {
    this.clientNetworks = clientNetworks;
    return this;
  }

  public OsgMdnsRuleOpenApiVo addClientNetworksItem(String clientNetworksItem) {
    this.clientNetworks.add(clientNetworksItem);
    return this;
  }

  /**
   * LAN Network ID list of selected client networks. LAN Network can be created using 'Create LAN network' interface, and LAN Network ID can be obtained from 'Get LAN network list' interface
   * @return clientNetworks
  */
  @ApiModelProperty(required = true, value = "LAN Network ID list of selected client networks. LAN Network can be created using 'Create LAN network' interface, and LAN Network ID can be obtained from 'Get LAN network list' interface")
  @NotNull


  public List<String> getClientNetworks() {
    return clientNetworks;
  }

  public void setClientNetworks(List<String> clientNetworks) {
    this.clientNetworks = clientNetworks;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    OsgMdnsRuleOpenApiVo osgMdnsRuleOpenApiVo = (OsgMdnsRuleOpenApiVo) o;
    return Objects.equals(this.serviceNetworks, osgMdnsRuleOpenApiVo.serviceNetworks) &&
        Objects.equals(this.clientNetworks, osgMdnsRuleOpenApiVo.clientNetworks);
  }

  @Override
  public int hashCode() {
    return Objects.hash(serviceNetworks, clientNetworks);
  }

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

