com.factset.sdk.PAEngine.models.PACommentary Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of paengine Show documentation
Show all versions of paengine Show documentation
FactSet SDK for Java - paengine
/*
* PA Engine API
* Allow clients to fetch Analytics through APIs.
*
* The version of the OpenAPI document: 3.16.0
* 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.PAEngine.models;
import java.util.Objects;
import java.util.Arrays;
import java.util.Map;
import java.util.HashMap;
import com.factset.sdk.PAEngine.models.Section;
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.PAEngine.JSON;
/**
* PACommentary
*/
@JsonPropertyOrder({
PACommentary.JSON_PROPERTY_COMMENTARY_ID,
PACommentary.JSON_PROPERTY_SECTIONS,
PACommentary.JSON_PROPERTY_DISCLAIMER
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class PACommentary implements Serializable {
private static final long serialVersionUID = 1L;
public static final String JSON_PROPERTY_COMMENTARY_ID = "commentaryId";
private JsonNullable commentaryId = JsonNullable.undefined();
public static final String JSON_PROPERTY_SECTIONS = "sections";
private JsonNullable> sections = JsonNullable.>undefined();
public static final String JSON_PROPERTY_DISCLAIMER = "disclaimer";
private JsonNullable disclaimer = JsonNullable.undefined();
public PACommentary() {
}
public PACommentary commentaryId(String commentaryId) {
this.commentaryId = JsonNullable.of(commentaryId);
return this;
}
/**
* Generated commentary Id
* @return commentaryId
**/
@jakarta.annotation.Nullable
@ApiModelProperty(value = "Generated commentary Id")
@JsonIgnore
public String getCommentaryId() {
return commentaryId.orElse(null);
}
@JsonProperty(JSON_PROPERTY_COMMENTARY_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable getCommentaryId_JsonNullable() {
return commentaryId;
}
@JsonProperty(JSON_PROPERTY_COMMENTARY_ID)
public void setCommentaryId_JsonNullable(JsonNullable commentaryId) {
this.commentaryId = commentaryId;
}
public void setCommentaryId(String commentaryId) {
this.commentaryId = JsonNullable.of(commentaryId);
}
public PACommentary sections(java.util.List sections) {
this.sections = JsonNullable.>of(sections);
return this;
}
public PACommentary addSectionsItem(Section sectionsItem) {
if (this.sections == null || !this.sections.isPresent()) {
this.sections = JsonNullable.>of(new java.util.ArrayList<>());
}
try {
this.sections.get().add(sectionsItem);
} catch (java.util.NoSuchElementException e) {
// this can never happen, as we make sure above that the value is present
}
return this;
}
/**
* Commentary sections
* @return sections
**/
@jakarta.annotation.Nullable
@ApiModelProperty(value = "Commentary sections")
@JsonIgnore
public java.util.List getSections() {
return sections.orElse(null);
}
@JsonProperty(JSON_PROPERTY_SECTIONS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable> getSections_JsonNullable() {
return sections;
}
@JsonProperty(JSON_PROPERTY_SECTIONS)
public void setSections_JsonNullable(JsonNullable> sections) {
this.sections = sections;
}
public void setSections(java.util.List sections) {
this.sections = JsonNullable.>of(sections);
}
public PACommentary disclaimer(String disclaimer) {
this.disclaimer = JsonNullable.of(disclaimer);
return this;
}
/**
* Disclaimer
* @return disclaimer
**/
@jakarta.annotation.Nullable
@ApiModelProperty(value = "Disclaimer")
@JsonIgnore
public String getDisclaimer() {
return disclaimer.orElse(null);
}
@JsonProperty(JSON_PROPERTY_DISCLAIMER)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable getDisclaimer_JsonNullable() {
return disclaimer;
}
@JsonProperty(JSON_PROPERTY_DISCLAIMER)
public void setDisclaimer_JsonNullable(JsonNullable disclaimer) {
this.disclaimer = disclaimer;
}
public void setDisclaimer(String disclaimer) {
this.disclaimer = JsonNullable.of(disclaimer);
}
/**
* Return true if this PACommentary object is equal to o.
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
PACommentary paCommentary = (PACommentary) o;
return equalsNullable(this.commentaryId, paCommentary.commentaryId) &&
equalsNullable(this.sections, paCommentary.sections) &&
equalsNullable(this.disclaimer, paCommentary.disclaimer);
}
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(commentaryId), hashCodeNullable(sections), hashCodeNullable(disclaimer));
}
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 PACommentary {\n");
sb.append(" commentaryId: ").append(toIndentedString(commentaryId)).append("\n");
sb.append(" sections: ").append(toIndentedString(sections)).append("\n");
sb.append(" disclaimer: ").append(toIndentedString(disclaimer)).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 ");
}
}