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 record
Configuration 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 aPostControls
record class. -
Method Summary
Modifier and TypeMethodDescription@NotEmpty Map
<String, TelegramProperties.PostControls.Button> buttons()
Returns the value of thebuttons
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.Returns the value of theignoredApiResponses
record component.@NotBlank String
Returns the value of theinitialMessageText
record component.final String
toString()
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 aPostControls
record class.- Parameters:
ignoredApiResponses
- the value for theignoredApiResponses
record componentinitialMessageText
- the value for theinitialMessageText
record componentbuttons
- the value for thebuttons
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)
. -
ignoredApiResponses
Returns the value of theignoredApiResponses
record component.- Returns:
- the value of the
ignoredApiResponses
record component
-
initialMessageText
Returns the value of theinitialMessageText
record component.- Returns:
- the value of the
initialMessageText
record component
-
buttons
Returns the value of thebuttons
record component.- Returns:
- the value of the
buttons
record component
-