Package io.micronaut.rss.jsonfeed
Class JsonFeedAttachment
java.lang.Object
io.micronaut.rss.jsonfeed.JsonFeedAttachment
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:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
JSON Feed Attachment Builder. -
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic JsonFeedAttachment.Builder
builder()
Gets a Builder with the required fields.static JsonFeedAttachment.Builder
Gets a Builder with the required fields.@Nullable Integer
Specifies how long it takes to listen to or watch, when played at normal speed.@NonNull String
Mime type of the attachment.@Nullable Long
Specifies how large the file is in bytes.@Nullable String
getTitle()
Name of the attachment.@NonNull String
getUrl()
Location of the attachment.void
setDurationInSeconds
(@Nullable Integer durationInSeconds) Specifies how long it takes to listen to or watch, when played at normal speed.void
setMimeType
(@NonNull String mimeType) Mime type of the attachment.void
setSizeInBytes
(@Nullable Long sizeInBytes) Specifies how large the file is in bytes.void
Name of the attachment.void
Specifies the location of the attachment.toMap()
-
Field Details
-
KEY_URL
- See Also:
-
KEY_MIME_TYPE
- See Also:
-
KEY_TITLE
- See Also:
-
KEY_SIZE_IN_BYTES
- See Also:
-
KEY_DURATION_IN_SECONDS
- See Also:
-
-
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 attachmentmimeType
- mime type of the attachment- Returns:
- The Builder
-
builder
Gets a Builder with the required fields.- Returns:
- The Builder
-
getUrl
Location of the attachment.- Returns:
- location of the attachment
-
setUrl
Specifies the location of the attachment.- Parameters:
url
- the location of the attachment
-
getMimeType
Mime type of the attachment.- Returns:
- mime type of the attachment
-
setMimeType
Mime type of the attachment.- Parameters:
mimeType
- mime type of the attachment
-
getTitle
Name of the attachment.- Returns:
- name of the attachment
-
setTitle
Name of the attachment.- Parameters:
title
- name of the attachment
-
getSizeInBytes
Specifies how large the file is in bytes.- Returns:
- specifies how large the file is in bytes
-
setSizeInBytes
Specifies how large the file is in bytes.- Parameters:
sizeInBytes
- specifies how large the file is in bytes
-
getDurationInSeconds
Specifies how long it takes to listen to or watch, when played at normal speed.- Returns:
- specifies duration of the attachment
-
setDurationInSeconds
Specifies how long it takes to listen to or watch, when played at normal speed.- Parameters:
durationInSeconds
- duration of the attachment
-
toMap
- Returns:
- a Map representation of a JSON Feed Author.
-