{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "title": "Hotels Micro Services Pipeline Setup",
    "description": "Deployment of the Hotels Micro Services",
    "longDescription": "The Delivery Pipeline for DevOps Services allows you to automate your continuous deployment setup. To avoid conflicts, make sure to use unique application names. We recommend to use a common prefix like your name or initials.",
    "type": "object",
    "properties": {
        "selected-region": {
            "description": "The Bluemix region",
            "type": "string"
        },
        "selected-organization": {
            "description": "The Bluemix org",
            "type": "string"
        },
        "selected-space": {
            "description": "The Bluemix space",
            "type": "string"
        },
        "ui-app-name": {
            "description": "Name of the UI",
            "type": "string"
        },
        "dealsQ-app-name": {
            "description": "Name of the deals Query app",
            "type": "string"
        },
        "hotelQ-app-name": {
            "description": "Name of the hotels Query App",
            "type": "string"
        },
        "locationQ-app-name": {
            "description": "Name of the hotels Query App",
            "type": "string"
        },
        "controller-app-name": {
            "description": "Name of the hotels Query App",
            "type": "string"
        },
        "openwhisk_auth": {
            "type": "string"
        },
        "apic-username": {
            "description": "APIC username",
            "type": "string"
        },
        "apic-password": {
            "description": "APIC password",
            "type": "string"
        },
        "api-app-name": {
            "description": "API cf app name",
            "type": "string"
        }
    },
    "required": [
        "selected-region",
        "selected-organization",
        "selected-space",
        "ui-app-name",
        "dealsQ-app-name",
        "hotelQ-app-name",
        "locationQ-app-name",
        "controller-app-name",
        "messaging-app-name"
    ],
    "form": [
        {
            "type": "validator",
            "url": "/devops/setup/bm-helper/helper.html"
        },
        {
            "type": "text",
            "readonly": false,
            "title": "Hotels UI App Name",
            "key": "ui-app-name"
        },
        {
            "type": "text",
            "readonly": false,
            "title": "Hotels Query App Name",
            "key": "hotelQ-app-name"
        },
        {
            "type": "text",
            "readonly": false,
            "title": " Deals Query App Name",
            "key": "dealsQ-app-name"
        },
        {
            "type": "text",
            "readonly": false,
            "title": "Hotels Location App Name",
            "key": "locationQ-app-name"
        },
        {
            "type": "text",
            "readonly": false,
            "title": "Messaging App Name",
            "key": "messaging-app-name"
        },
        {
            "type": "text",
            "readonly": false,
            "title": "Hotels Controller App Name",
            "key": "controller-app-name"
        },
        {
            "type": "text",
            "readonly": false,
            "title": "APIC Username",
            "key": "apic-username"
        },
        {
            "type": "text",
            "readonly": false,
            "title": "APIC Password",
            "key": "apic-password"
        },
        {
            "type": "text",
            "readonly": false,
            "title": "API APP Name",
            "key": "api-app-name"
        },
        {
            "type": "table",
            "columnCount": 3,
            "widths": [
                "20%",
                "20%",
                "20%"
            ],
            "items": [
                {
                    "type": "label",
                    "title": "Region"
                },
                {
                    "type": "label",
                    "title": "Organization"
                },
                {
                    "type": "label",
                    "title": "Space"
                },
                {
                    "type": "select",
                    "key": "selected-region"
                },
                {
                    "type": "select",
                    "key": "selected-organization"
                },
                {
                    "type": "select",
                    "key": "selected-space",
                    "readonly": false
                }
            ]
        },
        {
            "type": "label",
            "title": "The HotelsEvent Handler service relies on OpenWhisk actions. To deploy these actions, the pipeline requires your OpenWhisk authorization key. Make sure to enter the authorization key associated with the space where the applications will be deployed."
        },
        {
            "type": "text",
            "readonly": false,
            "title": "OpenWhisk Authorization Key",
            "key": "openwhisk_auth"
        },
        {
            "type": "label",
            "title": "The Bootstrap openwhisk action requires API Key and Secret to make API calls to initialize events db with registered properties and locations. Make sure to enter API Key and Secret of the Registered consumer app."
        },
        {
            "type": "text",
            "readonly": false,
            "title": "API Key",
            "key": "api_key"
        },
        {
            "type": "text",
            "readonly": false,
            "title": "API Secret",
            "key": "api_secret"
        },
        {
            "type": "text",
            "readonly": false,
            "title": "API Hostname",
            "key": "api_host"
        }
    ]
}