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;

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

public class GroupOpenApiVo   {
  @JsonProperty("groupId")
  private String groupId;

  @JsonProperty("name")
  private String name;

  @JsonProperty("type")
  private Integer type;

  @JsonProperty("count")
  private Integer count;

  @JsonProperty("buildIn")
  private Boolean buildIn;

  @JsonProperty("ipList")
  @Valid
  private List<IpSubnetsOpenApiVo> ipList = null;

  @JsonProperty("ipv6List")
  @Valid
  private List<IPv6SubnetsOpenApiVo> ipv6List = null;

  @JsonProperty("portType")
  private Integer portType;

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

  @JsonProperty("portMaskList")
  @Valid
  private List<PortMaskOpenApiVo> portMaskList = null;

  @JsonProperty("macAddressList")
  @Valid
  private List<MacAddressOpenApiVo> macAddressList = null;

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

  @JsonProperty("description")
  private String description;

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

  @JsonProperty("domainNamePort")
  @Valid
  private List<DomainOpenApiVo> domainNamePort = null;

  public GroupOpenApiVo groupId(String groupId) {
    this.groupId = groupId;
    return this;
  }

  /**
   * Group profile ID
   * @return groupId
  */
  @ApiModelProperty(value = "Group profile ID")


  public String getGroupId() {
    return groupId;
  }

  public void setGroupId(String groupId) {
    this.groupId = groupId;
  }

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

  /**
   * Group profile name
   * @return name
  */
  @ApiModelProperty(value = "Group profile name")


  public String getName() {
    return name;
  }

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

  public GroupOpenApiVo type(Integer type) {
    this.type = type;
    return this;
  }

  /**
   * Type of group profile. 0: IP Group; 1: IP Port Group; 2: MAC Group; 3: IPv6 Group; 4: IPv6 Port Group; 5: Country Group; 7: Domain Group
   * @return type
  */
  @ApiModelProperty(value = "Type of group profile. 0: IP Group; 1: IP Port Group; 2: MAC Group; 3: IPv6 Group; 4: IPv6 Port Group; 5: Country Group; 7: Domain Group")


  public Integer getType() {
    return type;
  }

  public void setType(Integer type) {
    this.type = type;
  }

  public GroupOpenApiVo count(Integer count) {
    this.count = count;
    return this;
  }

  /**
   * Count of list entries
   * @return count
  */
  @ApiModelProperty(value = "Count of list entries")


  public Integer getCount() {
    return count;
  }

  public void setCount(Integer count) {
    this.count = count;
  }

  public GroupOpenApiVo buildIn(Boolean buildIn) {
    this.buildIn = buildIn;
    return this;
  }

  /**
   * Is this profile a built-in profile
   * @return buildIn
  */
  @ApiModelProperty(value = "Is this profile a built-in profile")


  public Boolean getBuildIn() {
    return buildIn;
  }

  public void setBuildIn(Boolean buildIn) {
    this.buildIn = buildIn;
  }

  public GroupOpenApiVo ipList(List<IpSubnetsOpenApiVo> ipList) {
    this.ipList = ipList;
    return this;
  }

  public GroupOpenApiVo addIpListItem(IpSubnetsOpenApiVo ipListItem) {
    if (this.ipList == null) {
      this.ipList = new ArrayList<>();
    }
    this.ipList.add(ipListItem);
    return this;
  }

  /**
   * IP subnet info list. [type] value of 0 or 1 is required
   * @return ipList
  */
  @ApiModelProperty(value = "IP subnet info list. [type] value of 0 or 1 is required")

  @Valid

  public List<IpSubnetsOpenApiVo> getIpList() {
    return ipList;
  }

  public void setIpList(List<IpSubnetsOpenApiVo> ipList) {
    this.ipList = ipList;
  }

  public GroupOpenApiVo ipv6List(List<IPv6SubnetsOpenApiVo> ipv6List) {
    this.ipv6List = ipv6List;
    return this;
  }

  public GroupOpenApiVo addIpv6ListItem(IPv6SubnetsOpenApiVo ipv6ListItem) {
    if (this.ipv6List == null) {
      this.ipv6List = new ArrayList<>();
    }
    this.ipv6List.add(ipv6ListItem);
    return this;
  }

  /**
   * IPv6 subnet info list. [type] value of 3 or 4 is required
   * @return ipv6List
  */
  @ApiModelProperty(value = "IPv6 subnet info list. [type] value of 3 or 4 is required")

  @Valid

  public List<IPv6SubnetsOpenApiVo> getIpv6List() {
    return ipv6List;
  }

  public void setIpv6List(List<IPv6SubnetsOpenApiVo> ipv6List) {
    this.ipv6List = ipv6List;
  }

  public GroupOpenApiVo portType(Integer portType) {
    this.portType = portType;
    return this;
  }

  /**
   * Port type. 0: port range 1: port mask. Valid when [type] is 1 or 4
   * @return portType
  */
  @ApiModelProperty(value = "Port type. 0: port range 1: port mask. Valid when [type] is 1 or 4")


  public Integer getPortType() {
    return portType;
  }

  public void setPortType(Integer portType) {
    this.portType = portType;
  }

  public GroupOpenApiVo portList(List<String> portList) {
    this.portList = portList;
    return this;
  }

  public GroupOpenApiVo addPortListItem(String portListItem) {
    if (this.portList == null) {
      this.portList = new ArrayList<>();
    }
    this.portList.add(portListItem);
    return this;
  }

  /**
   * Port list. Valid when [portType] is 0
   * @return portList
  */
  @ApiModelProperty(value = "Port list. Valid when [portType] is 0")


  public List<String> getPortList() {
    return portList;
  }

  public void setPortList(List<String> portList) {
    this.portList = portList;
  }

  public GroupOpenApiVo portMaskList(List<PortMaskOpenApiVo> portMaskList) {
    this.portMaskList = portMaskList;
    return this;
  }

  public GroupOpenApiVo addPortMaskListItem(PortMaskOpenApiVo portMaskListItem) {
    if (this.portMaskList == null) {
      this.portMaskList = new ArrayList<>();
    }
    this.portMaskList.add(portMaskListItem);
    return this;
  }

  /**
   * Port mask list. [portType] value of 1 are is required
   * @return portMaskList
  */
  @ApiModelProperty(value = "Port mask list. [portType] value of 1 are is required")

  @Valid

  public List<PortMaskOpenApiVo> getPortMaskList() {
    return portMaskList;
  }

  public void setPortMaskList(List<PortMaskOpenApiVo> portMaskList) {
    this.portMaskList = portMaskList;
  }

  public GroupOpenApiVo macAddressList(List<MacAddressOpenApiVo> macAddressList) {
    this.macAddressList = macAddressList;
    return this;
  }

  public GroupOpenApiVo addMacAddressListItem(MacAddressOpenApiVo macAddressListItem) {
    if (this.macAddressList == null) {
      this.macAddressList = new ArrayList<>();
    }
    this.macAddressList.add(macAddressListItem);
    return this;
  }

  /**
   * MAC address list. Valid when [type] is 2
   * @return macAddressList
  */
  @ApiModelProperty(value = "MAC address list. Valid when [type] is 2")

  @Valid

  public List<MacAddressOpenApiVo> getMacAddressList() {
    return macAddressList;
  }

  public void setMacAddressList(List<MacAddressOpenApiVo> macAddressList) {
    this.macAddressList = macAddressList;
  }

  public GroupOpenApiVo countryList(List<String> countryList) {
    this.countryList = countryList;
    return this;
  }

  public GroupOpenApiVo addCountryListItem(String countryListItem) {
    if (this.countryList == null) {
      this.countryList = new ArrayList<>();
    }
    this.countryList.add(countryListItem);
    return this;
  }

  /**
   * Country list. Valid when [type] is 5
   * @return countryList
  */
  @ApiModelProperty(value = "Country list. Valid when [type] is 5")


  public List<String> getCountryList() {
    return countryList;
  }

  public void setCountryList(List<String> countryList) {
    this.countryList = countryList;
  }

  public GroupOpenApiVo description(String description) {
    this.description = description;
    return this;
  }

  /**
   * Description. Valid when [type] is 5
   * @return description
  */
  @ApiModelProperty(value = "Description. Valid when [type] is 5")


  public String getDescription() {
    return description;
  }

  public void setDescription(String description) {
    this.description = description;
  }

  public GroupOpenApiVo domainName(List<String> domainName) {
    this.domainName = domainName;
    return this;
  }

  public GroupOpenApiVo addDomainNameItem(String domainNameItem) {
    if (this.domainName == null) {
      this.domainName = new ArrayList<>();
    }
    this.domainName.add(domainNameItem);
    return this;
  }

  /**
   * Domain name. Valid when [type] is 7
   * @return domainName
  */
  @ApiModelProperty(value = "Domain name. Valid when [type] is 7")


  public List<String> getDomainName() {
    return domainName;
  }

  public void setDomainName(List<String> domainName) {
    this.domainName = domainName;
  }

  public GroupOpenApiVo domainNamePort(List<DomainOpenApiVo> domainNamePort) {
    this.domainNamePort = domainNamePort;
    return this;
  }

  public GroupOpenApiVo addDomainNamePortItem(DomainOpenApiVo domainNamePortItem) {
    if (this.domainNamePort == null) {
      this.domainNamePort = new ArrayList<>();
    }
    this.domainNamePort.add(domainNamePortItem);
    return this;
  }

  /**
   * Domain info. Handle situations where there are ports,  [type] values of 7 is required
   * @return domainNamePort
  */
  @ApiModelProperty(value = "Domain info. Handle situations where there are ports,  [type] values of 7 is required")

  @Valid

  public List<DomainOpenApiVo> getDomainNamePort() {
    return domainNamePort;
  }

  public void setDomainNamePort(List<DomainOpenApiVo> domainNamePort) {
    this.domainNamePort = domainNamePort;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    GroupOpenApiVo groupOpenApiVo = (GroupOpenApiVo) o;
    return Objects.equals(this.groupId, groupOpenApiVo.groupId) &&
        Objects.equals(this.name, groupOpenApiVo.name) &&
        Objects.equals(this.type, groupOpenApiVo.type) &&
        Objects.equals(this.count, groupOpenApiVo.count) &&
        Objects.equals(this.buildIn, groupOpenApiVo.buildIn) &&
        Objects.equals(this.ipList, groupOpenApiVo.ipList) &&
        Objects.equals(this.ipv6List, groupOpenApiVo.ipv6List) &&
        Objects.equals(this.portType, groupOpenApiVo.portType) &&
        Objects.equals(this.portList, groupOpenApiVo.portList) &&
        Objects.equals(this.portMaskList, groupOpenApiVo.portMaskList) &&
        Objects.equals(this.macAddressList, groupOpenApiVo.macAddressList) &&
        Objects.equals(this.countryList, groupOpenApiVo.countryList) &&
        Objects.equals(this.description, groupOpenApiVo.description) &&
        Objects.equals(this.domainName, groupOpenApiVo.domainName) &&
        Objects.equals(this.domainNamePort, groupOpenApiVo.domainNamePort);
  }

  @Override
  public int hashCode() {
    return Objects.hash(groupId, name, type, count, buildIn, ipList, ipv6List, portType, portList, portMaskList, macAddressList, countryList, description, domainName, domainNamePort);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class GroupOpenApiVo {\n");
    
    sb.append("    groupId: ").append(toIndentedString(groupId)).append("\n");
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    type: ").append(toIndentedString(type)).append("\n");
    sb.append("    count: ").append(toIndentedString(count)).append("\n");
    sb.append("    buildIn: ").append(toIndentedString(buildIn)).append("\n");
    sb.append("    ipList: ").append(toIndentedString(ipList)).append("\n");
    sb.append("    ipv6List: ").append(toIndentedString(ipv6List)).append("\n");
    sb.append("    portType: ").append(toIndentedString(portType)).append("\n");
    sb.append("    portList: ").append(toIndentedString(portList)).append("\n");
    sb.append("    portMaskList: ").append(toIndentedString(portMaskList)).append("\n");
    sb.append("    macAddressList: ").append(toIndentedString(macAddressList)).append("\n");
    sb.append("    countryList: ").append(toIndentedString(countryList)).append("\n");
    sb.append("    description: ").append(toIndentedString(description)).append("\n");
    sb.append("    domainName: ").append(toIndentedString(domainName)).append("\n");
    sb.append("    domainNamePort: ").append(toIndentedString(domainNamePort)).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    ");
  }
}

