All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.factset.sdk.PAEngine.models.UnlinkedPATemplateParameters Maven / Gradle / Ivy

There is a newer version: 3.1.1
Show newest version
/*
 * 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;


/**
 * UnlinkedPATemplateParameters
 */
@JsonPropertyOrder({
  UnlinkedPATemplateParameters.JSON_PROPERTY_DIRECTORY,
  UnlinkedPATemplateParameters.JSON_PROPERTY_TEMPLATE_TYPE_ID,
  UnlinkedPATemplateParameters.JSON_PROPERTY_DESCRIPTION,
  UnlinkedPATemplateParameters.JSON_PROPERTY_ACCOUNTS,
  UnlinkedPATemplateParameters.JSON_PROPERTY_BENCHMARKS,
  UnlinkedPATemplateParameters.JSON_PROPERTY_COLUMNS,
  UnlinkedPATemplateParameters.JSON_PROPERTY_DATES,
  UnlinkedPATemplateParameters.JSON_PROPERTY_GROUPS,
  UnlinkedPATemplateParameters.JSON_PROPERTY_DATASOURCES,
  UnlinkedPATemplateParameters.JSON_PROPERTY_CURRENCYISOCODE,
  UnlinkedPATemplateParameters.JSON_PROPERTY_COMPONENTDETAIL,
  UnlinkedPATemplateParameters.JSON_PROPERTY_CONTENT
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")

public class UnlinkedPATemplateParameters implements Serializable {
  private static final long serialVersionUID = 1L;

  public static final String JSON_PROPERTY_DIRECTORY = "directory";
  private String directory;

  public static final String JSON_PROPERTY_TEMPLATE_TYPE_ID = "templateTypeId";
  private String templateTypeId;

  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 UnlinkedPATemplateParameters() { 
  }

  @JsonCreator
  public UnlinkedPATemplateParameters(
    @JsonProperty(value=JSON_PROPERTY_DIRECTORY, required=true) String directory, 
    @JsonProperty(value=JSON_PROPERTY_TEMPLATE_TYPE_ID, required=true) String templateTypeId
  ) {
    this();
    this.directory = directory;
    this.templateTypeId = templateTypeId;
  }

  public UnlinkedPATemplateParameters directory(String directory) {
    this.directory = directory;
    return this;
  }

   /**
   * The directory to create an unlinked PA template
   * @return directory
  **/
  @jakarta.annotation.Nonnull
  @ApiModelProperty(required = true, value = "The directory to create an unlinked PA template")
  @JsonProperty(JSON_PROPERTY_DIRECTORY)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)

  public String getDirectory() {
    return directory;
  }


  @JsonProperty(JSON_PROPERTY_DIRECTORY)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setDirectory(String directory) {
    this.directory = directory;
  }


  public UnlinkedPATemplateParameters templateTypeId(String templateTypeId) {
    this.templateTypeId = templateTypeId;
    return this;
  }

   /**
   * Template type id
   * @return templateTypeId
  **/
  @jakarta.annotation.Nonnull
  @ApiModelProperty(required = true, value = "Template type id")
  @JsonProperty(JSON_PROPERTY_TEMPLATE_TYPE_ID)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)

  public String getTemplateTypeId() {
    return templateTypeId;
  }


  @JsonProperty(JSON_PROPERTY_TEMPLATE_TYPE_ID)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setTemplateTypeId(String templateTypeId) {
    this.templateTypeId = templateTypeId;
  }


  public UnlinkedPATemplateParameters 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 UnlinkedPATemplateParameters accounts(java.util.List accounts) {
    this.accounts = JsonNullable.>of(accounts);
    return this;
  }

  public UnlinkedPATemplateParameters 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 UnlinkedPATemplateParameters benchmarks(java.util.List benchmarks) {
    this.benchmarks = JsonNullable.>of(benchmarks);
    return this;
  }

  public UnlinkedPATemplateParameters 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 UnlinkedPATemplateParameters columns(java.util.List columns) {
    this.columns = JsonNullable.>of(columns);
    return this;
  }

  public UnlinkedPATemplateParameters 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 UnlinkedPATemplateParameters 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 UnlinkedPATemplateParameters groups(java.util.List groups) {
    this.groups = JsonNullable.>of(groups);
    return this;
  }

  public UnlinkedPATemplateParameters 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 UnlinkedPATemplateParameters 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 UnlinkedPATemplateParameters 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 UnlinkedPATemplateParameters 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 UnlinkedPATemplateParameters 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 UnlinkedPATemplateParameters object is equal to o.
   */
  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    UnlinkedPATemplateParameters unlinkedPATemplateParameters = (UnlinkedPATemplateParameters) o;
    return Objects.equals(this.directory, unlinkedPATemplateParameters.directory) &&
        Objects.equals(this.templateTypeId, unlinkedPATemplateParameters.templateTypeId) &&
        equalsNullable(this.description, unlinkedPATemplateParameters.description) &&
        equalsNullable(this.accounts, unlinkedPATemplateParameters.accounts) &&
        equalsNullable(this.benchmarks, unlinkedPATemplateParameters.benchmarks) &&
        equalsNullable(this.columns, unlinkedPATemplateParameters.columns) &&
        Objects.equals(this.dates, unlinkedPATemplateParameters.dates) &&
        equalsNullable(this.groups, unlinkedPATemplateParameters.groups) &&
        Objects.equals(this.datasources, unlinkedPATemplateParameters.datasources) &&
        equalsNullable(this.currencyisocode, unlinkedPATemplateParameters.currencyisocode) &&
        equalsNullable(this.componentdetail, unlinkedPATemplateParameters.componentdetail) &&
        Objects.equals(this.content, unlinkedPATemplateParameters.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(directory, templateTypeId, 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 UnlinkedPATemplateParameters {\n");
    sb.append("    directory: ").append(toIndentedString(directory)).append("\n");
    sb.append("    templateTypeId: ").append(toIndentedString(templateTypeId)).append("\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    ");
  }

}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy