com.factset.sdk.IRNNotes.models.NoteEventDto 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
*
*
* 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.factset.sdk.IRNNotes.models.RecordChangeDto;
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;
/**
* NoteEventDto
*/
@JsonPropertyOrder({
NoteEventDto.JSON_PROPERTY_CREATED_AT,
NoteEventDto.JSON_PROPERTY_TYPE,
NoteEventDto.JSON_PROPERTY_USER,
NoteEventDto.JSON_PROPERTY_COMMENT,
NoteEventDto.JSON_PROPERTY_CHANGE_LIST
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class NoteEventDto implements Serializable {
private static final long serialVersionUID = 1L;
public static final String JSON_PROPERTY_CREATED_AT = "createdAt";
private JsonNullable createdAt = JsonNullable.undefined();
public static final String JSON_PROPERTY_TYPE = "type";
private JsonNullable type = JsonNullable.undefined();
public static final String JSON_PROPERTY_USER = "user";
private JsonNullable user = JsonNullable.undefined();
public static final String JSON_PROPERTY_COMMENT = "comment";
private JsonNullable comment = JsonNullable.undefined();
public static final String JSON_PROPERTY_CHANGE_LIST = "changeList";
private JsonNullable> changeList = JsonNullable.>undefined();
public NoteEventDto() {
}
public NoteEventDto createdAt(String createdAt) {
this.createdAt = JsonNullable.of(createdAt);
return this;
}
/**
* Get createdAt
* @return createdAt
**/
@jakarta.annotation.Nullable
@ApiModelProperty(value = "")
@JsonIgnore
public String getCreatedAt() {
return createdAt.orElse(null);
}
@JsonProperty(JSON_PROPERTY_CREATED_AT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable getCreatedAt_JsonNullable() {
return createdAt;
}
@JsonProperty(JSON_PROPERTY_CREATED_AT)
public void setCreatedAt_JsonNullable(JsonNullable createdAt) {
this.createdAt = createdAt;
}
public void setCreatedAt(String createdAt) {
this.createdAt = JsonNullable.of(createdAt);
}
public NoteEventDto type(String type) {
this.type = JsonNullable.of(type);
return this;
}
/**
* Get type
* @return type
**/
@jakarta.annotation.Nullable
@ApiModelProperty(value = "")
@JsonIgnore
public String getType() {
return type.orElse(null);
}
@JsonProperty(JSON_PROPERTY_TYPE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable getType_JsonNullable() {
return type;
}
@JsonProperty(JSON_PROPERTY_TYPE)
public void setType_JsonNullable(JsonNullable type) {
this.type = type;
}
public void setType(String type) {
this.type = JsonNullable.of(type);
}
public NoteEventDto user(String user) {
this.user = JsonNullable.of(user);
return this;
}
/**
* Get user
* @return user
**/
@jakarta.annotation.Nullable
@ApiModelProperty(value = "")
@JsonIgnore
public String getUser() {
return user.orElse(null);
}
@JsonProperty(JSON_PROPERTY_USER)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable getUser_JsonNullable() {
return user;
}
@JsonProperty(JSON_PROPERTY_USER)
public void setUser_JsonNullable(JsonNullable user) {
this.user = user;
}
public void setUser(String user) {
this.user = JsonNullable.of(user);
}
public NoteEventDto comment(String comment) {
this.comment = JsonNullable.of(comment);
return this;
}
/**
* Get comment
* @return comment
**/
@jakarta.annotation.Nullable
@ApiModelProperty(value = "")
@JsonIgnore
public String getComment() {
return comment.orElse(null);
}
@JsonProperty(JSON_PROPERTY_COMMENT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable getComment_JsonNullable() {
return comment;
}
@JsonProperty(JSON_PROPERTY_COMMENT)
public void setComment_JsonNullable(JsonNullable comment) {
this.comment = comment;
}
public void setComment(String comment) {
this.comment = JsonNullable.of(comment);
}
public NoteEventDto changeList(java.util.List changeList) {
this.changeList = JsonNullable.>of(changeList);
return this;
}
public NoteEventDto addChangeListItem(RecordChangeDto changeListItem) {
if (this.changeList == null || !this.changeList.isPresent()) {
this.changeList = JsonNullable.>of(new java.util.ArrayList<>());
}
try {
this.changeList.get().add(changeListItem);
} catch (java.util.NoSuchElementException e) {
// this can never happen, as we make sure above that the value is present
}
return this;
}
/**
* Get changeList
* @return changeList
**/
@jakarta.annotation.Nullable
@ApiModelProperty(value = "")
@JsonIgnore
public java.util.List getChangeList() {
return changeList.orElse(null);
}
@JsonProperty(JSON_PROPERTY_CHANGE_LIST)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable> getChangeList_JsonNullable() {
return changeList;
}
@JsonProperty(JSON_PROPERTY_CHANGE_LIST)
public void setChangeList_JsonNullable(JsonNullable> changeList) {
this.changeList = changeList;
}
public void setChangeList(java.util.List changeList) {
this.changeList = JsonNullable.>of(changeList);
}
/**
* Return true if this NoteEventDto object is equal to o.
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
NoteEventDto noteEventDto = (NoteEventDto) o;
return equalsNullable(this.createdAt, noteEventDto.createdAt) &&
equalsNullable(this.type, noteEventDto.type) &&
equalsNullable(this.user, noteEventDto.user) &&
equalsNullable(this.comment, noteEventDto.comment) &&
equalsNullable(this.changeList, noteEventDto.changeList);
}
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(createdAt), hashCodeNullable(type), hashCodeNullable(user), hashCodeNullable(comment), hashCodeNullable(changeList));
}
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 NoteEventDto {\n");
sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" user: ").append(toIndentedString(user)).append("\n");
sb.append(" comment: ").append(toIndentedString(comment)).append("\n");
sb.append(" changeList: ").append(toIndentedString(changeList)).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 ");
}
}