Class TextInputImpl

    • Constructor Summary

      Constructors 
      Constructor Description
      TextInputImpl​(com.fasterxml.jackson.databind.JsonNode data)
      Creates a new text input.
      TextInputImpl​(TextInputStyle style, java.lang.String label, java.lang.String customId, java.lang.String value, java.lang.String placeholder, boolean required, java.lang.Integer minimumLength, java.lang.Integer maximumLength)
      Creates a new Text Input.
    • Constructor Detail

      • TextInputImpl

        public TextInputImpl​(com.fasterxml.jackson.databind.JsonNode data)
        Creates a new text input.
        Parameters:
        data - The json data of the text input.
      • TextInputImpl

        public TextInputImpl​(TextInputStyle style,
                             java.lang.String label,
                             java.lang.String customId,
                             java.lang.String value,
                             java.lang.String placeholder,
                             boolean required,
                             java.lang.Integer minimumLength,
                             java.lang.Integer maximumLength)
        Creates a new Text Input.
        Parameters:
        style - The text input's style.
        label - The text input's label.
        customId - The text input's custom ID.
        value - The text input's value.
        placeholder - The text input's placeholder.
        required - Whether the text input is a required component.
        minimumLength - The text input's minimum length.
        maximumLength - The text input's maximum length.
    • Method Detail

      • getCustomId

        public java.lang.String getCustomId()
        Specified by:
        getCustomId in interface TextInput
      • getLabel

        public java.util.Optional<java.lang.String> getLabel()
        Specified by:
        getLabel in interface TextInput
      • getMinimumLength

        public java.util.Optional<java.lang.Integer> getMinimumLength()
        Specified by:
        getMinimumLength in interface TextInput
      • getMaximumLength

        public java.util.Optional<java.lang.Integer> getMaximumLength()
        Specified by:
        getMaximumLength in interface TextInput
      • getValue

        public java.lang.String getValue()
        Specified by:
        getValue in interface TextInput
      • getPlaceholder

        public java.util.Optional<java.lang.String> getPlaceholder()
        Specified by:
        getPlaceholder in interface TextInput
      • toJsonNode

        public com.fasterxml.jackson.databind.node.ObjectNode toJsonNode()
        Description copied from class: ComponentImpl
        Gets the Component as a ObjectNode. This is what is sent to Discord.
        Specified by:
        toJsonNode in class ComponentImpl
        Returns:
        The component as a ObjectNode.
      • toJsonNode

        public com.fasterxml.jackson.databind.node.ObjectNode toJsonNode​(com.fasterxml.jackson.databind.node.ObjectNode object)
        Gets the text input as a ObjectNode. This is what is sent to Discord.
        Parameters:
        object - The object, the data should be added to.
        Returns:
        The text input as a ObjectNode.