Record Class ConversationInstanceConstraints
java.lang.Object
java.lang.Record
org.teleight.teleightbots.conversation.ConversationInstanceConstraints
- Record Components:
maxInstances- the maximum number of instances that can be created for a conversation (default is -1, which means no limit)maxInstancesPerUser- the maximum number of instances that can be created per user (default is -1, which means no limit)maxInstancesPerChat- the maximum number of instances that can be created per chat (default is -1, which means no limit)maxInstancesPerUserPerChat- the maximum number of instances that can be created per user in a chat (default is -1, which means no limit)
public record ConversationInstanceConstraints(int maxInstances, int maxInstancesPerUser, int maxInstancesPerChat, int maxInstancesPerUserPerChat)
extends Record
Represents constraints for a conversation instance.
The constraints define the maximum number of instances that can be created for a conversation.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionConversationInstanceConstraints(int maxInstances, int maxInstancesPerUser, int maxInstancesPerChat, int maxInstancesPerUserPerChat) Creates an instance of aConversationInstanceConstraintsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of themaxInstancesrecord component.intReturns the value of themaxInstancesPerChatrecord component.intReturns the value of themaxInstancesPerUserrecord component.intReturns the value of themaxInstancesPerUserPerChatrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ConversationInstanceConstraints
public ConversationInstanceConstraints(int maxInstances, int maxInstancesPerUser, int maxInstancesPerChat, int maxInstancesPerUserPerChat) Creates an instance of aConversationInstanceConstraintsrecord class.- Parameters:
maxInstances- the value for themaxInstancesrecord componentmaxInstancesPerUser- the value for themaxInstancesPerUserrecord componentmaxInstancesPerChat- the value for themaxInstancesPerChatrecord componentmaxInstancesPerUserPerChat- the value for themaxInstancesPerUserPerChatrecord 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 with '=='. -
maxInstances
public int maxInstances()Returns the value of themaxInstancesrecord component.- Returns:
- the value of the
maxInstancesrecord component
-
maxInstancesPerUser
public int maxInstancesPerUser()Returns the value of themaxInstancesPerUserrecord component.- Returns:
- the value of the
maxInstancesPerUserrecord component
-
maxInstancesPerChat
public int maxInstancesPerChat()Returns the value of themaxInstancesPerChatrecord component.- Returns:
- the value of the
maxInstancesPerChatrecord component
-
maxInstancesPerUserPerChat
public int maxInstancesPerUserPerChat()Returns the value of themaxInstancesPerUserPerChatrecord component.- Returns:
- the value of the
maxInstancesPerUserPerChatrecord component
-