com.factset.sdk.IRNNotes.models.UserTeamLookupDto Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of irnnotes Show documentation
Show all versions of irnnotes Show documentation
FactSet SDK for Java - irnnotes
/*
* IRN API v1
* Allows users to extract, create, update and configure IRN data.
*
* The version of the OpenAPI document: 1
* Contact: [email protected]
*
* 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.factset.sdk.IRNNotes.models;
import java.util.Objects;
import java.util.Arrays;
import java.util.Map;
import java.util.HashMap;
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 org.openapitools.jackson.nullable.JsonNullable;
import com.fasterxml.jackson.annotation.JsonIgnore;
import org.openapitools.jackson.nullable.JsonNullable;
import java.util.NoSuchElementException;
import java.io.Serializable;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.factset.sdk.IRNNotes.JSON;
/**
* UserTeamLookupDto
*/
@JsonPropertyOrder({
UserTeamLookupDto.JSON_PROPERTY_USER_IDS,
UserTeamLookupDto.JSON_PROPERTY_TEAM_IDS
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class UserTeamLookupDto implements Serializable {
private static final long serialVersionUID = 1L;
public static final String JSON_PROPERTY_USER_IDS = "userIds";
private JsonNullable> userIds = JsonNullable.>undefined();
public static final String JSON_PROPERTY_TEAM_IDS = "teamIds";
private JsonNullable> teamIds = JsonNullable.>undefined();
public UserTeamLookupDto() {
}
public UserTeamLookupDto userIds(java.util.List userIds) {
this.userIds = JsonNullable.>of(userIds);
return this;
}
public UserTeamLookupDto addUserIdsItem(java.util.UUID userIdsItem) {
if (this.userIds == null || !this.userIds.isPresent()) {
this.userIds = JsonNullable.>of(new java.util.ArrayList<>());
}
try {
this.userIds.get().add(userIdsItem);
} catch (java.util.NoSuchElementException e) {
// this can never happen, as we make sure above that the value is present
}
return this;
}
/**
* Get userIds
* @return userIds
**/
@jakarta.annotation.Nullable
@ApiModelProperty(value = "")
@JsonIgnore
public java.util.List getUserIds() {
return userIds.orElse(null);
}
@JsonProperty(JSON_PROPERTY_USER_IDS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable> getUserIds_JsonNullable() {
return userIds;
}
@JsonProperty(JSON_PROPERTY_USER_IDS)
public void setUserIds_JsonNullable(JsonNullable> userIds) {
this.userIds = userIds;
}
public void setUserIds(java.util.List userIds) {
this.userIds = JsonNullable.>of(userIds);
}
public UserTeamLookupDto teamIds(java.util.List teamIds) {
this.teamIds = JsonNullable.>of(teamIds);
return this;
}
public UserTeamLookupDto addTeamIdsItem(java.util.UUID teamIdsItem) {
if (this.teamIds == null || !this.teamIds.isPresent()) {
this.teamIds = JsonNullable.>of(new java.util.ArrayList<>());
}
try {
this.teamIds.get().add(teamIdsItem);
} catch (java.util.NoSuchElementException e) {
// this can never happen, as we make sure above that the value is present
}
return this;
}
/**
* Get teamIds
* @return teamIds
**/
@jakarta.annotation.Nullable
@ApiModelProperty(value = "")
@JsonIgnore
public java.util.List getTeamIds() {
return teamIds.orElse(null);
}
@JsonProperty(JSON_PROPERTY_TEAM_IDS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable> getTeamIds_JsonNullable() {
return teamIds;
}
@JsonProperty(JSON_PROPERTY_TEAM_IDS)
public void setTeamIds_JsonNullable(JsonNullable> teamIds) {
this.teamIds = teamIds;
}
public void setTeamIds(java.util.List teamIds) {
this.teamIds = JsonNullable.>of(teamIds);
}
/**
* Return true if this UserTeamLookupDto object is equal to o.
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
UserTeamLookupDto userTeamLookupDto = (UserTeamLookupDto) o;
return equalsNullable(this.userIds, userTeamLookupDto.userIds) &&
equalsNullable(this.teamIds, userTeamLookupDto.teamIds);
}
private static boolean equalsNullable(JsonNullable a, JsonNullable b) {
return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get()));
}
@Override
public int hashCode() {
return Objects.hash(hashCodeNullable(userIds), hashCodeNullable(teamIds));
}
private static int hashCodeNullable(JsonNullable a) {
if (a == null) {
return 1;
}
return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class UserTeamLookupDto {\n");
sb.append(" userIds: ").append(toIndentedString(userIds)).append("\n");
sb.append(" teamIds: ").append(toIndentedString(teamIds)).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 ");
}
}