Class JsonFeedAttachment

java.lang.Object
io.micronaut.rss.jsonfeed.JsonFeedAttachment

@Introspected public class JsonFeedAttachment extends Object
Related resource for a JSON Feed item. Podcasts, for instance, would include an attachment that’s an audio or video file.
Since:
2.2.0
Author:
Sergio del Amo, mark1626
See Also:
  • Field Details

  • Method Details

    • builder

      public static JsonFeedAttachment.Builder builder(@NonNull @NonNull String url, @NonNull @NonNull String mimeType)
      Gets a Builder with the required fields.
      Parameters:
      url - the location of the attachment
      mimeType - mime type of the attachment
      Returns:
      The Builder
    • builder

      public static JsonFeedAttachment.Builder builder()
      Gets a Builder with the required fields.
      Returns:
      The Builder
    • getUrl

      @NonNull public @NonNull String getUrl()
      Location of the attachment.
      Returns:
      location of the attachment
    • setUrl

      public void setUrl(@NonNull @NonNull String url)
      Specifies the location of the attachment.
      Parameters:
      url - the location of the attachment
    • getMimeType

      @NonNull public @NonNull String getMimeType()
      Mime type of the attachment.
      Returns:
      mime type of the attachment
    • setMimeType

      public void setMimeType(@NonNull @NonNull String mimeType)
      Mime type of the attachment.
      Parameters:
      mimeType - mime type of the attachment
    • getTitle

      @Nullable public @Nullable String getTitle()
      Name of the attachment.
      Returns:
      name of the attachment
    • setTitle

      public void setTitle(@Nullable @Nullable String title)
      Name of the attachment.
      Parameters:
      title - name of the attachment
    • getSizeInBytes

      @Nullable public @Nullable Long getSizeInBytes()
      Specifies how large the file is in bytes.
      Returns:
      specifies how large the file is in bytes
    • setSizeInBytes

      public void setSizeInBytes(@Nullable @Nullable Long sizeInBytes)
      Specifies how large the file is in bytes.
      Parameters:
      sizeInBytes - specifies how large the file is in bytes
    • getDurationInSeconds

      @Nullable public @Nullable Integer getDurationInSeconds()
      Specifies how long it takes to listen to or watch, when played at normal speed.
      Returns:
      specifies duration of the attachment
    • setDurationInSeconds

      public void setDurationInSeconds(@Nullable @Nullable Integer durationInSeconds)
      Specifies how long it takes to listen to or watch, when played at normal speed.
      Parameters:
      durationInSeconds - duration of the attachment
    • toMap

      @NonNull public @NonNull Map<String,Object> toMap()
      Returns:
      a Map representation of a JSON Feed Author.