All Downloads are FREE. Search and download functionalities are using the official Maven repository.

discord4j.discordjson.json.ComponentData Maven / Gradle / Ivy

There is a newer version: 1.7.9
Show newest version
package discord4j.discordjson.json;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import discord4j.discordjson.possible.Possible;
import org.immutables.value.Value;

import java.util.List;

@Value.Immutable
@JsonSerialize(as = ImmutableComponentData.class)
@JsonDeserialize(as = ImmutableComponentData.class)
public interface ComponentData {

    static ImmutableComponentData.Builder builder() {
        return ImmutableComponentData.builder();
    }

    int type();

    Possible> components();

    Possible style();

    Possible label();

    Possible emoji();

    @JsonProperty("custom_id")
    Possible customId();

    Possible url();

    Possible disabled();

    Possible placeholder();

    @JsonProperty("min_values")
    Possible minValues();

    @JsonProperty("max_values")
    Possible maxValues();

    /* Text input only */
    @JsonProperty("min_length")
    Possible minLength();

    @JsonProperty("max_length")
    Possible maxLength();

    Possible required();

    Possible value();

    Possible> values();

    Possible> options();

    @JsonProperty("channel_types")
    Possible> channelTypes();

    /* Only for user, role, mentionable and channel select menu components */
    @JsonProperty("default_values")
    Possible> defaultValues();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy