package org.wfc.omada.api.msp.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 customer&#39;s privilege of this user.
 */
@ApiModel(description = "The customer's privilege of this user.")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-12-04T11:44:08.065+08:00[Asia/Shanghai]")

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

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

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

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


  public Boolean getAll() {
    return all;
  }

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

  public MspPrivilegeOpenApiVo customers(List<String> customers) {
    this.customers = customers;
    return this;
  }

  public MspPrivilegeOpenApiVo addCustomersItem(String customersItem) {
    if (this.customers == null) {
      this.customers = new ArrayList<>();
    }
    this.customers.add(customersItem);
    return this;
  }

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


  public List<String> getCustomers() {
    return customers;
  }

  public void setCustomers(List<String> customers) {
    this.customers = customers;
  }


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

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

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

