// Code generated by go-swagger; DO NOT EDIT.

package restapi

// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

import (
	"encoding/json"
)

var (
	// SwaggerJSON embedded version of the swagger document used at generation time
	SwaggerJSON json.RawMessage
	// FlatSwaggerJSON embedded flattened version of the swagger document used at generation time
	FlatSwaggerJSON json.RawMessage
)

func init() {
	SwaggerJSON = json.RawMessage([]byte(`{
  "schemes": [
    "http",
    "https"
  ],
  "swagger": "2.0",
  "info": {
    "description": "An API which supports creation, deletion, listing etc of Plan Manager",
    "title": "Plan Manager Management API",
    "contact": {
      "email": "sean@cyclops-labs.io"
    },
    "license": {
      "name": "Apache 2.0",
      "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
    },
    "version": "1.0.0"
  },
  "host": "localhost:8000",
  "basePath": "/api/v1.0",
  "paths": {
    "/cycle": {
      "get": {
        "description": "lists all cycles",
        "tags": [
          "cycleManagement"
        ],
        "summary": "List all cycles",
        "operationId": "listCycles",
        "parameters": [
          {
            "type": "string",
            "description": "state to filter",
            "name": "state",
            "in": "query"
          },
          {
            "type": "string",
            "description": "resource type to filter",
            "name": "type",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "list of cycles returned",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/Cycle"
              }
            }
          },
          "500": {
            "description": "unexpected error",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          }
        }
      },
      "post": {
        "description": "Creates a new cycle",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "cycleManagement"
        ],
        "summary": "Create a plan",
        "operationId": "createCycle",
        "parameters": [
          {
            "description": "Cycle to be added",
            "name": "cycle",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/Cycle"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "item created",
            "schema": {
              "$ref": "#/definitions/ItemCreatedResponse"
            }
          },
          "400": {
            "description": "invalid input, object invalid"
          },
          "409": {
            "description": "an existing item already exists",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          },
          "500": {
            "description": "unexpected error",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          }
        }
      }
    },
    "/cycle/{id}": {
      "get": {
        "description": "get cycle with given id",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "cycleManagement"
        ],
        "summary": "Get specific cycle",
        "operationId": "getCycle",
        "parameters": [
          {
            "type": "string",
            "description": "Id of cycle to be obtained",
            "name": "id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "cycle returned",
            "schema": {
              "$ref": "#/definitions/Cycle"
            }
          },
          "404": {
            "description": "cycle with id not found",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          },
          "500": {
            "description": "unexpected error",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          }
        }
      },
      "put": {
        "description": "Update cycle with given id",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "cycleManagement"
        ],
        "summary": "Update specific cycle",
        "operationId": "updateCycle",
        "parameters": [
          {
            "type": "string",
            "description": "Id of cycle to be updated",
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "description": "updated cycle containing all parameters except id",
            "name": "cycle",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/Cycle"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "updated cycle",
            "schema": {
              "$ref": "#/definitions/Cycle"
            }
          },
          "404": {
            "description": "cycle with id not found",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          },
          "500": {
            "description": "unexpected error",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          }
        }
      }
    },
    "/plan": {
      "get": {
        "description": "lists all plans (tbd - pagination?)",
        "tags": [
          "planManagement"
        ],
        "summary": "List all plans",
        "operationId": "listPlans",
        "responses": {
          "200": {
            "description": "list of plans returned",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/Plan"
              }
            }
          },
          "500": {
            "description": "unexpected error",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          }
        }
      },
      "post": {
        "description": "Creates a new plan",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "planManagement"
        ],
        "summary": "Create a plan",
        "operationId": "createPlan",
        "parameters": [
          {
            "description": "Plan to be added",
            "name": "plan",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/Plan"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "item created",
            "schema": {
              "$ref": "#/definitions/ItemCreatedResponse"
            }
          },
          "400": {
            "description": "invalid input, object invalid"
          },
          "409": {
            "description": "an existing item already exists",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          },
          "500": {
            "description": "unexpected error",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          }
        }
      }
    },
    "/plan/complete": {
      "get": {
        "description": "Obtains full information on all known plans",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "planManagement"
        ],
        "summary": "Get full information relating to known plans",
        "operationId": "listCompletePlans",
        "responses": {
          "200": {
            "description": "Set of known plans returned in full",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/Plan"
              }
            }
          },
          "500": {
            "description": "unexpected error",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          }
        }
      }
    },
    "/plan/complete/{id}": {
      "get": {
        "description": "gets complete plan with planid",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "planManagement"
        ],
        "summary": "Get complete plan",
        "operationId": "getCompletePlan",
        "parameters": [
          {
            "type": "string",
            "description": "Id of plan to be obtained",
            "name": "id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "plan returned",
            "schema": {
              "$ref": "#/definitions/Plan"
            }
          },
          "404": {
            "description": "complete plan with planid not found",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          },
          "500": {
            "description": "unexpected error",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          }
        }
      }
    },
    "/plan/{id}": {
      "get": {
        "description": "get plan with given planid",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "planManagement"
        ],
        "summary": "Get specific plan",
        "operationId": "getPlan",
        "parameters": [
          {
            "type": "string",
            "description": "Id of plan to be obtained",
            "name": "id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "plan returned",
            "schema": {
              "$ref": "#/definitions/Plan"
            }
          },
          "404": {
            "description": "plan with planid not found",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          },
          "500": {
            "description": "unexpected error",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          }
        }
      },
      "put": {
        "description": "Update plan with given planId",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "planManagement"
        ],
        "summary": "Update specific plan",
        "operationId": "updatePlan",
        "parameters": [
          {
            "type": "string",
            "description": "Id of plan to be obtained",
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "description": "updated plan containing all parameters except id",
            "name": "plan",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/Plan"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "updated plan",
            "schema": {
              "$ref": "#/definitions/Plan"
            }
          },
          "404": {
            "description": "plan with planid not found",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          },
          "500": {
            "description": "unexpected error",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          }
        }
      }
    },
    "/sku": {
      "get": {
        "description": "lists all skus",
        "tags": [
          "skuManagement"
        ],
        "summary": "list SKUs",
        "operationId": "listSkus",
        "responses": {
          "200": {
            "description": "list of skus returned",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/Sku"
              }
            }
          },
          "500": {
            "description": "unexpected error",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          }
        }
      },
      "post": {
        "description": "Creates a new sku",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "skuManagement"
        ],
        "summary": "create SKU",
        "operationId": "createSku",
        "parameters": [
          {
            "description": "SKU to be added",
            "name": "sku",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/Sku"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "item created",
            "schema": {
              "$ref": "#/definitions/ItemCreatedResponse"
            }
          },
          "400": {
            "description": "invalid input, object invalid"
          },
          "409": {
            "description": "an existing item already exists",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          },
          "500": {
            "description": "unexpected error",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          }
        }
      }
    },
    "/sku/bundle": {
      "get": {
        "description": "lists all sku bundles",
        "tags": [
          "bundleManagement"
        ],
        "summary": "list SKU Bundles",
        "operationId": "listSkuBundles",
        "responses": {
          "200": {
            "description": "list of skus bundles returned",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/SkuBundle"
              }
            }
          },
          "500": {
            "description": "unexpected error",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          }
        }
      },
      "post": {
        "description": "Creates a new sku bundle",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "bundleManagement"
        ],
        "summary": "create SKU bundle",
        "operationId": "createSkuBundle",
        "parameters": [
          {
            "description": "SKU bundle to be added",
            "name": "bundle",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/SkuBundle"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "item created",
            "schema": {
              "$ref": "#/definitions/ItemCreatedResponse"
            }
          },
          "400": {
            "description": "invalid input, object invalid"
          },
          "409": {
            "description": "an existing item already exists",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          },
          "500": {
            "description": "unexpected error",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          }
        }
      }
    },
    "/sku/bundle/name/{name}": {
      "get": {
        "description": "get sku bundle with given name",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "bundleManagement"
        ],
        "summary": "Get specific sku bundle",
        "operationId": "getSkuBundleByName",
        "parameters": [
          {
            "type": "string",
            "description": "Id of sku bundle to be obtained",
            "name": "name",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "sku bundle returned",
            "schema": {
              "$ref": "#/definitions/SkuBundle"
            }
          },
          "404": {
            "description": "sku bundle with name not found",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          },
          "500": {
            "description": "unexpected error",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          }
        }
      }
    },
    "/sku/bundle/{id}": {
      "get": {
        "description": "get sku bundle with given id",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "bundleManagement"
        ],
        "summary": "Get specific sku bundle",
        "operationId": "getSkuBundle",
        "parameters": [
          {
            "type": "string",
            "description": "Id of sku bundle to be obtained",
            "name": "id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "sku bundle returned",
            "schema": {
              "$ref": "#/definitions/SkuBundle"
            }
          },
          "404": {
            "description": "sku bundle with id not found",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          },
          "500": {
            "description": "unexpected error",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          }
        }
      },
      "put": {
        "description": "Update sku bundle with given id",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "bundleManagement"
        ],
        "summary": "Update specific sku bundle",
        "operationId": "updateSkuBundle",
        "parameters": [
          {
            "type": "string",
            "description": "Id of sku bundle to be obtained",
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "description": "updated sku bundle containing all parameters except id",
            "name": "bundle",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/SkuBundle"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "updated sku bundle",
            "schema": {
              "$ref": "#/definitions/SkuBundle"
            }
          },
          "404": {
            "description": "sku bundle with id not found",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          },
          "500": {
            "description": "unexpected error",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          }
        }
      }
    },
    "/sku/price": {
      "get": {
        "description": "lists all sku prices",
        "tags": [
          "priceManagement"
        ],
        "summary": "list SKU Prices",
        "operationId": "listSkuPrices",
        "responses": {
          "200": {
            "description": "list of skus prices returned",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/SkuPrice"
              }
            }
          },
          "500": {
            "description": "unexpected error",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          }
        }
      },
      "post": {
        "description": "Creates a new sku price",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "priceManagement"
        ],
        "summary": "create SKU price",
        "operationId": "createSkuPrice",
        "parameters": [
          {
            "description": "SKU price to be added",
            "name": "price",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/SkuPrice"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "item created",
            "schema": {
              "$ref": "#/definitions/ItemCreatedResponse"
            }
          },
          "400": {
            "description": "invalid input, object invalid"
          },
          "409": {
            "description": "an existing item already exists",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          },
          "500": {
            "description": "unexpected error",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          }
        }
      }
    },
    "/sku/price/{id}": {
      "get": {
        "description": "get sku price with given skupriceid",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "priceManagement"
        ],
        "summary": "Get specific sku price",
        "operationId": "getSkuPrice",
        "parameters": [
          {
            "type": "string",
            "description": "Id of sku price to be obtained",
            "name": "id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "sku price returned",
            "schema": {
              "$ref": "#/definitions/SkuPrice"
            }
          },
          "404": {
            "description": "sku price with skupriceid not found",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          },
          "500": {
            "description": "unexpected error",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          }
        }
      },
      "put": {
        "description": "Update sku price with given skupriceid",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "priceManagement"
        ],
        "summary": "Update specific sku price",
        "operationId": "updateSkuPrice",
        "parameters": [
          {
            "type": "string",
            "description": "Id of sku price to be obtained",
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "description": "updated sku containing all parameters except id",
            "name": "price",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/SkuPrice"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "updated sku price",
            "schema": {
              "$ref": "#/definitions/SkuPrice"
            }
          },
          "404": {
            "description": "sku price with skupriceid not found",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          },
          "500": {
            "description": "unexpected error",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          }
        }
      }
    },
    "/sku/{id}": {
      "get": {
        "description": "get sku with given skuid",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "skuManagement"
        ],
        "summary": "Get specific sku",
        "operationId": "getSku",
        "parameters": [
          {
            "type": "string",
            "description": "Id of sku to be obtained",
            "name": "id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "sku returned",
            "schema": {
              "$ref": "#/definitions/Sku"
            }
          },
          "404": {
            "description": "sku with skuid not found",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          },
          "500": {
            "description": "unexpected error",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          }
        }
      },
      "put": {
        "description": "Update sku with given skuid",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "skuManagement"
        ],
        "summary": "Update specific sku",
        "operationId": "updateSku",
        "parameters": [
          {
            "type": "string",
            "description": "Id of sku to be obtained",
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "description": "updated sku containing all parameters except id",
            "name": "sku",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/Sku"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "updated sku",
            "schema": {
              "$ref": "#/definitions/Sku"
            }
          },
          "404": {
            "description": "sku with skuid not found",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          },
          "500": {
            "description": "unexpected error",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          }
        }
      }
    },
    "/status": {
      "get": {
        "security": [
          {
            "Keycloak": [
              "user"
            ]
          },
          {
            "APIKeyHeader": []
          },
          {
            "APIKeyParam": []
          }
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "statusManagement"
        ],
        "summary": "Basic status of the system",
        "operationId": "showStatus",
        "responses": {
          "200": {
            "description": "Status information of the system",
            "schema": {
              "$ref": "#/definitions/Status"
            }
          }
        }
      }
    },
    "/status/{id}": {
      "get": {
        "security": [
          {
            "Keycloak": [
              "user"
            ]
          },
          {
            "APIKeyHeader": []
          },
          {
            "APIKeyParam": []
          }
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "statusManagement"
        ],
        "summary": "Basic status of the system",
        "operationId": "getStatus",
        "parameters": [
          {
            "enum": [
              "kafka-receiver",
              "kafka-sender",
              "status",
              "trigger",
              "bundle",
              "cycle",
              "plan",
              "price",
              "sku"
            ],
            "type": "string",
            "description": "Id of the endpoint to be checked",
            "name": "id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Status information of the system",
            "schema": {
              "$ref": "#/definitions/Status"
            }
          },
          "404": {
            "description": "The endpoint provided doesn't exist",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          }
        }
      }
    },
    "/trigger/sample": {
      "get": {
        "security": [
          {
            "Keycloak": [
              "user"
            ]
          },
          {
            "APIKeyHeader": []
          },
          {
            "APIKeyParam": []
          }
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "triggerManagement"
        ],
        "summary": "Sample task trigger",
        "operationId": "execSample",
        "responses": {
          "200": {
            "description": "Sample task executed successfully"
          },
          "500": {
            "description": "Something unexpected happend, error raised",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          }
        }
      }
    }
  },
  "definitions": {
    "Cycle": {
      "type": "object",
      "required": [
        "State",
        "ResourceType",
        "SkuList"
      ],
      "properties": {
        "ID": {
          "type": "string",
          "x-go-custom-tag": "gorm:\"primary_key;unique;default:md5(random()::text || clock_timestamp()::text)::uuid\""
        },
        "ResourceType": {
          "type": "string"
        },
        "SkuList": {
          "x-go-custom-tag": "gorm:\"type:jsonb\"",
          "$ref": "#/definitions/Metadata"
        },
        "State": {
          "type": "string"
        }
      }
    },
    "ErrorResponse": {
      "type": "object",
      "required": [
        "errorString"
      ],
      "properties": {
        "errorString": {
          "type": "string"
        }
      }
    },
    "ItemCreatedResponse": {
      "properties": {
        "ID": {
          "type": "string"
        },
        "Link": {
          "type": "string"
        },
        "Message": {
          "type": "string"
        }
      }
    },
    "Metadata": {
      "type": "object",
      "x-go-type": {
        "import": {
          "package": "gitlab.com/cyclops-utilities/datamodels"
        },
        "type": "JSONdb"
      }
    },
    "Plan": {
      "type": "object",
      "required": [
        "Name",
        "OfferedEndDate",
        "OfferedStartDate"
      ],
      "properties": {
        "Discount": {
          "type": "number",
          "format": "double",
          "default": 0,
          "x-go-custom-tag": "gorm:\"type:numeric(23,13);default:0.0\""
        },
        "ID": {
          "type": "string",
          "x-go-custom-tag": "gorm:\"primary_key;unique;default:md5(random()::text || clock_timestamp()::text)::uuid\""
        },
        "Name": {
          "type": "string",
          "example": "Standard 3 year plan starting 1/1/2019"
        },
        "OfferedEndDate": {
          "type": "string",
          "format": "date",
          "x-go-custom-tag": "gorm:\"type:date\"",
          "example": "2016-08-29"
        },
        "OfferedStartDate": {
          "type": "string",
          "format": "date",
          "x-go-custom-tag": "gorm:\"type:date\"",
          "example": "2016-08-29"
        },
        "SkuPrices": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/SkuPrice"
          },
          "x-go-custom-tag": "gorm:\"-\""
        }
      }
    },
    "Sku": {
      "type": "object",
      "required": [
        "Name"
      ],
      "properties": {
        "ID": {
          "type": "string",
          "x-go-custom-tag": "gorm:\"primary_key;unique;default:md5(random()::text || clock_timestamp()::text)::uuid\""
        },
        "Name": {
          "type": "string",
          "example": "Standard 3 year plan starting 1/1/2019"
        },
        "Unit": {
          "type": "string"
        }
      }
    },
    "SkuBundle": {
      "type": "object",
      "required": [
        "Name"
      ],
      "properties": {
        "ID": {
          "type": "string",
          "x-go-custom-tag": "gorm:\"primary_key;unique;default:md5(random()::text || clock_timestamp()::text)::uuid\""
        },
        "Name": {
          "type": "string"
        },
        "SkuPrices": {
          "x-go-custom-tag": "gorm:\"type:jsonb\"",
          "$ref": "#/definitions/Metadata"
        }
      }
    },
    "SkuPrice": {
      "type": "object",
      "required": [
        "PlanID",
        "SkuID",
        "Unit",
        "UnitPrice"
      ],
      "properties": {
        "AccountingMode": {
          "type": "string",
          "default": "CREDIT",
          "enum": [
            "CREDIT",
            "CASH",
            "BOTH",
            "NONE"
          ],
          "x-go-custom-tag": "gorm:\"index;default:CREDIT\""
        },
        "Discount": {
          "type": "number",
          "format": "double",
          "default": 0,
          "x-go-custom-tag": "gorm:\"type:numeric(23,13);default:0.0\""
        },
        "ID": {
          "type": "string",
          "x-go-custom-tag": "gorm:\"primary_key;unique;default:md5(random()::text || clock_timestamp()::text)::uuid\""
        },
        "PlanID": {
          "type": "string"
        },
        "SkuID": {
          "type": "string"
        },
        "SkuName": {
          "type": "string"
        },
        "Unit": {
          "type": "string"
        },
        "UnitCreditPrice": {
          "type": "number",
          "format": "double",
          "x-go-custom-tag": "gorm:\"type:numeric(23,13)\""
        },
        "UnitPrice": {
          "type": "number",
          "format": "double",
          "x-go-custom-tag": "gorm:\"type:numeric(23,13)\""
        }
      }
    },
    "Status": {
      "type": "object",
      "required": [
        "SystemState"
      ],
      "properties": {
        "AverageResponseTime": {
          "type": "number",
          "format": "double"
        },
        "DBState": {
          "type": "string"
        },
        "LastRequest": {
          "type": "string"
        },
        "RequestsBoT": {
          "type": "integer"
        },
        "RequestsLastHour": {
          "type": "integer"
        },
        "RequestsToday": {
          "type": "integer"
        },
        "SystemState": {
          "type": "string"
        }
      }
    }
  },
  "securityDefinitions": {
    "APIKeyHeader": {
      "type": "apiKey",
      "name": "X-API-KEY",
      "in": "header"
    },
    "APIKeyParam": {
      "type": "apiKey",
      "name": "api_key",
      "in": "query"
    },
    "Keycloak": {
      "type": "oauth2",
      "flow": "accessCode",
      "authorizationUrl": "http://localhost:8080/auth/realms/Dev/protocol/openid-connect/auth",
      "tokenUrl": "http://localhost:8080/auth/realms/Dev/protocol/openid-connect/token",
      "scopes": {
        "admin": "Admin scope",
        "user": "User scope"
      }
    }
  },
  "security": [
    {
      "Keycloak": [
        "user",
        "admin"
      ]
    },
    {
      "APIKeyHeader": []
    },
    {
      "APIKeyParam": []
    }
  ],
  "tags": [
    {
      "description": "Actions relating to the reporting of the state of the service",
      "name": "statusManagement"
    },
    {
      "description": "Actions relating to the periodics actions to be triggered in the system",
      "name": "triggerManagement"
    },
    {
      "description": "Actions relating to management of sku bundles",
      "name": "bundleManagement"
    },
    {
      "description": "Actions relating to management of life cycles",
      "name": "cycleManagement"
    },
    {
      "description": "Actions relating to management of plans",
      "name": "planManagement"
    },
    {
      "description": "Actions relating to management of sku prices",
      "name": "priceManagement"
    },
    {
      "description": "Actions relating to management of skus and prices",
      "name": "skuManagement"
    }
  ]
}`))
	FlatSwaggerJSON = json.RawMessage([]byte(`{
  "schemes": [
    "http",
    "https"
  ],
  "swagger": "2.0",
  "info": {
    "description": "An API which supports creation, deletion, listing etc of Plan Manager",
    "title": "Plan Manager Management API",
    "contact": {
      "email": "sean@cyclops-labs.io"
    },
    "license": {
      "name": "Apache 2.0",
      "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
    },
    "version": "1.0.0"
  },
  "host": "localhost:8000",
  "basePath": "/api/v1.0",
  "paths": {
    "/cycle": {
      "get": {
        "description": "lists all cycles",
        "tags": [
          "cycleManagement"
        ],
        "summary": "List all cycles",
        "operationId": "listCycles",
        "parameters": [
          {
            "type": "string",
            "description": "state to filter",
            "name": "state",
            "in": "query"
          },
          {
            "type": "string",
            "description": "resource type to filter",
            "name": "type",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "list of cycles returned",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/Cycle"
              }
            }
          },
          "500": {
            "description": "unexpected error",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          }
        }
      },
      "post": {
        "description": "Creates a new cycle",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "cycleManagement"
        ],
        "summary": "Create a plan",
        "operationId": "createCycle",
        "parameters": [
          {
            "description": "Cycle to be added",
            "name": "cycle",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/Cycle"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "item created",
            "schema": {
              "$ref": "#/definitions/ItemCreatedResponse"
            }
          },
          "400": {
            "description": "invalid input, object invalid"
          },
          "409": {
            "description": "an existing item already exists",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          },
          "500": {
            "description": "unexpected error",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          }
        }
      }
    },
    "/cycle/{id}": {
      "get": {
        "description": "get cycle with given id",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "cycleManagement"
        ],
        "summary": "Get specific cycle",
        "operationId": "getCycle",
        "parameters": [
          {
            "type": "string",
            "description": "Id of cycle to be obtained",
            "name": "id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "cycle returned",
            "schema": {
              "$ref": "#/definitions/Cycle"
            }
          },
          "404": {
            "description": "cycle with id not found",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          },
          "500": {
            "description": "unexpected error",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          }
        }
      },
      "put": {
        "description": "Update cycle with given id",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "cycleManagement"
        ],
        "summary": "Update specific cycle",
        "operationId": "updateCycle",
        "parameters": [
          {
            "type": "string",
            "description": "Id of cycle to be updated",
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "description": "updated cycle containing all parameters except id",
            "name": "cycle",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/Cycle"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "updated cycle",
            "schema": {
              "$ref": "#/definitions/Cycle"
            }
          },
          "404": {
            "description": "cycle with id not found",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          },
          "500": {
            "description": "unexpected error",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          }
        }
      }
    },
    "/plan": {
      "get": {
        "description": "lists all plans (tbd - pagination?)",
        "tags": [
          "planManagement"
        ],
        "summary": "List all plans",
        "operationId": "listPlans",
        "responses": {
          "200": {
            "description": "list of plans returned",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/Plan"
              }
            }
          },
          "500": {
            "description": "unexpected error",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          }
        }
      },
      "post": {
        "description": "Creates a new plan",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "planManagement"
        ],
        "summary": "Create a plan",
        "operationId": "createPlan",
        "parameters": [
          {
            "description": "Plan to be added",
            "name": "plan",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/Plan"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "item created",
            "schema": {
              "$ref": "#/definitions/ItemCreatedResponse"
            }
          },
          "400": {
            "description": "invalid input, object invalid"
          },
          "409": {
            "description": "an existing item already exists",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          },
          "500": {
            "description": "unexpected error",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          }
        }
      }
    },
    "/plan/complete": {
      "get": {
        "description": "Obtains full information on all known plans",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "planManagement"
        ],
        "summary": "Get full information relating to known plans",
        "operationId": "listCompletePlans",
        "responses": {
          "200": {
            "description": "Set of known plans returned in full",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/Plan"
              }
            }
          },
          "500": {
            "description": "unexpected error",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          }
        }
      }
    },
    "/plan/complete/{id}": {
      "get": {
        "description": "gets complete plan with planid",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "planManagement"
        ],
        "summary": "Get complete plan",
        "operationId": "getCompletePlan",
        "parameters": [
          {
            "type": "string",
            "description": "Id of plan to be obtained",
            "name": "id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "plan returned",
            "schema": {
              "$ref": "#/definitions/Plan"
            }
          },
          "404": {
            "description": "complete plan with planid not found",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          },
          "500": {
            "description": "unexpected error",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          }
        }
      }
    },
    "/plan/{id}": {
      "get": {
        "description": "get plan with given planid",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "planManagement"
        ],
        "summary": "Get specific plan",
        "operationId": "getPlan",
        "parameters": [
          {
            "type": "string",
            "description": "Id of plan to be obtained",
            "name": "id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "plan returned",
            "schema": {
              "$ref": "#/definitions/Plan"
            }
          },
          "404": {
            "description": "plan with planid not found",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          },
          "500": {
            "description": "unexpected error",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          }
        }
      },
      "put": {
        "description": "Update plan with given planId",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "planManagement"
        ],
        "summary": "Update specific plan",
        "operationId": "updatePlan",
        "parameters": [
          {
            "type": "string",
            "description": "Id of plan to be obtained",
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "description": "updated plan containing all parameters except id",
            "name": "plan",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/Plan"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "updated plan",
            "schema": {
              "$ref": "#/definitions/Plan"
            }
          },
          "404": {
            "description": "plan with planid not found",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          },
          "500": {
            "description": "unexpected error",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          }
        }
      }
    },
    "/sku": {
      "get": {
        "description": "lists all skus",
        "tags": [
          "skuManagement"
        ],
        "summary": "list SKUs",
        "operationId": "listSkus",
        "responses": {
          "200": {
            "description": "list of skus returned",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/Sku"
              }
            }
          },
          "500": {
            "description": "unexpected error",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          }
        }
      },
      "post": {
        "description": "Creates a new sku",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "skuManagement"
        ],
        "summary": "create SKU",
        "operationId": "createSku",
        "parameters": [
          {
            "description": "SKU to be added",
            "name": "sku",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/Sku"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "item created",
            "schema": {
              "$ref": "#/definitions/ItemCreatedResponse"
            }
          },
          "400": {
            "description": "invalid input, object invalid"
          },
          "409": {
            "description": "an existing item already exists",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          },
          "500": {
            "description": "unexpected error",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          }
        }
      }
    },
    "/sku/bundle": {
      "get": {
        "description": "lists all sku bundles",
        "tags": [
          "bundleManagement"
        ],
        "summary": "list SKU Bundles",
        "operationId": "listSkuBundles",
        "responses": {
          "200": {
            "description": "list of skus bundles returned",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/SkuBundle"
              }
            }
          },
          "500": {
            "description": "unexpected error",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          }
        }
      },
      "post": {
        "description": "Creates a new sku bundle",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "bundleManagement"
        ],
        "summary": "create SKU bundle",
        "operationId": "createSkuBundle",
        "parameters": [
          {
            "description": "SKU bundle to be added",
            "name": "bundle",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/SkuBundle"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "item created",
            "schema": {
              "$ref": "#/definitions/ItemCreatedResponse"
            }
          },
          "400": {
            "description": "invalid input, object invalid"
          },
          "409": {
            "description": "an existing item already exists",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          },
          "500": {
            "description": "unexpected error",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          }
        }
      }
    },
    "/sku/bundle/name/{name}": {
      "get": {
        "description": "get sku bundle with given name",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "bundleManagement"
        ],
        "summary": "Get specific sku bundle",
        "operationId": "getSkuBundleByName",
        "parameters": [
          {
            "type": "string",
            "description": "Id of sku bundle to be obtained",
            "name": "name",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "sku bundle returned",
            "schema": {
              "$ref": "#/definitions/SkuBundle"
            }
          },
          "404": {
            "description": "sku bundle with name not found",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          },
          "500": {
            "description": "unexpected error",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          }
        }
      }
    },
    "/sku/bundle/{id}": {
      "get": {
        "description": "get sku bundle with given id",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "bundleManagement"
        ],
        "summary": "Get specific sku bundle",
        "operationId": "getSkuBundle",
        "parameters": [
          {
            "type": "string",
            "description": "Id of sku bundle to be obtained",
            "name": "id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "sku bundle returned",
            "schema": {
              "$ref": "#/definitions/SkuBundle"
            }
          },
          "404": {
            "description": "sku bundle with id not found",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          },
          "500": {
            "description": "unexpected error",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          }
        }
      },
      "put": {
        "description": "Update sku bundle with given id",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "bundleManagement"
        ],
        "summary": "Update specific sku bundle",
        "operationId": "updateSkuBundle",
        "parameters": [
          {
            "type": "string",
            "description": "Id of sku bundle to be obtained",
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "description": "updated sku bundle containing all parameters except id",
            "name": "bundle",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/SkuBundle"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "updated sku bundle",
            "schema": {
              "$ref": "#/definitions/SkuBundle"
            }
          },
          "404": {
            "description": "sku bundle with id not found",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          },
          "500": {
            "description": "unexpected error",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          }
        }
      }
    },
    "/sku/price": {
      "get": {
        "description": "lists all sku prices",
        "tags": [
          "priceManagement"
        ],
        "summary": "list SKU Prices",
        "operationId": "listSkuPrices",
        "responses": {
          "200": {
            "description": "list of skus prices returned",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/SkuPrice"
              }
            }
          },
          "500": {
            "description": "unexpected error",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          }
        }
      },
      "post": {
        "description": "Creates a new sku price",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "priceManagement"
        ],
        "summary": "create SKU price",
        "operationId": "createSkuPrice",
        "parameters": [
          {
            "description": "SKU price to be added",
            "name": "price",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/SkuPrice"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "item created",
            "schema": {
              "$ref": "#/definitions/ItemCreatedResponse"
            }
          },
          "400": {
            "description": "invalid input, object invalid"
          },
          "409": {
            "description": "an existing item already exists",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          },
          "500": {
            "description": "unexpected error",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          }
        }
      }
    },
    "/sku/price/{id}": {
      "get": {
        "description": "get sku price with given skupriceid",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "priceManagement"
        ],
        "summary": "Get specific sku price",
        "operationId": "getSkuPrice",
        "parameters": [
          {
            "type": "string",
            "description": "Id of sku price to be obtained",
            "name": "id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "sku price returned",
            "schema": {
              "$ref": "#/definitions/SkuPrice"
            }
          },
          "404": {
            "description": "sku price with skupriceid not found",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          },
          "500": {
            "description": "unexpected error",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          }
        }
      },
      "put": {
        "description": "Update sku price with given skupriceid",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "priceManagement"
        ],
        "summary": "Update specific sku price",
        "operationId": "updateSkuPrice",
        "parameters": [
          {
            "type": "string",
            "description": "Id of sku price to be obtained",
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "description": "updated sku containing all parameters except id",
            "name": "price",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/SkuPrice"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "updated sku price",
            "schema": {
              "$ref": "#/definitions/SkuPrice"
            }
          },
          "404": {
            "description": "sku price with skupriceid not found",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          },
          "500": {
            "description": "unexpected error",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          }
        }
      }
    },
    "/sku/{id}": {
      "get": {
        "description": "get sku with given skuid",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "skuManagement"
        ],
        "summary": "Get specific sku",
        "operationId": "getSku",
        "parameters": [
          {
            "type": "string",
            "description": "Id of sku to be obtained",
            "name": "id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "sku returned",
            "schema": {
              "$ref": "#/definitions/Sku"
            }
          },
          "404": {
            "description": "sku with skuid not found",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          },
          "500": {
            "description": "unexpected error",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          }
        }
      },
      "put": {
        "description": "Update sku with given skuid",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "skuManagement"
        ],
        "summary": "Update specific sku",
        "operationId": "updateSku",
        "parameters": [
          {
            "type": "string",
            "description": "Id of sku to be obtained",
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "description": "updated sku containing all parameters except id",
            "name": "sku",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/Sku"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "updated sku",
            "schema": {
              "$ref": "#/definitions/Sku"
            }
          },
          "404": {
            "description": "sku with skuid not found",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          },
          "500": {
            "description": "unexpected error",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          }
        }
      }
    },
    "/status": {
      "get": {
        "security": [
          {
            "Keycloak": [
              "user"
            ]
          },
          {
            "APIKeyHeader": []
          },
          {
            "APIKeyParam": []
          }
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "statusManagement"
        ],
        "summary": "Basic status of the system",
        "operationId": "showStatus",
        "responses": {
          "200": {
            "description": "Status information of the system",
            "schema": {
              "$ref": "#/definitions/Status"
            }
          }
        }
      }
    },
    "/status/{id}": {
      "get": {
        "security": [
          {
            "Keycloak": [
              "user"
            ]
          },
          {
            "APIKeyHeader": []
          },
          {
            "APIKeyParam": []
          }
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "statusManagement"
        ],
        "summary": "Basic status of the system",
        "operationId": "getStatus",
        "parameters": [
          {
            "enum": [
              "kafka-receiver",
              "kafka-sender",
              "status",
              "trigger",
              "bundle",
              "cycle",
              "plan",
              "price",
              "sku"
            ],
            "type": "string",
            "description": "Id of the endpoint to be checked",
            "name": "id",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Status information of the system",
            "schema": {
              "$ref": "#/definitions/Status"
            }
          },
          "404": {
            "description": "The endpoint provided doesn't exist",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          }
        }
      }
    },
    "/trigger/sample": {
      "get": {
        "security": [
          {
            "Keycloak": [
              "user"
            ]
          },
          {
            "APIKeyHeader": []
          },
          {
            "APIKeyParam": []
          }
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "triggerManagement"
        ],
        "summary": "Sample task trigger",
        "operationId": "execSample",
        "responses": {
          "200": {
            "description": "Sample task executed successfully"
          },
          "500": {
            "description": "Something unexpected happend, error raised",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            }
          }
        }
      }
    }
  },
  "definitions": {
    "Cycle": {
      "type": "object",
      "required": [
        "State",
        "ResourceType",
        "SkuList"
      ],
      "properties": {
        "ID": {
          "type": "string",
          "x-go-custom-tag": "gorm:\"primary_key;unique;default:md5(random()::text || clock_timestamp()::text)::uuid\""
        },
        "ResourceType": {
          "type": "string"
        },
        "SkuList": {
          "x-go-custom-tag": "gorm:\"type:jsonb\"",
          "$ref": "#/definitions/Metadata"
        },
        "State": {
          "type": "string"
        }
      }
    },
    "ErrorResponse": {
      "type": "object",
      "required": [
        "errorString"
      ],
      "properties": {
        "errorString": {
          "type": "string"
        }
      }
    },
    "ItemCreatedResponse": {
      "properties": {
        "ID": {
          "type": "string"
        },
        "Link": {
          "type": "string"
        },
        "Message": {
          "type": "string"
        }
      }
    },
    "Metadata": {
      "type": "object",
      "x-go-type": {
        "import": {
          "package": "gitlab.com/cyclops-utilities/datamodels"
        },
        "type": "JSONdb"
      }
    },
    "Plan": {
      "type": "object",
      "required": [
        "Name",
        "OfferedEndDate",
        "OfferedStartDate"
      ],
      "properties": {
        "Discount": {
          "type": "number",
          "format": "double",
          "default": 0,
          "x-go-custom-tag": "gorm:\"type:numeric(23,13);default:0.0\""
        },
        "ID": {
          "type": "string",
          "x-go-custom-tag": "gorm:\"primary_key;unique;default:md5(random()::text || clock_timestamp()::text)::uuid\""
        },
        "Name": {
          "type": "string",
          "example": "Standard 3 year plan starting 1/1/2019"
        },
        "OfferedEndDate": {
          "type": "string",
          "format": "date",
          "x-go-custom-tag": "gorm:\"type:date\"",
          "example": "2016-08-29"
        },
        "OfferedStartDate": {
          "type": "string",
          "format": "date",
          "x-go-custom-tag": "gorm:\"type:date\"",
          "example": "2016-08-29"
        },
        "SkuPrices": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/SkuPrice"
          },
          "x-go-custom-tag": "gorm:\"-\""
        }
      }
    },
    "Sku": {
      "type": "object",
      "required": [
        "Name"
      ],
      "properties": {
        "ID": {
          "type": "string",
          "x-go-custom-tag": "gorm:\"primary_key;unique;default:md5(random()::text || clock_timestamp()::text)::uuid\""
        },
        "Name": {
          "type": "string",
          "example": "Standard 3 year plan starting 1/1/2019"
        },
        "Unit": {
          "type": "string"
        }
      }
    },
    "SkuBundle": {
      "type": "object",
      "required": [
        "Name"
      ],
      "properties": {
        "ID": {
          "type": "string",
          "x-go-custom-tag": "gorm:\"primary_key;unique;default:md5(random()::text || clock_timestamp()::text)::uuid\""
        },
        "Name": {
          "type": "string"
        },
        "SkuPrices": {
          "x-go-custom-tag": "gorm:\"type:jsonb\"",
          "$ref": "#/definitions/Metadata"
        }
      }
    },
    "SkuPrice": {
      "type": "object",
      "required": [
        "PlanID",
        "SkuID",
        "Unit",
        "UnitPrice"
      ],
      "properties": {
        "AccountingMode": {
          "type": "string",
          "default": "CREDIT",
          "enum": [
            "CREDIT",
            "CASH",
            "BOTH",
            "NONE"
          ],
          "x-go-custom-tag": "gorm:\"index;default:CREDIT\""
        },
        "Discount": {
          "type": "number",
          "format": "double",
          "default": 0,
          "x-go-custom-tag": "gorm:\"type:numeric(23,13);default:0.0\""
        },
        "ID": {
          "type": "string",
          "x-go-custom-tag": "gorm:\"primary_key;unique;default:md5(random()::text || clock_timestamp()::text)::uuid\""
        },
        "PlanID": {
          "type": "string"
        },
        "SkuID": {
          "type": "string"
        },
        "SkuName": {
          "type": "string"
        },
        "Unit": {
          "type": "string"
        },
        "UnitCreditPrice": {
          "type": "number",
          "format": "double",
          "x-go-custom-tag": "gorm:\"type:numeric(23,13)\""
        },
        "UnitPrice": {
          "type": "number",
          "format": "double",
          "x-go-custom-tag": "gorm:\"type:numeric(23,13)\""
        }
      }
    },
    "Status": {
      "type": "object",
      "required": [
        "SystemState"
      ],
      "properties": {
        "AverageResponseTime": {
          "type": "number",
          "format": "double"
        },
        "DBState": {
          "type": "string"
        },
        "LastRequest": {
          "type": "string"
        },
        "RequestsBoT": {
          "type": "integer"
        },
        "RequestsLastHour": {
          "type": "integer"
        },
        "RequestsToday": {
          "type": "integer"
        },
        "SystemState": {
          "type": "string"
        }
      }
    }
  },
  "securityDefinitions": {
    "APIKeyHeader": {
      "type": "apiKey",
      "name": "X-API-KEY",
      "in": "header"
    },
    "APIKeyParam": {
      "type": "apiKey",
      "name": "api_key",
      "in": "query"
    },
    "Keycloak": {
      "type": "oauth2",
      "flow": "accessCode",
      "authorizationUrl": "http://localhost:8080/auth/realms/Dev/protocol/openid-connect/auth",
      "tokenUrl": "http://localhost:8080/auth/realms/Dev/protocol/openid-connect/token",
      "scopes": {
        "admin": "Admin scope",
        "user": "User scope"
      }
    }
  },
  "security": [
    {
      "Keycloak": [
        "admin",
        "user"
      ]
    },
    {
      "APIKeyHeader": []
    },
    {
      "APIKeyParam": []
    }
  ],
  "tags": [
    {
      "description": "Actions relating to the reporting of the state of the service",
      "name": "statusManagement"
    },
    {
      "description": "Actions relating to the periodics actions to be triggered in the system",
      "name": "triggerManagement"
    },
    {
      "description": "Actions relating to management of sku bundles",
      "name": "bundleManagement"
    },
    {
      "description": "Actions relating to management of life cycles",
      "name": "cycleManagement"
    },
    {
      "description": "Actions relating to management of plans",
      "name": "planManagement"
    },
    {
      "description": "Actions relating to management of sku prices",
      "name": "priceManagement"
    },
    {
      "description": "Actions relating to management of skus and prices",
      "name": "skuManagement"
    }
  ]
}`))
}
