package org.wfc.omada.api.msp.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;

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

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

  @JsonProperty("name")
  private String name;

  @JsonProperty("roleId")
  private String roleId;

  @JsonProperty("roleName")
  private String roleName;

  @JsonProperty("roleType")
  private Integer roleType;

  @JsonProperty("customerRoleId")
  private String customerRoleId;

  @JsonProperty("customerRoleName")
  private String customerRoleName;

  @JsonProperty("customerRoleType")
  private Integer customerRoleType;

  @JsonProperty("allCustomer")
  private Boolean allCustomer;

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

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

  /**
   * Msp external user group ID.
   * @return id
  */
  @ApiModelProperty(value = "Msp external user group ID.")


  public String getId() {
    return id;
  }

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

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

  /**
   * Msp external user group name.
   * @return name
  */
  @ApiModelProperty(value = "Msp external user group name.")


  public String getName() {
    return name;
  }

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

  public MspExternalUserGroupDetailOpenApiVo roleId(String roleId) {
    this.roleId = roleId;
    return this;
  }

  /**
   * Msp role ID.
   * @return roleId
  */
  @ApiModelProperty(value = "Msp role ID.")


  public String getRoleId() {
    return roleId;
  }

  public void setRoleId(String roleId) {
    this.roleId = roleId;
  }

  public MspExternalUserGroupDetailOpenApiVo roleName(String roleName) {
    this.roleName = roleName;
    return this;
  }

  /**
   * Msp role name.
   * @return roleName
  */
  @ApiModelProperty(value = "Msp role name.")


  public String getRoleName() {
    return roleName;
  }

  public void setRoleName(String roleName) {
    this.roleName = roleName;
  }

  public MspExternalUserGroupDetailOpenApiVo roleType(Integer roleType) {
    this.roleType = roleType;
    return this;
  }

  /**
   * Msp role type.
   * @return roleType
  */
  @ApiModelProperty(value = "Msp role type.")


  public Integer getRoleType() {
    return roleType;
  }

  public void setRoleType(Integer roleType) {
    this.roleType = roleType;
  }

  public MspExternalUserGroupDetailOpenApiVo customerRoleId(String customerRoleId) {
    this.customerRoleId = customerRoleId;
    return this;
  }

  /**
   * Customer role ID.
   * @return customerRoleId
  */
  @ApiModelProperty(value = "Customer role ID.")


  public String getCustomerRoleId() {
    return customerRoleId;
  }

  public void setCustomerRoleId(String customerRoleId) {
    this.customerRoleId = customerRoleId;
  }

  public MspExternalUserGroupDetailOpenApiVo customerRoleName(String customerRoleName) {
    this.customerRoleName = customerRoleName;
    return this;
  }

  /**
   * Customer role name.
   * @return customerRoleName
  */
  @ApiModelProperty(value = "Customer role name.")


  public String getCustomerRoleName() {
    return customerRoleName;
  }

  public void setCustomerRoleName(String customerRoleName) {
    this.customerRoleName = customerRoleName;
  }

  public MspExternalUserGroupDetailOpenApiVo customerRoleType(Integer customerRoleType) {
    this.customerRoleType = customerRoleType;
    return this;
  }

  /**
   * Customer role type.
   * @return customerRoleType
  */
  @ApiModelProperty(value = "Customer role type.")


  public Integer getCustomerRoleType() {
    return customerRoleType;
  }

  public void setCustomerRoleType(Integer customerRoleType) {
    this.customerRoleType = customerRoleType;
  }

  public MspExternalUserGroupDetailOpenApiVo allCustomer(Boolean allCustomer) {
    this.allCustomer = allCustomer;
    return this;
  }

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


  public Boolean getAllCustomer() {
    return allCustomer;
  }

  public void setAllCustomer(Boolean allCustomer) {
    this.allCustomer = allCustomer;
  }

  public MspExternalUserGroupDetailOpenApiVo customers(List<OmadacInfoOpenApiVo> customers) {
    this.customers = customers;
    return this;
  }

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

  /**
   * The customers which can be accessed. Required when allCustomer is false.
   * @return customers
  */
  @ApiModelProperty(value = "The customers which can be accessed. Required when allCustomer is false.")

  @Valid

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

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


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    MspExternalUserGroupDetailOpenApiVo mspExternalUserGroupDetailOpenApiVo = (MspExternalUserGroupDetailOpenApiVo) o;
    return Objects.equals(this.id, mspExternalUserGroupDetailOpenApiVo.id) &&
        Objects.equals(this.name, mspExternalUserGroupDetailOpenApiVo.name) &&
        Objects.equals(this.roleId, mspExternalUserGroupDetailOpenApiVo.roleId) &&
        Objects.equals(this.roleName, mspExternalUserGroupDetailOpenApiVo.roleName) &&
        Objects.equals(this.roleType, mspExternalUserGroupDetailOpenApiVo.roleType) &&
        Objects.equals(this.customerRoleId, mspExternalUserGroupDetailOpenApiVo.customerRoleId) &&
        Objects.equals(this.customerRoleName, mspExternalUserGroupDetailOpenApiVo.customerRoleName) &&
        Objects.equals(this.customerRoleType, mspExternalUserGroupDetailOpenApiVo.customerRoleType) &&
        Objects.equals(this.allCustomer, mspExternalUserGroupDetailOpenApiVo.allCustomer) &&
        Objects.equals(this.customers, mspExternalUserGroupDetailOpenApiVo.customers);
  }

  @Override
  public int hashCode() {
    return Objects.hash(id, name, roleId, roleName, roleType, customerRoleId, customerRoleName, customerRoleType, allCustomer, customers);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class MspExternalUserGroupDetailOpenApiVo {\n");
    
    sb.append("    id: ").append(toIndentedString(id)).append("\n");
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    roleId: ").append(toIndentedString(roleId)).append("\n");
    sb.append("    roleName: ").append(toIndentedString(roleName)).append("\n");
    sb.append("    roleType: ").append(toIndentedString(roleType)).append("\n");
    sb.append("    customerRoleId: ").append(toIndentedString(customerRoleId)).append("\n");
    sb.append("    customerRoleName: ").append(toIndentedString(customerRoleName)).append("\n");
    sb.append("    customerRoleType: ").append(toIndentedString(customerRoleType)).append("\n");
    sb.append("    allCustomer: ").append(toIndentedString(allCustomer)).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    ");
  }
}

