com.katalon.testops.api.model.TeamResource 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 com.katalon.testops.api.model.OrganizationResource;
import com.katalon.testops.api.model.UserResource;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList;
import java.util.List;
import java.io.Serializable;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
/**
* TeamResource
*/
@JsonPropertyOrder({
TeamResource.JSON_PROPERTY_ID,
TeamResource.JSON_PROPERTY_NAME,
TeamResource.JSON_PROPERTY_ROLE,
TeamResource.JSON_PROPERTY_USERS,
TeamResource.JSON_PROPERTY_ORGANIZATION,
TeamResource.JSON_PROPERTY_ORGANIZATION_ID
})
@JsonTypeName("TeamResource")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class TeamResource 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_NAME = "name";
private String name;
/**
* 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 static final String JSON_PROPERTY_USERS = "users";
private List users = null;
public static final String JSON_PROPERTY_ORGANIZATION = "organization";
private OrganizationResource organization;
public static final String JSON_PROPERTY_ORGANIZATION_ID = "organizationId";
private Long organizationId;
public TeamResource 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 TeamResource name(String name) {
this.name = name;
return this;
}
/**
* Get name
* @return name
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_NAME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public TeamResource 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;
}
public TeamResource users(List users) {
this.users = users;
return this;
}
public TeamResource addUsersItem(UserResource usersItem) {
if (this.users == null) {
this.users = new ArrayList<>();
}
this.users.add(usersItem);
return this;
}
/**
* Get users
* @return users
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_USERS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List getUsers() {
return users;
}
public void setUsers(List users) {
this.users = users;
}
public TeamResource organization(OrganizationResource organization) {
this.organization = organization;
return this;
}
/**
* Get organization
* @return organization
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_ORGANIZATION)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public OrganizationResource getOrganization() {
return organization;
}
public void setOrganization(OrganizationResource organization) {
this.organization = organization;
}
public TeamResource organizationId(Long organizationId) {
this.organizationId = organizationId;
return this;
}
/**
* Get organizationId
* @return organizationId
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_ORGANIZATION_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Long getOrganizationId() {
return organizationId;
}
public void setOrganizationId(Long organizationId) {
this.organizationId = organizationId;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
TeamResource teamResource = (TeamResource) o;
return Objects.equals(this.id, teamResource.id) &&
Objects.equals(this.name, teamResource.name) &&
Objects.equals(this.role, teamResource.role) &&
Objects.equals(this.users, teamResource.users) &&
Objects.equals(this.organization, teamResource.organization) &&
Objects.equals(this.organizationId, teamResource.organizationId);
}
@Override
public int hashCode() {
return Objects.hash(id, name, role, users, organization, organizationId);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class TeamResource {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" role: ").append(toIndentedString(role)).append("\n");
sb.append(" users: ").append(toIndentedString(users)).append("\n");
sb.append(" organization: ").append(toIndentedString(organization)).append("\n");
sb.append(" organizationId: ").append(toIndentedString(organizationId)).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 ");
}
}