All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.icthh.xm.commons.gen.model.Tenant Maven / Gradle / Ivy

There is a newer version: 4.0.20
Show newest version
package com.icthh.xm.commons.gen.model;

import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.validation.annotation.Validated;
import jakarta.validation.Valid;
import jakarta.validation.constraints.*;

/**
 * Tenant
 */
@Validated
@jakarta.annotation.Generated(value = "io.swagger.codegen.languages.SpringCodegen", date = "2024-11-06T13:47:41.259Z")


public class Tenant   {
  @JsonProperty("tenantKey")
  private String tenantKey = null;

  @JsonProperty("name")
  private String name = null;

  @JsonProperty("description")
  private String description = null;

  @JsonProperty("data")
  private Object data = null;

  public Tenant tenantKey(String tenantKey) {
    this.tenantKey = tenantKey;
    return this;
  }

  /**
   * Unique tenant key. Alpha-numeric string with underscores. First alpha character. Not start with 'pg_'. Max length is 48
   * @return tenantKey
  **/
  @ApiModelProperty(required = true, value = "Unique tenant key. Alpha-numeric string with underscores. First alpha character. Not start with 'pg_'. Max length is 48")
  @NotNull

@Pattern(regexp="^(?!commons$)(?!pg_)(?!_)[a-zA-Z][a-zA-Z0-9_]{0,47}$") 
  public String getTenantKey() {
    return tenantKey;
  }

  public void setTenantKey(String tenantKey) {
    this.tenantKey = tenantKey;
  }

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

  /**
   * Tenant name
   * @return name
  **/
  @ApiModelProperty(value = "Tenant name")


  public String getName() {
    return name;
  }

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

  public Tenant description(String description) {
    this.description = description;
    return this;
  }

  /**
   * Tenant desciption
   * @return description
  **/
  @ApiModelProperty(value = "Tenant desciption")


  public String getDescription() {
    return description;
  }

  public void setDescription(String description) {
    this.description = description;
  }

  public Tenant data(Object data) {
    this.data = data;
    return this;
  }

  /**
   * Tenant additional data
   * @return data
  **/
  @ApiModelProperty(value = "Tenant additional data")


  public Object getData() {
    return data;
  }

  public void setData(Object data) {
    this.data = data;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    Tenant tenant = (Tenant) o;
    return Objects.equals(this.tenantKey, tenant.tenantKey) &&
        Objects.equals(this.name, tenant.name) &&
        Objects.equals(this.description, tenant.description) &&
        Objects.equals(this.data, tenant.data);
  }

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

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("Tenant {");
    
    sb.append("tenantKey: ").append(toOneLineString(tenantKey)).append(", ");
    sb.append("name: ").append(toOneLineString(name)).append(", ");
    sb.append("description: ").append(toOneLineString(description)).append(", ");
    sb.append("data: ").append(toOneLineString(data)).append(", ");
    sb.append("}").deleteCharAt(sb.toString().lastIndexOf(","));
    return sb.toString();
  }

  /**
   * Convert the given object to string with each line indented by 4 spaces
   * (except the first line).
   */
  private String toOneLineString(java.lang.Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", " ");
  }
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy