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:
  • Field Details

  • Constructor Details

    • News

      public News()
  • Method Details

    • author

      public News author(@Nonnull String author)
    • getAuthor

      @Nonnull public String getAuthor()
      Original author of news article.
      Returns:
      author
    • setAuthor

      public void setAuthor(@Nonnull String author)
    • content

      public News content(@Nonnull String content)
    • getContent

      @Nonnull public String getContent()
      Content of the news article (might contain HTML).
      Returns:
      content
    • setContent

      public void setContent(@Nonnull String content)
    • createdAt

      public News createdAt(@Nonnull OffsetDateTime createdAt)
    • getCreatedAt

      @Nonnull public OffsetDateTime getCreatedAt()
      Date article was created (RFC-3339).
      Returns:
      createdAt
    • setCreatedAt

      public void setCreatedAt(@Nonnull OffsetDateTime createdAt)
    • headline

      public News headline(@Nonnull String headline)
    • getHeadline

      @Nonnull public String getHeadline()
      Headline or title of the article.
      Returns:
      headline
    • setHeadline

      public void setHeadline(@Nonnull String headline)
    • id

      public News id(@Nonnull Long id)
    • getId

      @Nonnull public Long getId()
      News article ID.
      Returns:
      id
    • setId

      public void setId(@Nonnull Long id)
    • images

      public News images(@Nonnull Set<NewsImage> images)
    • addImagesItem

      public News addImagesItem(NewsImage imagesItem)
    • getImages

      @Nonnull public Set<NewsImage> getImages()
      List of images (URLs) related to given article (may be empty).
      Returns:
      images
    • setImages

      public void setImages(@Nonnull Set<NewsImage> images)
    • source

      public News source(@Nonnull String source)
    • getSource

      @Nonnull public String getSource()
      Source where the news originated from (e.g. Benzinga).
      Returns:
      source
    • setSource

      public void setSource(@Nonnull String source)
    • summary

      public News summary(@Nonnull String summary)
    • getSummary

      @Nonnull public String getSummary()
      Summary text for the article (may be first sentence of content).
      Returns:
      summary
    • setSummary

      public void setSummary(@Nonnull String summary)
    • symbols

      public News symbols(@Nonnull List<String> symbols)
    • addSymbolsItem

      public News addSymbolsItem(String symbolsItem)
    • getSymbols

      @Nonnull public List<String> getSymbols()
      List of related or mentioned symbols.
      Returns:
      symbols
    • setSymbols

      public void setSymbols(@Nonnull List<String> symbols)
    • updatedAt

      public News updatedAt(@Nonnull OffsetDateTime updatedAt)
    • getUpdatedAt

      @Nonnull public OffsetDateTime getUpdatedAt()
      Date article was updated (RFC-3339).
      Returns:
      updatedAt
    • setUpdatedAt

      public void setUpdatedAt(@Nonnull OffsetDateTime updatedAt)
    • url

      public News url(@Nullable URI url)
    • getUrl

      @Nullable public URI getUrl()
      URL of article (if applicable).
      Returns:
      url
    • setUrl

      public void setUrl(@Nullable URI url)
    • putAdditionalProperty

      public News putAdditionalProperty(String key, Object value)
      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 property
      value - value of the property
      Returns:
      the News instance itself
    • getAdditionalProperties

      public Map<String,Object> getAdditionalProperties()
      Return the additional (undeclared) property.
      Returns:
      a map of objects
    • getAdditionalProperty

      public Object getAdditionalProperty(String key)
      Return the additional (undeclared) property with the specified name.
      Parameters:
      key - name of the property
      Returns:
      an object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • validateJsonElement

      public static void validateJsonElement(com.google.gson.JsonElement jsonElement) throws IOException
      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

      public static News fromJson(String jsonString) throws IOException
      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

      public String toJson()
      Convert an instance of News to an JSON string
      Returns:
      JSON string