// Code generated by swaggo/swag. DO NOT EDIT
package apikey

import "github.com/swaggo/swag"

const docTemplate = `{
    "schemes": {{ marshal .Schemes }},
    "swagger": "2.0",
    "info": {
        "description": "{{escape .Description}}",
        "title": "{{.Title}}",
        "contact": {},
        "version": "{{.Version}}"
    },
    "host": "{{.Host}}",
    "basePath": "{{.BasePath}}",
    "paths": {
        "/apikeys": {
            "get": {
                "description": "This endpoint returns a list of API keys.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "API Key"
                ],
                "summary": "Get a list of API keys",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "The project to which returned API key belongs. If not set, return the API keys belongs to org.",
                        "name": "projectId",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "A page token received from a previous call. Provide this to retrieve the subsequent page.",
                        "name": "pageToken",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "The page size. If unspecified, at most 100 API keys will be returned in one page.",
                        "name": "pageSize",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/api.OpenApiListApiKeyRsp"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/api.OpenApiError"
                        }
                    }
                }
            },
            "post": {
                "description": "This endpoint creates a new API key.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "API Key"
                ],
                "summary": "Create a new API key",
                "parameters": [
                    {
                        "description": "create API key request",
                        "name": "apiKey",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/api.OpenApiCreateApiKeyReq"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/api.OpenApiApiKey"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/api.OpenApiError"
                        }
                    }
                }
            }
        },
        "/apikeys/{accessKey}": {
            "get": {
                "description": "This endpoint retrieves a single API key.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "API Key"
                ],
                "summary": "Get a single API key",
                "parameters": [
                    {
                        "type": "string",
                        "description": "The access key of the API key.",
                        "name": "accessKey",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/api.OpenApiApiKey"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/api.OpenApiError"
                        }
                    }
                }
            },
            "delete": {
                "description": "This endpoint deletes an API key.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "API Key"
                ],
                "summary": "Delete an API key",
                "parameters": [
                    {
                        "type": "string",
                        "description": "The access key of the API key to delete.",
                        "name": "accessKey",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/api.OpenApiError"
                        }
                    }
                }
            },
            "patch": {
                "description": "This endpoint updates an API key by overwriting the specified values.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "API Key"
                ],
                "summary": "Update an API key",
                "parameters": [
                    {
                        "type": "string",
                        "description": "The access key of the API key to update.",
                        "name": "accessKey",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "update api key",
                        "name": "apiKey",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/api.OpenApiUpdateApiKeyReq"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/api.OpenApiError"
                        }
                    }
                }
            }
        }
    },
    "definitions": {
        "api.OpenApiApiKey": {
            "type": "object",
            "properties": {
                "accessKey": {
                    "description": "The access key of the API key.",
                    "type": "string",
                    "example": "ABCDEFGH"
                },
                "displayName": {
                    "description": "The display name of the API key.",
                    "type": "string",
                    "example": "New Key"
                },
                "name": {
                    "description": "The name of the API key.",
                    "type": "string",
                    "example": "orgs/1/apiKeys/2"
                },
                "role": {
                    "description": "The role of the API key.",
                    "type": "string",
                    "example": "org:owner"
                },
                "secretKey": {
                    "description": "The secret key of the API key.",
                    "type": "string",
                    "example": "498c7f44-656f-4944-b455-0695faa5d4f9"
                }
            }
        },
        "api.OpenApiCreateApiKeyReq": {
            "type": "object",
            "properties": {
                "displayName": {
                    "description": "The display name of API key.",
                    "type": "string",
                    "example": "New Key"
                },
                "projectId": {
                    "description": "The project to which the API key belongs. If not set, the API key belongs to org.",
                    "type": "integer",
                    "example": 123456
                },
                "role": {
                    "description": "The role of API key. If the projectId is set to 0, the role should be Organization roles, if the projectId is not set to 0, the role should be Project roles.\n\nOrganization roles:\n- ` + "`" + `org:owner` + "`" + `: indicates the 'Organization Owner' role.\n- ` + "`" + `org:member` + "`" + `: indicates the 'Organization Viewer'.\n- ` + "`" + `org:billing_admin` + "`" + `: indicates the 'Organization Billing Manager' role.\n- ` + "`" + `org:billing_viewer` + "`" + `: indicates the 'Organization Billing Viewer' role.\n- ` + "`" + `org:audit_admin` + "`" + `: indicates the 'Organization Console Audit Manager' role.\n\nProject roles:\n- ` + "`" + `project:owner` + "`" + `: indicates the 'Project Owner' role.\n- ` + "`" + `project:dev` + "`" + `: indicates the 'Project Data Access Read-Write' role.\n- ` + "`" + `project:readonly` + "`" + `: indicates the 'Project Data Access Read-Only' role.\n- ` + "`" + `project:ctl_plane_viewer` + "`" + `: indicates the 'Project Viewer' role.",
                    "type": "string",
                    "example": "org:owner"
                }
            }
        },
        "api.OpenApiError": {
            "type": "object",
            "properties": {
                "code": {
                    "type": "string"
                },
                "error": {},
                "msgPrefix": {
                    "type": "string"
                },
                "status": {
                    "type": "integer"
                }
            }
        },
        "api.OpenApiListApiKeyRsp": {
            "type": "object",
            "properties": {
                "apiKeys": {
                    "description": "The list of matching API keys.",
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/api.OpenApiApiKey"
                    }
                },
                "nextPageToken": {
                    "description": "` + "`" + `nextPageToken` + "`" + ` A token, which can be sent as ` + "`" + `pageToken` + "`" + ` to retrieve the next page. If this field is omitted, there are no subsequent pages.",
                    "type": "string",
                    "example": "498c7f44-656f-4944-b455-0695faa5d4f9"
                }
            }
        },
        "api.OpenApiUpdateApiKeyReq": {
            "type": "object",
            "properties": {
                "displayName": {
                    "description": "The display name of the API key.",
                    "type": "string",
                    "example": "New Key"
                },
                "projectId": {
                    "description": "The project to which the API key belongs. If not set, the API key belongs to org.",
                    "type": "integer",
                    "example": 123456
                },
                "role": {
                    "description": "The role of API key. If the projectId is set to 0, the role should be Organization roles, if the projectId is not set to 0, the role should be Project roles.\n\nOrganization roles:\n- ` + "`" + `org:owner` + "`" + `: indicates the 'Organization Owner' role.\n- ` + "`" + `org:member` + "`" + `: indicates the 'Organization Viewer'.\n- ` + "`" + `org:billing_admin` + "`" + `: indicates the 'Organization Billing Manager' role.\n- ` + "`" + `org:billing_viewer` + "`" + `: indicates the 'Organization Billing Viewer' role.\n- ` + "`" + `org:audit_admin` + "`" + `: indicates the 'Organization Console Audit Manager' role.\n\nProject roles:\n- ` + "`" + `project:owner` + "`" + `: indicates the 'Project Owner' role.\n- ` + "`" + `project:dev` + "`" + `: indicates the 'Project Data Access Read-Write' role.\n- ` + "`" + `project:readonly` + "`" + `: indicates the 'Project Data Access Read-Only' role.\n- ` + "`" + `project:ctl_plane_viewer` + "`" + `: indicates the 'Project Viewer' role.",
                    "type": "string",
                    "example": "org:owner"
                }
            }
        }
    }
}`

// SwaggerInfo holds exported Swagger Info so clients can modify it
var SwaggerInfo = &swag.Spec{
	Version:          "v1beta1",
	Host:             "iam.tidbapi.com",
	BasePath:         "/v1beta1",
	Schemes:          []string{},
	Title:            "Account System OPENAPI",
	Description:      "This is an account system server.",
	InfoInstanceName: "swagger",
	SwaggerTemplate:  docTemplate,
}

func init() {
	swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
}
