com.factset.sdk.PAEngine.models.UnlinkedPATemplateUpdateParameters 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.factset.sdk.PAEngine.models.TemplateContentTypes;
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;
/**
* UnlinkedPATemplateUpdateParameters
*/
@JsonPropertyOrder({
UnlinkedPATemplateUpdateParameters.JSON_PROPERTY_DESCRIPTION,
UnlinkedPATemplateUpdateParameters.JSON_PROPERTY_ACCOUNTS,
UnlinkedPATemplateUpdateParameters.JSON_PROPERTY_BENCHMARKS,
UnlinkedPATemplateUpdateParameters.JSON_PROPERTY_COLUMNS,
UnlinkedPATemplateUpdateParameters.JSON_PROPERTY_DATES,
UnlinkedPATemplateUpdateParameters.JSON_PROPERTY_GROUPS,
UnlinkedPATemplateUpdateParameters.JSON_PROPERTY_DATASOURCES,
UnlinkedPATemplateUpdateParameters.JSON_PROPERTY_CURRENCYISOCODE,
UnlinkedPATemplateUpdateParameters.JSON_PROPERTY_COMPONENTDETAIL,
UnlinkedPATemplateUpdateParameters.JSON_PROPERTY_CONTENT
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class UnlinkedPATemplateUpdateParameters implements Serializable {
private static final long serialVersionUID = 1L;
public static final String JSON_PROPERTY_DESCRIPTION = "description";
private JsonNullable description = JsonNullable.undefined();
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_COLUMNS = "columns";
private JsonNullable> columns = 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_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 static final String JSON_PROPERTY_CONTENT = "content";
private TemplateContentTypes content;
public UnlinkedPATemplateUpdateParameters() {
}
public UnlinkedPATemplateUpdateParameters description(String description) {
this.description = JsonNullable.of(description);
return this;
}
/**
* Template description
* @return description
**/
@jakarta.annotation.Nullable
@ApiModelProperty(value = "Template description")
@JsonIgnore
public String getDescription() {
return description.orElse(null);
}
@JsonProperty(JSON_PROPERTY_DESCRIPTION)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable getDescription_JsonNullable() {
return description;
}
@JsonProperty(JSON_PROPERTY_DESCRIPTION)
public void setDescription_JsonNullable(JsonNullable description) {
this.description = description;
}
public void setDescription(String description) {
this.description = JsonNullable.of(description);
}
public UnlinkedPATemplateUpdateParameters accounts(java.util.List accounts) {
this.accounts = JsonNullable.>of(accounts);
return this;
}
public UnlinkedPATemplateUpdateParameters 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 UnlinkedPATemplateUpdateParameters benchmarks(java.util.List benchmarks) {
this.benchmarks = JsonNullable.>of(benchmarks);
return this;
}
public UnlinkedPATemplateUpdateParameters 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 UnlinkedPATemplateUpdateParameters columns(java.util.List columns) {
this.columns = JsonNullable.>of(columns);
return this;
}
public UnlinkedPATemplateUpdateParameters 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
* @return columns
**/
@jakarta.annotation.Nullable
@ApiModelProperty(value = "List of columns for the PA calculation")
@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 UnlinkedPATemplateUpdateParameters 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 UnlinkedPATemplateUpdateParameters groups(java.util.List groups) {
this.groups = JsonNullable.>of(groups);
return this;
}
public UnlinkedPATemplateUpdateParameters 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
* @return groups
**/
@jakarta.annotation.Nullable
@ApiModelProperty(value = "List of groupings for the PA calculation")
@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 UnlinkedPATemplateUpdateParameters 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 UnlinkedPATemplateUpdateParameters 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 UnlinkedPATemplateUpdateParameters 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);
}
public UnlinkedPATemplateUpdateParameters content(TemplateContentTypes content) {
this.content = content;
return this;
}
/**
* Get content
* @return content
**/
@jakarta.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_CONTENT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public TemplateContentTypes getContent() {
return content;
}
@JsonProperty(JSON_PROPERTY_CONTENT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setContent(TemplateContentTypes content) {
this.content = content;
}
/**
* Return true if this UnlinkedPATemplateUpdateParameters object is equal to o.
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
UnlinkedPATemplateUpdateParameters unlinkedPATemplateUpdateParameters = (UnlinkedPATemplateUpdateParameters) o;
return equalsNullable(this.description, unlinkedPATemplateUpdateParameters.description) &&
equalsNullable(this.accounts, unlinkedPATemplateUpdateParameters.accounts) &&
equalsNullable(this.benchmarks, unlinkedPATemplateUpdateParameters.benchmarks) &&
equalsNullable(this.columns, unlinkedPATemplateUpdateParameters.columns) &&
Objects.equals(this.dates, unlinkedPATemplateUpdateParameters.dates) &&
equalsNullable(this.groups, unlinkedPATemplateUpdateParameters.groups) &&
Objects.equals(this.datasources, unlinkedPATemplateUpdateParameters.datasources) &&
equalsNullable(this.currencyisocode, unlinkedPATemplateUpdateParameters.currencyisocode) &&
equalsNullable(this.componentdetail, unlinkedPATemplateUpdateParameters.componentdetail) &&
Objects.equals(this.content, unlinkedPATemplateUpdateParameters.content);
}
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(description), hashCodeNullable(accounts), hashCodeNullable(benchmarks), hashCodeNullable(columns), dates, hashCodeNullable(groups), datasources, hashCodeNullable(currencyisocode), hashCodeNullable(componentdetail), content);
}
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 UnlinkedPATemplateUpdateParameters {\n");
sb.append(" description: ").append(toIndentedString(description)).append("\n");
sb.append(" accounts: ").append(toIndentedString(accounts)).append("\n");
sb.append(" benchmarks: ").append(toIndentedString(benchmarks)).append("\n");
sb.append(" columns: ").append(toIndentedString(columns)).append("\n");
sb.append(" dates: ").append(toIndentedString(dates)).append("\n");
sb.append(" groups: ").append(toIndentedString(groups)).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(" content: ").append(toIndentedString(content)).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 ");
}
}