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

com.factset.sdk.StreetAccountNews.models.HeadlinesRequestData Maven / Gradle / Ivy

The newest version!
/*
 * StreetAccount News API
 * The StreetAccount News API provides access to FactSet's proprietary news provider, StreetAccount. StreetAccount, is a premium real-time market intelligence news service that delivers comprehensive U.S., Canadian, and European coverage (and expanding Asia coverage). All possible sources for corporate news are scanned and key story facts are highlighted and presented in an easy-to-read format.  **StreetAccount Filters, Headlines, and Views:**  These endpoints allow for the retrieval of news headlines using filters such as Watchlists/Indices/Tickers, Categories (the equivalent of 'Subjects' within the Workstation), Market Topics, Regions, and Sectors.  Headlines can also be retrieved based on saved views within the Workstation.
 *
 * The version of the OpenAPI document: 1.0.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.StreetAccountNews.models;

import java.util.Objects;
import java.util.Arrays;
import java.util.Map;
import java.util.HashMap;
import com.factset.sdk.StreetAccountNews.models.HeadlinesRequestDataSearchTime;
import com.factset.sdk.StreetAccountNews.models.HeadlinesRequestTickersObject;
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.StreetAccountNews.JSON;


/**
 * HeadlinesRequestData
 */
@JsonPropertyOrder({
  HeadlinesRequestData.JSON_PROPERTY_TICKERS,
  HeadlinesRequestData.JSON_PROPERTY_IS_PRIMARY,
  HeadlinesRequestData.JSON_PROPERTY_CATEGORIES,
  HeadlinesRequestData.JSON_PROPERTY_TOPICS,
  HeadlinesRequestData.JSON_PROPERTY_REGIONS,
  HeadlinesRequestData.JSON_PROPERTY_SECTORS,
  HeadlinesRequestData.JSON_PROPERTY_PREDEFINED_RANGE,
  HeadlinesRequestData.JSON_PROPERTY_SEARCH_TIME
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")

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

  public static final String JSON_PROPERTY_TICKERS = "tickers";
  private java.util.List tickers = null;

  public static final String JSON_PROPERTY_IS_PRIMARY = "isPrimary";
  private Boolean isPrimary;

  public static final String JSON_PROPERTY_CATEGORIES = "categories";
  private java.util.List categories = null;

  public static final String JSON_PROPERTY_TOPICS = "topics";
  private java.util.List topics = null;

  public static final String JSON_PROPERTY_REGIONS = "regions";
  private java.util.List regions = null;

  public static final String JSON_PROPERTY_SECTORS = "sectors";
  private java.util.List sectors = null;

  /**
   * see list of valid date ranges. Date range is mutually exclusive to start/end time
   */
  public enum PredefinedRangeEnum {
    TODAY("today"),
    
    TWODAYS("twoDays"),
    
    ONEWEEK("oneWeek"),
    
    ONEMONTH("oneMonth"),
    
    THREEMONTHS("threeMonths"),
    
    SIXMONTHS("sixMonths"),
    
    ONEYEAR("oneYear"),
    
    THREEYEARS("threeYears"),
    
    FIVEYEARS("fiveYears"),
    
    TENYEARS("tenYears"),
    
    ALLAVAILABLE("allAvailable");

    private String value;

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

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

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

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

  public static final String JSON_PROPERTY_PREDEFINED_RANGE = "predefinedRange";
  private PredefinedRangeEnum predefinedRange;

  public static final String JSON_PROPERTY_SEARCH_TIME = "searchTime";
  private HeadlinesRequestDataSearchTime searchTime;

  public HeadlinesRequestData() { 
  }

  public HeadlinesRequestData tickers(java.util.List tickers) {
    this.tickers = tickers;
    return this;
  }

  public HeadlinesRequestData addTickersItem(HeadlinesRequestTickersObject tickersItem) {
    if (this.tickers == null) {
      this.tickers = new java.util.ArrayList<>();
    }
    this.tickers.add(tickersItem);
    return this;
  }

   /**
   * List of tickers to filter the headlines. Each ticker is an object.
   * @return tickers
  **/
  @jakarta.annotation.Nullable
  @ApiModelProperty(value = "List of tickers to filter the headlines. Each ticker is an object.")
  @JsonProperty(JSON_PROPERTY_TICKERS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public java.util.List getTickers() {
    return tickers;
  }


  @JsonProperty(JSON_PROPERTY_TICKERS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setTickers(java.util.List tickers) {
    this.tickers = tickers;
  }


  public HeadlinesRequestData isPrimary(Boolean isPrimary) {
    this.isPrimary = isPrimary;
    return this;
  }

   /**
   * If true, then only stories with the provided ticker as a primary symbol will be returned. Otherwise, all stories with the ticker as a primary symbol or related symbol will be returned 
   * @return isPrimary
  **/
  @jakarta.annotation.Nullable
  @ApiModelProperty(example = "true", value = "If true, then only stories with the provided ticker as a primary symbol will be returned. Otherwise, all stories with the ticker as a primary symbol or related symbol will be returned ")
  @JsonProperty(JSON_PROPERTY_IS_PRIMARY)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public Boolean getIsPrimary() {
    return isPrimary;
  }


  @JsonProperty(JSON_PROPERTY_IS_PRIMARY)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setIsPrimary(Boolean isPrimary) {
    this.isPrimary = isPrimary;
  }


  public HeadlinesRequestData categories(java.util.List categories) {
    this.categories = categories;
    return this;
  }

  public HeadlinesRequestData addCategoriesItem(String categoriesItem) {
    if (this.categories == null) {
      this.categories = new java.util.ArrayList<>();
    }
    this.categories.add(categoriesItem);
    return this;
  }

   /**
   * A list of categories used to filter the headlines. Categories are define the nature or topic of the headlines, such as \"Earnings\". Use the `/filters/categories` endpoint to get the list of available categories.
   * @return categories
  **/
  @jakarta.annotation.Nullable
  @ApiModelProperty(value = "A list of categories used to filter the headlines. Categories are define the nature or topic of the headlines, such as \"Earnings\". Use the `/filters/categories` endpoint to get the list of available categories.")
  @JsonProperty(JSON_PROPERTY_CATEGORIES)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public java.util.List getCategories() {
    return categories;
  }


  @JsonProperty(JSON_PROPERTY_CATEGORIES)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setCategories(java.util.List categories) {
    this.categories = categories;
  }


  public HeadlinesRequestData topics(java.util.List topics) {
    this.topics = topics;
    return this;
  }

  public HeadlinesRequestData addTopicsItem(String topicsItem) {
    if (this.topics == null) {
      this.topics = new java.util.ArrayList<>();
    }
    this.topics.add(topicsItem);
    return this;
  }

   /**
   * A list of topics used to filter the headlines. Topics represent specific subjects or themes associated with the headlines, such as \"Market Summaries\". Use the `/filters/topics` endpoint to get the list of available topics.
   * @return topics
  **/
  @jakarta.annotation.Nullable
  @ApiModelProperty(value = "A list of topics used to filter the headlines. Topics represent specific subjects or themes associated with the headlines, such as \"Market Summaries\". Use the `/filters/topics` endpoint to get the list of available topics.")
  @JsonProperty(JSON_PROPERTY_TOPICS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public java.util.List getTopics() {
    return topics;
  }


  @JsonProperty(JSON_PROPERTY_TOPICS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setTopics(java.util.List topics) {
    this.topics = topics;
  }


  public HeadlinesRequestData regions(java.util.List regions) {
    this.regions = regions;
    return this;
  }

  public HeadlinesRequestData addRegionsItem(String regionsItem) {
    if (this.regions == null) {
      this.regions = new java.util.ArrayList<>();
    }
    this.regions.add(regionsItem);
    return this;
  }

   /**
   * A list of regions used to filter the headlines. Regions specify the geographical location or market to which the headlines are relevant, for example, \"North America\". Use the `/filters/regions` endpoint to get the list of available regions.
   * @return regions
  **/
  @jakarta.annotation.Nullable
  @ApiModelProperty(value = "A list of regions used to filter the headlines. Regions specify the geographical location or market to which the headlines are relevant, for example, \"North America\". Use the `/filters/regions` endpoint to get the list of available regions.")
  @JsonProperty(JSON_PROPERTY_REGIONS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public java.util.List getRegions() {
    return regions;
  }


  @JsonProperty(JSON_PROPERTY_REGIONS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setRegions(java.util.List regions) {
    this.regions = regions;
  }


  public HeadlinesRequestData sectors(java.util.List sectors) {
    this.sectors = sectors;
    return this;
  }

  public HeadlinesRequestData addSectorsItem(String sectorsItem) {
    if (this.sectors == null) {
      this.sectors = new java.util.ArrayList<>();
    }
    this.sectors.add(sectorsItem);
    return this;
  }

   /**
   * A list of sectors used to filter the headlines. Sectors are segments or divisions of the economy or market provided by StreetAccount, such as \"Financial\". Use the `/filters/sectors`endpoint to get the list of available sectors.
   * @return sectors
  **/
  @jakarta.annotation.Nullable
  @ApiModelProperty(value = "A list of sectors used to filter the headlines. Sectors are segments or divisions of the economy or market provided by StreetAccount, such as \"Financial\". Use the `/filters/sectors`endpoint to get the list of available sectors.")
  @JsonProperty(JSON_PROPERTY_SECTORS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public java.util.List getSectors() {
    return sectors;
  }


  @JsonProperty(JSON_PROPERTY_SECTORS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setSectors(java.util.List sectors) {
    this.sectors = sectors;
  }


  public HeadlinesRequestData predefinedRange(PredefinedRangeEnum predefinedRange) {
    this.predefinedRange = predefinedRange;
    return this;
  }

   /**
   * see list of valid date ranges. Date range is mutually exclusive to start/end time
   * @return predefinedRange
  **/
  @jakarta.annotation.Nullable
  @ApiModelProperty(value = "see list of valid date ranges. Date range is mutually exclusive to start/end time")
  @JsonProperty(JSON_PROPERTY_PREDEFINED_RANGE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public PredefinedRangeEnum getPredefinedRange() {
    return predefinedRange;
  }


  @JsonProperty(JSON_PROPERTY_PREDEFINED_RANGE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setPredefinedRange(PredefinedRangeEnum predefinedRange) {
    this.predefinedRange = predefinedRange;
  }


  public HeadlinesRequestData searchTime(HeadlinesRequestDataSearchTime searchTime) {
    this.searchTime = searchTime;
    return this;
  }

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

  public HeadlinesRequestDataSearchTime getSearchTime() {
    return searchTime;
  }


  @JsonProperty(JSON_PROPERTY_SEARCH_TIME)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setSearchTime(HeadlinesRequestDataSearchTime searchTime) {
    this.searchTime = searchTime;
  }


  /**
   * Return true if this HeadlinesRequest_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;
    }
    HeadlinesRequestData headlinesRequestData = (HeadlinesRequestData) o;
    return Objects.equals(this.tickers, headlinesRequestData.tickers) &&
        Objects.equals(this.isPrimary, headlinesRequestData.isPrimary) &&
        Objects.equals(this.categories, headlinesRequestData.categories) &&
        Objects.equals(this.topics, headlinesRequestData.topics) &&
        Objects.equals(this.regions, headlinesRequestData.regions) &&
        Objects.equals(this.sectors, headlinesRequestData.sectors) &&
        Objects.equals(this.predefinedRange, headlinesRequestData.predefinedRange) &&
        Objects.equals(this.searchTime, headlinesRequestData.searchTime);
  }

  @Override
  public int hashCode() {
    return Objects.hash(tickers, isPrimary, categories, topics, regions, sectors, predefinedRange, searchTime);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class HeadlinesRequestData {\n");
    sb.append("    tickers: ").append(toIndentedString(tickers)).append("\n");
    sb.append("    isPrimary: ").append(toIndentedString(isPrimary)).append("\n");
    sb.append("    categories: ").append(toIndentedString(categories)).append("\n");
    sb.append("    topics: ").append(toIndentedString(topics)).append("\n");
    sb.append("    regions: ").append(toIndentedString(regions)).append("\n");
    sb.append("    sectors: ").append(toIndentedString(sectors)).append("\n");
    sb.append("    predefinedRange: ").append(toIndentedString(predefinedRange)).append("\n");
    sb.append("    searchTime: ").append(toIndentedString(searchTime)).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