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

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

import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

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

public class BonjourServiceOpenApiVo   {
  @JsonProperty("name")
  private String name;

  @JsonProperty("serviceIds")
  @Valid
  private List<String> serviceIds = new ArrayList<>();

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

  /**
   * The name of Bonjour Service should contain 1 to 64 characters.
   * @return name
  */
  @ApiModelProperty(required = true, value = "The name of Bonjour Service should contain 1 to 64 characters.")
  @NotNull

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

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

  public BonjourServiceOpenApiVo serviceIds(List<String> serviceIds) {
    this.serviceIds = serviceIds;
    return this;
  }

  public BonjourServiceOpenApiVo addServiceIdsItem(String serviceIdsItem) {
    this.serviceIds.add(serviceIdsItem);
    return this;
  }

  /**
   * The Service ID list of Bonjour Service. Service ID is a string in \"_A._B.local\" format, where \"A\" can be lowercase letters/numbers/hyphens (-)/underscore (_), and \"B\" should be lowercase letters. For example: _a1._b.local.Up to 3 entries are allowed for the serviceIds list.
   * @return serviceIds
  */
  @ApiModelProperty(required = true, value = "The Service ID list of Bonjour Service. Service ID is a string in \"_A._B.local\" format, where \"A\" can be lowercase letters/numbers/hyphens (-)/underscore (_), and \"B\" should be lowercase letters. For example: _a1._b.local.Up to 3 entries are allowed for the serviceIds list.")
  @NotNull

@Size(min=1,max=3) 
  public List<String> getServiceIds() {
    return serviceIds;
  }

  public void setServiceIds(List<String> serviceIds) {
    this.serviceIds = serviceIds;
  }


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

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

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

