Module it.auties.cobalt
Record Class HighlyStructuredDateTimeComponent
java.lang.Object
java.lang.Record
it.auties.whatsapp.model.button.template.highlyStructured.HighlyStructuredDateTimeComponent
- All Implemented Interfaces:
it.auties.protobuf.model.ProtobufMessage,it.auties.protobuf.model.ProtobufObject,HighlyStructuredDateTimeValue
public record HighlyStructuredDateTimeComponent(HighlyStructuredDateTimeComponent.DayOfWeek dayOfWeek, int year, int month, int dayOfMonth, int hour, int minute, HighlyStructuredDateTimeComponent.CalendarType calendar)
extends Record
implements HighlyStructuredDateTimeValue
A model class that represents a time component
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe constants of this enumerated type describe the supported calendar typesstatic enumThe constants of this enumerated type describe the days of the weekNested classes/interfaces inherited from interface it.auties.whatsapp.model.button.template.highlyStructured.HighlyStructuredDateTimeValue
HighlyStructuredDateTimeValue.Type -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final HighlyStructuredDateTimeComponent.CalendarTypeThe field for thecalendarrecord component.private final intThe field for thedayOfMonthrecord component.private final HighlyStructuredDateTimeComponent.DayOfWeekThe field for thedayOfWeekrecord component.private final intThe field for thehourrecord component.private final intThe field for theminuterecord component.private final intThe field for themonthrecord component.private final intThe field for theyearrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionHighlyStructuredDateTimeComponent(HighlyStructuredDateTimeComponent.DayOfWeek dayOfWeek, int year, int month, int dayOfMonth, int hour, int minute, HighlyStructuredDateTimeComponent.CalendarType calendar) Creates an instance of aHighlyStructuredDateTimeComponentrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncalendar()Returns the value of thecalendarrecord component.dateType()Returns the type of dateintReturns the value of thedayOfMonthrecord component.Returns the value of thedayOfWeekrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.inthour()Returns the value of thehourrecord component.intminute()Returns the value of theminuterecord component.intmonth()Returns the value of themonthrecord component.final StringtoString()Returns a string representation of this record class.intyear()Returns the value of theyearrecord component.
-
Field Details
-
dayOfWeek
The field for thedayOfWeekrecord component. -
year
private final int yearThe field for theyearrecord component. -
month
private final int monthThe field for themonthrecord component. -
dayOfMonth
private final int dayOfMonthThe field for thedayOfMonthrecord component. -
hour
private final int hourThe field for thehourrecord component. -
minute
private final int minuteThe field for theminuterecord component. -
calendar
The field for thecalendarrecord component.
-
-
Constructor Details
-
HighlyStructuredDateTimeComponent
public HighlyStructuredDateTimeComponent(HighlyStructuredDateTimeComponent.DayOfWeek dayOfWeek, int year, int month, int dayOfMonth, int hour, int minute, HighlyStructuredDateTimeComponent.CalendarType calendar) Creates an instance of aHighlyStructuredDateTimeComponentrecord class.- Parameters:
dayOfWeek- the value for thedayOfWeekrecord componentyear- the value for theyearrecord componentmonth- the value for themonthrecord componentdayOfMonth- the value for thedayOfMonthrecord componenthour- the value for thehourrecord componentminute- the value for theminuterecord componentcalendar- the value for thecalendarrecord component
-
-
Method Details
-
dateType
Description copied from interface:HighlyStructuredDateTimeValueReturns the type of date- Specified by:
dateTypein interfaceHighlyStructuredDateTimeValue- Returns:
- a non-null type
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
dayOfWeek
Returns the value of thedayOfWeekrecord component.- Returns:
- the value of the
dayOfWeekrecord component
-
year
public int year()Returns the value of theyearrecord component.- Returns:
- the value of the
yearrecord component
-
month
public int month()Returns the value of themonthrecord component.- Returns:
- the value of the
monthrecord component
-
dayOfMonth
public int dayOfMonth()Returns the value of thedayOfMonthrecord component.- Returns:
- the value of the
dayOfMonthrecord component
-
hour
public int hour()Returns the value of thehourrecord component.- Returns:
- the value of the
hourrecord component
-
minute
public int minute()Returns the value of theminuterecord component.- Returns:
- the value of the
minuterecord component
-
calendar
Returns the value of thecalendarrecord component.- Returns:
- the value of the
calendarrecord component
-