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

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


/**
 * PACommentaryStatus
 */
@JsonPropertyOrder({
  PACommentaryStatus.JSON_PROPERTY_RESULT,
  PACommentaryStatus.JSON_PROPERTY_CALCULATIONID,
  PACommentaryStatus.JSON_PROPERTY_UNITID,
  PACommentaryStatus.JSON_PROPERTY_STATUS
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")

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

  public static final String JSON_PROPERTY_RESULT = "result";
  private JsonNullable result = JsonNullable.undefined();

  public static final String JSON_PROPERTY_CALCULATIONID = "calculationid";
  private JsonNullable calculationid = JsonNullable.undefined();

  public static final String JSON_PROPERTY_UNITID = "unitid";
  private JsonNullable unitid = JsonNullable.undefined();

  /**
   * The status of commentary generation.
   */
  public enum StatusEnum {
    EXECUTING("Executing"),
    
    SUCCESS("Success");

    private String value;

    StatusEnum(String value) {
      this.value = value;
    }

    @JsonValue
    public String getValue() {
      return value;
    }

    @Override
    public String toString() {
      return String.valueOf(value);
    }

    @JsonCreator
    public static StatusEnum fromValue(String value) {
      for (StatusEnum b : StatusEnum.values()) {
        if (b.value.equals(value)) {
          return b;
        }
      }
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
    }
  }

  public static final String JSON_PROPERTY_STATUS = "status";
  private StatusEnum status;

  public PACommentaryStatus() { 
  }

  public PACommentaryStatus result(String result) {
    this.result = JsonNullable.of(result);
    return this;
  }

   /**
   * The result url of the generated commentary.
   * @return result
  **/
  @jakarta.annotation.Nullable
  @ApiModelProperty(value = "The result url of the generated commentary.")
  @JsonIgnore

  public String getResult() {
        return result.orElse(null);
  }

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

  public JsonNullable getResult_JsonNullable() {
    return result;
  }
  
  @JsonProperty(JSON_PROPERTY_RESULT)
  public void setResult_JsonNullable(JsonNullable result) {
    this.result = result;
  }

  public void setResult(String result) {
    this.result = JsonNullable.of(result);
  }


  public PACommentaryStatus calculationid(String calculationid) {
    this.calculationid = JsonNullable.of(calculationid);
    return this;
  }

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

  public String getCalculationid() {
        return calculationid.orElse(null);
  }

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

  public JsonNullable getCalculationid_JsonNullable() {
    return calculationid;
  }
  
  @JsonProperty(JSON_PROPERTY_CALCULATIONID)
  public void setCalculationid_JsonNullable(JsonNullable calculationid) {
    this.calculationid = calculationid;
  }

  public void setCalculationid(String calculationid) {
    this.calculationid = JsonNullable.of(calculationid);
  }


  public PACommentaryStatus unitid(String unitid) {
    this.unitid = JsonNullable.of(unitid);
    return this;
  }

   /**
   * Calculation unit id.
   * @return unitid
  **/
  @jakarta.annotation.Nullable
  @ApiModelProperty(value = "Calculation unit id.")
  @JsonIgnore

  public String getUnitid() {
        return unitid.orElse(null);
  }

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

  public JsonNullable getUnitid_JsonNullable() {
    return unitid;
  }
  
  @JsonProperty(JSON_PROPERTY_UNITID)
  public void setUnitid_JsonNullable(JsonNullable unitid) {
    this.unitid = unitid;
  }

  public void setUnitid(String unitid) {
    this.unitid = JsonNullable.of(unitid);
  }


  public PACommentaryStatus status(StatusEnum status) {
    this.status = status;
    return this;
  }

   /**
   * The status of commentary generation.
   * @return status
  **/
  @jakarta.annotation.Nullable
  @ApiModelProperty(value = "The status of commentary generation.")
  @JsonProperty(JSON_PROPERTY_STATUS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public StatusEnum getStatus() {
    return status;
  }


  @JsonProperty(JSON_PROPERTY_STATUS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setStatus(StatusEnum status) {
    this.status = status;
  }


  /**
   * Return true if this PACommentaryStatus object is equal to o.
   */
  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    PACommentaryStatus paCommentaryStatus = (PACommentaryStatus) o;
    return equalsNullable(this.result, paCommentaryStatus.result) &&
        equalsNullable(this.calculationid, paCommentaryStatus.calculationid) &&
        equalsNullable(this.unitid, paCommentaryStatus.unitid) &&
        Objects.equals(this.status, paCommentaryStatus.status);
  }

  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(result), hashCodeNullable(calculationid), hashCodeNullable(unitid), status);
  }

  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 PACommentaryStatus {\n");
    sb.append("    result: ").append(toIndentedString(result)).append("\n");
    sb.append("    calculationid: ").append(toIndentedString(calculationid)).append("\n");
    sb.append("    unitid: ").append(toIndentedString(unitid)).append("\n");
    sb.append("    status: ").append(toIndentedString(status)).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