Record Class FestivalRequest
java.lang.Object
java.lang.Record
org.localify.festival.dto.request.FestivalRequest
- Record Components:
name- The name of the festival.nickname- The nickname of the festival.description- The description of the festival.startDate- The start date of the festival.endDate- The end date of the festival.timeZone- The time zone of the festival.address- The address of the festival.performances- A list of performances at the festival.url- The URL of the festival.scheduleUrl- The URL for the festival schedule.imageUrl- The URL for the festival image.
public record FestivalRequest(@NotNull String name, String nickname, String description, @NotNull String startDate, @NotNull String endDate, @NotNull String timeZone, String address, @NotEmpty List<FestivalPerformanceRequest> performances, String url, String scheduleUrl, String imageUrl)
extends Record
Represents a request to create or update a festival.
-
Constructor Summary
ConstructorsConstructorDescriptionFestivalRequest(@NotNull String name, String nickname, String description, @NotNull String startDate, @NotNull String endDate, @NotNull String timeZone, String address, @NotEmpty List<FestivalPerformanceRequest> performances, String url, String scheduleUrl, String imageUrl) Creates an instance of aFestivalRequestrecord class. -
Method Summary
Modifier and TypeMethodDescriptionaddress()Returns the value of theaddressrecord component.Returns the value of thedescriptionrecord component.@NotNull StringendDate()Returns the value of theendDaterecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.imageUrl()Returns the value of theimageUrlrecord component.@NotNull Stringname()Returns the value of thenamerecord component.nickname()Returns the value of thenicknamerecord component.@NotEmpty List<FestivalPerformanceRequest>Returns the value of theperformancesrecord component.Returns the value of thescheduleUrlrecord component.@NotNull StringReturns the value of thestartDaterecord component.@NotNull StringtimeZone()Returns the value of thetimeZonerecord component.final StringtoString()Returns a string representation of this record class.url()Returns the value of theurlrecord component.
-
Constructor Details
-
FestivalRequest
public FestivalRequest(@NotNull @NotNull String name, String nickname, String description, @NotNull @NotNull String startDate, @NotNull @NotNull String endDate, @NotNull @NotNull String timeZone, String address, @NotEmpty @NotEmpty List<FestivalPerformanceRequest> performances, String url, String scheduleUrl, String imageUrl) Creates an instance of aFestivalRequestrecord class.- Parameters:
name- the value for thenamerecord componentnickname- the value for thenicknamerecord componentdescription- the value for thedescriptionrecord componentstartDate- the value for thestartDaterecord componentendDate- the value for theendDaterecord componenttimeZone- the value for thetimeZonerecord componentaddress- the value for theaddressrecord componentperformances- the value for theperformancesrecord componenturl- the value for theurlrecord componentscheduleUrl- the value for thescheduleUrlrecord componentimageUrl- the value for theimageUrlrecord 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). -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
nickname
Returns the value of thenicknamerecord component.- Returns:
- the value of the
nicknamerecord component
-
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-
startDate
Returns the value of thestartDaterecord component.- Returns:
- the value of the
startDaterecord component
-
endDate
Returns the value of theendDaterecord component.- Returns:
- the value of the
endDaterecord component
-
timeZone
Returns the value of thetimeZonerecord component.- Returns:
- the value of the
timeZonerecord component
-
address
Returns the value of theaddressrecord component.- Returns:
- the value of the
addressrecord component
-
performances
Returns the value of theperformancesrecord component.- Returns:
- the value of the
performancesrecord component
-
url
Returns the value of theurlrecord component.- Returns:
- the value of the
urlrecord component
-
scheduleUrl
Returns the value of thescheduleUrlrecord component.- Returns:
- the value of the
scheduleUrlrecord component
-
imageUrl
Returns the value of theimageUrlrecord component.- Returns:
- the value of the
imageUrlrecord component
-