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

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

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

/**
 * The site&#39;s privilege of this user.
 */
@ApiModel(description = "The site's privilege of this user.")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-12-04T10:44:52.771+08:00[Asia/Shanghai]")

public class PrivilegeOpenApiVo   {
  @JsonProperty("all")
  private Boolean all;

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

  public PrivilegeOpenApiVo all(Boolean all) {
    this.all = all;
    return this;
  }

  /**
   * Whether having all site privilege.
   * @return all
  */
  @ApiModelProperty(value = "Whether having all site privilege.")


  public Boolean getAll() {
    return all;
  }

  public void setAll(Boolean all) {
    this.all = all;
  }

  public PrivilegeOpenApiVo sites(List<String> sites) {
    this.sites = sites;
    return this;
  }

  public PrivilegeOpenApiVo addSitesItem(String sitesItem) {
    if (this.sites == null) {
      this.sites = new ArrayList<>();
    }
    this.sites.add(sitesItem);
    return this;
  }

  /**
   * The IDs of site that can be accessed by this user.
   * @return sites
  */
  @ApiModelProperty(value = "The IDs of site that can be accessed by this user.")


  public List<String> getSites() {
    return sites;
  }

  public void setSites(List<String> sites) {
    this.sites = sites;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    PrivilegeOpenApiVo privilegeOpenApiVo = (PrivilegeOpenApiVo) o;
    return Objects.equals(this.all, privilegeOpenApiVo.all) &&
        Objects.equals(this.sites, privilegeOpenApiVo.sites);
  }

  @Override
  public int hashCode() {
    return Objects.hash(all, sites);
  }

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

