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

com.factset.sdk.UniversalScreening.models.ResourceStatusResponseData Maven / Gradle / Ivy

/*
 * Universal Screening API
 * Through the Universal Screening API, you can access the power of FactSet's Universal Screening Application. Calculate and return the results of your saved Universal Screens.
 *
 * The version of the OpenAPI document: 2.0.2
 * 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.UniversalScreening.models;

import java.util.Objects;
import java.util.Arrays;
import java.util.Map;
import java.util.HashMap;
import com.factset.sdk.UniversalScreening.models.ErrorObject;
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 java.io.Serializable;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.factset.sdk.UniversalScreening.JSON;


/**
 * Information about the status of the long-running job.
 */
@ApiModel(description = "Information about the status of the long-running job.")
@JsonPropertyOrder({
  ResourceStatusResponseData.JSON_PROPERTY_ERROR,
  ResourceStatusResponseData.JSON_PROPERTY_ID,
  ResourceStatusResponseData.JSON_PROPERTY_STATUS
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")

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

  public static final String JSON_PROPERTY_ERROR = "error";
  private ErrorObject error;

  public static final String JSON_PROPERTY_ID = "id";
  private java.util.UUID id;

  /**
   * Current status of the job.\\ `queued`: The job has not started.\\ `executing`: The job is in progress.\\ `created`: The job completed successfully.\\ `failed`: The job failed. See the `error` property for more information.\\ `cancelled`: The job was cancelled before it could finish.
   */
  public enum StatusEnum {
    QUEUED("queued"),
    
    EXECUTING("executing"),
    
    CREATED("created"),
    
    FAILED("failed"),
    
    CANCELLED("cancelled");

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

  public ResourceStatusResponseData error(ErrorObject error) {
    this.error = error;
    return this;
  }

   /**
   * Get error
   * @return error
  **/
  @jakarta.annotation.Nullable
  @ApiModelProperty(value = "")
  @JsonProperty(JSON_PROPERTY_ERROR)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public ErrorObject getError() {
    return error;
  }


  @JsonProperty(JSON_PROPERTY_ERROR)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setError(ErrorObject error) {
    this.error = error;
  }


  public ResourceStatusResponseData id(java.util.UUID id) {
    this.id = id;
    return this;
  }

   /**
   * ID of the submitted job
   * @return id
  **/
  @jakarta.annotation.Nullable
  @ApiModelProperty(example = "123e4567-e89b-12d3-a456-426655440002", value = "ID of the submitted job")
  @JsonProperty(JSON_PROPERTY_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public java.util.UUID getId() {
    return id;
  }


  @JsonProperty(JSON_PROPERTY_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setId(java.util.UUID id) {
    this.id = id;
  }


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

   /**
   * Current status of the job.\\ `queued`: The job has not started.\\ `executing`: The job is in progress.\\ `created`: The job completed successfully.\\ `failed`: The job failed. See the `error` property for more information.\\ `cancelled`: The job was cancelled before it could finish.
   * @return status
  **/
  @jakarta.annotation.Nullable
  @ApiModelProperty(example = "queued", value = "Current status of the job.\\ `queued`: The job has not started.\\ `executing`: The job is in progress.\\ `created`: The job completed successfully.\\ `failed`: The job failed. See the `error` property for more information.\\ `cancelled`: The job was cancelled before it could finish.")
  @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 ResourceStatusResponse_data object is equal to o.
   */
  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    ResourceStatusResponseData resourceStatusResponseData = (ResourceStatusResponseData) o;
    return Objects.equals(this.error, resourceStatusResponseData.error) &&
        Objects.equals(this.id, resourceStatusResponseData.id) &&
        Objects.equals(this.status, resourceStatusResponseData.status);
  }

  @Override
  public int hashCode() {
    return Objects.hash(error, id, status);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class ResourceStatusResponseData {\n");
    sb.append("    error: ").append(toIndentedString(error)).append("\n");
    sb.append("    id: ").append(toIndentedString(id)).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