{
    "current_parameters": {
      {% if component.description %}"component_description": {{ component.description|tojson|safe }},{% endif %}
      "label": "",
{% for property in component.properties %}
        "elyra_{{ property.ref }}":
    {% if property.control_id == "OneOfControl" %}
        {
        "activeControl": "{{ property.default_control_type }}",
        "{{ property.default_control_type }}":
    {% endif %}
    {% set property_data_type = property.data_type %}
    {% if property.data_type == 'inputvalue' %}{% set property_data_type = property.default_data_type %}{% endif %}
    {% if property.default_control_type == "EnumControl" %}
        null
    {% elif property_data_type|lower == "bool" or property_data_type|lower == "boolean" %}
        {{ property.value|lower }}
    {% elif property_data_type|lower == "int" or property_data_type|lower == "integer" or
            property_data_type|lower == "number" or property_data_type|lower == "float" %}
        {{ property.value }}
    {% else %}
        "{{ property.value }}"
    {% endif %}
    {% if property.control_id == "OneOfControl" %}
        }
    {% endif %},
{% endfor %}
{% if "mounted_volumes" not in elyra_property_collisions_list %}
      "elyra_mounted_volumes": [],
{% endif %}
{% if "kubernetes_tolerations" not in elyra_property_collisions_list %}
      "elyra_kubernetes_tolerations": [],
{% endif %}
{% if "kubernetes_pod_annotations" not in elyra_property_collisions_list %}
      "elyra_kubernetes_pod_annotations": [],
{% endif %}
{% if "disallow_cached_output" not in elyra_property_collisions_list %}
      "elyra_disallow_cached_output": null,
{% endif %}
      "component_source": {{ component.component_source|tojson|safe }}
    },
    "parameters": [
      {% if component.description %}{
        "id": "component_description"
      },{% endif %}
      {
        "id": "label"
      },
{% for property in component.properties %}
      {
        "id": "elyra_{{ property.ref }}"
      },
{% endfor %}
{% if "mounted_volumes" not in elyra_property_collisions_list %}
      {
        "id": "elyra_mounted_volumes"
      },
{% endif %}
{% if "kubernetes_tolerations" not in elyra_property_collisions_list %}
      {
        "id": "elyra_kubernetes_tolerations"
      },
{% endif %}
{% if "kubernetes_pod_annotations" not in elyra_property_collisions_list %}
      {
        "id": "elyra_kubernetes_pod_annotations"
      },
{% endif %}
{% if "disallow_cached_output" not in elyra_property_collisions_list %}
      {
        "id": "elyra_disallow_cached_output"
      },
{% endif %}
      {
        "id": "component_source"
      }
    ],
    "uihints": {
      "id": "nodeProperties",
      "parameter_info": [
        {% if component.description %}{
          "parameter_ref": "component_description",
          "control": "readonly",
          "label": {
            "default": "Component Description"
          },
          "description": {
            "default": " ",
            "placement": "on_panel"
          },
          "label_visible": false,
          "data": {
            "required": false
          }
        },{% endif %}
        {
          "parameter_ref": "label",
          "control": "custom",
          "custom_control_id": "StringControl",
          "label": {
            "default": "Label"
          },
          "description": {
            "default": "A custom label for the node.",
            "placement": "on_panel"
          },
          "data": {}
        },
{% for property in component.properties %}
        {
          "parameter_ref": "elyra_{{ property.ref }}",
          "control": "{{ property.control }}",
          "custom_control_id": "{{ property.control_id }}",
          "label": {
            "default": "{{ property.name }}"
          },
          "description": {
            "default": {{ property.description|tojson|safe }},
            "placement": "on_panel"
          },
          "data": {
    {% if property.control_id == "OneOfControl" %}
            "controls":{
        {% for control, control_data_type, control_label in property.one_of_control_types %}
                  "{{ control }}": {
                    "label": "{{ control_label }}",
                    "format": "{{ control_data_type }}"
            {% if control == 'NestedEnumControl' %}
                    ,
                    "allownooptions":
                {% if property.allow_no_options %}
                    true
                {% else %}
                    false
                {% endif %}
            {% endif %}
                  }
            {% if loop.index != loop.length %}
                  ,
            {% endif %}
        {%  endfor %}
            },
    {% else %}
            "format": "{{ property.data_type }}",
    {% endif %}
            "required": {{ property.required|lower }}
            {% if property.control_id == "EnumControl" %}
            ,
            "items": [
              {% for item in property.items %}
              "{{ item }}"
              {% if loop.index != property.items|length %}
              ,
              {% endif %}
              {% endfor %}
              ]
            {% endif %}
          }
        },
{% endfor %}
{% if "mounted_volumes" not in elyra_property_collisions_list %}
        {
          "parameter_ref": "elyra_mounted_volumes",
          "control": "custom",
          "custom_control_id": "StringArrayControl",
          "label": {
            "default": "Data Volumes"
          },
          "description": {
           "default": "Volumes to be mounted in this node. The specified Persistent Volume Claims must exist in the Kubernetes namespace where the node is executed or this node will not run.",
           "placement": "on_panel"
          },
          "data": {
            "required": false,
            "placeholder": "/mount/path=pvc-name",
            "keyValueEntries": true
          }
        },
{% endif %}
{% if "kubernetes_tolerations" not in elyra_property_collisions_list %}
        {
          "parameter_ref": "elyra_kubernetes_tolerations",
          "control": "custom",
          "custom_control_id": "StringArrayControl",
          "label": {
            "default": "Kubernetes Tolerations"
          },
          "description": {
           "default": "Kubernetes tolerations to attach to the pod where the node is executed.",
           "placement": "on_panel"
          },
          "data": {
            "required": false,
            "placeholder": "TOL_ID=key:operator:value:effect",
            "keyValueEntries": true
          }
        },
{% endif %}
{% if "kubernetes_pod_annotations" not in elyra_property_collisions_list %}
        {
          "parameter_ref": "elyra_kubernetes_pod_annotations",
          "control": "custom",
          "custom_control_id": "StringArrayControl",
          "label": {
            "default": "Kubernetes Pod Annotations"
          },
          "description": {
           "default": "Metadata to be added to this node. The metadata is exposed as annotation in the Kubernetes pod that executes this node.",
           "placement": "on_panel"
          },
          "data": {
            "required": false,
            "placeholder": "annotation_key=annotation_value",
            "keyValueEntries": true
          }
        },
{% endif %}
{% if "disallow_cached_output" not in elyra_property_collisions_list %}
        {
          "parameter_ref": "elyra_disallow_cached_output",
          "control": "custom",
          "custom_control_id": "BooleanControl",
          "label": {
            "default": "Disallow cached output"
          },
          "description": {
           "default": "Disable caching to force node re-execution in the target runtime environment.",
           "placement": "on_panel"
          },
          "data": {
            "required": false
          }
        },
{% endif %}
        {
          "parameter_ref": "component_source",
          "control": "readonly",
          "label": {
            "default": "Component Source"
          },
          "description": {
            "default": " ",
            "placement": "on_panel"
          },
          "data": {}
        }
      ],
      "group_info": [
        {
          "id": "nodeGroupInfo",
          "type": "panels",
          "group_info": [
            {% if component.description %}{
              "id": "component_description",
              "type": "controls",
              "parameter_refs": ["component_description"]
            },{% endif %}
            {
              "id": "label",
              "type": "controls",
              "parameter_refs": ["label"]
            },
{% if component.input_properties|length > 0 %}
            {
              "id": "elyra_inputCategoryHeader",
              "class_name": "elyra_categoryHeader",
              "type": "textPanel",
              "label": {
                "default": "Inputs"
              }
            },
    {% for property in component.input_properties %}
            {
              "id": "elyra_{{ property.ref }}",
              "type": "controls",
              "parameter_refs": ["elyra_{{ property.ref }}"]
            },
    {% endfor %}
{% endif %}
{% if component.output_properties|length > 0 %}
            {
              "id": "elyra_outputCategoryHeader",
              "type": "textPanel",
              "class_name": "elyra_categoryHeader",
              "label": {
                "default": "Outputs"
              }
            },
    {% for property in component.output_properties %}
            {
              "id": "elyra_{{ property.ref }}",
              "type": "controls",
              "parameter_refs": ["elyra_{{ property.ref }}"]
            },
    {% endfor %}
{% endif %}
{% if (("mounted_volumes" not in elyra_property_collisions_list) or
       ("kubernetes_pod_annotations" not in elyra_property_collisions_list)) %}
            {
              "id": "elyra_other_propertiesCategoryHeader",
              "type": "textPanel",
              "class_name": "elyra_categoryHeader",
              "label": {
                "default": "Additional Properties"
              },
              "description": {
                "default": "Additional properties used by Elyra that are not given in the component definition.",
                "placement": "on_panel"
              }
            },
{% endif %}
{% if "mounted_volumes" not in elyra_property_collisions_list %}
            {
              "id": "elyra_mounted_volumes",
              "type": "controls",
              "parameter_refs": ["elyra_mounted_volumes"]
            },
{% endif %}
{% if "kubernetes_tolerations" not in elyra_property_collisions_list %}
            {
              "id": "elyra_kubernetes_tolerations",
              "type": "controls",
              "parameter_refs": ["elyra_kubernetes_tolerations"]
            },
{% endif %}
{% if "kubernetes_pod_annotations" not in elyra_property_collisions_list %}
            {
              "id": "elyra_kubernetes_pod_annotations",
              "type": "controls",
              "parameter_refs": ["elyra_kubernetes_pod_annotations"]
            },
{% endif %}
{% if "disallow_cached_output" not in elyra_property_collisions_list %}
            {
              "id": "elyra_disallow_cached_output",
              "type": "controls",
              "parameter_refs": ["elyra_disallow_cached_output"]
            },
{% endif %}
            {
              "id": "elyra_component_sourceCategoryHeader",
              "type": "textPanel",
              "class_name": "elyra_categoryHeader",
              "label": {
                "default": "Component Source"
              }
            },
            {
              "id": "component_source",
              "type": "controls",
              "parameter_refs": ["component_source"]
            }
          ]
        }
      ]
    },
    "resources": {}
  }
