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

com.factset.sdk.FactSetEstimates.models.Metric Maven / Gradle / Ivy

/*
 * FactSet Estimates
 * Gain access to 20+ years of comprehensive estimates and statistics of over 250+ estimated metrics, including financial statement items, product segments, geosegments, and industry metrics. FactSet's consensus estimates are aggregated from a wide base of over 800+ contributors and cover over 19,000 active companies across 90+ countries. Data returned can be accessed on the data frequencies based on quarterly, fiscal years, and calendar years. FactSet Estimates updates on a real time basis intraday (every 5 minutes). Updating times vary based on earning season vs. non-earning season but the goal is to have the data available to the client within a few hours that FactSet receives updated information. Often times updates times can be much faster as FactSet has always been known as one of the fastest estimate providers in the market. 
 *
 * The version of the OpenAPI document: 2.5.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.FactSetEstimates.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.FactSetEstimates.JSON;


/**
 * Metric
 */
@JsonPropertyOrder({
  Metric.JSON_PROPERTY_METRIC,
  Metric.JSON_PROPERTY_NAME,
  Metric.JSON_PROPERTY_CATEGORY,
  Metric.JSON_PROPERTY_SUBCATEGORY,
  Metric.JSON_PROPERTY_OAURL
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")

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

  public static final String JSON_PROPERTY_METRIC = "metric";
  private JsonNullable metric = 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 static final String JSON_PROPERTY_SUBCATEGORY = "subcategory";
  private JsonNullable subcategory = JsonNullable.undefined();

  public static final String JSON_PROPERTY_OAURL = "OAurl";
  private JsonNullable oaurl = JsonNullable.undefined();

  public Metric() { 
  }

  public Metric metric(String metric) {
    this.metric = JsonNullable.of(metric);
    return this;
  }

   /**
   * Metric identifier to be used as `metrics` input in the FactSet Estimate endpoints.
   * @return metric
  **/
  @jakarta.annotation.Nullable
  @ApiModelProperty(example = "ASSETS", value = "Metric identifier to be used as `metrics` input in the FactSet Estimate endpoints.")
  @JsonIgnore

  public String getMetric() {
        return metric.orElse(null);
  }

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

  public JsonNullable getMetric_JsonNullable() {
    return metric;
  }
  
  @JsonProperty(JSON_PROPERTY_METRIC)
  public void setMetric_JsonNullable(JsonNullable metric) {
    this.metric = metric;
  }

  public void setMetric(String metric) {
    this.metric = JsonNullable.of(metric);
  }


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

   /**
   * Plain text name of the metric.
   * @return name
  **/
  @jakarta.annotation.Nullable
  @ApiModelProperty(example = "Total Assets", value = "Plain text name of the metric.")
  @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 Metric category(String category) {
    this.category = JsonNullable.of(category);
    return this;
  }

   /**
   * Primary Category of metric item, such as, FINANCIAL_STATEMENT or INDUSTRY_METRIC
   * @return category
  **/
  @jakarta.annotation.Nullable
  @ApiModelProperty(example = "FINANCIAL_STATEMENT", value = "Primary Category of metric item, such as, FINANCIAL_STATEMENT or INDUSTRY_METRIC")
  @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);
  }


  public Metric subcategory(String subcategory) {
    this.subcategory = JsonNullable.of(subcategory);
    return this;
  }

   /**
   * Sub-category of metric items, such as the INCOME_STATEMENT or AIRLINES.
   * @return subcategory
  **/
  @jakarta.annotation.Nullable
  @ApiModelProperty(example = "BALANCE_SHEET", value = "Sub-category of metric items, such as the INCOME_STATEMENT or AIRLINES.")
  @JsonIgnore

  public String getSubcategory() {
        return subcategory.orElse(null);
  }

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

  public JsonNullable getSubcategory_JsonNullable() {
    return subcategory;
  }
  
  @JsonProperty(JSON_PROPERTY_SUBCATEGORY)
  public void setSubcategory_JsonNullable(JsonNullable subcategory) {
    this.subcategory = subcategory;
  }

  public void setSubcategory(String subcategory) {
    this.subcategory = JsonNullable.of(subcategory);
  }


  public Metric oaurl(String oaurl) {
    this.oaurl = JsonNullable.of(oaurl);
    return this;
  }

   /**
   * The Online Assistant Page URL, used to lookup the definition and methodology of the requested item.
   * @return oaurl
  **/
  @jakarta.annotation.Nullable
  @ApiModelProperty(example = "https://my.apps.factset.com/oa/pages/16283", value = "The Online Assistant Page URL, used to lookup the definition and methodology of the requested item.")
  @JsonIgnore

  public String getOaurl() {
        return oaurl.orElse(null);
  }

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

  public JsonNullable getOaurl_JsonNullable() {
    return oaurl;
  }
  
  @JsonProperty(JSON_PROPERTY_OAURL)
  public void setOaurl_JsonNullable(JsonNullable oaurl) {
    this.oaurl = oaurl;
  }

  public void setOaurl(String oaurl) {
    this.oaurl = JsonNullable.of(oaurl);
  }


  /**
   * Return true if this metric object is equal to o.
   */
  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    Metric metric = (Metric) o;
    return equalsNullable(this.metric, metric.metric) &&
        equalsNullable(this.name, metric.name) &&
        equalsNullable(this.category, metric.category) &&
        equalsNullable(this.subcategory, metric.subcategory) &&
        equalsNullable(this.oaurl, metric.oaurl);
  }

  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(metric), hashCodeNullable(name), hashCodeNullable(category), hashCodeNullable(subcategory), hashCodeNullable(oaurl));
  }

  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 Metric {\n");
    sb.append("    metric: ").append(toIndentedString(metric)).append("\n");
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    category: ").append(toIndentedString(category)).append("\n");
    sb.append("    subcategory: ").append(toIndentedString(subcategory)).append("\n");
    sb.append("    oaurl: ").append(toIndentedString(oaurl)).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