com.factset.sdk.PAEngine.models.PACalculationParameters 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.PACalculationColumn;
import com.factset.sdk.PAEngine.models.PACalculationDataSources;
import com.factset.sdk.PAEngine.models.PACalculationGroup;
import com.factset.sdk.PAEngine.models.PADateParameters;
import com.factset.sdk.PAEngine.models.PAIdentifier;
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;
/**
* PACalculationParameters
*/
@JsonPropertyOrder({
PACalculationParameters.JSON_PROPERTY_COMPONENTID,
PACalculationParameters.JSON_PROPERTY_ACCOUNTS,
PACalculationParameters.JSON_PROPERTY_BENCHMARKS,
PACalculationParameters.JSON_PROPERTY_DATES,
PACalculationParameters.JSON_PROPERTY_GROUPS,
PACalculationParameters.JSON_PROPERTY_CURRENCYISOCODE,
PACalculationParameters.JSON_PROPERTY_COLUMNS,
PACalculationParameters.JSON_PROPERTY_DATASOURCES,
PACalculationParameters.JSON_PROPERTY_COMPONENTDETAIL
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class PACalculationParameters implements Serializable {
private static final long serialVersionUID = 1L;
public static final String JSON_PROPERTY_COMPONENTID = "componentid";
private String componentid;
public static final String JSON_PROPERTY_ACCOUNTS = "accounts";
private JsonNullable> accounts = JsonNullable.>undefined();
public static final String JSON_PROPERTY_BENCHMARKS = "benchmarks";
private JsonNullable> benchmarks = JsonNullable.>undefined();
public static final String JSON_PROPERTY_DATES = "dates";
private PADateParameters dates;
public static final String JSON_PROPERTY_GROUPS = "groups";
private JsonNullable> groups = JsonNullable.>undefined();
public static final String JSON_PROPERTY_CURRENCYISOCODE = "currencyisocode";
private JsonNullable currencyisocode = JsonNullable.undefined();
public static final String JSON_PROPERTY_COLUMNS = "columns";
private JsonNullable> columns = JsonNullable.>undefined();
public static final String JSON_PROPERTY_DATASOURCES = "datasources";
private PACalculationDataSources datasources;
public static final String JSON_PROPERTY_COMPONENTDETAIL = "componentdetail";
private JsonNullable componentdetail = JsonNullable.undefined();
public PACalculationParameters() {
}
@JsonCreator
public PACalculationParameters(
@JsonProperty(value=JSON_PROPERTY_COMPONENTID, required=true) String componentid
) {
this();
this.componentid = componentid;
}
public PACalculationParameters componentid(String componentid) {
this.componentid = componentid;
return this;
}
/**
* The PA Engine component identifier to analyze.
* @return componentid
**/
@jakarta.annotation.Nonnull
@ApiModelProperty(required = true, value = "The PA Engine component identifier to analyze.")
@JsonProperty(JSON_PROPERTY_COMPONENTID)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getComponentid() {
return componentid;
}
@JsonProperty(JSON_PROPERTY_COMPONENTID)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setComponentid(String componentid) {
this.componentid = componentid;
}
public PACalculationParameters accounts(java.util.List accounts) {
this.accounts = JsonNullable.>of(accounts);
return this;
}
public PACalculationParameters addAccountsItem(PAIdentifier accountsItem) {
if (this.accounts == null || !this.accounts.isPresent()) {
this.accounts = JsonNullable.>of(new java.util.ArrayList<>());
}
try {
this.accounts.get().add(accountsItem);
} catch (java.util.NoSuchElementException e) {
// this can never happen, as we make sure above that the value is present
}
return this;
}
/**
* List of accounts.
* @return accounts
**/
@jakarta.annotation.Nullable
@ApiModelProperty(value = "List of accounts.")
@JsonIgnore
public java.util.List getAccounts() {
return accounts.orElse(null);
}
@JsonProperty(JSON_PROPERTY_ACCOUNTS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable> getAccounts_JsonNullable() {
return accounts;
}
@JsonProperty(JSON_PROPERTY_ACCOUNTS)
public void setAccounts_JsonNullable(JsonNullable> accounts) {
this.accounts = accounts;
}
public void setAccounts(java.util.List accounts) {
this.accounts = JsonNullable.>of(accounts);
}
public PACalculationParameters benchmarks(java.util.List benchmarks) {
this.benchmarks = JsonNullable.>of(benchmarks);
return this;
}
public PACalculationParameters addBenchmarksItem(PAIdentifier benchmarksItem) {
if (this.benchmarks == null || !this.benchmarks.isPresent()) {
this.benchmarks = JsonNullable.>of(new java.util.ArrayList<>());
}
try {
this.benchmarks.get().add(benchmarksItem);
} catch (java.util.NoSuchElementException e) {
// this can never happen, as we make sure above that the value is present
}
return this;
}
/**
* List of benchmarks.
* @return benchmarks
**/
@jakarta.annotation.Nullable
@ApiModelProperty(value = "List of benchmarks.")
@JsonIgnore
public java.util.List getBenchmarks() {
return benchmarks.orElse(null);
}
@JsonProperty(JSON_PROPERTY_BENCHMARKS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable> getBenchmarks_JsonNullable() {
return benchmarks;
}
@JsonProperty(JSON_PROPERTY_BENCHMARKS)
public void setBenchmarks_JsonNullable(JsonNullable> benchmarks) {
this.benchmarks = benchmarks;
}
public void setBenchmarks(java.util.List benchmarks) {
this.benchmarks = JsonNullable.>of(benchmarks);
}
public PACalculationParameters dates(PADateParameters dates) {
this.dates = dates;
return this;
}
/**
* Get dates
* @return dates
**/
@jakarta.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_DATES)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public PADateParameters getDates() {
return dates;
}
@JsonProperty(JSON_PROPERTY_DATES)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setDates(PADateParameters dates) {
this.dates = dates;
}
public PACalculationParameters groups(java.util.List groups) {
this.groups = JsonNullable.>of(groups);
return this;
}
public PACalculationParameters addGroupsItem(PACalculationGroup groupsItem) {
if (this.groups == null || !this.groups.isPresent()) {
this.groups = JsonNullable.>of(new java.util.ArrayList<>());
}
try {
this.groups.get().add(groupsItem);
} catch (java.util.NoSuchElementException e) {
// this can never happen, as we make sure above that the value is present
}
return this;
}
/**
* List of groupings for the PA calculation. This will take precedence over the groupings saved in the PA document.
* @return groups
**/
@jakarta.annotation.Nullable
@ApiModelProperty(value = "List of groupings for the PA calculation. This will take precedence over the groupings saved in the PA document.")
@JsonIgnore
public java.util.List getGroups() {
return groups.orElse(null);
}
@JsonProperty(JSON_PROPERTY_GROUPS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable> getGroups_JsonNullable() {
return groups;
}
@JsonProperty(JSON_PROPERTY_GROUPS)
public void setGroups_JsonNullable(JsonNullable> groups) {
this.groups = groups;
}
public void setGroups(java.util.List groups) {
this.groups = JsonNullable.>of(groups);
}
public PACalculationParameters currencyisocode(String currencyisocode) {
this.currencyisocode = JsonNullable.of(currencyisocode);
return this;
}
/**
* Currency ISO code for calculation.
* @return currencyisocode
**/
@jakarta.annotation.Nullable
@ApiModelProperty(value = "Currency ISO code for calculation.")
@JsonIgnore
public String getCurrencyisocode() {
return currencyisocode.orElse(null);
}
@JsonProperty(JSON_PROPERTY_CURRENCYISOCODE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable getCurrencyisocode_JsonNullable() {
return currencyisocode;
}
@JsonProperty(JSON_PROPERTY_CURRENCYISOCODE)
public void setCurrencyisocode_JsonNullable(JsonNullable currencyisocode) {
this.currencyisocode = currencyisocode;
}
public void setCurrencyisocode(String currencyisocode) {
this.currencyisocode = JsonNullable.of(currencyisocode);
}
public PACalculationParameters columns(java.util.List columns) {
this.columns = JsonNullable.>of(columns);
return this;
}
public PACalculationParameters addColumnsItem(PACalculationColumn columnsItem) {
if (this.columns == null || !this.columns.isPresent()) {
this.columns = JsonNullable.>of(new java.util.ArrayList<>());
}
try {
this.columns.get().add(columnsItem);
} catch (java.util.NoSuchElementException e) {
// this can never happen, as we make sure above that the value is present
}
return this;
}
/**
* List of columns for the PA calculation. This will take precedence over the columns saved in the PA document.
* @return columns
**/
@jakarta.annotation.Nullable
@ApiModelProperty(value = "List of columns for the PA calculation. This will take precedence over the columns saved in the PA document.")
@JsonIgnore
public java.util.List getColumns() {
return columns.orElse(null);
}
@JsonProperty(JSON_PROPERTY_COLUMNS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable> getColumns_JsonNullable() {
return columns;
}
@JsonProperty(JSON_PROPERTY_COLUMNS)
public void setColumns_JsonNullable(JsonNullable> columns) {
this.columns = columns;
}
public void setColumns(java.util.List columns) {
this.columns = JsonNullable.>of(columns);
}
public PACalculationParameters datasources(PACalculationDataSources datasources) {
this.datasources = datasources;
return this;
}
/**
* Get datasources
* @return datasources
**/
@jakarta.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_DATASOURCES)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public PACalculationDataSources getDatasources() {
return datasources;
}
@JsonProperty(JSON_PROPERTY_DATASOURCES)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setDatasources(PACalculationDataSources datasources) {
this.datasources = datasources;
}
public PACalculationParameters componentdetail(String componentdetail) {
this.componentdetail = JsonNullable.of(componentdetail);
return this;
}
/**
* Component detail type for the PA component. It can be GROUPS or GROUPSALL or TOTALS or SECURITIES.
* @return componentdetail
**/
@jakarta.annotation.Nullable
@ApiModelProperty(value = "Component detail type for the PA component. It can be GROUPS or GROUPSALL or TOTALS or SECURITIES.")
@JsonIgnore
public String getComponentdetail() {
return componentdetail.orElse(null);
}
@JsonProperty(JSON_PROPERTY_COMPONENTDETAIL)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable getComponentdetail_JsonNullable() {
return componentdetail;
}
@JsonProperty(JSON_PROPERTY_COMPONENTDETAIL)
public void setComponentdetail_JsonNullable(JsonNullable componentdetail) {
this.componentdetail = componentdetail;
}
public void setComponentdetail(String componentdetail) {
this.componentdetail = JsonNullable.of(componentdetail);
}
/**
* Return true if this PACalculationParameters object is equal to o.
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
PACalculationParameters paCalculationParameters = (PACalculationParameters) o;
return Objects.equals(this.componentid, paCalculationParameters.componentid) &&
equalsNullable(this.accounts, paCalculationParameters.accounts) &&
equalsNullable(this.benchmarks, paCalculationParameters.benchmarks) &&
Objects.equals(this.dates, paCalculationParameters.dates) &&
equalsNullable(this.groups, paCalculationParameters.groups) &&
equalsNullable(this.currencyisocode, paCalculationParameters.currencyisocode) &&
equalsNullable(this.columns, paCalculationParameters.columns) &&
Objects.equals(this.datasources, paCalculationParameters.datasources) &&
equalsNullable(this.componentdetail, paCalculationParameters.componentdetail);
}
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(componentid, hashCodeNullable(accounts), hashCodeNullable(benchmarks), dates, hashCodeNullable(groups), hashCodeNullable(currencyisocode), hashCodeNullable(columns), datasources, hashCodeNullable(componentdetail));
}
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 PACalculationParameters {\n");
sb.append(" componentid: ").append(toIndentedString(componentid)).append("\n");
sb.append(" accounts: ").append(toIndentedString(accounts)).append("\n");
sb.append(" benchmarks: ").append(toIndentedString(benchmarks)).append("\n");
sb.append(" dates: ").append(toIndentedString(dates)).append("\n");
sb.append(" groups: ").append(toIndentedString(groups)).append("\n");
sb.append(" currencyisocode: ").append(toIndentedString(currencyisocode)).append("\n");
sb.append(" columns: ").append(toIndentedString(columns)).append("\n");
sb.append(" datasources: ").append(toIndentedString(datasources)).append("\n");
sb.append(" componentdetail: ").append(toIndentedString(componentdetail)).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 ");
}
}