package org.wfc.omada.api.organization.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 java.util.ArrayList;
import java.util.List;
import java.util.Objects;

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

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

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

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

  /**
   * Name of the site template should contain 1 to 64 characters.
   * @return name
  */
  @ApiModelProperty(required = true, value = "Name of the site template 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 CreateSiteTemplateEntity settings(List<String> settings) {
    this.settings = settings;
    return this;
  }

  public CreateSiteTemplateEntity addSettingsItem(String settingsItem) {
    if (this.settings == null) {
      this.settings = new ArrayList<>();
    }
    this.settings.add(settingsItem);
    return this;
  }

  /**
   * Settings of the site template support.
   * @return settings
  */
  @ApiModelProperty(value = "Settings of the site template support.")


  public List<String> getSettings() {
    return settings;
  }

  public void setSettings(List<String> settings) {
    this.settings = settings;
  }


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

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

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

