Record Class TelegramProperties.PostControls
java.lang.Object
java.lang.Record
io.github.yvasyliev.telegramforwarderbot.configuration.TelegramProperties.PostControls
- Record Components:
ignoredApiResponses- set of API responses to ignoreinitialMessageText- initial text for messages- map of button identifiers to their properties
- Enclosing class:
TelegramProperties
public static record TelegramProperties.PostControls(@NotEmpty Set<String> ignoredApiResponses, @NotBlank String initialMessageText, @NotEmpty Map<String,TelegramProperties.PostControls.Button> buttons)
extends Record
Configuration for post controls.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordConfiguration for a button in the post controls. -
Constructor Summary
ConstructorsConstructorDescriptionPostControls(@NotEmpty Set<String> ignoredApiResponses, @NotBlank String initialMessageText, @NotEmpty Map<String, TelegramProperties.PostControls.Button> buttons) Creates an instance of aPostControlsrecord class. -
Method Summary
Modifier and TypeMethodDescription@NotEmpty Map<String, TelegramProperties.PostControls.Button> buttons()Returns the value of thebuttonsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theignoredApiResponsesrecord component.@NotBlank StringReturns the value of theinitialMessageTextrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
PostControls
public PostControls(@NotEmpty @NotEmpty Set<String> ignoredApiResponses, @NotBlank @NotBlank String initialMessageText, @Validated @NotEmpty @NotEmpty Map<String, TelegramProperties.PostControls.Button> buttons) Creates an instance of aPostControlsrecord class.- Parameters:
ignoredApiResponses- the value for theignoredApiResponsesrecord componentinitialMessageText- the value for theinitialMessageTextrecord componentbuttons- the value for thebuttonsrecord 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). -
ignoredApiResponses
Returns the value of theignoredApiResponsesrecord component.- Returns:
- the value of the
ignoredApiResponsesrecord component
-
initialMessageText
Returns the value of theinitialMessageTextrecord component.- Returns:
- the value of the
initialMessageTextrecord component
-
buttons
Returns the value of thebuttonsrecord component.- Returns:
- the value of the
buttonsrecord component
-