package com.github.seratch.jslack.api.model;

import lombok.Builder;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

import com.google.gson.annotations.SerializedName;

@Data
@Builder
public class Action {
    /**
     * Represents the type of action (e.g Message button or message menu)
     *
     * @see <a href="https://api.slack.com/interactive-messages#interaction_types">Interaction Types</a>
     */
    public enum Type {

        /**
         * @see <a href="https://api.slack.com/docs/message-buttons">Message button</a>
         */
        @SerializedName("button")
        BUTTON("button"),

        /**
         * @see <a href="https://api.slack.com/docs/message-menus">Message menus</a>
         */
        @SerializedName("select")
        SELECT("select");

        private final String value;

        Type(String value) {
            this.value = value;
        }

        public String value() {
            return value;
        }
    }

    private String name;
    private String text;
    private String style;
    @Builder.Default
    private Type type = Type.BUTTON;
    private String value;
    private Confirmation confirm;
    private List<Option> options = new ArrayList<>();
}

@@ -1225,10 +1225,140 @@
 st%3C%3E();%0A
+    private List%3COption%3E selectedOptions = new ArrayList%3C%3E();%0A    private String dataSource;%0A    private Integer minQueryLength;%0A%0A
 %7D%0A

Fix #52 Action does not support dynamic selects