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

com.factset.sdk.PAEngine.models.PAComponent 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.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;


/**
 * PAComponent
 */
@JsonPropertyOrder({
  PAComponent.JSON_PROPERTY_ID,
  PAComponent.JSON_PROPERTY_ACCOUNTS,
  PAComponent.JSON_PROPERTY_BENCHMARKS,
  PAComponent.JSON_PROPERTY_CURRENCYISOCODE,
  PAComponent.JSON_PROPERTY_DATES,
  PAComponent.JSON_PROPERTY_SNAPSHOT,
  PAComponent.JSON_PROPERTY_PATH,
  PAComponent.JSON_PROPERTY_NAME,
  PAComponent.JSON_PROPERTY_CATEGORY
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")

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

  public static final String JSON_PROPERTY_ID = "id";
  private JsonNullable id = 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_CURRENCYISOCODE = "currencyisocode";
  private JsonNullable currencyisocode = JsonNullable.undefined();

  public static final String JSON_PROPERTY_DATES = "dates";
  private PADateParameters dates;

  public static final String JSON_PROPERTY_SNAPSHOT = "snapshot";
  private Boolean snapshot;

  public static final String JSON_PROPERTY_PATH = "path";
  private JsonNullable path = JsonNullable.undefined();

  public static final String JSON_PROPERTY_NAME = "name";
  private JsonNullable name = JsonNullable.undefined();

  public static final String JSON_PROPERTY_CATEGORY = "category";
  private JsonNullable category = JsonNullable.undefined();

  public PAComponent() { 
  }

  public PAComponent id(String id) {
    this.id = JsonNullable.of(id);
    return this;
  }

   /**
   * Component identifier.
   * @return id
  **/
  @jakarta.annotation.Nullable
  @ApiModelProperty(value = "Component identifier.")
  @JsonIgnore

  public String getId() {
        return id.orElse(null);
  }

  @JsonProperty(JSON_PROPERTY_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public JsonNullable getId_JsonNullable() {
    return id;
  }
  
  @JsonProperty(JSON_PROPERTY_ID)
  public void setId_JsonNullable(JsonNullable id) {
    this.id = id;
  }

  public void setId(String id) {
    this.id = JsonNullable.of(id);
  }


  public PAComponent accounts(java.util.List accounts) {
    this.accounts = JsonNullable.>of(accounts);
    return this;
  }

  public PAComponent 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 saved in the PA document.
   * @return accounts
  **/
  @jakarta.annotation.Nullable
  @ApiModelProperty(value = "List of accounts saved in the PA document.")
  @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 PAComponent benchmarks(java.util.List benchmarks) {
    this.benchmarks = JsonNullable.>of(benchmarks);
    return this;
  }

  public PAComponent 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 saved in the PA document.
   * @return benchmarks
  **/
  @jakarta.annotation.Nullable
  @ApiModelProperty(value = "List of benchmarks saved in the PA document.")
  @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 PAComponent currencyisocode(String currencyisocode) {
    this.currencyisocode = JsonNullable.of(currencyisocode);
    return this;
  }

   /**
   * Get currencyisocode
   * @return currencyisocode
  **/
  @jakarta.annotation.Nullable
  @ApiModelProperty(value = "")
  @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 PAComponent 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 PAComponent snapshot(Boolean snapshot) {
    this.snapshot = snapshot;
    return this;
  }

   /**
   * Is the component type snapshot or subperiod.
   * @return snapshot
  **/
  @jakarta.annotation.Nullable
  @ApiModelProperty(value = "Is the component type snapshot or subperiod.")
  @JsonProperty(JSON_PROPERTY_SNAPSHOT)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public Boolean getSnapshot() {
    return snapshot;
  }


  @JsonProperty(JSON_PROPERTY_SNAPSHOT)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setSnapshot(Boolean snapshot) {
    this.snapshot = snapshot;
  }


  public PAComponent path(String path) {
    this.path = JsonNullable.of(path);
    return this;
  }

   /**
   * The path to the document
   * @return path
  **/
  @jakarta.annotation.Nullable
  @ApiModelProperty(value = "The path to the document")
  @JsonIgnore

  public String getPath() {
        return path.orElse(null);
  }

  @JsonProperty(JSON_PROPERTY_PATH)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public JsonNullable getPath_JsonNullable() {
    return path;
  }
  
  @JsonProperty(JSON_PROPERTY_PATH)
  public void setPath_JsonNullable(JsonNullable path) {
    this.path = path;
  }

  public void setPath(String path) {
    this.path = JsonNullable.of(path);
  }


  public PAComponent name(String name) {
    this.name = JsonNullable.of(name);
    return this;
  }

   /**
   * Component name.
   * @return name
  **/
  @jakarta.annotation.Nullable
  @ApiModelProperty(value = "Component name.")
  @JsonIgnore

  public String getName() {
        return name.orElse(null);
  }

  @JsonProperty(JSON_PROPERTY_NAME)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public JsonNullable getName_JsonNullable() {
    return name;
  }
  
  @JsonProperty(JSON_PROPERTY_NAME)
  public void setName_JsonNullable(JsonNullable name) {
    this.name = name;
  }

  public void setName(String name) {
    this.name = JsonNullable.of(name);
  }


  public PAComponent category(String category) {
    this.category = JsonNullable.of(category);
    return this;
  }

   /**
   * Component category.
   * @return category
  **/
  @jakarta.annotation.Nullable
  @ApiModelProperty(value = "Component category.")
  @JsonIgnore

  public String getCategory() {
        return category.orElse(null);
  }

  @JsonProperty(JSON_PROPERTY_CATEGORY)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public JsonNullable getCategory_JsonNullable() {
    return category;
  }
  
  @JsonProperty(JSON_PROPERTY_CATEGORY)
  public void setCategory_JsonNullable(JsonNullable category) {
    this.category = category;
  }

  public void setCategory(String category) {
    this.category = JsonNullable.of(category);
  }


  /**
   * Return true if this PAComponent object is equal to o.
   */
  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    PAComponent paComponent = (PAComponent) o;
    return equalsNullable(this.id, paComponent.id) &&
        equalsNullable(this.accounts, paComponent.accounts) &&
        equalsNullable(this.benchmarks, paComponent.benchmarks) &&
        equalsNullable(this.currencyisocode, paComponent.currencyisocode) &&
        Objects.equals(this.dates, paComponent.dates) &&
        Objects.equals(this.snapshot, paComponent.snapshot) &&
        equalsNullable(this.path, paComponent.path) &&
        equalsNullable(this.name, paComponent.name) &&
        equalsNullable(this.category, paComponent.category);
  }

  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(id), hashCodeNullable(accounts), hashCodeNullable(benchmarks), hashCodeNullable(currencyisocode), dates, snapshot, hashCodeNullable(path), hashCodeNullable(name), hashCodeNullable(category));
  }

  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 PAComponent {\n");
    sb.append("    id: ").append(toIndentedString(id)).append("\n");
    sb.append("    accounts: ").append(toIndentedString(accounts)).append("\n");
    sb.append("    benchmarks: ").append(toIndentedString(benchmarks)).append("\n");
    sb.append("    currencyisocode: ").append(toIndentedString(currencyisocode)).append("\n");
    sb.append("    dates: ").append(toIndentedString(dates)).append("\n");
    sb.append("    snapshot: ").append(toIndentedString(snapshot)).append("\n");
    sb.append("    path: ").append(toIndentedString(path)).append("\n");
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    category: ").append(toIndentedString(category)).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