com.katalon.testops.api.model.UserTeamResource Maven / Gradle / Ivy
/*
* Katalon TestOps API reference
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package com.katalon.testops.api.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
/**
* UserTeamResource
*/
@JsonPropertyOrder({
UserTeamResource.JSON_PROPERTY_ID,
UserTeamResource.JSON_PROPERTY_USER_ID,
UserTeamResource.JSON_PROPERTY_TEAM_ID,
UserTeamResource.JSON_PROPERTY_ROLE
})
@JsonTypeName("UserTeamResource")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class UserTeamResource implements Serializable {
private static final long serialVersionUID = 1L;
public static final String JSON_PROPERTY_ID = "id";
private Long id;
public static final String JSON_PROPERTY_USER_ID = "userId";
private Long userId;
public static final String JSON_PROPERTY_TEAM_ID = "teamId";
private Long teamId;
/**
* Gets or Sets role
*/
public enum RoleEnum {
OWNER("OWNER"),
ADMIN("ADMIN"),
USER("USER");
private String value;
RoleEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static RoleEnum fromValue(String value) {
for (RoleEnum b : RoleEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
public static final String JSON_PROPERTY_ROLE = "role";
private RoleEnum role;
public UserTeamResource id(Long id) {
this.id = id;
return this;
}
/**
* Get id
* @return id
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public UserTeamResource userId(Long userId) {
this.userId = userId;
return this;
}
/**
* Get userId
* @return userId
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_USER_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Long getUserId() {
return userId;
}
public void setUserId(Long userId) {
this.userId = userId;
}
public UserTeamResource teamId(Long teamId) {
this.teamId = teamId;
return this;
}
/**
* Get teamId
* @return teamId
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_TEAM_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Long getTeamId() {
return teamId;
}
public void setTeamId(Long teamId) {
this.teamId = teamId;
}
public UserTeamResource role(RoleEnum role) {
this.role = role;
return this;
}
/**
* Get role
* @return role
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_ROLE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public RoleEnum getRole() {
return role;
}
public void setRole(RoleEnum role) {
this.role = role;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
UserTeamResource userTeamResource = (UserTeamResource) o;
return Objects.equals(this.id, userTeamResource.id) &&
Objects.equals(this.userId, userTeamResource.userId) &&
Objects.equals(this.teamId, userTeamResource.teamId) &&
Objects.equals(this.role, userTeamResource.role);
}
@Override
public int hashCode() {
return Objects.hash(id, userId, teamId, role);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class UserTeamResource {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" userId: ").append(toIndentedString(userId)).append("\n");
sb.append(" teamId: ").append(toIndentedString(teamId)).append("\n");
sb.append(" role: ").append(toIndentedString(role)).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 ");
}
}