com.factset.sdk.PAEngine.models.PAComponentData 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;
/**
* PAComponentData
*/
@JsonPropertyOrder({
PAComponentData.JSON_PROPERTY_ACCOUNTS,
PAComponentData.JSON_PROPERTY_BENCHMARKS,
PAComponentData.JSON_PROPERTY_GROUPS,
PAComponentData.JSON_PROPERTY_COLUMNS,
PAComponentData.JSON_PROPERTY_DATES,
PAComponentData.JSON_PROPERTY_DATASOURCES,
PAComponentData.JSON_PROPERTY_CURRENCYISOCODE,
PAComponentData.JSON_PROPERTY_COMPONENTDETAIL
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class PAComponentData implements Serializable {
private static final long serialVersionUID = 1L;
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_GROUPS = "groups";
private JsonNullable> groups = JsonNullable.>undefined();
public static final String JSON_PROPERTY_COLUMNS = "columns";
private JsonNullable> columns = JsonNullable.>undefined();
public static final String JSON_PROPERTY_DATES = "dates";
private PADateParameters dates;
public static final String JSON_PROPERTY_DATASOURCES = "datasources";
private PACalculationDataSources datasources;
public static final String JSON_PROPERTY_CURRENCYISOCODE = "currencyisocode";
private JsonNullable currencyisocode = JsonNullable.undefined();
public static final String JSON_PROPERTY_COMPONENTDETAIL = "componentdetail";
private JsonNullable componentdetail = JsonNullable.undefined();
public PAComponentData() {
}
public PAComponentData accounts(java.util.List accounts) {
this.accounts = JsonNullable.>of(accounts);
return this;
}
public PAComponentData 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 PAComponentData benchmarks(java.util.List benchmarks) {
this.benchmarks = JsonNullable.>of(benchmarks);
return this;
}
public PAComponentData 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 PAComponentData groups(java.util.List groups) {
this.groups = JsonNullable.>of(groups);
return this;
}
public PAComponentData 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 PAComponentData columns(java.util.List columns) {
this.columns = JsonNullable.>of(columns);
return this;
}
public PAComponentData 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 PAComponentData 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 PAComponentData 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 PAComponentData 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 PAComponentData componentdetail(String componentdetail) {
this.componentdetail = JsonNullable.of(componentdetail);
return this;
}
/**
* PA Storage type. It can be GROUPS or GROUPSALL or TOTALS or SECURITIES.
* @return componentdetail
**/
@jakarta.annotation.Nullable
@ApiModelProperty(value = "PA Storage type. 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 PAComponentData object is equal to o.
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
PAComponentData paComponentData = (PAComponentData) o;
return equalsNullable(this.accounts, paComponentData.accounts) &&
equalsNullable(this.benchmarks, paComponentData.benchmarks) &&
equalsNullable(this.groups, paComponentData.groups) &&
equalsNullable(this.columns, paComponentData.columns) &&
Objects.equals(this.dates, paComponentData.dates) &&
Objects.equals(this.datasources, paComponentData.datasources) &&
equalsNullable(this.currencyisocode, paComponentData.currencyisocode) &&
equalsNullable(this.componentdetail, paComponentData.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(hashCodeNullable(accounts), hashCodeNullable(benchmarks), hashCodeNullable(groups), hashCodeNullable(columns), dates, datasources, hashCodeNullable(currencyisocode), 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 PAComponentData {\n");
sb.append(" accounts: ").append(toIndentedString(accounts)).append("\n");
sb.append(" benchmarks: ").append(toIndentedString(benchmarks)).append("\n");
sb.append(" groups: ").append(toIndentedString(groups)).append("\n");
sb.append(" columns: ").append(toIndentedString(columns)).append("\n");
sb.append(" dates: ").append(toIndentedString(dates)).append("\n");
sb.append(" datasources: ").append(toIndentedString(datasources)).append("\n");
sb.append(" currencyisocode: ").append(toIndentedString(currencyisocode)).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 ");
}
}