Package markets.alpaca.client.ws.model
Record Class NewsArticle
java.lang.Object
java.lang.Record
markets.alpaca.client.ws.model.NewsArticle
- Record Components:
id- unique news article IDheadline- headline or title of the articlesummary- summary text (may be the first sentence of the content)- original authorcreatedAt- publication timestamp (RFC-3339)updatedAt- last update timestamp (RFC-3339)url- URL of the article (may be null)content- full article content, may contain HTML (may be null)symbols- related stock or crypto symbolssource- news source identifier (e.g."benzinga")
public record NewsArticle(long id, String headline, String summary, String author, String createdAt, String updatedAt, String url, String content, List<String> symbols, String source)
extends Record
A real-time news article event (
T: "n").-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionauthor()Returns the value of theauthorrecord component.content()Returns the value of thecontentrecord component.Returns the value of thecreatedAtrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.headline()Returns the value of theheadlinerecord component.longid()Returns the value of theidrecord component.source()Returns the value of thesourcerecord component.summary()Returns the value of thesummaryrecord component.symbols()Returns the value of thesymbolsrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of theupdatedAtrecord component.url()Returns the value of theurlrecord component.
-
Constructor Details
-
NewsArticle
public NewsArticle(long id, String headline, String summary, String author, String createdAt, String updatedAt, String url, String content, List<String> symbols, String source) Creates an instance of aNewsArticlerecord class.- Parameters:
id- the value for theidrecord componentheadline- the value for theheadlinerecord componentsummary- the value for thesummaryrecord componentauthor- the value for theauthorrecord componentcreatedAt- the value for thecreatedAtrecord componentupdatedAt- the value for theupdatedAtrecord componenturl- the value for theurlrecord componentcontent- the value for thecontentrecord componentsymbols- the value for thesymbolsrecord componentsource- the value for thesourcerecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
id
@SerializedName("id") public long id()Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
headline
Returns the value of theheadlinerecord component.- Returns:
- the value of the
headlinerecord component
-
summary
Returns the value of thesummaryrecord component.- Returns:
- the value of the
summaryrecord component
-
author
Returns the value of theauthorrecord component.- Returns:
- the value of the
authorrecord component
-
createdAt
Returns the value of thecreatedAtrecord component.- Returns:
- the value of the
createdAtrecord component
-
updatedAt
Returns the value of theupdatedAtrecord component.- Returns:
- the value of the
updatedAtrecord component
-
url
Returns the value of theurlrecord component.- Returns:
- the value of the
urlrecord component
-
content
Returns the value of thecontentrecord component.- Returns:
- the value of the
contentrecord component
-
symbols
Returns the value of thesymbolsrecord component.- Returns:
- the value of the
symbolsrecord component
-
source
Returns the value of thesourcerecord component.- Returns:
- the value of the
sourcerecord component
-