// Package docs GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
// This file was generated by swaggo/swag
package docs

import (
	"bytes"
	"encoding/json"
	"strings"
	"text/template"

	"github.com/swaggo/swag"
)

var doc = `{
    "schemes": {{ marshal .Schemes }},
    "swagger": "2.0",
    "info": {
        "description": "{{escape .Description}}",
        "title": "{{.Title}}",
        "contact": {},
        "version": "{{.Version}}"
    },
    "host": "{{.Host}}",
    "basePath": "{{.BasePath}}",
    "paths": {
        "/access-logs": {
            "get": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "AccessLog"
                ],
                "summary": "Search Management Portal access logs",
                "parameters": [
                    {
                        "type": "string",
                        "name": "content",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "name": "end_time",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "name": "org_id",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "name": "start_time",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "name": "user",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "name": "page",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "name": "per_page",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/forms.ListAccessLogResp"
                        }
                    }
                }
            }
        },
        "/api/v1/admin/profile/query": {
            "post": {
                "description": "CalcNodeProfiles",
                "consumes": [
                    "multipart/form-data"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Profile"
                ],
                "summary": "CalcNodeProfiles",
                "parameters": [
                    {
                        "type": "boolean",
                        "name": "is_dev_tier",
                        "in": "formData"
                    },
                    {
                        "type": "string",
                        "example": "0",
                        "name": "org_id",
                        "in": "formData"
                    },
                    {
                        "type": "string",
                        "name": "provider",
                        "in": "formData"
                    },
                    {
                        "type": "string",
                        "name": "region",
                        "in": "formData"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/forms.CalcNodeProfileResp"
                        }
                    }
                }
            }
        },
        "/api_key": {
            "post": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "ApiKey"
                ],
                "summary": "Add API Key",
                "parameters": [
                    {
                        "description": "Add API key",
                        "name": "user",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/forms.CreateAPIKey"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/forms.CreateAPIKeyResp"
                        }
                    }
                }
            }
        },
        "/dashboard/stats": {
            "get": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "System"
                ],
                "summary": "GetDashboardStats",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/forms.GetDashboardStatsResq"
                        }
                    }
                }
            }
        },
        "/external-api/v1/orgs/profile/replace_node_and_sku": {
            "post": {
                "description": "ReplaceNodeAndSKUByYaml",
                "consumes": [
                    "multipart/form-data"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Profile"
                ],
                "summary": "ReplaceNodeAndSKUByYaml",
                "parameters": [
                    {
                        "type": "string",
                        "name": "dryrun",
                        "in": "formData"
                    },
                    {
                        "type": "string",
                        "example": "the file of node, named by nodes.yaml",
                        "name": "node",
                        "in": "formData"
                    },
                    {
                        "type": "string",
                        "example": "the file of sku, named by skus.yaml",
                        "name": "sku",
                        "in": "formData"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/forms.ReplaceProfileResponse"
                        }
                    }
                }
            }
        },
        "/global-discounts": {
            "get": {
                "description": "Update global discount",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Discount"
                ],
                "summary": "Get Global Discount",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/forms.GlobalDiscount"
                        }
                    }
                }
            },
            "put": {
                "description": "Update global discount",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Discount"
                ],
                "summary": "Update Global Discount",
                "parameters": [
                    {
                        "description": "discount",
                        "name": "discount",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/forms.GlobalDiscount"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/forms.GlobalDiscount"
                        }
                    }
                }
            }
        },
        "/me": {
            "get": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "ManagementPortalUser"
                ],
                "summary": "GetCentralUserProfile",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/forms.CentralUserProfile"
                        }
                    }
                }
            }
        },
        "/orgs": {
            "get": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Tenant"
                ],
                "summary": "List Tenant",
                "parameters": [
                    {
                        "type": "integer",
                        "name": "page",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "name": "per_page",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "name": "alias",
                        "in": "query"
                    },
                    {
                        "type": "boolean",
                        "name": "brief",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "name": "email",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "name": "id",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "name": "kind",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "name": "name",
                        "in": "query"
                    },
                    {
                        "type": "boolean",
                        "name": "no_limit",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "options: asc or desc",
                        "name": "order",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "name": "plan",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "options: timezone, created_at",
                        "name": "sort_by",
                        "in": "query"
                    },
                    {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "name": "status",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/forms.ListTenantResp"
                        }
                    }
                }
            }
        },
        "/orgs/{org_id}": {
            "get": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Tenant"
                ],
                "summary": "Get Tenant By ID",
                "parameters": [
                    {
                        "type": "string",
                        "description": "org_id",
                        "name": "org_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/forms.Tenant"
                        }
                    }
                }
            },
            "delete": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Tenant"
                ],
                "summary": "Delete Tenant By ID",
                "parameters": [
                    {
                        "type": "string",
                        "description": "org_id",
                        "name": "org_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/forms.EmptyResponse"
                        }
                    }
                }
            },
            "patch": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Tenant"
                ],
                "summary": "PatchTenant",
                "parameters": [
                    {
                        "type": "string",
                        "description": "org_id",
                        "name": "org_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "patch tenant",
                        "name": "req",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/forms.PatchTenantReq"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/forms.EmptyResponse"
                        }
                    }
                }
            }
        },
        "/orgs/{org_id}/access-logs": {
            "get": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "AccessLog"
                ],
                "summary": "Serach Tenant access logs",
                "parameters": [
                    {
                        "type": "string",
                        "description": "org_id",
                        "name": "org_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "name": "content",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "name": "end_time",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "name": "org_id",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "name": "start_time",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "name": "user",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "name": "page",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "name": "per_page",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/forms.ListAccessLogResp"
                        }
                    }
                }
            }
        },
        "/orgs/{org_id}/cluster-lifecycles": {
            "get": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Tenant"
                ],
                "summary": "ListTenantClusterLifeCycle",
                "parameters": [
                    {
                        "type": "string",
                        "description": "org_id",
                        "name": "org_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "name": "end",
                        "in": "query",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "name": "start",
                        "in": "query",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/forms.ListTenantClusterLifeCycleResp"
                        }
                    }
                }
            }
        },
        "/orgs/{org_id}/clusters": {
            "get": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "TenantCuster"
                ],
                "summary": "List Tenant Cluster",
                "parameters": [
                    {
                        "type": "string",
                        "description": "org_id",
                        "name": "org_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "integer",
                        "name": "page",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "name": "per_page",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/forms.ListTenantClustersResp"
                        }
                    }
                }
            }
        },
        "/orgs/{org_id}/clusters/{cluster_id}": {
            "delete": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "TenantCuster"
                ],
                "summary": "Delete Tenant Cluster",
                "parameters": [
                    {
                        "type": "string",
                        "description": "org_id",
                        "name": "org_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "cluster_id",
                        "name": "cluster_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/forms.EmptyResponse"
                        }
                    }
                }
            }
        },
        "/orgs/{org_id}/clusters/{cluster_id}/components": {
            "put": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "TenantCuster"
                ],
                "summary": "Scale Tenant Cluster",
                "parameters": [
                    {
                        "type": "string",
                        "description": "org_id",
                        "name": "org_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "cluster_id",
                        "name": "cluster_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "scale cluster component",
                        "name": "scale",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/forms.ScaleComponentReq"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/forms.EmptyResponse"
                        }
                    }
                }
            }
        },
        "/orgs/{org_id}/clusters/{cluster_id}/dashboard_links": {
            "get": {
                "description": "GetDashboardLinks",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "TenantCuster"
                ],
                "summary": "GetDashboardLinks",
                "parameters": [
                    {
                        "type": "string",
                        "description": "org_id",
                        "name": "org_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "cluster_id",
                        "name": "cluster_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/forms.GetDashboardLinksResp"
                        }
                    }
                }
            }
        },
        "/orgs/{org_id}/clusters/{cluster_id}/tcu": {
            "get": {
                "description": "Get cluster TCU",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "GetClusterTCU"
                ],
                "summary": "Get cluster TCU",
                "parameters": [
                    {
                        "type": "string",
                        "description": "org_id",
                        "name": "org_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/forms.ClusterTCU"
                        }
                    }
                }
            },
            "put": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Salesforce"
                ],
                "summary": "Update Cluster TCU",
                "parameters": [
                    {
                        "type": "string",
                        "description": "org_id",
                        "name": "org_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "cluster tcu",
                        "name": "tcu",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/forms.ClusterTCU"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/forms.EmptyResponse"
                        }
                    }
                }
            }
        },
        "/orgs/{org_id}/credits_history": {
            "get": {
                "description": "Tenant Credits History",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Billing"
                ],
                "summary": "Get Tenant Credits History",
                "parameters": [
                    {
                        "type": "string",
                        "description": "org_id",
                        "name": "org_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/forms.TenantCreditsHistory"
                        }
                    }
                }
            }
        },
        "/orgs/{org_id}/discounts": {
            "get": {
                "description": "Get discount",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Discount"
                ],
                "summary": "Get Tenant Discount",
                "parameters": [
                    {
                        "type": "string",
                        "description": "org_id",
                        "name": "org_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/forms.Discount"
                        }
                    }
                }
            },
            "put": {
                "description": "update discount",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Discount"
                ],
                "summary": "Update Tenant Discount",
                "parameters": [
                    {
                        "type": "string",
                        "description": "org_id",
                        "name": "org_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "discount",
                        "name": "discount",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/forms.Discount"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/forms.Discount"
                        }
                    }
                }
            }
        },
        "/orgs/{org_id}/impersonation": {
            "post": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Impersonation"
                ],
                "summary": "AddImpersonation",
                "parameters": [
                    {
                        "type": "string",
                        "description": "org_id",
                        "name": "org_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/forms.EmptyResponse"
                        }
                    }
                }
            },
            "delete": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Impersonation"
                ],
                "summary": "Delete Impersonation",
                "parameters": [
                    {
                        "type": "string",
                        "description": "org_id",
                        "name": "org_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/forms.EmptyResponse"
                        }
                    }
                }
            }
        },
        "/orgs/{org_id}/poc": {
            "put": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "poc"
                ],
                "summary": "Update POC Status",
                "parameters": [
                    {
                        "type": "string",
                        "description": "org_id",
                        "name": "org_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "update poc status",
                        "name": "user",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/forms.UpdateOrgPocStatusReq"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/forms.EmptyResponse"
                        }
                    }
                }
            }
        },
        "/orgs/{org_id}/projects/{project_id}": {
            "delete": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "TenantProject"
                ],
                "summary": "Delete Tenant Project",
                "parameters": [
                    {
                        "type": "string",
                        "description": "org_id",
                        "name": "org_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "project_id",
                        "name": "project_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/forms.EmptyResponse"
                        }
                    }
                }
            }
        },
        "/orgs/{org_id}/salesforce": {
            "post": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Salesforce"
                ],
                "summary": "Sync Salesforce Leads",
                "parameters": [
                    {
                        "type": "string",
                        "description": "org_id",
                        "name": "org_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/forms.EmptyResponse"
                        }
                    }
                }
            }
        },
        "/orgs/{org_id}/trial_credit": {
            "get": {
                "description": "Get Tenant Billing Status",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Billing"
                ],
                "summary": "Get Tenant Billing Status",
                "parameters": [
                    {
                        "type": "string",
                        "description": "org_id",
                        "name": "org_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/forms.TenantRemaingCredits"
                        }
                    }
                }
            },
            "post": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Credit"
                ],
                "summary": "Add Trial Credit",
                "parameters": [
                    {
                        "type": "string",
                        "description": "org_id",
                        "name": "org_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "add trial credit",
                        "name": "user",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/forms.AddTrailCredit"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/forms.EmptyResponse"
                        }
                    }
                }
            }
        },
        "/orgs/{org_id}/users": {
            "get": {
                "description": "List tenant user",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "TenantUser"
                ],
                "summary": "List Tenant Users",
                "parameters": [
                    {
                        "type": "string",
                        "description": "org_id",
                        "name": "org_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/forms.ListTenantUsersResp"
                        }
                    }
                }
            },
            "post": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "TenantUser"
                ],
                "summary": "Add Tenant User",
                "parameters": [
                    {
                        "type": "string",
                        "description": "org_id",
                        "name": "org_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Add User",
                        "name": "user",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/forms.TenantUser"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/forms.TenantUser"
                        }
                    }
                }
            }
        },
        "/orgs/{org_id}/users/{user_id}": {
            "get": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "TenantUser"
                ],
                "summary": "Get Tenant User",
                "parameters": [
                    {
                        "type": "string",
                        "description": "org_id",
                        "name": "org_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "user_id",
                        "name": "user_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/forms.TenantUser"
                        }
                    }
                }
            },
            "put": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "TenantUser"
                ],
                "summary": "Update Tenant User",
                "parameters": [
                    {
                        "type": "string",
                        "description": "org_id",
                        "name": "org_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "user_id",
                        "name": "user_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "update User",
                        "name": "user",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/forms.TenantUser"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/forms.TenantUser"
                        }
                    }
                }
            },
            "delete": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "TenantUser"
                ],
                "summary": "Delete Tenant User",
                "parameters": [
                    {
                        "type": "string",
                        "description": "org_id",
                        "name": "org_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "user_id",
                        "name": "user_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/forms.EmptyResponse"
                        }
                    }
                }
            }
        },
        "/providers": {
            "get": {
                "description": "ListProviders",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Provider"
                ],
                "summary": "ListProviders",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/forms.ListProvidersResp"
                        }
                    }
                }
            },
            "post": {
                "description": "AddProvider",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Provider"
                ],
                "summary": "AddProvider",
                "parameters": [
                    {
                        "description": "provider",
                        "name": "provider",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/forms.Provider"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/forms.EmptyResponse"
                        }
                    }
                }
            }
        },
        "/providers/{provider}/regions": {
            "get": {
                "description": "ListRegions",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Provider"
                ],
                "summary": "ListRegions",
                "parameters": [
                    {
                        "type": "string",
                        "description": "provider",
                        "name": "provider",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/forms.ListRegionResp"
                        }
                    }
                }
            },
            "post": {
                "description": "AddRegion",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Provider"
                ],
                "summary": "AddRegion",
                "parameters": [
                    {
                        "type": "string",
                        "description": "provider",
                        "name": "provider",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "region",
                        "name": "region",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/forms.ProviderRegion"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/forms.ProviderRegion"
                        }
                    }
                }
            }
        },
        "/providers/{provider}/regions/{region_id}": {
            "get": {
                "description": "GetRegionByID",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Provider"
                ],
                "summary": "GetRegionByID",
                "parameters": [
                    {
                        "type": "string",
                        "description": "provider",
                        "name": "provider",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "region_id",
                        "name": "region_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/forms.ProviderRegion"
                        }
                    }
                }
            },
            "put": {
                "description": "UpdateRegion",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Provider"
                ],
                "summary": "UpdateRegion",
                "parameters": [
                    {
                        "type": "string",
                        "description": "provider",
                        "name": "provider",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "region_id",
                        "name": "region_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "region",
                        "name": "region",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/forms.ProviderRegion"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/forms.ProviderRegion"
                        }
                    }
                }
            },
            "delete": {
                "description": "DeleteRegion",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Provider"
                ],
                "summary": "DeleteRegion",
                "parameters": [
                    {
                        "type": "string",
                        "description": "provider",
                        "name": "provider",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "region_id",
                        "name": "region_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/forms.EmptyResponse"
                        }
                    }
                }
            }
        },
        "/roles": {
            "get": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "ManagementPortalUser"
                ],
                "summary": "ListCentralRoles",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/forms.ListRolesResp"
                        }
                    }
                }
            },
            "post": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "ManagementPortalUser"
                ],
                "summary": "AddCentralRole",
                "parameters": [
                    {
                        "description": "AddCentralRole",
                        "name": "role",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/forms.Role"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/forms.Role"
                        }
                    }
                }
            }
        },
        "/roles/{role_id}": {
            "get": {
                "description": "GetCentralRole",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "ManagementPortalUser"
                ],
                "summary": "GetCentralRole",
                "parameters": [
                    {
                        "type": "string",
                        "description": "role_id",
                        "name": "role_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/forms.Role"
                        }
                    }
                }
            },
            "put": {
                "description": "UpdateCentralRole",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "ManagementPortalUser"
                ],
                "summary": "UpdateCentralRole",
                "parameters": [
                    {
                        "type": "string",
                        "description": "role_id",
                        "name": "role_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "UpdateCentralRole",
                        "name": "role",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/forms.Role"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/forms.Role"
                        }
                    }
                }
            },
            "delete": {
                "description": "DeleteCentralRole",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "ManagementPortalUser"
                ],
                "summary": "DeleteCentralRole",
                "parameters": [
                    {
                        "type": "string",
                        "description": "role_id",
                        "name": "role_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/forms.EmptyResponse"
                        }
                    }
                }
            }
        },
        "/system-settings": {
            "get": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "System"
                ],
                "summary": "GetSystemSettings",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/forms.SystemSettings"
                        }
                    }
                }
            },
            "put": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "System"
                ],
                "summary": "UpdateSystemSettings",
                "parameters": [
                    {
                        "description": "update system settings",
                        "name": "settings",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/forms.SystemSettings"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/forms.SystemSettings"
                        }
                    }
                }
            }
        },
        "/upload": {
            "post": {
                "summary": "UploadFile",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/forms.EmptyResponse"
                        }
                    }
                }
            }
        },
        "/uploaded/{file_path}": {
            "get": {
                "summary": "DownloadFile",
                "responses": {}
            }
        },
        "/users": {
            "get": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "ManagementPortalUser"
                ],
                "summary": "ListCentralUsers",
                "parameters": [
                    {
                        "type": "integer",
                        "name": "page",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "name": "per_page",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "name": "email",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/forms.ListCentralUsersResp"
                        }
                    }
                }
            },
            "post": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "ManagementPortalUser"
                ],
                "summary": "Add Management Portal User",
                "parameters": [
                    {
                        "description": "Add management portal user",
                        "name": "user",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/forms.CentralUser"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/forms.CentralUser"
                        }
                    }
                }
            }
        },
        "/users/{user_id}": {
            "get": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "ManagementPortalUser"
                ],
                "summary": "Get Management Portal User",
                "parameters": [
                    {
                        "type": "string",
                        "description": "user_id",
                        "name": "user_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/forms.CentralUser"
                        }
                    }
                }
            },
            "put": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "ManagementPortalUser"
                ],
                "summary": "Update Management Portal User",
                "parameters": [
                    {
                        "type": "string",
                        "description": "user_id",
                        "name": "user_id",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "update management portal user",
                        "name": "user",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/forms.CentralUser"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/forms.CentralUser"
                        }
                    }
                }
            },
            "delete": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "ManagementPortalUser"
                ],
                "summary": "Delete Management Portal User",
                "parameters": [
                    {
                        "type": "string",
                        "description": "user_id",
                        "name": "user_id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/forms.EmptyResponse"
                        }
                    }
                }
            }
        }
    },
    "definitions": {
        "forms.AccessLog": {
            "type": "object",
            "properties": {
                "content": {
                    "type": "string"
                },
                "happened_on": {
                    "type": "integer"
                },
                "id": {
                    "type": "string",
                    "example": "0"
                },
                "user": {
                    "type": "string"
                }
            }
        },
        "forms.AddTrailCredit": {
            "type": "object",
            "properties": {
                "credit_amount": {
                    "type": "integer"
                }
            }
        },
        "forms.CalcNodeProfileResp": {
            "type": "object",
            "properties": {
                "code": {
                    "type": "integer"
                },
                "component_node_profiles": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/forms.NodeProfilesWithComponentType"
                    }
                },
                "message": {
                    "type": "string"
                }
            }
        },
        "forms.CentralUser": {
            "type": "object",
            "properties": {
                "email": {
                    "type": "string"
                },
                "first_name": {
                    "type": "string"
                },
                "id": {
                    "type": "string",
                    "example": "0"
                },
                "last_name": {
                    "type": "string"
                },
                "roles": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                }
            }
        },
        "forms.CentralUserProfile": {
            "type": "object",
            "properties": {
                "email": {
                    "type": "string"
                },
                "id": {
                    "type": "string",
                    "example": "0"
                },
                "name": {
                    "type": "string"
                },
                "roles": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                }
            }
        },
        "forms.ClusterTCU": {
            "type": "object",
            "properties": {
                "tcu_number": {
                    "type": "integer"
                }
            }
        },
        "forms.ComponentScale": {
            "type": "object",
            "required": [
                "component_type",
                "node_profile_id",
                "replicas"
            ],
            "properties": {
                "component_type": {
                    "type": "string"
                },
                "node_profile_id": {
                    "type": "string",
                    "example": "0"
                },
                "replicas": {
                    "type": "integer"
                },
                "storage_size_gi": {
                    "type": "integer"
                }
            }
        },
        "forms.CreateAPIKey": {
            "type": "object",
            "properties": {
                "creator_user_id": {
                    "type": "string",
                    "example": "0"
                },
                "key_name": {
                    "type": "string"
                },
                "tenant_id": {
                    "type": "string",
                    "example": "0"
                }
            }
        },
        "forms.CreateAPIKeyResp": {
            "type": "object",
            "properties": {
                "api_key": {
                    "type": "string"
                }
            }
        },
        "forms.CreditsHistoryItem": {
            "type": "object",
            "properties": {
                "amount": {
                    "type": "integer"
                },
                "created": {
                    "type": "integer"
                }
            }
        },
        "forms.DashboardLink": {
            "type": "object",
            "properties": {
                "link": {
                    "type": "string"
                },
                "name": {
                    "type": "string"
                }
            }
        },
        "forms.DevTierStats": {
            "type": "object",
            "properties": {
                "aws_active_clusters_count": {
                    "type": "integer"
                },
                "gcp_active_clusters_count": {
                    "type": "integer"
                }
            }
        },
        "forms.Discount": {
            "type": "object",
            "properties": {
                "discount": {
                    "type": "integer"
                }
            }
        },
        "forms.EmptyResponse": {
            "type": "object"
        },
        "forms.EnableDevTier": {
            "type": "object",
            "properties": {
                "enable_on_aws": {
                    "type": "boolean"
                },
                "enable_on_gcp": {
                    "type": "boolean"
                }
            }
        },
        "forms.GetDashboardLinksResp": {
            "type": "object",
            "properties": {
                "dashboards": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/forms.DashboardLink"
                    }
                }
            }
        },
        "forms.GetDashboardStatsResq": {
            "type": "object",
            "properties": {
                "dev_tier": {
                    "$ref": "#/definitions/forms.DevTierStats"
                }
            }
        },
        "forms.GlobalDiscount": {
            "type": "object",
            "properties": {
                "discount": {
                    "type": "integer"
                }
            }
        },
        "forms.ListAccessLogResp": {
            "type": "object",
            "properties": {
                "items": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/forms.AccessLog"
                    }
                },
                "total": {
                    "type": "integer"
                }
            }
        },
        "forms.ListCentralUsersResp": {
            "type": "object",
            "properties": {
                "items": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/forms.CentralUser"
                    }
                },
                "total": {
                    "type": "integer"
                }
            }
        },
        "forms.ListProvidersResp": {
            "type": "object",
            "properties": {
                "items": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/forms.Provider"
                    }
                },
                "total": {
                    "type": "integer"
                }
            }
        },
        "forms.ListRegionResp": {
            "type": "object",
            "properties": {
                "items": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/forms.ProviderRegion"
                    }
                },
                "total": {
                    "type": "integer"
                }
            }
        },
        "forms.ListRolesResp": {
            "type": "object",
            "properties": {
                "items": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/forms.Role"
                    }
                },
                "total": {
                    "type": "integer"
                }
            }
        },
        "forms.ListTenantClusterLifeCycleResp": {
            "type": "object",
            "properties": {
                "items": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/forms.TenantClusterLifecycle"
                    }
                },
                "total": {
                    "type": "integer"
                }
            }
        },
        "forms.ListTenantClustersResp": {
            "type": "object",
            "properties": {
                "code": {
                    "type": "integer"
                },
                "items": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/forms.TenantCluster"
                    }
                },
                "message": {
                    "type": "string"
                },
                "total": {
                    "type": "integer"
                }
            }
        },
        "forms.ListTenantResp": {
            "type": "object",
            "properties": {
                "items": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/forms.Tenant"
                    }
                },
                "total": {
                    "type": "integer"
                }
            }
        },
        "forms.ListTenantUsersResp": {
            "type": "object",
            "properties": {
                "items": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/forms.TenantUser"
                    }
                },
                "total": {
                    "type": "integer"
                }
            }
        },
        "forms.NodeProfile": {
            "type": "object",
            "properties": {
                "default_node_num": {
                    "type": "integer"
                },
                "id": {
                    "type": "string",
                    "example": "0"
                },
                "max_storage_size_gi": {
                    "type": "integer"
                },
                "min_storage_size_gi": {
                    "type": "integer"
                },
                "name": {
                    "type": "string"
                }
            }
        },
        "forms.NodeProfileCompute": {
            "type": "object",
            "properties": {
                "cpu": {
                    "type": "integer"
                },
                "memory_mi": {
                    "type": "integer"
                }
            }
        },
        "forms.NodeProfileOfComponent": {
            "type": "object",
            "properties": {
                "compute": {
                    "$ref": "#/definitions/forms.NodeProfileCompute"
                },
                "name": {
                    "type": "string"
                },
                "node_profile_id": {
                    "type": "string",
                    "example": "0"
                },
                "storage_gi": {
                    "type": "integer"
                }
            }
        },
        "forms.NodeProfilesWithComponentType": {
            "type": "object",
            "properties": {
                "component_type": {
                    "description": "core.proto:ComponentType.string()",
                    "type": "string"
                },
                "profiles": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/forms.NodeProfile"
                    }
                }
            }
        },
        "forms.PatchTenantReq": {
            "type": "object",
            "properties": {
                "account_manager": {
                    "description": "the email address of account manager, must end with @pingcap.com",
                    "type": "string"
                },
                "alias": {
                    "type": "string"
                },
                "kind": {
                    "type": "string"
                }
            }
        },
        "forms.Privilege": {
            "type": "object",
            "required": [
                "operation",
                "resource"
            ],
            "properties": {
                "operation": {
                    "type": "string"
                },
                "resource": {
                    "type": "string"
                }
            }
        },
        "forms.Provider": {
            "type": "object",
            "required": [
                "name"
            ],
            "properties": {
                "name": {
                    "type": "string"
                },
                "status": {
                    "type": "string"
                }
            }
        },
        "forms.ProviderRegion": {
            "type": "object",
            "properties": {
                "default_backup_time": {
                    "type": "string"
                },
                "display_name": {
                    "type": "string"
                },
                "id": {
                    "type": "string",
                    "example": "0"
                },
                "is_public": {
                    "type": "boolean"
                },
                "name": {
                    "type": "string"
                },
                "opened_org_ids": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "provider": {
                    "type": "string"
                },
                "status": {
                    "type": "string"
                },
                "zones": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                }
            }
        },
        "forms.ReplaceProfileResponse": {
            "type": "object",
            "properties": {
                "code": {
                    "type": "integer"
                },
                "message": {
                    "type": "string"
                },
                "version_id": {
                    "type": "integer"
                }
            }
        },
        "forms.Role": {
            "type": "object",
            "required": [
                "name",
                "privileges"
            ],
            "properties": {
                "id": {
                    "type": "string",
                    "example": "0"
                },
                "name": {
                    "type": "string"
                },
                "privileges": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/forms.Privilege"
                    }
                }
            }
        },
        "forms.ScaleComponentReq": {
            "type": "object",
            "required": [
                "components"
            ],
            "properties": {
                "components": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/forms.ComponentScale"
                    }
                }
            }
        },
        "forms.SystemSettings": {
            "type": "object",
            "properties": {
                "enable_dev_tier": {
                    "$ref": "#/definitions/forms.EnableDevTier"
                }
            }
        },
        "forms.Tenant": {
            "type": "object",
            "properties": {
                "account_manager": {
                    "type": "string"
                },
                "alias": {
                    "type": "string"
                },
                "country": {
                    "type": "string"
                },
                "created_at": {
                    "type": "integer"
                },
                "discount": {
                    "type": "integer"
                },
                "discount_description": {
                    "type": "string"
                },
                "email": {
                    "type": "string"
                },
                "has_discount": {
                    "type": "boolean"
                },
                "id": {
                    "type": "string",
                    "example": "0"
                },
                "kind": {
                    "type": "string"
                },
                "name": {
                    "type": "string"
                },
                "plan": {
                    "type": "string"
                },
                "remaining_credit": {
                    "type": "integer"
                },
                "status": {
                    "type": "string"
                },
                "third_party_account_code": {
                    "type": "string"
                },
                "third_party_account_provider": {
                    "type": "string"
                },
                "timezone": {
                    "type": "integer"
                },
                "total_credit": {
                    "type": "integer"
                }
            }
        },
        "forms.TenantCluster": {
            "type": "object",
            "properties": {
                "create_time": {
                    "type": "integer"
                },
                "cross_account_deployment_id": {
                    "type": "string",
                    "example": "0"
                },
                "id": {
                    "type": "string",
                    "example": "0"
                },
                "is_dev_tier": {
                    "type": "boolean"
                },
                "name": {
                    "type": "string"
                },
                "profile": {
                    "type": "string"
                },
                "project_id": {
                    "type": "string",
                    "example": "0"
                },
                "project_name": {
                    "type": "string"
                },
                "provider": {
                    "type": "string"
                },
                "region": {
                    "type": "string"
                },
                "status": {
                    "type": "string"
                },
                "tenant_components": {
                    "$ref": "#/definitions/forms.TenantComponents"
                },
                "version": {
                    "type": "string"
                }
            }
        },
        "forms.TenantClusterLifecycle": {
            "type": "object",
            "properties": {
                "created_at": {
                    "type": "integer"
                },
                "deleted_at": {
                    "type": "integer"
                },
                "id": {
                    "type": "string",
                    "example": "0"
                },
                "project_id": {
                    "type": "string",
                    "example": "0"
                }
            }
        },
        "forms.TenantComponent": {
            "type": "object",
            "properties": {
                "machineType": {
                    "description": "TODO(chenfei): remove. used by gitops to overlay configuration for component for now",
                    "type": "string"
                },
                "node_profile": {
                    "$ref": "#/definitions/forms.NodeProfileOfComponent"
                },
                "replicas": {
                    "type": "integer"
                }
            }
        },
        "forms.TenantComponents": {
            "type": "object",
            "properties": {
                "pd": {
                    "$ref": "#/definitions/forms.TenantComponent"
                },
                "tidb": {
                    "$ref": "#/definitions/forms.TenantComponent"
                },
                "tiflash": {
                    "$ref": "#/definitions/forms.TenantComponent"
                },
                "tikv": {
                    "$ref": "#/definitions/forms.TenantComponent"
                }
            }
        },
        "forms.TenantCreditsHistory": {
            "type": "object",
            "properties": {
                "amount": {
                    "type": "integer"
                },
                "history": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/forms.CreditsHistoryItem"
                    }
                }
            }
        },
        "forms.TenantRemaingCredits": {
            "type": "object",
            "properties": {
                "remaining_credit": {
                    "type": "integer"
                }
            }
        },
        "forms.TenantUser": {
            "type": "object",
            "properties": {
                "email": {
                    "type": "string"
                },
                "first_name": {
                    "type": "string"
                },
                "id": {
                    "type": "string",
                    "example": "0"
                },
                "last_name": {
                    "type": "string"
                },
                "org_id": {
                    "type": "string",
                    "example": "0"
                },
                "role": {
                    "type": "string"
                },
                "roles": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "status": {
                    "type": "string"
                }
            }
        },
        "forms.UpdateOrgPocStatusReq": {
            "type": "object",
            "properties": {
                "approve": {
                    "type": "boolean"
                },
                "org_id": {
                    "type": "string",
                    "example": "0"
                }
            }
        }
    }
}`

type swaggerInfo struct {
	Version     string
	Host        string
	BasePath    string
	Schemes     []string
	Title       string
	Description string
}

// SwaggerInfo holds exported Swagger Info so clients can modify it
var SwaggerInfo = swaggerInfo{
	Version:     "1.0",
	Host:        "127.0.0.1:8080",
	BasePath:    "/api/v1/admin",
	Schemes:     []string{},
	Title:       "Management Portal API",
	Description: "This is a management portal server",
}

type s struct{}

func (s *s) ReadDoc() string {
	sInfo := SwaggerInfo
	sInfo.Description = strings.Replace(sInfo.Description, "\n", "\\n", -1)

	t, err := template.New("swagger_info").Funcs(template.FuncMap{
		"marshal": func(v interface{}) string {
			a, _ := json.Marshal(v)
			return string(a)
		},
		"escape": func(v interface{}) string {
			// escape tabs
			str := strings.Replace(v.(string), "\t", "\\t", -1)
			// replace " with \", and if that results in \\", replace that with \\\"
			str = strings.Replace(str, "\"", "\\\"", -1)
			return strings.Replace(str, "\\\\\"", "\\\\\\\"", -1)
		},
	}).Parse(doc)
	if err != nil {
		return doc
	}

	var tpl bytes.Buffer
	if err := t.Execute(&tpl, sInfo); err != nil {
		return doc
	}

	return tpl.String()
}

func init() {
	swag.Register(swag.Name, &s{})
}
