{
  "swagger": "2.0",
  "info": {
    "description": "This is a clinic cloud-server for TiDBCloud.",
    "title": "Clinic Cloud Server",
    "contact": {},
    "version": "1.0"
  },
  "paths": {
    "/api/alert/v1/orgs/{orgId}/clusters/{clusterId}/alertSubscriberQuota": {
      "get": {
        "description": "get next-gen alert subscriber quota",
        "produces": ["application/json"],
        "tags": ["alert subscriber"],
        "operationId": "GetNextGenAlertSubscriberQuota",
        "parameters": [
          {
            "type": "string",
            "description": "organization id",
            "name": "orgId",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "cluster id",
            "name": "clusterId",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/entity.GetAlertSubscriberQuotaResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/common.BaseResp"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/common.BaseResp"
            }
          }
        }
      }
    },
    "/api/alert/v1/orgs/{orgId}/clusters/{clusterId}/alertSubscribers": {
      "get": {
        "description": "list next-gen alert subscribers",
        "produces": ["application/json"],
        "tags": ["alert subscriber"],
        "operationId": "ListNextGenAlertSubscribers",
        "parameters": [
          {
            "type": "string",
            "description": "organization id",
            "name": "orgId",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "cluster id",
            "name": "clusterId",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/entity.ListAlertSubscribersResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/common.BaseResp"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/common.BaseResp"
            }
          }
        }
      },
      "post": {
        "description": "create next-gen alert subscriber",
        "produces": ["application/json"],
        "tags": ["alert subscriber"],
        "operationId": "CreateNextGenAlertSubscriber",
        "parameters": [
          {
            "type": "string",
            "description": "organization id",
            "name": "orgId",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "cluster id",
            "name": "clusterId",
            "in": "path",
            "required": true
          },
          {
            "description": "request param",
            "name": "req",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/entity.CreateAlertSubscriberRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/common.BaseResp"
            }
          }
        }
      }
    },
    "/api/alert/v1/orgs/{orgId}/clusters/{clusterId}/alertSubscribers/{alertSubscriberId}": {
      "delete": {
        "description": "delete next-gen alert subscriber",
        "produces": ["application/json"],
        "tags": ["alert subscriber"],
        "operationId": "DeleteNextGenAlertSubscriber",
        "parameters": [
          {
            "type": "string",
            "description": "organization id",
            "name": "orgId",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "cluster id",
            "name": "clusterId",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "alert subscriber id",
            "name": "alertSubscriberId",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/common.BaseResp"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/common.BaseResp"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/common.BaseResp"
            }
          }
        }
      }
    },
    "/api/alert/v1/orgs/{orgId}/projects/{projectId}/alertSubscriberQuota": {
      "get": {
        "description": "get alert subscriber quota",
        "produces": ["application/json"],
        "tags": ["alert subscriber"],
        "operationId": "GetAlertSubscriberQuota",
        "parameters": [
          {
            "type": "string",
            "description": "organization id",
            "name": "orgId",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "project id",
            "name": "projectId",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/entity.GetAlertSubscriberQuotaResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/common.BaseResp"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/common.BaseResp"
            }
          }
        }
      }
    },
    "/api/alert/v1/orgs/{orgId}/projects/{projectId}/alertSubscribers": {
      "get": {
        "description": "list alert subscribers",
        "produces": ["application/json"],
        "tags": ["alert subscriber"],
        "operationId": "ListAlertSubscribers",
        "parameters": [
          {
            "type": "string",
            "description": "organization id",
            "name": "orgId",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "project id",
            "name": "projectId",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/entity.ListAlertSubscribersResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/common.BaseResp"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/common.BaseResp"
            }
          }
        }
      },
      "post": {
        "description": "create alert subscriber",
        "produces": ["application/json"],
        "tags": ["alert subscriber"],
        "operationId": "CreateAlertSubscriber",
        "parameters": [
          {
            "type": "string",
            "description": "organization id",
            "name": "orgId",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "project id",
            "name": "projectId",
            "in": "path",
            "required": true
          },
          {
            "description": "request param",
            "name": "req",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/entity.CreateAlertSubscriberRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/common.BaseResp"
            }
          }
        }
      }
    },
    "/api/alert/v1/orgs/{orgId}/projects/{projectId}/alertSubscribers/{alertSubscriberId}": {
      "delete": {
        "description": "delete alert subscriber",
        "produces": ["application/json"],
        "tags": ["alert subscriber"],
        "operationId": "DeleteAlertSubscriber",
        "parameters": [
          {
            "type": "string",
            "description": "organization id",
            "name": "orgId",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "project id",
            "name": "projectId",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "alert subscriber id",
            "name": "alertSubscriberId",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/common.BaseResp"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/common.BaseResp"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/common.BaseResp"
            }
          }
        }
      }
    },
    "/api/alert/v1/orgs/{orgId}/projects/{projectId}/clusters/{clusterId}/alertSubscriberQuota": {
      "get": {
        "description": "get essential alert subscriber quota",
        "produces": ["application/json"],
        "tags": ["alert subscriber"],
        "operationId": "GetEssentialAlertSubscriberQuota",
        "parameters": [
          {
            "type": "string",
            "description": "organization id",
            "name": "orgId",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "project id",
            "name": "projectId",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "cluster id",
            "name": "clusterId",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/entity.GetAlertSubscriberQuotaResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/common.BaseResp"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/common.BaseResp"
            }
          }
        }
      }
    },
    "/api/alert/v1/orgs/{orgId}/projects/{projectId}/clusters/{clusterId}/alertSubscribers": {
      "get": {
        "description": "list essential alert subscribers",
        "produces": ["application/json"],
        "tags": ["alert subscriber"],
        "operationId": "ListEssentialAlertSubscribers",
        "parameters": [
          {
            "type": "string",
            "description": "organization id",
            "name": "orgId",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "project id",
            "name": "projectId",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "cluster id",
            "name": "clusterId",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/entity.ListAlertSubscribersResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/common.BaseResp"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/common.BaseResp"
            }
          }
        }
      },
      "post": {
        "description": "create essential alert subscriber",
        "produces": ["application/json"],
        "tags": ["alert subscriber"],
        "operationId": "CreateEssentialAlertSubscriber",
        "parameters": [
          {
            "type": "string",
            "description": "organization id",
            "name": "orgId",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "project id",
            "name": "projectId",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "cluster id",
            "name": "clusterId",
            "in": "path",
            "required": true
          },
          {
            "description": "request param",
            "name": "req",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/entity.CreateAlertSubscriberRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/common.BaseResp"
            }
          }
        }
      }
    },
    "/api/alert/v1/orgs/{orgId}/projects/{projectId}/clusters/{clusterId}/alertSubscribers/{alertSubscriberId}": {
      "delete": {
        "description": "delete essential alert subscriber",
        "produces": ["application/json"],
        "tags": ["alert subscriber"],
        "operationId": "DeleteEssentialAlertSubscriber",
        "parameters": [
          {
            "type": "string",
            "description": "organization id",
            "name": "orgId",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "project id",
            "name": "projectId",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "cluster id",
            "name": "clusterId",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "alert subscriber id",
            "name": "alertSubscriberId",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/common.BaseResp"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/common.BaseResp"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/common.BaseResp"
            }
          }
        }
      }
    },
    "/orgs/{oid}/clusters/{cid}/eventfilters": {
      "get": {
        "description": "list cloud cluster events type and status filters",
        "produces": ["application/json"],
        "tags": ["cloud event"],
        "summary": "List cloud cluster event filters",
        "operationId": "ListEventFiltersWithoutProject",
        "parameters": [
          {
            "type": "string",
            "description": "organization id",
            "name": "oid",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "cluster id",
            "name": "cid",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "provider aws/gcp",
            "name": "X-Provider",
            "in": "header",
            "required": true
          },
          {
            "type": "string",
            "description": "region",
            "name": "X-Region",
            "in": "header",
            "required": true
          },
          {
            "type": "string",
            "description": "organization id from dbaas",
            "name": "X-Org-Id",
            "in": "header",
            "required": true
          },
          {
            "type": "string",
            "description": "cluster id from dbaas",
            "name": "X-Cluster-Id",
            "in": "header",
            "required": true
          },
          {
            "type": "string",
            "description": "cluster type serverless/dedicated/nextgen",
            "name": "cluster_type",
            "in": "query",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/event.ListEventFiltersResp"
            }
          }
        }
      }
    },
    "/orgs/{oid}/clusters/{cid}/events": {
      "get": {
        "description": "list cloud cluster events from activityhub",
        "produces": ["application/json"],
        "tags": ["cloud event"],
        "summary": "List cloud cluster events",
        "operationId": "ListEventsWithoutProject",
        "parameters": [
          {
            "type": "string",
            "description": "organization id",
            "name": "oid",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "cluster id",
            "name": "cid",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "provider aws/gcp",
            "name": "X-Provider",
            "in": "header",
            "required": true
          },
          {
            "type": "string",
            "description": "region",
            "name": "X-Region",
            "in": "header",
            "required": true
          },
          {
            "type": "string",
            "description": "organization id from dbaas",
            "name": "X-Org-Id",
            "in": "header",
            "required": true
          },
          {
            "type": "string",
            "description": "cluster id from dbaas",
            "name": "X-Cluster-Id",
            "in": "header",
            "required": true
          },
          {
            "type": "string",
            "description": "cursor for next page",
            "name": "cursor",
            "in": "header"
          },
          {
            "type": "string",
            "description": "cluster type",
            "name": "cluster_type",
            "in": "query",
            "required": true
          },
          {
            "type": "string",
            "description": "start time in unix seconds",
            "name": "begin_ts",
            "in": "query",
            "required": true
          },
          {
            "type": "string",
            "description": "end time in unix seconds",
            "name": "end_ts",
            "in": "query",
            "required": true
          },
          {
            "type": "string",
            "description": "result limit",
            "name": "limit",
            "in": "query"
          },
          {
            "type": "string",
            "description": "event status",
            "name": "status",
            "in": "query"
          },
          {
            "type": "array",
            "items": {
              "type": "string"
            },
            "collectionFormat": "csv",
            "description": "task type list; if not specified, any type is allowed",
            "name": "type",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/event.ListEventsResp"
            }
          }
        }
      }
    },
    "/orgs/{oid}/projects/{pid}/clusters/{cid}/eventfilters": {
      "get": {
        "description": "list cloud cluster events type and status filters",
        "produces": ["application/json"],
        "tags": ["cloud event"],
        "summary": "List cloud cluster event filters",
        "operationId": "ListEventFilters",
        "parameters": [
          {
            "type": "string",
            "description": "organization id",
            "name": "oid",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "project id",
            "name": "pid",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "cluster id",
            "name": "cid",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "provider aws/gcp",
            "name": "X-Provider",
            "in": "header",
            "required": true
          },
          {
            "type": "string",
            "description": "region",
            "name": "X-Region",
            "in": "header",
            "required": true
          },
          {
            "type": "string",
            "description": "organization id from dbaas",
            "name": "X-Org-Id",
            "in": "header",
            "required": true
          },
          {
            "type": "string",
            "description": "project id from dbaas",
            "name": "X-Project-Id",
            "in": "header"
          },
          {
            "type": "string",
            "description": "cluster id from dbaas",
            "name": "X-Cluster-Id",
            "in": "header",
            "required": true
          },
          {
            "type": "string",
            "description": "cluster type serverless/dedicated",
            "name": "cluster_type",
            "in": "query",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/event.ListEventFiltersResp"
            }
          }
        }
      }
    },
    "/orgs/{oid}/projects/{pid}/clusters/{cid}/events": {
      "get": {
        "description": "list cloud cluster events from activityhub",
        "produces": ["application/json"],
        "tags": ["cloud event"],
        "summary": "List cloud cluster events",
        "operationId": "ListEvents",
        "parameters": [
          {
            "type": "string",
            "description": "organization id",
            "name": "oid",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "project id",
            "name": "pid",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "cluster id",
            "name": "cid",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "provider aws/gcp",
            "name": "X-Provider",
            "in": "header",
            "required": true
          },
          {
            "type": "string",
            "description": "region",
            "name": "X-Region",
            "in": "header",
            "required": true
          },
          {
            "type": "string",
            "description": "organization id from dbaas",
            "name": "X-Org-Id",
            "in": "header",
            "required": true
          },
          {
            "type": "string",
            "description": "project id from dbaas",
            "name": "X-Project-Id",
            "in": "header",
            "required": true
          },
          {
            "type": "string",
            "description": "cluster id from dbaas",
            "name": "X-Cluster-Id",
            "in": "header",
            "required": true
          },
          {
            "type": "string",
            "description": "cursor for next page",
            "name": "cursor",
            "in": "header"
          },
          {
            "type": "string",
            "description": "cluster type",
            "name": "cluster_type",
            "in": "query",
            "required": true
          },
          {
            "type": "string",
            "description": "start time in unix seconds",
            "name": "begin_ts",
            "in": "query",
            "required": true
          },
          {
            "type": "string",
            "description": "end time in unix seconds",
            "name": "end_ts",
            "in": "query",
            "required": true
          },
          {
            "type": "string",
            "description": "result limit",
            "name": "limit",
            "in": "query"
          },
          {
            "type": "string",
            "description": "event status",
            "name": "status",
            "in": "query"
          },
          {
            "type": "array",
            "items": {
              "type": "string"
            },
            "collectionFormat": "csv",
            "description": "task type list; if not specified, any type is allowed",
            "name": "type",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/event.ListEventsResp"
            }
          }
        }
      }
    },
    "/{organization}/authorizations": {
      "get": {
        "description": "get userdebug auth list",
        "produces": ["application/json"],
        "tags": ["userdebug"],
        "summary": "get userdebug auth list",
        "operationId": "GetUserDebugAuthList",
        "parameters": [
          {
            "type": "string",
            "description": "organization id",
            "name": "organization",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "provider aws/gcp",
            "name": "X-Provider",
            "in": "header",
            "required": true
          },
          {
            "type": "string",
            "description": "region",
            "name": "X-Region",
            "in": "header",
            "required": true
          },
          {
            "type": "string",
            "description": "organization id from dbaas",
            "name": "X-Org-Id",
            "in": "header",
            "required": true
          },
          {
            "type": "string",
            "description": "project id from dbaas",
            "name": "X-Project-Id",
            "in": "header",
            "required": true
          },
          {
            "type": "string",
            "description": "cluster id from dbaas",
            "name": "X-Cluster-Id",
            "in": "header",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/userdebug.UserDebugAuthorizationList"
            }
          }
        }
      }
    },
    "/{organization}/features": {
      "get": {
        "description": "list userdebug features",
        "produces": ["application/json"],
        "tags": ["userdebug"],
        "summary": "List userdebug features",
        "operationId": "GetUserDebugFeatures",
        "parameters": [
          {
            "type": "string",
            "description": "organization id",
            "name": "organization",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "provider aws/gcp",
            "name": "X-Provider",
            "in": "header",
            "required": true
          },
          {
            "type": "string",
            "description": "region",
            "name": "X-Region",
            "in": "header",
            "required": true
          },
          {
            "type": "string",
            "description": "organization id from dbaas",
            "name": "X-Org-Id",
            "in": "header",
            "required": true
          },
          {
            "type": "string",
            "description": "project id from dbaas",
            "name": "X-Project-Id",
            "in": "header",
            "required": true
          },
          {
            "type": "string",
            "description": "cluster id from dbaas",
            "name": "X-Cluster-Id",
            "in": "header",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/userdebug.UserDebugFeatureList"
            }
          }
        }
      }
    },
    "/{organization}/{cluster}/authorization": {
      "get": {
        "description": "get userdebug auth code",
        "produces": ["application/json"],
        "tags": ["userdebug"],
        "summary": "get userdebug auth code",
        "operationId": "GetUserDebugAuthCode",
        "parameters": [
          {
            "type": "string",
            "description": "organization id",
            "name": "organization",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "cluster id",
            "name": "cluster",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "provider aws/gcp",
            "name": "X-Provider",
            "in": "header",
            "required": true
          },
          {
            "type": "string",
            "description": "region",
            "name": "X-Region",
            "in": "header",
            "required": true
          },
          {
            "type": "string",
            "description": "organization id from dbaas",
            "name": "X-Org-Id",
            "in": "header",
            "required": true
          },
          {
            "type": "string",
            "description": "project id from dbaas",
            "name": "X-Project-Id",
            "in": "header",
            "required": true
          },
          {
            "type": "string",
            "description": "cluster id from dbaas",
            "name": "X-Cluster-Id",
            "in": "header",
            "required": true
          },
          {
            "type": "string",
            "description": "user name",
            "name": "user",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/userdebug.UserDebugAuthorization"
            }
          }
        }
      },
      "post": {
        "description": "create the userdebug auth code",
        "produces": ["application/json"],
        "tags": ["userdebug"],
        "summary": "create the userdebug auth code",
        "operationId": "CreateUserDebugAuthCode",
        "parameters": [
          {
            "type": "string",
            "description": "organization id",
            "name": "organization",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "cluster id",
            "name": "cluster",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "provider aws/gcp",
            "name": "X-Provider",
            "in": "header",
            "required": true
          },
          {
            "type": "string",
            "description": "region",
            "name": "X-Region",
            "in": "header",
            "required": true
          },
          {
            "type": "string",
            "description": "organization id from dbaas",
            "name": "X-Org-Id",
            "in": "header",
            "required": true
          },
          {
            "type": "string",
            "description": "project id from dbaas",
            "name": "X-Project-Id",
            "in": "header",
            "required": true
          },
          {
            "type": "string",
            "description": "cluster id from dbaas",
            "name": "X-Cluster-Id",
            "in": "header",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "string"
            }
          }
        }
      },
      "delete": {
        "description": "revokes the userdebug auth code",
        "produces": ["application/json"],
        "tags": ["userdebug"],
        "summary": "revokes the userdebug auth code",
        "operationId": "DeleteUserDebugAuth",
        "parameters": [
          {
            "type": "string",
            "description": "organization id",
            "name": "organization",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "cluster id",
            "name": "cluster",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "provider aws/gcp",
            "name": "X-Provider",
            "in": "header",
            "required": true
          },
          {
            "type": "string",
            "description": "region",
            "name": "X-Region",
            "in": "header",
            "required": true
          },
          {
            "type": "string",
            "description": "organization id from dbaas",
            "name": "X-Org-Id",
            "in": "header",
            "required": true
          },
          {
            "type": "string",
            "description": "project id from dbaas",
            "name": "X-Project-Id",
            "in": "header",
            "required": true
          },
          {
            "type": "string",
            "description": "cluster id from dbaas",
            "name": "X-Cluster-Id",
            "in": "header",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "type": "string"
            }
          }
        }
      }
    },
    "/{organization}/{cluster}/authorization/details/{auth_id}": {
      "get": {
        "description": "get the detail of a userdebug auth code",
        "produces": ["application/json"],
        "tags": ["userdebug"],
        "summary": "get the detail of a userdebug auth code",
        "operationId": "GetUserDebugAuthDetail",
        "parameters": [
          {
            "type": "string",
            "description": "organization id",
            "name": "organization",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "cluster id",
            "name": "cluster",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "auth id",
            "name": "auth_id",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "provider aws/gcp",
            "name": "X-Provider",
            "in": "header",
            "required": true
          },
          {
            "type": "string",
            "description": "region",
            "name": "X-Region",
            "in": "header",
            "required": true
          },
          {
            "type": "string",
            "description": "organization id from dbaas",
            "name": "X-Org-Id",
            "in": "header",
            "required": true
          },
          {
            "type": "string",
            "description": "project id from dbaas",
            "name": "X-Project-Id",
            "in": "header",
            "required": true
          },
          {
            "type": "string",
            "description": "cluster id from dbaas",
            "name": "X-Cluster-Id",
            "in": "header",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/userdebug.UserDebugAuthorizationDetail"
            }
          }
        }
      }
    },
    "/{organization}/{cluster}/authorization/records": {
      "get": {
        "description": "get use userdebug auth code records",
        "produces": ["application/json"],
        "tags": ["userdebug"],
        "summary": "get userdebug auth code records",
        "operationId": "GetUserDebugAuthRecords",
        "parameters": [
          {
            "type": "string",
            "description": "organization id",
            "name": "organization",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "cluster id",
            "name": "cluster",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "provider aws/gcp",
            "name": "X-Provider",
            "in": "header",
            "required": true
          },
          {
            "type": "string",
            "description": "region",
            "name": "X-Region",
            "in": "header",
            "required": true
          },
          {
            "type": "string",
            "description": "organization id from dbaas",
            "name": "X-Org-Id",
            "in": "header",
            "required": true
          },
          {
            "type": "string",
            "description": "project id from dbaas",
            "name": "X-Project-Id",
            "in": "header",
            "required": true
          },
          {
            "type": "string",
            "description": "cluster id from dbaas",
            "name": "X-Cluster-Id",
            "in": "header",
            "required": true
          },
          {
            "type": "string",
            "description": "page number",
            "name": "page",
            "in": "query"
          },
          {
            "type": "string",
            "description": "records per page",
            "name": "per_page",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/userdebug.UserDebugAuthorizationRecords"
            }
          }
        }
      }
    },
    "/{organization}/{cluster}/authorization/records/{auth_id}": {
      "get": {
        "description": "get userdebug auth code records for a specific auth code",
        "produces": ["application/json"],
        "tags": ["userdebug"],
        "summary": "get userdebug auth code records for a specific auth code",
        "operationId": "GetUserDebugAuthRecordsForAuth",
        "parameters": [
          {
            "type": "string",
            "description": "organization id",
            "name": "organization",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "cluster id",
            "name": "cluster",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "auth id",
            "name": "auth_id",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "provider aws/gcp",
            "name": "X-Provider",
            "in": "header",
            "required": true
          },
          {
            "type": "string",
            "description": "region",
            "name": "X-Region",
            "in": "header",
            "required": true
          },
          {
            "type": "string",
            "description": "organization id from dbaas",
            "name": "X-Org-Id",
            "in": "header",
            "required": true
          },
          {
            "type": "string",
            "description": "project id from dbaas",
            "name": "X-Project-Id",
            "in": "header",
            "required": true
          },
          {
            "type": "string",
            "description": "cluster id from dbaas",
            "name": "X-Cluster-Id",
            "in": "header",
            "required": true
          },
          {
            "type": "string",
            "description": "page number",
            "name": "page",
            "in": "query"
          },
          {
            "type": "string",
            "description": "records per page",
            "name": "per_page",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/userdebug.UserDebugAuthorizationRecords"
            }
          }
        }
      }
    }
  },
  "definitions": {
    "common.BaseResp": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer"
        },
        "message": {
          "type": "string"
        }
      }
    },
    "entity.AlertSubscriberType": {
      "type": "string",
      "enum": ["EMAIL", "SLACK", "ZOOM", "FLASHDUTY", "PAGERDUTY", "WEBHOOK", "LARK"],
      "x-enum-varnames": [
        "AlertSubscriberTypeEmail",
        "AlertSubscriberTypeSlack",
        "AlertSubscriberTypeZoom",
        "AlertSubscriberTypeFlashDuty",
        "AlertSubscriberTypePagerDuty",
        "AlertSubscriberTypeWebhook",
        "AlertSubscriberTypeLark"
      ]
    },
    "entity.AlertSubscribersItem": {
      "type": "object",
      "properties": {
        "email": {
          "type": "string"
        },
        "flashDutyUrl": {
          "type": "string"
        },
        "id": {
          "type": "integer"
        },
        "larkSecret": {
          "type": "string"
        },
        "larkWebhookUrl": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "pagerDutyKey": {
          "type": "string"
        },
        "slackUrl": {
          "type": "string"
        },
        "subscriberType": {
          "$ref": "#/definitions/entity.AlertSubscriberType"
        },
        "webhookUrl": {
          "type": "string"
        },
        "zoomToken": {
          "type": "string"
        },
        "zoomUrl": {
          "type": "string"
        }
      }
    },
    "entity.CreateAlertSubscriberRequest": {
      "type": "object",
      "required": ["subscriberType"],
      "properties": {
        "dryRun": {
          "type": "boolean"
        },
        "email": {
          "type": "string"
        },
        "flashDutyUrl": {
          "type": "string"
        },
        "larkSecret": {
          "type": "string"
        },
        "larkWebhookUrl": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "pagerDutyKey": {
          "type": "string"
        },
        "slackUrl": {
          "type": "string"
        },
        "subscriberType": {
          "$ref": "#/definitions/entity.AlertSubscriberType"
        },
        "webhookUrl": {
          "type": "string"
        },
        "zoomToken": {
          "type": "string"
        },
        "zoomUrl": {
          "type": "string"
        }
      }
    },
    "entity.GetAlertSubscriberQuotaResponse": {
      "type": "object",
      "properties": {
        "maxAlertSubscribersCount": {
          "type": "integer"
        },
        "supportPlan": {
          "$ref": "#/definitions/entity.SupportPlanType"
        }
      }
    },
    "entity.ListAlertSubscribersResponse": {
      "type": "object",
      "properties": {
        "alertSubscribers": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/entity.AlertSubscribersItem"
          }
        },
        "totalSize": {
          "type": "integer"
        }
      }
    },
    "entity.SupportPlanType": {
      "type": "string",
      "enum": ["Basic", "Developer", "Enterprise", "Premium"],
      "x-enum-varnames": [
        "SupportPlanTypeBasic",
        "SupportPlanTypeDeveloper",
        "SupportPlanTypeEnterprise",
        "SupportPlanTypePremium"
      ]
    },
    "event.BaseResp": {
      "type": "object",
      "properties": {
        "err_code": {
          "type": "string"
        },
        "err_msg": {
          "type": "string"
        }
      }
    },
    "event.Event": {
      "type": "object",
      "properties": {
        "author": {
          "type": "string"
        },
        "calibration_time": {
          "type": "integer"
        },
        "status": {
          "type": "string"
        },
        "summary": {
          "type": "string"
        },
        "type": {
          "type": "string"
        }
      }
    },
    "event.EventStatus": {
      "type": "string",
      "enum": ["started", "succeeded", "failed", "canceled", "skipped", "running", "paused", "resumed"],
      "x-enum-varnames": [
        "EventStatusStarted",
        "EventStatusSucceeded",
        "EventStatusFailed",
        "EventStatusCanceled",
        "EventStatusSkipped",
        "EventStatusRunning",
        "EventStatusPaused",
        "EventStatusResumed"
      ]
    },
    "event.ListEventFiltersResp": {
      "type": "object",
      "properties": {
        "base_resp": {
          "$ref": "#/definitions/event.BaseResp"
        },
        "event_status": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/event.EventStatus"
          }
        },
        "event_types": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "event.ListEventsResp": {
      "type": "object",
      "properties": {
        "base_resp": {
          "$ref": "#/definitions/event.BaseResp"
        },
        "cursor": {
          "type": "string"
        },
        "events": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/event.Event"
          }
        },
        "partial": {
          "type": "boolean"
        }
      }
    },
    "userdebug.UserDebugAuthorization": {
      "type": "object",
      "properties": {
        "token": {
          "type": "string"
        },
        "valid": {
          "type": "boolean"
        }
      }
    },
    "userdebug.UserDebugAuthorizationDetail": {
      "type": "object",
      "properties": {
        "authorized_by": {
          "$ref": "#/definitions/userdebug.UserDebugAuthorizedBy"
        },
        "cluster_id": {
          "type": "string"
        },
        "cluster_name": {
          "type": "string"
        },
        "created_at": {
          "type": "integer"
        },
        "expires_at": {
          "type": "integer"
        },
        "id": {
          "type": "string"
        },
        "project_id": {
          "type": "string"
        },
        "project_name": {
          "type": "string"
        },
        "status": {
          "type": "string"
        },
        "updated_at": {
          "type": "integer"
        }
      }
    },
    "userdebug.UserDebugAuthorizationList": {
      "type": "object",
      "properties": {
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/userdebug.UserDebugAuthorizationDetail"
          }
        },
        "total": {
          "type": "integer"
        }
      }
    },
    "userdebug.UserDebugAuthorizationRecordItem": {
      "type": "object",
      "properties": {
        "auth_id": {
          "type": "string"
        },
        "created_at": {
          "type": "integer"
        },
        "expires_at": {
          "type": "integer"
        },
        "operation": {
          "type": "string"
        },
        "time_span": {
          "type": "integer"
        },
        "user": {
          "$ref": "#/definitions/userdebug.UserDebugAuthorizedBy"
        }
      }
    },
    "userdebug.UserDebugAuthorizationRecords": {
      "type": "object",
      "properties": {
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/userdebug.UserDebugAuthorizationRecordItem"
          }
        },
        "total": {
          "type": "integer"
        }
      }
    },
    "userdebug.UserDebugAuthorizedBy": {
      "type": "object",
      "properties": {
        "email": {
          "type": "string"
        },
        "first_name": {
          "type": "string"
        },
        "id": {
          "type": "string"
        },
        "last_name": {
          "type": "string"
        }
      }
    },
    "userdebug.UserDebugFeatureList": {
      "type": "object",
      "properties": {
        "features": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/userdebug.UserDebugFeatureListFeaturesItems"
          }
        },
        "org_id": {
          "type": "string"
        }
      }
    },
    "userdebug.UserDebugFeatureListFeaturesItems": {
      "type": "object",
      "properties": {
        "key": {
          "type": "string"
        },
        "status": {
          "type": "string"
        }
      }
    }
  }
}
