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

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

There is a newer version: 1.7.25
Show newest version
/*
 * MTM
 * 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.time.OffsetDateTime;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import net.leanix.mtm.api.models.Account;
import net.leanix.mtm.api.models.Contract;
import net.leanix.mtm.api.models.IdentityProvider;
import net.leanix.mtm.api.models.Instance;
import net.leanix.mtm.api.models.Link;
import net.leanix.mtm.api.models.User;
import net.leanix.mtm.api.models.Workspace;

/**
 * Event
 */

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

  /**
   * Gets or Sets type
   */
  public enum TypeEnum {
    TEST_EVENT("TEST_EVENT"),
    
    APITOKEN_CREATE("APITOKEN_CREATE"),
    
    APITOKEN_UPDATE("APITOKEN_UPDATE"),
    
    APITOKEN_DELETE("APITOKEN_DELETE"),
    
    ACCOUNT_CREATE("ACCOUNT_CREATE"),
    
    ACCOUNT_UPDATE("ACCOUNT_UPDATE"),
    
    ACCOUNT_DELETE("ACCOUNT_DELETE"),
    
    CONTRACT_CREATE("CONTRACT_CREATE"),
    
    CONTRACT_UPDATE("CONTRACT_UPDATE"),
    
    CONTRACT_DELETE("CONTRACT_DELETE"),
    
    WORKSPACE_CREATE("WORKSPACE_CREATE"),
    
    WORKSPACE_UPDATE("WORKSPACE_UPDATE"),
    
    WORKSPACE_DELETE("WORKSPACE_DELETE"),
    
    WORKSPACE_INITIALIZE("WORKSPACE_INITIALIZE"),
    
    TECHNICAL_USER_ARCHIVE_PERMISSION("TECHNICAL_USER_ARCHIVE_PERMISSION"),
    
    USER_CREATE("USER_CREATE"),
    
    USER_UPDATE("USER_UPDATE"),
    
    USER_DELETE("USER_DELETE"),
    
    USER_WELCOME("USER_WELCOME"),
    
    USER_WELCOME_SSO("USER_WELCOME_SSO"),
    
    USER_LOGIN("USER_LOGIN"),
    
    USER_LOGIN_FAILED("USER_LOGIN_FAILED"),
    
    USER_ACCESS_WORKSPACE("USER_ACCESS_WORKSPACE"),
    
    USER_PERMISSION_CREATE("USER_PERMISSION_CREATE"),
    
    USER_PERMISSION_UPDATE("USER_PERMISSION_UPDATE"),
    
    USER_ACTIVATE("USER_ACTIVATE"),
    
    USER_INVITE("USER_INVITE"),
    
    USER_INVITE_CONFIRM("USER_INVITE_CONFIRM"),
    
    USER_INVITE_REJECT("USER_INVITE_REJECT"),
    
    USER_INVITE_APPROVE("USER_INVITE_APPROVE"),
    
    USER_INVITE_REMIND("USER_INVITE_REMIND"),
    
    USER_PASSWORD_CREATE("USER_PASSWORD_CREATE"),
    
    USER_PASSWORD_UPDATE("USER_PASSWORD_UPDATE"),
    
    USER_PASSWORD_RESET("USER_PASSWORD_RESET"),
    
    DOMAIN_UPDATE("DOMAIN_UPDATE"),
    
    DOMAIN_DELETE("DOMAIN_DELETE"),
    
    WORKSPACE_STATISTICS("WORKSPACE_STATISTICS"),
    
    INSTANCE_DELETE("INSTANCE_DELETE"),
    
    IDENTITY_PROVIDER_DELETE("IDENTITY_PROVIDER_DELETE"),
    
    DAILY_SCIM_STATISTICS_CALCULATED("DAILY_SCIM_STATISTICS_CALCULATED"),
    
    USER_MAILJET_DELETE_FAILURE("USER_MAILJET_DELETE_FAILURE"),
    
    USER_MAILJET_DELETE_SUCCESS("USER_MAILJET_DELETE_SUCCESS");

    private String value;

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

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

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

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

  @JsonProperty("type")
  private TypeEnum type = null;

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

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

  /**
   * Gets or Sets status
   */
  public enum StatusEnum {
    STARTED("STARTED"),
    
    FINISHED("FINISHED");

    private String value;

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

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

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

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

  @JsonProperty("status")
  private StatusEnum status = null;

  @JsonProperty("createdAt")
  private OffsetDateTime createdAt = null;

  @JsonProperty("actor")
  private User actor = null;

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

  @JsonProperty("user")
  private User user = null;

  @JsonProperty("workspace")
  private Workspace workspace = null;

  @JsonProperty("contract")
  private Contract contract = null;

  @JsonProperty("instance")
  private Instance instance = null;

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

  @JsonProperty("finishedAt")
  private OffsetDateTime finishedAt = null;

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

  @JsonProperty("payload")
  private Map payload = null;

  public Event 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 Event type(TypeEnum type) {
    this.type = type;
    return this;
  }

   /**
   * Get type
   * @return type
  **/
  @ApiModelProperty(required = true, value = "")
  public TypeEnum getType() {
    return type;
  }

  public void setType(TypeEnum type) {
    this.type = type;
  }

  public Event application(String application) {
    this.application = application;
    return this;
  }

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

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

  public Event version(String version) {
    this.version = version;
    return this;
  }

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

  public void setVersion(String version) {
    this.version = version;
  }

  public Event status(StatusEnum status) {
    this.status = status;
    return this;
  }

   /**
   * Get status
   * @return status
  **/
  @ApiModelProperty(value = "")
  public StatusEnum getStatus() {
    return status;
  }

  public void setStatus(StatusEnum status) {
    this.status = status;
  }

  public Event createdAt(OffsetDateTime createdAt) {
    this.createdAt = createdAt;
    return this;
  }

   /**
   * Get createdAt
   * @return createdAt
  **/
  @ApiModelProperty(value = "")
  public OffsetDateTime getCreatedAt() {
    return createdAt;
  }

  public void setCreatedAt(OffsetDateTime createdAt) {
    this.createdAt = createdAt;
  }

  public Event actor(User actor) {
    this.actor = actor;
    return this;
  }

   /**
   * Get actor
   * @return actor
  **/
  @ApiModelProperty(required = true, value = "")
  public User getActor() {
    return actor;
  }

  public void setActor(User actor) {
    this.actor = actor;
  }

  public Event 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 Event user(User user) {
    this.user = user;
    return this;
  }

   /**
   * Get user
   * @return user
  **/
  @ApiModelProperty(value = "")
  public User getUser() {
    return user;
  }

  public void setUser(User user) {
    this.user = user;
  }

  public Event workspace(Workspace workspace) {
    this.workspace = workspace;
    return this;
  }

   /**
   * Get workspace
   * @return workspace
  **/
  @ApiModelProperty(value = "")
  public Workspace getWorkspace() {
    return workspace;
  }

  public void setWorkspace(Workspace workspace) {
    this.workspace = workspace;
  }

  public Event contract(Contract contract) {
    this.contract = contract;
    return this;
  }

   /**
   * Get contract
   * @return contract
  **/
  @ApiModelProperty(value = "")
  public Contract getContract() {
    return contract;
  }

  public void setContract(Contract contract) {
    this.contract = contract;
  }

  public Event instance(Instance instance) {
    this.instance = instance;
    return this;
  }

   /**
   * Get instance
   * @return instance
  **/
  @ApiModelProperty(value = "")
  public Instance getInstance() {
    return instance;
  }

  public void setInstance(Instance instance) {
    this.instance = instance;
  }

  public Event 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 Event finishedAt(OffsetDateTime finishedAt) {
    this.finishedAt = finishedAt;
    return this;
  }

   /**
   * Get finishedAt
   * @return finishedAt
  **/
  @ApiModelProperty(value = "")
  public OffsetDateTime getFinishedAt() {
    return finishedAt;
  }

  public void setFinishedAt(OffsetDateTime finishedAt) {
    this.finishedAt = finishedAt;
  }

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

  public Event 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 Event payload(Map payload) {
    this.payload = payload;
    return this;
  }

  public Event putPayloadItem(String key, Object payloadItem) {
    if (this.payload == null) {
      this.payload = new HashMap();
    }
    this.payload.put(key, payloadItem);
    return this;
  }

   /**
   * Get payload
   * @return payload
  **/
  @ApiModelProperty(value = "")
  public Map getPayload() {
    return payload;
  }

  public void setPayload(Map payload) {
    this.payload = payload;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    Event event = (Event) o;
    return Objects.equals(this.id, event.id) &&
        Objects.equals(this.type, event.type) &&
        Objects.equals(this.application, event.application) &&
        Objects.equals(this.version, event.version) &&
        Objects.equals(this.status, event.status) &&
        Objects.equals(this.createdAt, event.createdAt) &&
        Objects.equals(this.actor, event.actor) &&
        Objects.equals(this.account, event.account) &&
        Objects.equals(this.user, event.user) &&
        Objects.equals(this.workspace, event.workspace) &&
        Objects.equals(this.contract, event.contract) &&
        Objects.equals(this.instance, event.instance) &&
        Objects.equals(this.identityProvider, event.identityProvider) &&
        Objects.equals(this.finishedAt, event.finishedAt) &&
        Objects.equals(this.links, event.links) &&
        Objects.equals(this.payload, event.payload);
  }

  @Override
  public int hashCode() {
    return Objects.hash(id, type, application, version, status, createdAt, actor, account, user, workspace, contract, instance, identityProvider, finishedAt, links, payload);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class Event {\n");
    
    sb.append("    id: ").append(toIndentedString(id)).append("\n");
    sb.append("    type: ").append(toIndentedString(type)).append("\n");
    sb.append("    application: ").append(toIndentedString(application)).append("\n");
    sb.append("    version: ").append(toIndentedString(version)).append("\n");
    sb.append("    status: ").append(toIndentedString(status)).append("\n");
    sb.append("    createdAt: ").append(toIndentedString(createdAt)).append("\n");
    sb.append("    actor: ").append(toIndentedString(actor)).append("\n");
    sb.append("    account: ").append(toIndentedString(account)).append("\n");
    sb.append("    user: ").append(toIndentedString(user)).append("\n");
    sb.append("    workspace: ").append(toIndentedString(workspace)).append("\n");
    sb.append("    contract: ").append(toIndentedString(contract)).append("\n");
    sb.append("    instance: ").append(toIndentedString(instance)).append("\n");
    sb.append("    identityProvider: ").append(toIndentedString(identityProvider)).append("\n");
    sb.append("    finishedAt: ").append(toIndentedString(finishedAt)).append("\n");
    sb.append("    links: ").append(toIndentedString(links)).append("\n");
    sb.append("    payload: ").append(toIndentedString(payload)).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