com.factset.sdk.IRNNotes.models.RelatedRecordsDto 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;
/**
* RelatedRecordsDto
*/
@JsonPropertyOrder({
RelatedRecordsDto.JSON_PROPERTY_NOTE_IDS,
RelatedRecordsDto.JSON_PROPERTY_MEETING_IDS
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class RelatedRecordsDto implements Serializable {
private static final long serialVersionUID = 1L;
public static final String JSON_PROPERTY_NOTE_IDS = "noteIds";
private JsonNullable> noteIds = JsonNullable.>undefined();
public static final String JSON_PROPERTY_MEETING_IDS = "meetingIds";
private JsonNullable> meetingIds = JsonNullable.>undefined();
public RelatedRecordsDto() {
}
public RelatedRecordsDto noteIds(java.util.List noteIds) {
this.noteIds = JsonNullable.>of(noteIds);
return this;
}
public RelatedRecordsDto addNoteIdsItem(java.util.UUID noteIdsItem) {
if (this.noteIds == null || !this.noteIds.isPresent()) {
this.noteIds = JsonNullable.>of(new java.util.ArrayList<>());
}
try {
this.noteIds.get().add(noteIdsItem);
} catch (java.util.NoSuchElementException e) {
// this can never happen, as we make sure above that the value is present
}
return this;
}
/**
* Get noteIds
* @return noteIds
**/
@jakarta.annotation.Nullable
@ApiModelProperty(value = "")
@JsonIgnore
public java.util.List getNoteIds() {
return noteIds.orElse(null);
}
@JsonProperty(JSON_PROPERTY_NOTE_IDS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable> getNoteIds_JsonNullable() {
return noteIds;
}
@JsonProperty(JSON_PROPERTY_NOTE_IDS)
public void setNoteIds_JsonNullable(JsonNullable> noteIds) {
this.noteIds = noteIds;
}
public void setNoteIds(java.util.List noteIds) {
this.noteIds = JsonNullable.>of(noteIds);
}
public RelatedRecordsDto meetingIds(java.util.List meetingIds) {
this.meetingIds = JsonNullable.>of(meetingIds);
return this;
}
public RelatedRecordsDto addMeetingIdsItem(java.util.UUID meetingIdsItem) {
if (this.meetingIds == null || !this.meetingIds.isPresent()) {
this.meetingIds = JsonNullable.>of(new java.util.ArrayList<>());
}
try {
this.meetingIds.get().add(meetingIdsItem);
} catch (java.util.NoSuchElementException e) {
// this can never happen, as we make sure above that the value is present
}
return this;
}
/**
* Get meetingIds
* @return meetingIds
**/
@jakarta.annotation.Nullable
@ApiModelProperty(value = "")
@JsonIgnore
public java.util.List getMeetingIds() {
return meetingIds.orElse(null);
}
@JsonProperty(JSON_PROPERTY_MEETING_IDS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable> getMeetingIds_JsonNullable() {
return meetingIds;
}
@JsonProperty(JSON_PROPERTY_MEETING_IDS)
public void setMeetingIds_JsonNullable(JsonNullable> meetingIds) {
this.meetingIds = meetingIds;
}
public void setMeetingIds(java.util.List meetingIds) {
this.meetingIds = JsonNullable.>of(meetingIds);
}
/**
* Return true if this RelatedRecordsDto object is equal to o.
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
RelatedRecordsDto relatedRecordsDto = (RelatedRecordsDto) o;
return equalsNullable(this.noteIds, relatedRecordsDto.noteIds) &&
equalsNullable(this.meetingIds, relatedRecordsDto.meetingIds);
}
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(noteIds), hashCodeNullable(meetingIds));
}
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 RelatedRecordsDto {\n");
sb.append(" noteIds: ").append(toIndentedString(noteIds)).append("\n");
sb.append(" meetingIds: ").append(toIndentedString(meetingIds)).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 ");
}
}