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
Nested ClassesModifier and TypeClassDescriptionstatic final classJSON Feed Attachment Builder. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic JsonFeedAttachment.Builderbuilder()Gets a Builder with the required fields.static JsonFeedAttachment.BuilderGets a Builder with the required fields.@Nullable IntegerSpecifies how long it takes to listen to or watch, when played at normal speed.@NonNull StringMime type of the attachment.@Nullable LongSpecifies how large the file is in bytes.@Nullable StringgetTitle()Name of the attachment.@NonNull StringgetUrl()Location of the attachment.voidsetDurationInSeconds(@Nullable Integer durationInSeconds) Specifies how long it takes to listen to or watch, when played at normal speed.voidsetMimeType(@NonNull String mimeType) Mime type of the attachment.voidsetSizeInBytes(@Nullable Long sizeInBytes) Specifies how large the file is in bytes.voidName of the attachment.voidSpecifies 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.
-