com.factset.sdk.PAEngine.models.PACalculationDataSources 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.PACalculationPricingSource;
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;
/**
* PACalculationDataSources
*/
@JsonPropertyOrder({
PACalculationDataSources.JSON_PROPERTY_PORTFOLIOPRICINGSOURCES,
PACalculationDataSources.JSON_PROPERTY_BENCHMARKPRICINGSOURCES,
PACalculationDataSources.JSON_PROPERTY_USEPORTFOLIOPRICINGSOURCESFORBENCHMARK
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class PACalculationDataSources implements Serializable {
private static final long serialVersionUID = 1L;
public static final String JSON_PROPERTY_PORTFOLIOPRICINGSOURCES = "portfoliopricingsources";
private JsonNullable> portfoliopricingsources = JsonNullable.>undefined();
public static final String JSON_PROPERTY_BENCHMARKPRICINGSOURCES = "benchmarkpricingsources";
private JsonNullable> benchmarkpricingsources = JsonNullable.>undefined();
public static final String JSON_PROPERTY_USEPORTFOLIOPRICINGSOURCESFORBENCHMARK = "useportfoliopricingsourcesforbenchmark";
private JsonNullable useportfoliopricingsourcesforbenchmark = JsonNullable.undefined();
public PACalculationDataSources() {
}
public PACalculationDataSources portfoliopricingsources(java.util.List portfoliopricingsources) {
this.portfoliopricingsources = JsonNullable.>of(portfoliopricingsources);
return this;
}
public PACalculationDataSources addPortfoliopricingsourcesItem(PACalculationPricingSource portfoliopricingsourcesItem) {
if (this.portfoliopricingsources == null || !this.portfoliopricingsources.isPresent()) {
this.portfoliopricingsources = JsonNullable.>of(new java.util.ArrayList<>());
}
try {
this.portfoliopricingsources.get().add(portfoliopricingsourcesItem);
} catch (java.util.NoSuchElementException e) {
// this can never happen, as we make sure above that the value is present
}
return this;
}
/**
* List of portfilio pricing source for the PA calculation
* @return portfoliopricingsources
**/
@jakarta.annotation.Nullable
@ApiModelProperty(value = "List of portfilio pricing source for the PA calculation")
@JsonIgnore
public java.util.List getPortfoliopricingsources() {
return portfoliopricingsources.orElse(null);
}
@JsonProperty(JSON_PROPERTY_PORTFOLIOPRICINGSOURCES)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable> getPortfoliopricingsources_JsonNullable() {
return portfoliopricingsources;
}
@JsonProperty(JSON_PROPERTY_PORTFOLIOPRICINGSOURCES)
public void setPortfoliopricingsources_JsonNullable(JsonNullable> portfoliopricingsources) {
this.portfoliopricingsources = portfoliopricingsources;
}
public void setPortfoliopricingsources(java.util.List portfoliopricingsources) {
this.portfoliopricingsources = JsonNullable.>of(portfoliopricingsources);
}
public PACalculationDataSources benchmarkpricingsources(java.util.List benchmarkpricingsources) {
this.benchmarkpricingsources = JsonNullable.>of(benchmarkpricingsources);
return this;
}
public PACalculationDataSources addBenchmarkpricingsourcesItem(PACalculationPricingSource benchmarkpricingsourcesItem) {
if (this.benchmarkpricingsources == null || !this.benchmarkpricingsources.isPresent()) {
this.benchmarkpricingsources = JsonNullable.>of(new java.util.ArrayList<>());
}
try {
this.benchmarkpricingsources.get().add(benchmarkpricingsourcesItem);
} catch (java.util.NoSuchElementException e) {
// this can never happen, as we make sure above that the value is present
}
return this;
}
/**
* List of benchmark pricing source for the PA calculation
* @return benchmarkpricingsources
**/
@jakarta.annotation.Nullable
@ApiModelProperty(value = "List of benchmark pricing source for the PA calculation")
@JsonIgnore
public java.util.List getBenchmarkpricingsources() {
return benchmarkpricingsources.orElse(null);
}
@JsonProperty(JSON_PROPERTY_BENCHMARKPRICINGSOURCES)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable> getBenchmarkpricingsources_JsonNullable() {
return benchmarkpricingsources;
}
@JsonProperty(JSON_PROPERTY_BENCHMARKPRICINGSOURCES)
public void setBenchmarkpricingsources_JsonNullable(JsonNullable> benchmarkpricingsources) {
this.benchmarkpricingsources = benchmarkpricingsources;
}
public void setBenchmarkpricingsources(java.util.List benchmarkpricingsources) {
this.benchmarkpricingsources = JsonNullable.>of(benchmarkpricingsources);
}
public PACalculationDataSources useportfoliopricingsourcesforbenchmark(Boolean useportfoliopricingsourcesforbenchmark) {
this.useportfoliopricingsourcesforbenchmark = JsonNullable.of(useportfoliopricingsourcesforbenchmark);
return this;
}
/**
* Use portfolio pricing sources for benchmark
* @return useportfoliopricingsourcesforbenchmark
**/
@jakarta.annotation.Nullable
@ApiModelProperty(value = "Use portfolio pricing sources for benchmark")
@JsonIgnore
public Boolean getUseportfoliopricingsourcesforbenchmark() {
return useportfoliopricingsourcesforbenchmark.orElse(null);
}
@JsonProperty(JSON_PROPERTY_USEPORTFOLIOPRICINGSOURCESFORBENCHMARK)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable getUseportfoliopricingsourcesforbenchmark_JsonNullable() {
return useportfoliopricingsourcesforbenchmark;
}
@JsonProperty(JSON_PROPERTY_USEPORTFOLIOPRICINGSOURCESFORBENCHMARK)
public void setUseportfoliopricingsourcesforbenchmark_JsonNullable(JsonNullable useportfoliopricingsourcesforbenchmark) {
this.useportfoliopricingsourcesforbenchmark = useportfoliopricingsourcesforbenchmark;
}
public void setUseportfoliopricingsourcesforbenchmark(Boolean useportfoliopricingsourcesforbenchmark) {
this.useportfoliopricingsourcesforbenchmark = JsonNullable.of(useportfoliopricingsourcesforbenchmark);
}
/**
* Return true if this PACalculationDataSources object is equal to o.
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
PACalculationDataSources paCalculationDataSources = (PACalculationDataSources) o;
return equalsNullable(this.portfoliopricingsources, paCalculationDataSources.portfoliopricingsources) &&
equalsNullable(this.benchmarkpricingsources, paCalculationDataSources.benchmarkpricingsources) &&
equalsNullable(this.useportfoliopricingsourcesforbenchmark, paCalculationDataSources.useportfoliopricingsourcesforbenchmark);
}
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(portfoliopricingsources), hashCodeNullable(benchmarkpricingsources), hashCodeNullable(useportfoliopricingsourcesforbenchmark));
}
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 PACalculationDataSources {\n");
sb.append(" portfoliopricingsources: ").append(toIndentedString(portfoliopricingsources)).append("\n");
sb.append(" benchmarkpricingsources: ").append(toIndentedString(benchmarkpricingsources)).append("\n");
sb.append(" useportfoliopricingsourcesforbenchmark: ").append(toIndentedString(useportfoliopricingsourcesforbenchmark)).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 ");
}
}