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

net.jacobpeterson.domain.polygon.historicquotes.HistoricQuotesResponse Maven / Gradle / Ivy


package net.jacobpeterson.domain.polygon.historicquotes;

import java.io.Serializable;
import java.util.ArrayList;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;


/**
 * See https://polygon.io/docs/#!/Stocks--Equities/get_v2_ticks_stocks_nbbo_ticker_date
 * 

* * */ public class HistoricQuotesResponse implements Serializable { /** * Total number of results in this response *

* * */ @SerializedName("results_count") @Expose private Integer resultsCount; /** * Milliseconds of latency for the query results from DB *

* * */ @SerializedName("db_latency") @Expose private Integer dbLatency; /** * If this query was executed successfully *

* * */ @SerializedName("success") @Expose private Boolean success; /** * Ticker symbol that was evaluated from the request *

* * */ @SerializedName("ticker") @Expose private String ticker; /** * results *

* * */ @SerializedName("results") @Expose private ArrayList results; private final static long serialVersionUID = -2227969060125469206L; /** * No args constructor for use in serialization * */ public HistoricQuotesResponse() { } /** * * @param dbLatency * @param ticker * @param success * @param resultsCount * @param results */ public HistoricQuotesResponse(Integer resultsCount, Integer dbLatency, Boolean success, String ticker, ArrayList results) { super(); this.resultsCount = resultsCount; this.dbLatency = dbLatency; this.success = success; this.ticker = ticker; this.results = results; } /** * Total number of results in this response *

* * */ public Integer getResultsCount() { return resultsCount; } /** * Total number of results in this response *

* * */ public void setResultsCount(Integer resultsCount) { this.resultsCount = resultsCount; } /** * Milliseconds of latency for the query results from DB *

* * */ public Integer getDbLatency() { return dbLatency; } /** * Milliseconds of latency for the query results from DB *

* * */ public void setDbLatency(Integer dbLatency) { this.dbLatency = dbLatency; } /** * If this query was executed successfully *

* * */ public Boolean getSuccess() { return success; } /** * If this query was executed successfully *

* * */ public void setSuccess(Boolean success) { this.success = success; } /** * Ticker symbol that was evaluated from the request *

* * */ public String getTicker() { return ticker; } /** * Ticker symbol that was evaluated from the request *

* * */ public void setTicker(String ticker) { this.ticker = ticker; } /** * results *

* * */ public ArrayList getResults() { return results; } /** * results *

* * */ public void setResults(ArrayList results) { this.results = results; } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append(HistoricQuotesResponse.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); sb.append("resultsCount"); sb.append('='); sb.append(((this.resultsCount == null)?"":this.resultsCount)); sb.append(','); sb.append("dbLatency"); sb.append('='); sb.append(((this.dbLatency == null)?"":this.dbLatency)); sb.append(','); sb.append("success"); sb.append('='); sb.append(((this.success == null)?"":this.success)); sb.append(','); sb.append("ticker"); sb.append('='); sb.append(((this.ticker == null)?"":this.ticker)); sb.append(','); sb.append("results"); sb.append('='); sb.append(((this.results == null)?"":this.results)); sb.append(','); if (sb.charAt((sb.length()- 1)) == ',') { sb.setCharAt((sb.length()- 1), ']'); } else { sb.append(']'); } return sb.toString(); } @Override public int hashCode() { int result = 1; result = ((result* 31)+((this.dbLatency == null)? 0 :this.dbLatency.hashCode())); result = ((result* 31)+((this.ticker == null)? 0 :this.ticker.hashCode())); result = ((result* 31)+((this.results == null)? 0 :this.results.hashCode())); result = ((result* 31)+((this.success == null)? 0 :this.success.hashCode())); result = ((result* 31)+((this.resultsCount == null)? 0 :this.resultsCount.hashCode())); return result; } @Override public boolean equals(Object other) { if (other == this) { return true; } if ((other instanceof HistoricQuotesResponse) == false) { return false; } HistoricQuotesResponse rhs = ((HistoricQuotesResponse) other); return ((((((this.dbLatency == rhs.dbLatency)||((this.dbLatency!= null)&&this.dbLatency.equals(rhs.dbLatency)))&&((this.ticker == rhs.ticker)||((this.ticker!= null)&&this.ticker.equals(rhs.ticker))))&&((this.results == rhs.results)||((this.results!= null)&&this.results.equals(rhs.results))))&&((this.success == rhs.success)||((this.success!= null)&&this.success.equals(rhs.success))))&&((this.resultsCount == rhs.resultsCount)||((this.resultsCount!= null)&&this.resultsCount.equals(rhs.resultsCount)))); } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy