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.

  • Constructor Details

    • ConversationInstanceConstraints

      public ConversationInstanceConstraints(int maxInstances, int maxInstancesPerUser, int maxInstancesPerChat, int maxInstancesPerUserPerChat)
      Creates an instance of a ConversationInstanceConstraints record class.
      Parameters:
      maxInstances - the value for the maxInstances record component
      maxInstancesPerUser - the value for the maxInstancesPerUser record component
      maxInstancesPerChat - the value for the maxInstancesPerChat record component
      maxInstancesPerUserPerChat - the value for the maxInstancesPerUserPerChat record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • maxInstances

      public int maxInstances()
      Returns the value of the maxInstances record component.
      Returns:
      the value of the maxInstances record component
    • maxInstancesPerUser

      public int maxInstancesPerUser()
      Returns the value of the maxInstancesPerUser record component.
      Returns:
      the value of the maxInstancesPerUser record component
    • maxInstancesPerChat

      public int maxInstancesPerChat()
      Returns the value of the maxInstancesPerChat record component.
      Returns:
      the value of the maxInstancesPerChat record component
    • maxInstancesPerUserPerChat

      public int maxInstancesPerUserPerChat()
      Returns the value of the maxInstancesPerUserPerChat record component.
      Returns:
      the value of the maxInstancesPerUserPerChat record component