Class News
java.lang.Object
markets.alpaca.client.openapi.data.model.News
- All Implemented Interfaces:
Serializable
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
comments="Generator version: 7.23.0")
public class News
extends Object
implements Serializable
Model representing a news article.
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddImagesItem(NewsImage imagesItem) addSymbolsItem(String symbolsItem) createdAt(OffsetDateTime createdAt) booleanstatic NewsCreate an instance of News given an JSON stringReturn the additional (undeclared) property.Return the additional (undeclared) property with the specified name.Original author of news article.Content of the news article (might contain HTML).Date article was created (RFC-3339).Headline or title of the article.getId()News article ID.List of images (URLs) related to given article (may be empty).Source where the news originated from (e.g.Summary text for the article (may be first sentence of content).List of related or mentioned symbols.Date article was updated (RFC-3339).getUrl()URL of article (if applicable).inthashCode()putAdditionalProperty(String key, Object value) Set the additional (undeclared) property with the specified name and value.voidvoidsetContent(String content) voidsetCreatedAt(OffsetDateTime createdAt) voidsetHeadline(String headline) voidvoidvoidvoidsetSummary(String summary) voidsetSymbols(List<String> symbols) voidsetUpdatedAt(OffsetDateTime updatedAt) voidtoJson()Convert an instance of News to an JSON stringtoString()updatedAt(OffsetDateTime updatedAt) static voidvalidateJsonElement(com.google.gson.JsonElement jsonElement) Validates the JSON Element and throws an exception if issues found
-
Field Details
-
SERIALIZED_NAME_AUTHOR
- See Also:
-
SERIALIZED_NAME_CONTENT
- See Also:
-
SERIALIZED_NAME_CREATED_AT
- See Also:
-
SERIALIZED_NAME_HEADLINE
- See Also:
-
SERIALIZED_NAME_ID
- See Also:
-
SERIALIZED_NAME_IMAGES
- See Also:
-
SERIALIZED_NAME_SOURCE
- See Also:
-
SERIALIZED_NAME_SUMMARY
- See Also:
-
SERIALIZED_NAME_SYMBOLS
- See Also:
-
SERIALIZED_NAME_UPDATED_AT
- See Also:
-
SERIALIZED_NAME_URL
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
News
public News()
-
-
Method Details
-
author
-
getAuthor
Original author of news article.- Returns:
- author
-
setAuthor
-
content
-
getContent
Content of the news article (might contain HTML).- Returns:
- content
-
setContent
-
createdAt
-
getCreatedAt
Date article was created (RFC-3339).- Returns:
- createdAt
-
setCreatedAt
-
headline
-
getHeadline
Headline or title of the article.- Returns:
- headline
-
setHeadline
-
id
-
getId
News article ID.- Returns:
- id
-
setId
-
images
-
addImagesItem
-
getImages
List of images (URLs) related to given article (may be empty).- Returns:
- images
-
setImages
-
source
-
getSource
Source where the news originated from (e.g. Benzinga).- Returns:
- source
-
setSource
-
summary
-
getSummary
Summary text for the article (may be first sentence of content).- Returns:
- summary
-
setSummary
-
symbols
-
addSymbolsItem
-
getSymbols
List of related or mentioned symbols.- Returns:
- symbols
-
setSymbols
-
updatedAt
-
getUpdatedAt
Date article was updated (RFC-3339).- Returns:
- updatedAt
-
setUpdatedAt
-
url
-
getUrl
URL of article (if applicable).- Returns:
- url
-
setUrl
-
putAdditionalProperty
Set the additional (undeclared) property with the specified name and value. If the property does not already exist, create it otherwise replace it.- Parameters:
key- name of the propertyvalue- value of the property- Returns:
- the News instance itself
-
getAdditionalProperties
Return the additional (undeclared) property.- Returns:
- a map of objects
-
getAdditionalProperty
Return the additional (undeclared) property with the specified name.- Parameters:
key- name of the property- Returns:
- an object
-
equals
-
hashCode
public int hashCode() -
toString
-
validateJsonElement
Validates the JSON Element and throws an exception if issues found- Parameters:
jsonElement- JSON Element- Throws:
IOException- if the JSON Element is invalid with respect to News
-
fromJson
Create an instance of News given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of News
- Throws:
IOException- if the JSON string is invalid with respect to News
-
toJson
Convert an instance of News to an JSON string- Returns:
- JSON string
-