Record Class RedditProperties
java.lang.Object
java.lang.Record
io.github.yvasyliev.telegramforwarderbot.configuration.RedditProperties
- Record Components:
apiHost
- Reddit API host URIhost
- Reddit host URIsubreddit
- Subreddit to monitorusername
- Reddit usernameuserAgent
- User agent string for Reddit API requestsvideoDownloader
- Configuration for downloading videos from Reddit
@ConfigurationProperties(prefix="reddit")
@Validated
public record RedditProperties(@NotNull URI apiHost, @NotNull URI host, @NotBlank String subreddit, @NotBlank String username, @NotBlank String userAgent, @NotNull RedditProperties.VideoDownloader videoDownloader)
extends Record
Configuration properties for Reddit integration.
This class holds the necessary properties to connect to Reddit's API,
including the API host, subreddit, username, user agent,
and video downloader configuration.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final record
Configuration for downloading videos from Reddit. -
Constructor Summary
ConstructorsConstructorDescriptionRedditProperties
(@NotNull URI apiHost, @NotNull URI host, @NotBlank String subreddit, @NotBlank String username, @NotBlank String userAgent, @NotNull RedditProperties.VideoDownloader videoDownloader) Creates an instance of aRedditProperties
record class. -
Method Summary
Modifier and TypeMethodDescription@NotNull URI
apiHost()
Returns the value of theapiHost
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.@NotNull URI
host()
Returns the value of thehost
record component.@NotBlank String
Returns the value of thesubreddit
record component.final String
toString()
Returns a string representation of this record class.@NotBlank String
Returns the value of theuserAgent
record component.@NotBlank String
username()
Returns the value of theusername
record component.@NotNull RedditProperties.VideoDownloader
Returns the value of thevideoDownloader
record component.
-
Constructor Details
-
RedditProperties
public RedditProperties(@NotNull @NotNull URI apiHost, @NotNull @NotNull URI host, @NotBlank @NotBlank String subreddit, @NotBlank @NotBlank String username, @NotBlank @NotBlank String userAgent, @Validated @NotNull @NotNull RedditProperties.VideoDownloader videoDownloader) Creates an instance of aRedditProperties
record class.- Parameters:
apiHost
- the value for theapiHost
record componenthost
- the value for thehost
record componentsubreddit
- the value for thesubreddit
record componentusername
- the value for theusername
record componentuserAgent
- the value for theuserAgent
record componentvideoDownloader
- the value for thevideoDownloader
record component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object)
. -
apiHost
Returns the value of theapiHost
record component.- Returns:
- the value of the
apiHost
record component
-
host
Returns the value of thehost
record component.- Returns:
- the value of the
host
record component
-
subreddit
Returns the value of thesubreddit
record component.- Returns:
- the value of the
subreddit
record component
-
username
Returns the value of theusername
record component.- Returns:
- the value of the
username
record component
-
userAgent
Returns the value of theuserAgent
record component.- Returns:
- the value of the
userAgent
record component
-
videoDownloader
Returns the value of thevideoDownloader
record component.- Returns:
- the value of the
videoDownloader
record component
-