Record Class StringSelectMenuDefinition
java.lang.Object
java.lang.Record
io.github.kaktushose.jdac.definitions.interactions.component.menu.StringSelectMenuDefinition
- Record Components:
classDescription- theClassDescriptionof the declaring class of themethodDescription()methodDescription- theMethodDescriptionof the method this definition is bound topermissions- aCollectionof permissions for this menuselectOptions- the SelectOptions of this menuplaceholder- the placeholder text of this menuminValue- the minimum amount of choicesmaxValue- the maximum amount of choicesuniqueId- the uniqueId of this menu
- All Implemented Interfaces:
Definition, CustomIdJDAEntity<net.dv8tion.jda.api.components.selections.StringSelectMenu>, Invokable, JDAEntity<net.dv8tion.jda.api.components.selections.StringSelectMenu>, ComponentDefinition<net.dv8tion.jda.api.components.selections.StringSelectMenu>, SelectMenuDefinition<net.dv8tion.jda.api.components.selections.StringSelectMenu>, InteractionDefinition
public record StringSelectMenuDefinition(ClassDescription classDescription, MethodDescription methodDescription, Collection<String> permissions, Set<StringSelectMenuDefinition.MenuOptionDefinition> selectOptions, String placeholder, int minValue, int maxValue, @Nullable Integer uniqueId)
extends Record
implements SelectMenuDefinition<net.dv8tion.jda.api.components.selections.StringSelectMenu>
Representation of a string select menu.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordRepresentation of a select option for a string select menu defined by aMenuOption.Nested classes/interfaces inherited from interface InteractionDefinition
InteractionDefinition.ReplyConfig -
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionStringSelectMenuDefinition(ClassDescription classDescription, MethodDescription methodDescription, Collection<String> permissions, Set<StringSelectMenuDefinition.MenuOptionDefinition> selectOptions, String placeholder, int minValue, int maxValue, @Nullable Integer uniqueId) Creates an instance of aStringSelectMenuDefinitionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringSelectMenuDefinitionbuild(MethodBuildContext context) Builds a newStringSelectMenuDefinitionfrom the givenMethodBuildContext.Returns the value of theclassDescriptionrecord component.The human-readable name of this definition.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intmaxValue()Returns the value of themaxValuerecord component.Returns the value of themethodDescriptionrecord component.intminValue()Returns the value of theminValuerecord component.Returns the value of thepermissionsrecord component.Returns the value of theplaceholderrecord component.Returns the value of theselectOptionsrecord component.net.dv8tion.jda.api.components.selections.StringSelectMenuTransforms this definition to anStringSelectMenuwith an independent custom id.net.dv8tion.jda.api.components.selections.StringSelectMenutoJDAEntity(CustomId customId) Transforms this definition to anStringSelectMenuwith the givenCustomId.final StringtoString()Returns a string representation of this record class.@Nullable IntegeruniqueId()Returns the value of theuniqueIdrecord component.with(Set<net.dv8tion.jda.api.components.selections.SelectOption> selectOptions, Collection<String> defaultValues, @Nullable String placeholder, @Nullable Integer minValue, @Nullable Integer maxValue, @Nullable Integer uniqueId) Builds a newStringSelectMenuDefinitionwith the given values.Methods inherited from interface InteractionDefinition
definitionId
-
Constructor Details
-
StringSelectMenuDefinition
public StringSelectMenuDefinition(ClassDescription classDescription, MethodDescription methodDescription, Collection<String> permissions, Set<StringSelectMenuDefinition.MenuOptionDefinition> selectOptions, String placeholder, int minValue, int maxValue, @Nullable Integer uniqueId) Creates an instance of aStringSelectMenuDefinitionrecord class.- Parameters:
classDescription- the value for theclassDescriptionrecord componentmethodDescription- the value for themethodDescriptionrecord componentpermissions- the value for thepermissionsrecord componentselectOptions- the value for theselectOptionsrecord componentplaceholder- the value for theplaceholderrecord componentminValue- the value for theminValuerecord componentmaxValue- the value for themaxValuerecord componentuniqueId- the value for theuniqueIdrecord component
-
-
Method Details
-
build
Builds a newStringSelectMenuDefinitionfrom the givenMethodBuildContext.- Returns:
- an
Optionalholding theStringSelectMenuDefinition
-
with
public StringSelectMenuDefinition with(Set<net.dv8tion.jda.api.components.selections.SelectOption> selectOptions, Collection<String> defaultValues, @Nullable String placeholder, @Nullable Integer minValue, @Nullable Integer maxValue, @Nullable Integer uniqueId) Builds a newStringSelectMenuDefinitionwith the given values. -
toJDAEntity
public net.dv8tion.jda.api.components.selections.StringSelectMenu toJDAEntity()Transforms this definition to anStringSelectMenuwith an independent custom id.- Specified by:
toJDAEntityin interfaceJDAEntity<net.dv8tion.jda.api.components.selections.StringSelectMenu>- Returns:
- the
StringSelectMenu - See Also:
-
toJDAEntity
Transforms this definition to anStringSelectMenuwith the givenCustomId.- Specified by:
toJDAEntityin interfaceCustomIdJDAEntity<net.dv8tion.jda.api.components.selections.StringSelectMenu>- Parameters:
customId- theCustomIdto use- Returns:
- the
StringSelectMenu
-
displayName
Description copied from interface:DefinitionThe human-readable name of this definition.- Specified by:
displayNamein interfaceDefinition
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
classDescription
Returns the value of theclassDescriptionrecord component.- Specified by:
classDescriptionin interfaceComponentDefinition<net.dv8tion.jda.api.components.selections.StringSelectMenu>- Specified by:
classDescriptionin interfaceInvokable- Returns:
- the value of the
classDescriptionrecord component
-
methodDescription
Returns the value of themethodDescriptionrecord component.- Specified by:
methodDescriptionin interfaceComponentDefinition<net.dv8tion.jda.api.components.selections.StringSelectMenu>- Specified by:
methodDescriptionin interfaceInvokable- Returns:
- the value of the
methodDescriptionrecord component
-
permissions
Returns the value of thepermissionsrecord component.- Specified by:
permissionsin interfaceInteractionDefinition- Returns:
- the value of the
permissionsrecord component
-
selectOptions
Returns the value of theselectOptionsrecord component.- Returns:
- the value of the
selectOptionsrecord component
-
placeholder
Returns the value of theplaceholderrecord component.- Specified by:
placeholderin interfaceSelectMenuDefinition<net.dv8tion.jda.api.components.selections.StringSelectMenu>- Returns:
- the value of the
placeholderrecord component
-
minValue
public int minValue()Returns the value of theminValuerecord component.- Specified by:
minValuein interfaceSelectMenuDefinition<net.dv8tion.jda.api.components.selections.StringSelectMenu>- Returns:
- the value of the
minValuerecord component
-
maxValue
public int maxValue()Returns the value of themaxValuerecord component.- Specified by:
maxValuein interfaceSelectMenuDefinition<net.dv8tion.jda.api.components.selections.StringSelectMenu>- Returns:
- the value of the
maxValuerecord component
-
uniqueId
Returns the value of theuniqueIdrecord component.- Specified by:
uniqueIdin interfaceComponentDefinition<net.dv8tion.jda.api.components.selections.StringSelectMenu>- Returns:
- the value of the
uniqueIdrecord component
-