{
  "swagger": "2.0",
  "info": {
    "title": "TiDB Cloud Premium Open API",
    "description": "TiDB Cloud Premium Open API",
    "version": "v1beta2"
  },
  "tags": [
    {
      "name": "ImportIntoService"
    }
  ],
  "host": "cloud.tidbapi.com",
  "schemes": [
    "https"
  ],
  "consumes": [
    "application/json"
  ],
  "produces": [
    "application/json"
  ],
  "paths": {
    "/v1beta2/tidbs/{tidbId}/imports": {
      "get": {
        "summary": "Provides a list of import jobs",
        "description": "List an import job",
        "operationId": "ListImportIntoTasks",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1beta2ListImportIntoTasksResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "tidbId",
            "description": "The tidb_id to listing imports.",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "pageToken",
            "description": "Optional. The page token, default is empty.",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "pageSize",
            "description": "Optional. The page size, default is 10.",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "q",
            "description": "Optional. The search query.",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "status",
            "description": "Optional. The status filter\n\n - ENUM_UNSPECIFIED: The state of the import is unknown.\n - ENUM_PREPARING: The import is preparing.\n - ENUM_IMPORTING: The import is importing.\n - ENUM_COMPLETED: The import is completed.\n - ENUM_FAILED: The import is failed.\n - ENUM_CANCELING: The import is canceling.\n - ENUM_CANCELED: The import is canceled.\n - ENUM_SCALING_UP: The import is scaling up dxf nodes",
            "in": "query",
            "required": false,
            "type": "string",
            "enum": [
              "ENUM_UNSPECIFIED",
              "ENUM_PREPARING",
              "ENUM_IMPORTING",
              "ENUM_COMPLETED",
              "ENUM_FAILED",
              "ENUM_CANCELING",
              "ENUM_CANCELED",
              "ENUM_SCALING_UP"
            ],
            "default": "ENUM_UNSPECIFIED"
          }
        ],
        "tags": [
          "ImportService"
        ]
      },
      "post": {
        "summary": "Create an import job",
        "description": "Create an import job",
        "operationId": "CreateImportIntoTask",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1beta2ImportIntoTask"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "tidbId",
            "description": "The TiDB cluster id to create the import.",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "import",
            "description": "The import to create.",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/v1beta2ImportIntoTask"
            }
          }
        ],
        "tags": [
          "ImportService"
        ]
      }
    },
    "/v1beta2/tidbs/{tidbId}/imports/checkSourceAsync/{taskId}": {
      "get": {
        "description": "get async import source check task",
        "operationId": "GetCheckImportSourceTask",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1beta2GetCheckImportSourceTaskResp"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "tidbId",
            "description": "The tidb id to check import source.",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "taskId",
            "description": "The async task id.",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "tags": [
          "ImportService"
        ]
      }
    },
    "/v1beta2/tidbs/{tidbId}/imports/{importId}": {
      "get": {
        "summary": "Get an import detailed information",
        "description": "Get an import job",
        "operationId": "GetImportIntoTask",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1beta2ImportIntoTask"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "tidbId",
            "description": "The TiDB cluster id of the import.",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "importId",
            "description": "The id of the import.",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "tags": [
          "ImportService"
        ]
      }
    },
    "/v1beta2/tidbs/{tidbId}/imports/{importId}:cancel": {
      "post": {
        "summary": "Cancel an import job",
        "description": "Cancel an import job",
        "operationId": "CancelImportIntoTask",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "type": "object",
              "properties": {}
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "tidbId",
            "description": "The TiDB cluster id of the import.",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "importId",
            "description": "The id of the import.",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "type": "object",
              "description": "The IDs of the import."
            }
          }
        ],
        "tags": [
          "ImportService"
        ]
      }
    },
    "/v1beta2/tidbs/{tidbId}/imports:checkDatabaseConnectivity": {
      "post": {
        "description": "check import database connectivity",
        "operationId": "CheckDatabaseConnectivity",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1beta2CheckDatabaseConnectivityResp"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "tidbId",
            "description": "The tidb id to check import source.",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "type": "object",
              "properties": {
                "username": {
                  "type": "string",
                  "title": "Database username"
                },
                "password": {
                  "type": "string",
                  "title": "Database password"
                },
                "needCreateTable": {
                  "type": "boolean",
                  "title": "Create tables need more privilege"
                }
              },
              "description": "The request message for check database connection."
            }
          }
        ],
        "tags": [
          "ImportService"
        ]
      }
    },
    "/v1beta2/tidbs/{tidbId}/imports:checkImportSourceConnection": {
      "post": {
        "description": "check import soure connection",
        "operationId": "CheckImportSourceConnection",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1beta2CheckImportSourceConnectionResp"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "tidbId",
            "description": "The tidb id to check import source.",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "type": "object",
              "properties": {
                "source": {
                  "$ref": "#/definitions/adminapiv1beta2ImportSource"
                }
              },
              "description": "The request message for check import source."
            }
          }
        ],
        "tags": [
          "ImportService"
        ]
      }
    },
    "/v1beta2/tidbs/{tidbId}/imports:checkSource": {
      "post": {
        "description": "check import source",
        "operationId": "CheckImportSource",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1beta2CheckImportSourceResp"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "tidbId",
            "description": "The tidb id to check import source.",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "type": "object",
              "properties": {
                "source": {
                  "$ref": "#/definitions/adminapiv1beta2ImportSource"
                },
                "tableMetas": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "$ref": "#/definitions/adminapiv1beta2ImportTargetTableInfo"
                  },
                  "description": "to specific tables needed be imported, we will only check specific tables if this fields is not null."
                }
              },
              "description": "The request message for check import source."
            }
          }
        ],
        "tags": [
          "ImportService"
        ]
      }
    },
    "/v1beta2/tidbs/{tidbId}/imports:checkSourceAsync": {
      "post": {
        "description": "create async import source check task",
        "operationId": "CreateCheckImportSourceTask",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1beta2CreateCheckImportSourceTaskResp"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "tidbId",
            "description": "The tidb id to check import source.",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "type": "object",
              "properties": {
                "source": {
                  "$ref": "#/definitions/adminapiv1beta2ImportSource"
                },
                "tableMetas": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "$ref": "#/definitions/adminapiv1beta2ImportTargetTableInfo"
                  },
                  "description": "to specific tables needed be imported, we will only check specific tables if this fields is not null."
                }
              },
              "description": "The request message for creating an async import source check task."
            }
          }
        ],
        "tags": [
          "ImportService"
        ]
      }
    }
  },
  "definitions": {
    "adminapiv1beta2AzureBlobSource": {
      "type": "object",
      "properties": {
        "uri": {
          "type": "string",
          "description": "The Azure Blob HTTPS URI of the import source."
        },
        "authType": {
          "description": "The auth method of the import source.",
          "allOf": [
            {
              "$ref": "#/definitions/adminapiv1beta2ImportAzureBlobAuthTypeEnum"
            }
          ]
        },
        "sasToken": {
          "type": "string",
          "description": "The SAS token. This field is input-only."
        }
      },
      "description": "The Azure Blob source of the import."
    },
    "adminapiv1beta2ImportAzureBlobAuthTypeEnum": {
      "type": "string",
      "enum": [
        "ENUM_UNSPECIFIED",
        "ENUM_SAS_TOKEN"
      ],
      "default": "ENUM_UNSPECIFIED",
      "description": "The type of the access method.\n\n - ENUM_UNSPECIFIED: The access method is unknown.\n - ENUM_SAS_TOKEN: The access method is SAS token."
    },
    "adminapiv1beta2ImportOptions": {
      "type": "object",
      "properties": {
        "csvFormat": {
          "description": "Optional. The CSV format.",
          "allOf": [
            {
              "$ref": "#/definitions/v1beta2CSVFormat"
            }
          ]
        }
      },
      "description": "The options of the import."
    },
    "adminapiv1beta2ImportS3AuthTypeEnum": {
      "type": "string",
      "enum": [
        "ENUM_UNSPECIFIED",
        "ENUM_ROLE_ARN",
        "ENUM_ACCESS_KEY"
      ],
      "default": "ENUM_UNSPECIFIED",
      "description": "The type of the access method.\n\n - ENUM_UNSPECIFIED: The access method is unknown.\n - ENUM_ROLE_ARN: The access method is role arn.\n - ENUM_ACCESS_KEY: The access method is access key."
    },
    "adminapiv1beta2ImportSource": {
      "type": "object",
      "properties": {
        "type": {
          "description": "The import source type.",
          "allOf": [
            {
              "$ref": "#/definitions/adminapiv1beta2ImportSourceTypeEnum"
            }
          ]
        },
        "uri": {
          "type": "string",
          "title": "the uri of source",
          "readOnly": true
        },
        "s3": {
          "description": "The S3 information.",
          "allOf": [
            {
              "$ref": "#/definitions/adminapiv1beta2S3Source"
            }
          ]
        },
        "oss": {
          "title": "The OSS information",
          "allOf": [
            {
              "$ref": "#/definitions/v1beta2OSSSource"
            }
          ]
        },
        "azureBlob": {
          "description": "The Azure Blob information.",
          "allOf": [
            {
              "$ref": "#/definitions/adminapiv1beta2AzureBlobSource"
            }
          ]
        }
      },
      "description": "The source of the import."
    },
    "adminapiv1beta2ImportSourceTypeEnum": {
      "type": "string",
      "enum": [
        "ENUM_UNSPECIFIED",
        "ENUM_S3",
        "ENUM_AZURE_BLOB",
        "ENUM_OSS"
      ],
      "default": "ENUM_UNSPECIFIED",
      "description": "The source type of the import.\n\n - ENUM_UNSPECIFIED: The source of the import is unknown.\n - ENUM_S3: S3 source.\n - ENUM_AZURE_BLOB: Azure Blob source.\n - ENUM_OSS: OSS source"
    },
    "adminapiv1beta2ImportTargetTableInfo": {
      "type": "object",
      "properties": {
        "database": {
          "type": "string",
          "description": "The target database of the import."
        },
        "table": {
          "type": "string",
          "description": "The target table of the import."
        },
        "filesWildcard": {
          "type": "string",
          "description": "The files_wildcard table of the import."
        }
      },
      "description": "The target table info of the import."
    },
    "adminapiv1beta2S3Source": {
      "type": "object",
      "properties": {
        "uri": {
          "type": "string",
          "description": "The S3 URI of the import source."
        },
        "authType": {
          "description": "The auth method of the import source.",
          "allOf": [
            {
              "$ref": "#/definitions/adminapiv1beta2ImportS3AuthTypeEnum"
            }
          ]
        },
        "roleArn": {
          "type": "string",
          "title": "The role arn"
        },
        "accessKey": {
          "description": "The access key.",
          "allOf": [
            {
              "$ref": "#/definitions/adminapiv1beta2S3SourceAccessKey"
            }
          ]
        }
      },
      "description": "The S3 source of the import."
    },
    "adminapiv1beta2S3SourceAccessKey": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "The access key id."
        },
        "secret": {
          "type": "string",
          "description": "The secret access key. This field is input-only."
        }
      },
      "description": "The access key of the import source."
    },
    "protobufAny": {
      "type": "object",
      "properties": {
        "@type": {
          "type": "string",
          "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n  value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n  URL, or have them precompiled into a binary to avoid any\n  lookup. Therefore, binary compatibility needs to be preserved\n  on changes to types. (Use versioned type names to manage\n  breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics."
        }
      },
      "additionalProperties": {},
      "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n    Foo foo = ...;\n    Any any;\n    any.PackFrom(foo);\n    ...\n    if (any.UnpackTo(\u0026foo)) {\n      ...\n    }\n\nExample 2: Pack and unpack a message in Java.\n\n    Foo foo = ...;\n    Any any = Any.pack(foo);\n    ...\n    if (any.is(Foo.class)) {\n      foo = any.unpack(Foo.class);\n    }\n\nExample 3: Pack and unpack a message in Python.\n\n    foo = Foo(...)\n    any = Any()\n    any.Pack(foo)\n    ...\n    if any.Is(Foo.DESCRIPTOR):\n      any.Unpack(foo)\n      ...\n\nExample 4: Pack and unpack a message in Go\n\n     foo := \u0026pb.Foo{...}\n     any, err := anypb.New(foo)\n     if err != nil {\n       ...\n     }\n     ...\n     foo := \u0026pb.Foo{}\n     if err := any.UnmarshalTo(foo); err != nil {\n       ...\n     }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n    package google.profile;\n    message Person {\n      string first_name = 1;\n      string last_name = 2;\n    }\n\n    {\n      \"@type\": \"type.googleapis.com/google.profile.Person\",\n      \"firstName\": \u003cstring\u003e,\n      \"lastName\": \u003cstring\u003e\n    }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n    {\n      \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n      \"value\": \"1.212s\"\n    }"
    },
    "rpcStatus": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32"
        },
        "message": {
          "type": "string"
        },
        "details": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/protobufAny"
          }
        }
      }
    },
    "v1beta2CSVFormat": {
      "type": "object",
      "properties": {
        "separator": {
          "type": "string",
          "description": "Separator of each value in CSV files. Default is ','."
        },
        "delimiter": {
          "type": "string",
          "description": "Delimiter of string type variables in CSV files. Default is '\"'."
        },
        "lineTerminator": {
          "type": "string",
          "description": "Specifies the line terminator. By default, IMPORT INTO automatically identifies \\n, \\r, or \\r\\n as line terminators. If the line terminator is one of these three, you do not need to explicitly specify this option."
        },
        "escapeChar": {
          "type": "string",
          "description": "Specifies the escape character for fields. The default escape character is \\."
        },
        "skipRows": {
          "type": "integer",
          "format": "int64",
          "title": "Specifies the number of rows to skip. The default value is 0"
        },
        "nullValue": {
          "type": "string",
          "description": "Specifies the value that represents NULL in the fields. The default value is \\N."
        },
        "splitFile": {
          "type": "boolean",
          "title": "Splits a single CSV file into multiple smaller chunks of around 256 MiB for parallel processing to improve import efficiency. This parameter only works for non-compressed CSV files"
        }
      },
      "description": "The format specification for CSV files."
    },
    "v1beta2CheckDatabaseConnectivityResp": {
      "type": "object",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "the check result."
        },
        "errorMsg": {
          "type": "string",
          "description": "the error message if the check is not success."
        }
      },
      "description": "The response message for check database connection."
    },
    "v1beta2CheckImportSourceConnectionResp": {
      "type": "object",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "the check result."
        },
        "region": {
          "type": "string",
          "title": "the region"
        },
        "errorMsg": {
          "type": "string",
          "title": "error message"
        }
      },
      "description": "The response message for check import source."
    },
    "v1beta2CheckImportSourceResp": {
      "type": "object",
      "properties": {
        "success": {
          "type": "boolean",
          "description": "the check result."
        },
        "errorMsg": {
          "type": "string",
          "description": "the error message if the check is not success."
        },
        "tableMetas": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/adminapiv1beta2ImportTargetTableInfo"
          },
          "title": "the table meta list from source"
        },
        "totalScannedObjects": {
          "type": "integer",
          "format": "int32",
          "title": "the num of scanned objects"
        },
        "status": {
          "title": "the status of success",
          "allOf": [
            {
              "$ref": "#/definitions/v1beta2CheckImportSourceStatusEnum"
            }
          ]
        }
      },
      "description": "The response message for check import source."
    },
    "v1beta2CheckImportSourceStatusEnum": {
      "type": "string",
      "enum": [
        "ENUM_UNSPECIFIED",
        "ENUM_RUNNING",
        "ENUM_SUCCESS",
        "ENUM_TRUNCATED"
      ],
      "default": "ENUM_UNSPECIFIED",
      "description": " - ENUM_UNSPECIFIED: The status is unknown.\n - ENUM_RUNNING: The async file discovery task is still running.\n - ENUM_SUCCESS: The status is success.\n - ENUM_TRUNCATED: The status is truncated."
    },
    "v1beta2CreateCheckImportSourceTaskResp": {
      "type": "object",
      "properties": {
        "taskId": {
          "type": "string",
          "description": "The async task id."
        }
      },
      "description": "The response message for creating an async import source check task."
    },
    "v1beta2CreationDetails": {
      "type": "object",
      "properties": {
        "importOptions": {
          "description": "The options of the import.",
          "allOf": [
            {
              "$ref": "#/definitions/adminapiv1beta2ImportOptions"
            }
          ]
        },
        "source": {
          "description": "The source of the import.",
          "allOf": [
            {
              "$ref": "#/definitions/adminapiv1beta2ImportSource"
            }
          ]
        },
        "targetTableInfos": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/adminapiv1beta2ImportTargetTableInfo"
          },
          "description": "Optional. The target table infos of the import."
        }
      },
      "description": "The details of the import."
    },
    "v1beta2GetCheckImportSourceTaskResp": {
      "type": "object",
      "properties": {
        "taskId": {
          "type": "string",
          "description": "The async task id."
        },
        "success": {
          "type": "boolean",
          "description": "the check result."
        },
        "errorMsg": {
          "type": "string",
          "description": "the error message if the check is not success."
        },
        "tableMetas": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/adminapiv1beta2ImportTargetTableInfo"
          },
          "title": "the table meta list from source"
        },
        "totalScannedObjects": {
          "type": "integer",
          "format": "int32",
          "title": "the num of scanned objects"
        },
        "status": {
          "title": "the status of success",
          "allOf": [
            {
              "$ref": "#/definitions/v1beta2CheckImportSourceStatusEnum"
            }
          ]
        }
      },
      "description": "The response message for getting an async import source check task."
    },
    "v1beta2ImportIntoSubTask": {
      "type": "object",
      "properties": {
        "database": {
          "type": "string",
          "description": "The target database of the import."
        },
        "table": {
          "type": "string",
          "description": "The target table of the import."
        },
        "filesWildcard": {
          "type": "string",
          "description": "The files_wildcard table of the import."
        },
        "jobId": {
          "type": "string",
          "format": "uint64",
          "description": "The job id of import task.",
          "readOnly": true
        },
        "status": {
          "description": "The display status of an import subtask.",
          "readOnly": true,
          "allOf": [
            {
              "$ref": "#/definitions/v1beta2ImportSubTaskStatusEnum"
            }
          ]
        },
        "startedTime": {
          "type": "string",
          "format": "date-time",
          "description": "The time the import was started.",
          "readOnly": true
        },
        "finishedTime": {
          "type": "string",
          "format": "date-time",
          "description": "The time the import was finished.",
          "readOnly": true
        },
        "importedRows": {
          "type": "string",
          "format": "uint64",
          "description": "The imported rows of the import task.",
          "readOnly": true
        },
        "totalSize": {
          "type": "string",
          "format": "uint64",
          "title": "The total size of the import task",
          "readOnly": true
        },
        "resultMessage": {
          "type": "string",
          "title": "The Message of Result",
          "readOnly": true
        },
        "phase": {
          "type": "string",
          "title": "The phase of importing, deprecated, use the current step field",
          "readOnly": true
        },
        "currentStep": {
          "type": "string",
          "title": "The step of importing, empty means task is not running",
          "readOnly": true
        },
        "currentStepTotalSize": {
          "type": "string",
          "title": "The total size of current step need be processed, a human readable format",
          "readOnly": true
        },
        "currentStepProgressPercent": {
          "type": "integer",
          "format": "int32",
          "title": "The current step processing progress (%)",
          "readOnly": true
        },
        "currentStepEta": {
          "type": "string",
          "title": "The ETA of current step",
          "readOnly": true
        },
        "currentStepProcessedDataSize": {
          "type": "string",
          "title": "The processed data size of current step, a human readable format",
          "readOnly": true
        },
        "columns": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "title": "The custom columns of the table needs to be imported, empty means matching the columns of input file(s)"
        },
        "currentStepSpeed": {
          "type": "string",
          "title": "The current step processing speed",
          "readOnly": true
        }
      }
    },
    "v1beta2ImportIntoTask": {
      "type": "object",
      "properties": {
        "tidbId": {
          "type": "string",
          "description": "The ID of the TiDB cluster to import into.",
          "readOnly": true
        },
        "totalSize": {
          "type": "string",
          "format": "int64",
          "description": "The total size of the data imported.",
          "readOnly": true
        },
        "createTime": {
          "type": "string",
          "format": "date-time",
          "description": "The time the import was created.",
          "readOnly": true
        },
        "completeTime": {
          "type": "string",
          "format": "date-time",
          "description": "The time the import was completed.",
          "readOnly": true
        },
        "state": {
          "description": "The state of the import.",
          "readOnly": true,
          "allOf": [
            {
              "$ref": "#/definitions/v1beta2ImportStateEnum"
            }
          ]
        },
        "completePercent": {
          "type": "integer",
          "format": "int32",
          "description": "The process in percent of the import job, but doesn't include the post-processing progress.",
          "readOnly": true
        },
        "message": {
          "type": "string",
          "description": "The output message of the import.",
          "readOnly": true
        },
        "creator": {
          "type": "string",
          "description": "The user who created the import.",
          "readOnly": true
        },
        "creationDetails": {
          "description": "The creation details of the import.",
          "allOf": [
            {
              "$ref": "#/definitions/v1beta2CreationDetails"
            }
          ]
        },
        "importId": {
          "type": "string",
          "description": "The ID of the import.",
          "readOnly": true
        },
        "subtasks": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/v1beta2ImportIntoSubTask"
          },
          "description": "Import Into Sub Tasks.",
          "readOnly": true
        },
        "groupKey": {
          "type": "string",
          "description": "Deprecated: ignored on create. Dataflow generates and uses a service-owned\ngroup key in the form `import-into-\u003cimport_id\u003e`."
        },
        "username": {
          "type": "string",
          "title": "Database username"
        },
        "password": {
          "type": "string",
          "title": "Database password"
        },
        "name": {
          "type": "string",
          "title": "The Job Name, default imp-{import_id}"
        }
      },
      "description": "The import."
    },
    "v1beta2ImportOSSAuthTypeEnum": {
      "type": "string",
      "enum": [
        "ENUM_UNSPECIFIED",
        "ENUM_ACCESS_KEY"
      ],
      "default": "ENUM_UNSPECIFIED",
      "description": "The type of the access method.\n\n - ENUM_UNSPECIFIED: The access method is unknown.\n - ENUM_ACCESS_KEY: The access method is access key."
    },
    "v1beta2ImportStateEnum": {
      "type": "string",
      "enum": [
        "ENUM_UNSPECIFIED",
        "ENUM_PREPARING",
        "ENUM_IMPORTING",
        "ENUM_COMPLETED",
        "ENUM_FAILED",
        "ENUM_CANCELING",
        "ENUM_CANCELED",
        "ENUM_SCALING_UP"
      ],
      "default": "ENUM_UNSPECIFIED",
      "description": "The state of the import.\n\n - ENUM_UNSPECIFIED: The state of the import is unknown.\n - ENUM_PREPARING: The import is preparing.\n - ENUM_IMPORTING: The import is importing.\n - ENUM_COMPLETED: The import is completed.\n - ENUM_FAILED: The import is failed.\n - ENUM_CANCELING: The import is canceling.\n - ENUM_CANCELED: The import is canceled.\n - ENUM_SCALING_UP: The import is scaling up dxf nodes"
    },
    "v1beta2ImportSubTaskStatusEnum": {
      "type": "string",
      "enum": [
        "ENUM_UNSPECIFIED",
        "ENUM_PENDING",
        "ENUM_RUNNING",
        "ENUM_CANCELED",
        "ENUM_FAILED",
        "ENUM_FINISHED",
        "ENUM_WARNING"
      ],
      "default": "ENUM_UNSPECIFIED",
      "description": " - ENUM_UNSPECIFIED: The status of the import subtask is unknown.\n - ENUM_PENDING: The import subtask is pending.\n - ENUM_RUNNING: The import subtask is running.\n - ENUM_CANCELED: The import subtask is canceled.\n - ENUM_FAILED: The import subtask has failed.\n - ENUM_FINISHED: The import subtask has finished.\n - ENUM_WARNING: The import subtask has finished with warnings."
    },
    "v1beta2ListImportIntoTasksResponse": {
      "type": "object",
      "properties": {
        "imports": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/v1beta2ImportIntoTask"
          },
          "description": "The imports.",
          "readOnly": true
        },
        "totalSize": {
          "type": "integer",
          "format": "int32",
          "title": "The total size of the imports.\naip:ignore",
          "readOnly": true
        },
        "nextPageToken": {
          "type": "string",
          "description": "The next page token.",
          "readOnly": true
        }
      },
      "description": "The response message for listing imports."
    },
    "v1beta2OSSSource": {
      "type": "object",
      "properties": {
        "bucket": {
          "type": "string",
          "title": "The OSS Bucket name"
        },
        "prefix": {
          "type": "string",
          "description": "The OSS Prefix of the import source."
        },
        "uri": {
          "type": "string",
          "description": "The OSS URI of the import source, like oss://bucket/prefix, it will overwrite the bucket and prefix fields if not empty."
        },
        "authType": {
          "description": "The auth method of the import source.",
          "allOf": [
            {
              "$ref": "#/definitions/v1beta2ImportOSSAuthTypeEnum"
            }
          ]
        },
        "endpoint": {
          "type": "string",
          "title": "The OSS endpoint"
        },
        "accessKey": {
          "description": "The access key.",
          "allOf": [
            {
              "$ref": "#/definitions/v1beta2OSSSourceAccessKey"
            }
          ]
        }
      },
      "description": "The OSS source of the import."
    },
    "v1beta2OSSSourceAccessKey": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "The access key id."
        },
        "secret": {
          "type": "string",
          "description": "The secret access key. This field is input-only."
        }
      },
      "description": "The access key of the import source."
    }
  }
}
