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.constraints.Pattern;
import java.util.Objects;

/**
 * The customers which can be accessed. Required when allCustomer is false.
 */
@ApiModel(description = "The customers which can be accessed. Required when allCustomer is false.")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-12-04T11:44:08.065+08:00[Asia/Shanghai]")

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

  @JsonProperty("name")
  private String name;

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

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


  public String getId() {
    return id;
  }

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

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

  /**
   * Customer name should contain 1 to 32 characters.
   * @return name
  */
  @ApiModelProperty(value = "Customer name should contain 1 to 32 characters.")

@Pattern(regexp="^[^ \\+\\-\\@\\=]$|^[^ \\+\\-\\@\\=].{0,30}[^ ]$") 
  public String getName() {
    return name;
  }

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


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    OmadacInfoOpenApiVo omadacInfoOpenApiVo = (OmadacInfoOpenApiVo) o;
    return Objects.equals(this.id, omadacInfoOpenApiVo.id) &&
        Objects.equals(this.name, omadacInfoOpenApiVo.name);
  }

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

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

