package org.museautomation.core.task;

import com.fasterxml.jackson.annotation.*;
import org.museautomation.*;
import org.museautomation.core.values.*;
import org.museautomation.core.valuetypes.*;

/**
 * @author Christopher L Merrill (see LICENSE.txt for license details)
 */
public class TaskInput
    {
    // required for de/serialization
    @SuppressWarnings("unused")
    public TaskInput()
        {
        }

    public TaskInput(String name, String type_id, boolean required)
        {
        _name = name;
        _type_id = type_id;
        _required = required;
        }

    public TaskInput(String name, String type_id, ValueSourceConfiguration default_val)
        {
        _name = name;
        _type_id = type_id;
        _default = default_val;
        }

    public String getName()
        {
        return _name;
        }

    public void setName(String name)
        {
        _name = name;
        }

    @JsonIgnore
    public MuseValueType getType()
        {
        return MuseValueTypes.get().forTypeId(_type_id);
        }

    @JsonIgnore
    public void setType(MuseValueType type)
        {
        _type_id = type.getId();
        }

    public String getTypeId()
        {
        return _type_id;
        }

    // required for de/serialization
    @SuppressWarnings("unused")
    public void setTypeId(String type_id)
        {
        _type_id = type_id;
        }

    public boolean isRequired()
        {
        return _required;
        }

    public void setRequired(boolean required)
        {
        _required = required;
        }

    public ValueSourceConfiguration getDefault()
        {
        return _default;
        }

    public void setDefault(ValueSourceConfiguration default_value)
        {
        _default = default_value;
        }

    private String _name;
    private String _type_id;
    private boolean _required;
    private ValueSourceConfiguration _default;
    }
@@ -96,32 +96,114 @@
 seautomation.*;%0A
+import org.museautomation.core.metadata.*;%0Aimport org.museautomation.core.util.*;%0A
 import org.musea
@@ -273,16 +273,37 @@
 pes.*;%0A%0A
+import java.util.*;%0A%0A
 /**%0A * @
@@ -395,16 +395,36 @@
 askInput
+ implements Taggable
 %0A    %7B%0A 
@@ -1922,139 +1922,1465 @@
  %7D%0A%0A
-    private String _name;%0A    private String _type_id;%0A    private boolean _required;%0A    private ValueSourceConfiguration _default
+%0A    /**%0A     * ONLY for serialization use!%0A     *%0A     * Exposes the underlying set for serialization purposes only. Use #tags for accessing the tags%0A     */%0A    public Set%3CString%3E getTags()%0A        %7B%0A        return _tags.getTags();%0A        %7D%0A%0A    /**%0A     * ONLY for serialization use!%0A     *%0A     * Exposes the underlying set for serialization purposes only. Use #tags for accessing the tags%0A     */%0A    public void setTags(Set%3CString%3E tags)%0A        %7B%0A        _tags = new HashSetTagContainer(tags);%0A        %7D%0A%0A    @Override%0A    public TagContainer tags()%0A        %7B%0A        return _tags;%0A        %7D%0A%0A    public ContainsMetadata metadata()%0A%09    %7B%0A%09    return _metadata;%0A%09    %7D%0A%0A    /**%0A     * ONLY for serialization use!%0A     *%0A     * Exposes the underlying metadata map for serialization purposes only. Use #metadata for accessing the metadata%0A     */%0A    public Map%3CString, Object%3E getMetadata() %7B return _metadata.getMap(); %7D%0A%0A    /**%0A     * ONLY for serialization use!%0A     *%0A     * Exposes the underlying metadata map for serialization purposes only. Use #metadata for accessing the metadata%0A     */%0A    public void setMetadata(Map%3CString, Object%3E map) %7B _metadata.setMap(map); %7D%0A%0A    private String _name;%0A    private String _type_id;%0A    private boolean _required;%0A    private ValueSourceConfiguration _default;%0A    private final MetadataContainer _metadata = new MetadataContainer();%0A    private HashSetTagContainer _tags = new HashSetTagContainer()
 ;%0A  

ENHANCE add tags to TaskInput