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

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


/**
 * AccountDirectories
 */
@JsonPropertyOrder({
  AccountDirectories.JSON_PROPERTY_ACCOUNTS,
  AccountDirectories.JSON_PROPERTY_DIRECTORIES
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")

public class AccountDirectories 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_DIRECTORIES = "directories";
  private JsonNullable> directories = JsonNullable.>undefined();

  public AccountDirectories() { 
  }

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

  public AccountDirectories addAccountsItem(String 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 account and composite files.
   * @return accounts
  **/
  @jakarta.annotation.Nullable
  @ApiModelProperty(value = "List of account and composite files.")
  @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 AccountDirectories directories(java.util.List directories) {
    this.directories = JsonNullable.>of(directories);
    return this;
  }

  public AccountDirectories addDirectoriesItem(String directoriesItem) {
    if (this.directories == null || !this.directories.isPresent()) {
      this.directories = JsonNullable.>of(new java.util.ArrayList<>());
    }
    try {
      this.directories.get().add(directoriesItem);
    } catch (java.util.NoSuchElementException e) {
      // this can never happen, as we make sure above that the value is present
    }
    return this;
  }

   /**
   * List of directories.
   * @return directories
  **/
  @jakarta.annotation.Nullable
  @ApiModelProperty(value = "List of directories.")
  @JsonIgnore

  public java.util.List getDirectories() {
        return directories.orElse(null);
  }

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

  public JsonNullable> getDirectories_JsonNullable() {
    return directories;
  }
  
  @JsonProperty(JSON_PROPERTY_DIRECTORIES)
  public void setDirectories_JsonNullable(JsonNullable> directories) {
    this.directories = directories;
  }

  public void setDirectories(java.util.List directories) {
    this.directories = JsonNullable.>of(directories);
  }


  /**
   * Return true if this AccountDirectories object is equal to o.
   */
  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    AccountDirectories accountDirectories = (AccountDirectories) o;
    return equalsNullable(this.accounts, accountDirectories.accounts) &&
        equalsNullable(this.directories, accountDirectories.directories);
  }

  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(directories));
  }

  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 AccountDirectories {\n");
    sb.append("    accounts: ").append(toIndentedString(accounts)).append("\n");
    sb.append("    directories: ").append(toIndentedString(directories)).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