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

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

There is a newer version: 1.7.25
Show newest version
package net.leanix.mtm.api.models;

import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import net.leanix.mtm.api.models.Permission;
import net.leanix.mtm.api.models.User;
import net.leanix.mtm.api.models.Workspace;



/**
 * Invitation which is sent to invite a user to a workspace.
 **/

@ApiModel(description = "Invitation which is sent to invite a user to a workspace.")

public class Invitation   {
  
  private User host = null;
  private User user = null;
  private Workspace workspace = null;
  private Permission permission = null;
  private String message = null;

  
  /**
   **/
  public Invitation host(User host) {
    this.host = host;
    return this;
  }
  
  @ApiModelProperty(example = "null", required = true, value = "")
  @JsonProperty("host")
  public User getHost() {
    return host;
  }
  public void setHost(User host) {
    this.host = host;
  }

  
  /**
   **/
  public Invitation user(User user) {
    this.user = user;
    return this;
  }
  
  @ApiModelProperty(example = "null", required = true, value = "")
  @JsonProperty("user")
  public User getUser() {
    return user;
  }
  public void setUser(User user) {
    this.user = user;
  }

  
  /**
   **/
  public Invitation workspace(Workspace workspace) {
    this.workspace = workspace;
    return this;
  }
  
  @ApiModelProperty(example = "null", required = true, value = "")
  @JsonProperty("workspace")
  public Workspace getWorkspace() {
    return workspace;
  }
  public void setWorkspace(Workspace workspace) {
    this.workspace = workspace;
  }

  
  /**
   **/
  public Invitation permission(Permission permission) {
    this.permission = permission;
    return this;
  }
  
  @ApiModelProperty(example = "null", required = true, value = "")
  @JsonProperty("permission")
  public Permission getPermission() {
    return permission;
  }
  public void setPermission(Permission permission) {
    this.permission = permission;
  }

  
  /**
   **/
  public Invitation message(String message) {
    this.message = message;
    return this;
  }
  
  @ApiModelProperty(example = "null", value = "")
  @JsonProperty("message")
  public String getMessage() {
    return message;
  }
  public void setMessage(String message) {
    this.message = message;
  }

  

  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    Invitation invitation = (Invitation) o;
    return Objects.equals(this.host, invitation.host) &&
        Objects.equals(this.user, invitation.user) &&
        Objects.equals(this.workspace, invitation.workspace) &&
        Objects.equals(this.permission, invitation.permission) &&
        Objects.equals(this.message, invitation.message);
  }

  @Override
  public int hashCode() {
    return Objects.hash(host, user, workspace, permission, message);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class Invitation {\n");
    
    sb.append("    host: ").append(toIndentedString(host)).append("\n");
    sb.append("    user: ").append(toIndentedString(user)).append("\n");
    sb.append("    workspace: ").append(toIndentedString(workspace)).append("\n");
    sb.append("    permission: ").append(toIndentedString(permission)).append("\n");
    sb.append("    message: ").append(toIndentedString(message)).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