// 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": {
        "/credential/": {
            "post": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "credential"
                ],
                "summary": "generate credential for user at this cluster",
                "operationId": "generate-credential",
                "parameters": [
                    {
                        "description": "provided public info",
                        "name": "resource",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/request.CredentialRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/errors.StatusError"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/errors.StatusError"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/errors.StatusError"
                        }
                    }
                }
            }
        },
        "/credential/ecr": {
            "get": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "credentials"
                ],
                "summary": "get the temporary ecr image sync credential",
                "operationId": "get-temporary-ecr-image-sync-credential",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "type": "object",
                            "additionalProperties": true
                        }
                    }
                }
            }
        },
        "/proxy": {
            "get": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "proxy"
                ],
                "summary": "get the proxy",
                "operationId": "get-proxy",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "type": "object",
                            "additionalProperties": true
                        }
                    }
                }
            }
        },
        "/resource-pool/status": {
            "get": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "resource-pool"
                ],
                "summary": "get resource pool status",
                "operationId": "get-resource-pool-status",
                "parameters": [
                    {
                        "description": "ResourcePool to get status",
                        "name": "resource",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/request.GetResourcePoolStatusRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/response.GetResourcePoolStatusResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/errors.StatusError"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/errors.StatusError"
                        }
                    }
                }
            }
        },
        "/resource-pool/testbed-resource-overtime": {
            "get": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "resource-pool"
                ],
                "summary": "get testbed resource overtime",
                "operationId": "get-testbed-resource-overtime",
                "parameters": [
                    {
                        "description": "testbed to get resource",
                        "name": "resource",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/request.GetTestbedResourceOvertimeRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/response.GetTestbedResourceOvertimeResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/errors.StatusError"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/errors.StatusError"
                        }
                    }
                }
            }
        },
        "/resource-pool/testbeds-resource": {
            "get": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "resource-pool"
                ],
                "summary": "get testbed resource",
                "operationId": "get-testbed-resource",
                "parameters": [
                    {
                        "description": "ResourcePool to get testbeds resource",
                        "name": "resource",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/request.GetTestbedsResourceRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/response.GetTestbedsResourceResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/errors.StatusError"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/errors.StatusError"
                        }
                    }
                }
            }
        },
        "/testbeds": {
            "get": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "testbeds"
                ],
                "summary": "list testbeds",
                "operationId": "list-testbed",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/response.ListTestbedResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/errors.StatusError"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/errors.StatusError"
                        }
                    }
                }
            },
            "post": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "testbeds"
                ],
                "summary": "Create the testbed",
                "operationId": "create-testbed",
                "parameters": [
                    {
                        "description": "Testbed to create",
                        "name": "testbed",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/request.CreateTestbedRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/response.CreateTestbedResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/errors.StatusError"
                        }
                    }
                }
            }
        },
        "/testbeds/:name": {
            "get": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "testbeds"
                ],
                "summary": "Get the testbed basic info",
                "operationId": "get-testbed",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Testbed to get",
                        "name": "name",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "boolean",
                        "description": "return with details",
                        "name": "with_details",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/response.GetTestbedResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/errors.StatusError"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/errors.StatusError"
                        }
                    }
                }
            },
            "delete": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "testbeds"
                ],
                "summary": "delete the testbed",
                "operationId": "delete-testbed",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Testbed to delete",
                        "name": "name",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "type": "object",
                            "additionalProperties": true
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/errors.StatusError"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/errors.StatusError"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/errors.StatusError"
                        }
                    }
                }
            }
        },
        "/testbeds/:name/auth": {
            "put": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "consumes": [
                    "application/json"
                ],
                "tags": [
                    "testbeds"
                ],
                "summary": "Authenticate the testbed to user(s)",
                "operationId": "auth-testbed",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Testbed to auth",
                        "name": "name",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "authTestbed Request",
                        "name": "user",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/request.AuthTestbedRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "type": "object",
                            "additionalProperties": true
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/errors.StatusError"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/errors.StatusError"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/errors.StatusError"
                        }
                    }
                }
            }
        },
        "/testbeds/:name/check": {
            "get": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "testbeds"
                ],
                "summary": "check the testbed status",
                "operationId": "check-testbed",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Testbed to check",
                        "name": "name",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/response.CheckTestbedResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/errors.StatusError"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/errors.StatusError"
                        }
                    }
                }
            }
        },
        "/testbeds/:name/complete": {
            "put": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "testbeds"
                ],
                "summary": "complete the testbed",
                "operationId": "complete-testbed",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Testbed to complete",
                        "name": "name",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "On Testbed Completion Type",
                        "name": "type",
                        "in": "query",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "type": "object",
                            "additionalProperties": true
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/errors.StatusError"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/errors.StatusError"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/errors.StatusError"
                        }
                    }
                }
            }
        },
        "/testbeds/:name/lease": {
            "get": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "testbeds"
                ],
                "summary": "get the testbed lease",
                "operationId": "get-testbed-lease",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Testbed to get lease",
                        "name": "name",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/response.LeaseResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/errors.StatusError"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/errors.StatusError"
                        }
                    }
                }
            }
        },
        "/testbeds/:name/lease/renew": {
            "put": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "testbeds"
                ],
                "summary": "RenewLease renew lease of a testbed",
                "operationId": "renew-lease",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Testbed to renew lease",
                        "name": "name",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Lease to renew, testbed DDL will be updated to 'time.Now() + lease'",
                        "name": "lease",
                        "in": "query",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/response.RenewalLeaseResponse"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/errors.StatusError"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/errors.StatusError"
                        }
                    }
                }
            }
        },
        "/testbeds/:name/log_links": {
            "get": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "testbeds"
                ],
                "summary": "get the testbed log links",
                "operationId": "get-testbed-log-links",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Testbed to get log links",
                        "name": "name",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/response.GetLogLinksResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/errors.StatusError"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/errors.StatusError"
                        }
                    }
                }
            }
        },
        "/testbeds/:name/restore-monitor": {
            "post": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "testbeds"
                ],
                "summary": "restore monitor from prometheus backup",
                "operationId": "restore-monitor",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Testbed to restore monitor",
                        "name": "name",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "restore monitor request",
                        "name": "testbed",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/request.RestoreMonitorRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/errors.StatusError"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/errors.StatusError"
                        }
                    }
                }
            }
        },
        "/testbeds/:name/shoot-kubeconfig": {
            "get": {
                "security": [
                    {
                        "Bearer": []
                    }
                ],
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "testbeds"
                ],
                "summary": "Get kubeconfig of tidbcloud's shoot cluster",
                "operationId": "get-shoot-kubeconfig",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Testbed the TiDBCloudCluster belongs to",
                        "name": "name",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/response.GetShootKubeConfigResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/errors.StatusError"
                        }
                    }
                }
            }
        }
    },
    "definitions": {
        "errors.StatusError": {
            "type": "object",
            "properties": {
                "code": {
                    "description": "Suggested HTTP return code for this status",
                    "type": "integer"
                },
                "message": {
                    "description": "A human-readable description of the status of this operation.",
                    "type": "string"
                },
                "reason": {
                    "description": "A machine-readable description of why this operation is failed",
                    "type": "string"
                }
            }
        },
        "model.CPUResource": {
            "type": "object",
            "properties": {
                "core": {
                    "type": "number"
                }
            }
        },
        "model.MemoryResource": {
            "type": "object",
            "properties": {
                "byte": {
                    "type": "integer"
                }
            }
        },
        "model.PhysicalResource": {
            "type": "object",
            "properties": {
                "cpu": {
                    "$ref": "#/definitions/model.CPUResource"
                },
                "memory": {
                    "$ref": "#/definitions/model.MemoryResource"
                }
            }
        },
        "model.TestBedItem": {
            "type": "object",
            "required": [
                "type"
            ],
            "properties": {
                "name": {
                    "description": "Name is the name of the test resource",
                    "type": "string"
                },
                "provider": {
                    "description": "Provider indicates the name of provider who creates the resource.",
                    "type": "string"
                },
                "qos": {
                    "description": "Qos is the quality of service on test resource",
                    "type": "array",
                    "items": {
                        "type": "integer"
                    }
                },
                "ready": {
                    "description": "Ready identifies whether the test resource is in the ready state, it's generated on the RMS server side",
                    "type": "boolean"
                },
                "spec": {
                    "description": "Spec is the specification of test resource\nTODO(@mahjonp): add a validator(used on the TCMS server)",
                    "type": "array",
                    "items": {
                        "type": "integer"
                    }
                },
                "testbed": {
                    "description": "Testbed is the name of test resource's testbed and it's required unless the Type value equals to TEST_BED",
                    "type": "string"
                },
                "type": {
                    "description": "Type is the resource type",
                    "type": "string"
                }
            }
        },
        "request.AuthTestbedRequest": {
            "type": "object",
            "properties": {
                "authorizeTo": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/request.User"
                    }
                },
                "name": {
                    "type": "string"
                }
            }
        },
        "request.CreateTestbedRequest": {
            "type": "object",
            "properties": {
                "generateName": {
                    "description": "GenerateName is an optional prefix, used by the RMS server, to generate a unique\nname ONLY IF the Name field has not been provided.",
                    "type": "string"
                },
                "items": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/model.TestBedItem"
                    }
                },
                "meta": {
                    "$ref": "#/definitions/request.TestBedMeta"
                },
                "name": {
                    "description": "Name can be generated by scheduler from GenerateName",
                    "type": "string"
                },
                "physicalResourceRequest": {
                    "description": "If left empty, scheduler will try to estimate it",
                    "$ref": "#/definitions/model.PhysicalResource"
                },
                "qos": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/resource.QosClaim"
                    }
                },
                "reclaimPolicy": {
                    "description": "ReclaimPolicy shows how to clean the whole testbed resources",
                    "$ref": "#/definitions/resource.ReclaimPolicy"
                },
                "resourcePool": {
                    "description": "ResourcePool can be re-written by scheduler",
                    "type": "string",
                    "default": "default"
                },
                "rmsUrl": {
                    "description": "RmsUrl is the url added by scheduler and used by executor",
                    "type": "string"
                }
            }
        },
        "request.CredentialRequest": {
            "type": "object",
            "properties": {
                "pem": {
                    "type": "array",
                    "items": {
                        "type": "integer"
                    }
                },
                "testbedName": {
                    "type": "string"
                }
            }
        },
        "request.GetResourcePoolStatusRequest": {
            "type": "object",
            "properties": {
                "resourcePool": {
                    "type": "string"
                }
            }
        },
        "request.GetTestbedResourceOvertimeRequest": {
            "type": "object",
            "properties": {
                "end": {
                    "type": "string"
                },
                "start": {
                    "type": "string"
                },
                "testbed": {
                    "type": "string"
                }
            }
        },
        "request.GetTestbedsResourceRequest": {
            "type": "object",
            "properties": {
                "resourcePool": {
                    "type": "string"
                }
            }
        },
        "request.RestoreMonitorRequest": {
            "type": "object",
            "properties": {
                "clusterType": {
                    "type": "string",
                    "default": "k8s"
                },
                "prometheusTarballURL": {
                    "type": "string"
                },
                "testbed": {
                    "type": "string"
                }
            }
        },
        "request.TestBedMeta": {
            "type": "object",
            "properties": {
                "accounting": {
                    "$ref": "#/definitions/request.User"
                },
                "to": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/request.User"
                    }
                }
            }
        },
        "request.User": {
            "type": "object",
            "properties": {
                "kind": {
                    "type": "string"
                },
                "name": {
                    "type": "string"
                },
                "namespace": {
                    "type": "string"
                }
            }
        },
        "resource.Details": {
            "type": "object",
            "properties": {
                "endpoints": {
                    "description": "TODO(@codingpoet): add more fields here",
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/resource.Endpoint"
                    }
                }
            }
        },
        "resource.Endpoint": {
            "type": "object",
            "properties": {
                "externalSvcAddress": {
                    "type": "string"
                },
                "name": {
                    "type": "string"
                },
                "type": {
                    "type": "string"
                }
            }
        },
        "resource.GcAction": {
            "type": "object",
            "properties": {
                "artifact": {
                    "$ref": "#/definitions/resource.GcArtifactAction"
                },
                "notification": {
                    "$ref": "#/definitions/resource.GcNotificationAction"
                },
                "reserveEnv": {
                    "$ref": "#/definitions/resource.GcReserveEnvAction"
                }
            }
        },
        "resource.GcArtifactAction": {
            "type": "object",
            "properties": {
                "log": {
                    "type": "boolean"
                },
                "monitor": {
                    "type": "boolean"
                }
            }
        },
        "resource.GcNotificationAction": {
            "type": "object",
            "properties": {
                "feishu": {
                    "type": "string"
                }
            }
        },
        "resource.GcReserveEnvAction": {
            "type": "object",
            "properties": {
                "durationOnWorkingHour": {
                    "description": "retain duration on working hour, if triggers on non-working hour, retain to next working hour",
                    "type": "string"
                },
                "scaleDown": {
                    "description": "scale down to min request, on k8s impl, means removing resource requests(cpu \u0026 memory)",
                    "type": "boolean"
                },
                "scaleIn": {
                    "description": "scale in to min replicas, to tidbcluster, is 1 tidb, 1 tikv, 1 pd etc",
                    "type": "boolean"
                }
            }
        },
        "resource.GcStrategy": {
            "type": "object",
            "properties": {
                "onCompletion": {
                    "$ref": "#/definitions/resource.GcAction"
                },
                "onFailure": {
                    "$ref": "#/definitions/resource.GcAction"
                },
                "onSuccess": {
                    "$ref": "#/definitions/resource.GcAction"
                }
            }
        },
        "resource.QosClaim": {
            "type": "object",
            "properties": {
                "exclusive": {
                    "description": "Exclusive means whether the podGroup is mutually exclusive with other Pod or PodGroup.\n\nIf it is set, this pod are mutually exclusive with other pods(means don't schedule on the same node)\nwhich has different podGroup name or without a podGroup binding",
                    "type": "boolean"
                },
                "podGroup": {
                    "description": "PodGroup is the podGroup name, with the PodGroup we ensure a group of pods can be scheduled altogether.\n\nref: https://github.com/PingCAP-QE/NaglfarCloud",
                    "type": "string"
                }
            }
        },
        "resource.ReclaimPolicy": {
            "type": "object",
            "properties": {
                "gcStrategy": {
                    "$ref": "#/definitions/resource.GcStrategy"
                },
                "lease": {
                    "type": "string",
                    "default": "24h"
                }
            }
        },
        "response.CheckTestbedResponse": {
            "type": "object",
            "properties": {
                "message": {
                    "type": "string"
                },
                "name": {
                    "type": "string"
                },
                "status": {
                    "type": "string"
                }
            }
        },
        "response.CreateTestbedResponse": {
            "type": "object",
            "properties": {
                "items": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/response.TestbedResponseItem"
                    }
                },
                "name": {
                    "type": "string"
                }
            }
        },
        "response.GetLogLinksResponse": {
            "type": "object",
            "properties": {
                "logLinks": {
                    "type": "object",
                    "additionalProperties": {
                        "type": "string"
                    }
                }
            }
        },
        "response.GetResourcePoolStatusResponse": {
            "type": "object",
            "properties": {
                "nonTestbedOccupation": {
                    "$ref": "#/definitions/model.PhysicalResource"
                },
                "totalResource": {
                    "$ref": "#/definitions/model.PhysicalResource"
                }
            }
        },
        "response.GetShootKubeConfigResponse": {
            "type": "object",
            "properties": {
                "kubeConfig": {
                    "type": "array",
                    "items": {
                        "type": "integer"
                    }
                }
            }
        },
        "response.GetTestbedResourceOvertimeResponse": {
            "type": "object",
            "properties": {
                "averageTestBedPhysicalResource": {
                    "$ref": "#/definitions/model.PhysicalResource"
                },
                "maxTestBedPhysicalResource": {
                    "$ref": "#/definitions/model.PhysicalResource"
                }
            }
        },
        "response.GetTestbedResponse": {
            "type": "object",
            "properties": {
                "items": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/response.TestbedResponseItem"
                    }
                },
                "lease": {
                    "$ref": "#/definitions/response.LeaseResponse"
                },
                "name": {
                    "type": "string"
                }
            }
        },
        "response.GetTestbedsResourceResponse": {
            "type": "object",
            "properties": {
                "testbedsOccupation": {
                    "type": "object",
                    "additionalProperties": {
                        "$ref": "#/definitions/model.PhysicalResource"
                    }
                }
            }
        },
        "response.LeaseResponse": {
            "type": "object",
            "properties": {
                "expireDate": {
                    "description": "ExpireDate is the testbed's expire date",
                    "type": "string"
                },
                "lease": {
                    "description": "Lease is the testbed's lease duration",
                    "type": "string"
                }
            }
        },
        "response.ListTestbedResponse": {
            "type": "object",
            "properties": {
                "items": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/response.GetTestbedResponse"
                    }
                }
            }
        },
        "response.RenewalLeaseResponse": {
            "type": "object",
            "properties": {
                "expireDate": {
                    "description": "ExpireDate is the testbed's expire date",
                    "type": "string"
                },
                "name": {
                    "description": "Name is the testbed's name",
                    "type": "string"
                }
            }
        },
        "response.TestbedResponseItem": {
            "type": "object",
            "required": [
                "type"
            ],
            "properties": {
                "details": {
                    "$ref": "#/definitions/resource.Details"
                },
                "name": {
                    "description": "Name is the name of the test resource",
                    "type": "string"
                },
                "provider": {
                    "description": "Provider indicates the name of provider who creates the resource.",
                    "type": "string"
                },
                "ready": {
                    "description": "Ready identifies whether the test resource is in the ready state, it's generated on the RMS server side",
                    "type": "boolean"
                },
                "testbed": {
                    "description": "Testbed is the name of test resource's testbed and it's required unless the Type value equals to TEST_BED",
                    "type": "string"
                },
                "type": {
                    "description": "Type is the resource type",
                    "type": "string"
                }
            }
        }
    },
    "securityDefinitions": {
        "Bearer": {
            "type": "apiKey",
            "name": "Authorization",
            "in": "header"
        }
    }
}`

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:        "",
	BasePath:    "/api/v1",
	Schemes:     []string{},
	Title:       "",
	Description: "",
}

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{})
}
