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.Objects;

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

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

  @JsonProperty("name")
  private String name;

  @JsonProperty("type")
  private Integer type;

  @JsonProperty("defaultRole")
  private Boolean defaultRole;

  @JsonProperty("source")
  private Integer source;

  @JsonProperty("privilege")
  private ControllerRoleVo privilege;

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

  /**
   * Role ID
   * @return id
  */
  @ApiModelProperty(value = "Role ID")


  public String getId() {
    return id;
  }

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

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

  /**
   * Role Name
   * @return name
  */
  @ApiModelProperty(value = "Role Name")


  public String getName() {
    return name;
  }

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

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

  /**
   * Role Type should be a value as follows: 0: standard; 1: customer; 2: msp.
   * @return type
  */
  @ApiModelProperty(value = "Role Type should be a value as follows: 0: standard; 1: customer; 2: msp.")


  public Integer getType() {
    return type;
  }

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

  public ControllerRoleDetailVo defaultRole(Boolean defaultRole) {
    this.defaultRole = defaultRole;
    return this;
  }

  /**
   * Whether role is default role
   * @return defaultRole
  */
  @ApiModelProperty(value = "Whether role is default role")


  public Boolean getDefaultRole() {
    return defaultRole;
  }

  public void setDefaultRole(Boolean defaultRole) {
    this.defaultRole = defaultRole;
  }

  public ControllerRoleDetailVo source(Integer source) {
    this.source = source;
    return this;
  }

  /**
   * Role created resource. It should be a value as follows: 0: default; 1:create by standard controller or customer controller; 2: create by MSP
   * @return source
  */
  @ApiModelProperty(value = "Role created resource. It should be a value as follows: 0: default; 1:create by standard controller or customer controller; 2: create by MSP")


  public Integer getSource() {
    return source;
  }

  public void setSource(Integer source) {
    this.source = source;
  }

  public ControllerRoleDetailVo privilege(ControllerRoleVo privilege) {
    this.privilege = privilege;
    return this;
  }

  /**
   * Get privilege
   * @return privilege
  */
  @ApiModelProperty(value = "")

  @Valid

  public ControllerRoleVo getPrivilege() {
    return privilege;
  }

  public void setPrivilege(ControllerRoleVo privilege) {
    this.privilege = privilege;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    ControllerRoleDetailVo controllerRoleDetailVo = (ControllerRoleDetailVo) o;
    return Objects.equals(this.id, controllerRoleDetailVo.id) &&
        Objects.equals(this.name, controllerRoleDetailVo.name) &&
        Objects.equals(this.type, controllerRoleDetailVo.type) &&
        Objects.equals(this.defaultRole, controllerRoleDetailVo.defaultRole) &&
        Objects.equals(this.source, controllerRoleDetailVo.source) &&
        Objects.equals(this.privilege, controllerRoleDetailVo.privilege);
  }

  @Override
  public int hashCode() {
    return Objects.hash(id, name, type, defaultRole, source, privilege);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class ControllerRoleDetailVo {\n");
    
    sb.append("    id: ").append(toIndentedString(id)).append("\n");
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    type: ").append(toIndentedString(type)).append("\n");
    sb.append("    defaultRole: ").append(toIndentedString(defaultRole)).append("\n");
    sb.append("    source: ").append(toIndentedString(source)).append("\n");
    sb.append("    privilege: ").append(toIndentedString(privilege)).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    ");
  }
}

