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

net.leanix.mtm.api.models.Instance Maven / Gradle / Ivy

There is a newer version: 1.7.25
Show newest version
/*
 * LeanIX MTM REST API
 * Multi-tenancy-manager for LeanIX. Manages accounts, contracts, users, workspaces, permissions, and more.
 *
 * OpenAPI spec version: 1.6.348
 * 
 *
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen.git
 * Do not edit the class manually.
 */


package net.leanix.mtm.api.models;

import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList;
import java.util.List;
import net.leanix.mtm.api.models.Account;
import net.leanix.mtm.api.models.Application;
import net.leanix.mtm.api.models.IdentityProvider;
import net.leanix.mtm.api.models.Link;

/**
 * Instance
 */

public class Instance {
  @JsonProperty("id")
  private String id = null;

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

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

  /**
   * Gets or Sets identityManagement
   */
  public enum IdentityManagementEnum {
    FULLY_EXTERNAL("FULLY_EXTERNAL"),
    
    MTM_BASED_ROLES("MTM_BASED_ROLES"),
    
    FULLY_MTM_BASED("FULLY_MTM_BASED");

    private String value;

    IdentityManagementEnum(String value) {
      this.value = value;
    }

    @JsonValue
    public String getValue() {
      return value;
    }

    @Override
    public String toString() {
      return String.valueOf(value);
    }

    @JsonCreator
    public static IdentityManagementEnum fromValue(String text) {
      for (IdentityManagementEnum b : IdentityManagementEnum.values()) {
        if (String.valueOf(b.value).equals(text)) {
          return b;
        }
      }
      return null;
    }
  }

  @JsonProperty("identityManagement")
  private IdentityManagementEnum identityManagement = null;

  @JsonProperty("isDefault")
  private Boolean isDefault = false;

  @JsonProperty("isPrimary")
  private Boolean isPrimary = false;

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

  @JsonProperty("application")
  private Application application = null;

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

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

  @JsonProperty("account")
  private Account account = null;

  @JsonProperty("identityProvider")
  private IdentityProvider identityProvider = null;

  @JsonProperty("links")
  private List links = null;

  @JsonProperty("thirdParty")
  private Boolean thirdParty = false;

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

   /**
   * Get id
   * @return id
  **/
  @ApiModelProperty(value = "")
  public String getId() {
    return id;
  }

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

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

   /**
   * Get name
   * @return name
  **/
  @ApiModelProperty(value = "")
  public String getName() {
    return name;
  }

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

  public Instance url(String url) {
    this.url = url;
    return this;
  }

   /**
   * Get url
   * @return url
  **/
  @ApiModelProperty(value = "")
  public String getUrl() {
    return url;
  }

  public void setUrl(String url) {
    this.url = url;
  }

  public Instance identityManagement(IdentityManagementEnum identityManagement) {
    this.identityManagement = identityManagement;
    return this;
  }

   /**
   * Get identityManagement
   * @return identityManagement
  **/
  @ApiModelProperty(value = "")
  public IdentityManagementEnum getIdentityManagement() {
    return identityManagement;
  }

  public void setIdentityManagement(IdentityManagementEnum identityManagement) {
    this.identityManagement = identityManagement;
  }

  public Instance isDefault(Boolean isDefault) {
    this.isDefault = isDefault;
    return this;
  }

   /**
   * Get isDefault
   * @return isDefault
  **/
  @ApiModelProperty(value = "")
  public Boolean getIsDefault() {
    return isDefault;
  }

  public void setIsDefault(Boolean isDefault) {
    this.isDefault = isDefault;
  }

  public Instance isPrimary(Boolean isPrimary) {
    this.isPrimary = isPrimary;
    return this;
  }

   /**
   * Get isPrimary
   * @return isPrimary
  **/
  @ApiModelProperty(value = "")
  public Boolean getIsPrimary() {
    return isPrimary;
  }

  public void setIsPrimary(Boolean isPrimary) {
    this.isPrimary = isPrimary;
  }

  public Instance entityId(String entityId) {
    this.entityId = entityId;
    return this;
  }

   /**
   * Get entityId
   * @return entityId
  **/
  @ApiModelProperty(value = "")
  public String getEntityId() {
    return entityId;
  }

  public void setEntityId(String entityId) {
    this.entityId = entityId;
  }

  public Instance application(Application application) {
    this.application = application;
    return this;
  }

   /**
   * Get application
   * @return application
  **/
  @ApiModelProperty(required = true, value = "")
  public Application getApplication() {
    return application;
  }

  public void setApplication(Application application) {
    this.application = application;
  }

  public Instance resourceServerKey(String resourceServerKey) {
    this.resourceServerKey = resourceServerKey;
    return this;
  }

   /**
   * Get resourceServerKey
   * @return resourceServerKey
  **/
  @ApiModelProperty(required = true, value = "")
  public String getResourceServerKey() {
    return resourceServerKey;
  }

  public void setResourceServerKey(String resourceServerKey) {
    this.resourceServerKey = resourceServerKey;
  }

  public Instance resourceServerSecret(String resourceServerSecret) {
    this.resourceServerSecret = resourceServerSecret;
    return this;
  }

   /**
   * Get resourceServerSecret
   * @return resourceServerSecret
  **/
  @ApiModelProperty(required = true, value = "")
  public String getResourceServerSecret() {
    return resourceServerSecret;
  }

  public void setResourceServerSecret(String resourceServerSecret) {
    this.resourceServerSecret = resourceServerSecret;
  }

  public Instance account(Account account) {
    this.account = account;
    return this;
  }

   /**
   * Get account
   * @return account
  **/
  @ApiModelProperty(value = "")
  public Account getAccount() {
    return account;
  }

  public void setAccount(Account account) {
    this.account = account;
  }

  public Instance identityProvider(IdentityProvider identityProvider) {
    this.identityProvider = identityProvider;
    return this;
  }

   /**
   * Get identityProvider
   * @return identityProvider
  **/
  @ApiModelProperty(value = "")
  public IdentityProvider getIdentityProvider() {
    return identityProvider;
  }

  public void setIdentityProvider(IdentityProvider identityProvider) {
    this.identityProvider = identityProvider;
  }

  public Instance links(List links) {
    this.links = links;
    return this;
  }

  public Instance addLinksItem(Link linksItem) {
    if (this.links == null) {
      this.links = new ArrayList();
    }
    this.links.add(linksItem);
    return this;
  }

   /**
   * Get links
   * @return links
  **/
  @ApiModelProperty(value = "")
  public List getLinks() {
    return links;
  }

  public void setLinks(List links) {
    this.links = links;
  }

  public Instance thirdParty(Boolean thirdParty) {
    this.thirdParty = thirdParty;
    return this;
  }

   /**
   * Get thirdParty
   * @return thirdParty
  **/
  @ApiModelProperty(value = "")
  public Boolean getThirdParty() {
    return thirdParty;
  }

  public void setThirdParty(Boolean thirdParty) {
    this.thirdParty = thirdParty;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    Instance instance = (Instance) o;
    return Objects.equals(this.id, instance.id) &&
        Objects.equals(this.name, instance.name) &&
        Objects.equals(this.url, instance.url) &&
        Objects.equals(this.identityManagement, instance.identityManagement) &&
        Objects.equals(this.isDefault, instance.isDefault) &&
        Objects.equals(this.isPrimary, instance.isPrimary) &&
        Objects.equals(this.entityId, instance.entityId) &&
        Objects.equals(this.application, instance.application) &&
        Objects.equals(this.resourceServerKey, instance.resourceServerKey) &&
        Objects.equals(this.resourceServerSecret, instance.resourceServerSecret) &&
        Objects.equals(this.account, instance.account) &&
        Objects.equals(this.identityProvider, instance.identityProvider) &&
        Objects.equals(this.links, instance.links) &&
        Objects.equals(this.thirdParty, instance.thirdParty);
  }

  @Override
  public int hashCode() {
    return Objects.hash(id, name, url, identityManagement, isDefault, isPrimary, entityId, application, resourceServerKey, resourceServerSecret, account, identityProvider, links, thirdParty);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class Instance {\n");
    
    sb.append("    id: ").append(toIndentedString(id)).append("\n");
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    url: ").append(toIndentedString(url)).append("\n");
    sb.append("    identityManagement: ").append(toIndentedString(identityManagement)).append("\n");
    sb.append("    isDefault: ").append(toIndentedString(isDefault)).append("\n");
    sb.append("    isPrimary: ").append(toIndentedString(isPrimary)).append("\n");
    sb.append("    entityId: ").append(toIndentedString(entityId)).append("\n");
    sb.append("    application: ").append(toIndentedString(application)).append("\n");
    sb.append("    resourceServerKey: ").append(toIndentedString(resourceServerKey)).append("\n");
    sb.append("    resourceServerSecret: ").append(toIndentedString(resourceServerSecret)).append("\n");
    sb.append("    account: ").append(toIndentedString(account)).append("\n");
    sb.append("    identityProvider: ").append(toIndentedString(identityProvider)).append("\n");
    sb.append("    links: ").append(toIndentedString(links)).append("\n");
    sb.append("    thirdParty: ").append(toIndentedString(thirdParty)).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(java.lang.Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }
  
}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy