{
  "swagger": "2.0",
  "info": {
    "title": "agent/agent.proto",
    "version": "version not set"
  },
  "tags": [
    {
      "name": "AgentService"
    }
  ],
  "consumes": [
    "application/json"
  ],
  "produces": [
    "application/json"
  ],
  "paths": {
    "/api/v1/azblob/check_access": {
      "post": {
        "operationId": "CheckAzblobAccess",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/agentCheckAzblobAccessResp"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/agentCheckAzblobAccessReq"
            }
          }
        ],
        "tags": [
          "AgentService"
        ]
      }
    },
    "/api/v1/cluster-client-secret": {
      "post": {
        "operationId": "GetClusterClientSecret",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/agentGetClusterClientSecretResp"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/agentGetClusterClientSecretReq"
            }
          }
        ],
        "tags": [
          "AgentService"
        ]
      }
    },
    "/api/v1/cluster-tables": {
      "post": {
        "operationId": "GetClusterTables",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/agentGetClusterTablesResp"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/agentCluster"
            }
          }
        ],
        "tags": [
          "AgentService"
        ]
      }
    },
    "/api/v1/cluster/execsql": {
      "post": {
        "operationId": "ExecSQL",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/agentExecSQLResp"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/agentExecSQLReq"
            }
          }
        ],
        "tags": [
          "AgentService"
        ]
      }
    },
    "/api/v1/cluster/load-data": {
      "post": {
        "operationId": "LoadData",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/agentLoadDataResp"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/agentLoadDataReq"
            }
          }
        ],
        "tags": [
          "AgentService"
        ]
      }
    },
    "/api/v1/crypto/pem": {
      "post": {
        "operationId": "GetPublicKey",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/agentGetPublicKeyResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "description": "GetPublicKeyRequest is the request for fetching the agent's public key.",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/agentGetPublicKeyRequest"
            }
          }
        ],
        "tags": [
          "AgentService"
        ]
      }
    },
    "/api/v1/db-connectivity": {
      "post": {
        "operationId": "CheckDBConnectivity",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/agentCheckDBConnectivityResp"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/agentCheckDBConnectivityReq"
            }
          }
        ],
        "tags": [
          "AgentService"
        ]
      }
    },
    "/api/v1/dm/jobprecheck": {
      "post": {
        "operationId": "PrecheckDMJob",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/agentPrecheckDMJobResp"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/agentPrecheckDMJobReq"
            }
          }
        ],
        "tags": [
          "AgentService"
        ]
      }
    },
    "/api/v1/gcs/check_access": {
      "post": {
        "operationId": "CheckGcsAccess",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/agentCheckGcsAccessResp"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/agentCheckGcsAccessReq"
            }
          }
        ],
        "tags": [
          "AgentService"
        ]
      }
    },
    "/api/v1/import/clear-empty-tables": {
      "post": {
        "summary": "deprecated",
        "operationId": "ClearEmptyTables",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/agentClearEmptyTablesResp"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/agentClearEmptyTablesReq"
            }
          }
        ],
        "tags": [
          "AgentService"
        ]
      }
    },
    "/api/v1/import/create-schemas": {
      "post": {
        "operationId": "CreateSchemas",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "type": "object",
              "properties": {}
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/agentCreateSchemasReq"
            }
          }
        ],
        "tags": [
          "AgentService"
        ]
      }
    },
    "/api/v1/import/drop-cluster-tables": {
      "post": {
        "operationId": "DropClusterTables",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "type": "object",
              "properties": {}
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/agentDropClusterTablesReq"
            }
          }
        ],
        "tags": [
          "AgentService"
        ]
      }
    },
    "/api/v1/import/estimate-src-data-size": {
      "post": {
        "operationId": "EstimateSourceDataSize",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/agentEstimateSourceDataSizeResp"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/agentEstimateSourceDataSizeReq"
            }
          }
        ],
        "tags": [
          "AgentService"
        ]
      }
    },
    "/api/v1/import/get-import-files": {
      "post": {
        "operationId": "GetImportFiles",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/agentGetImportFilesResp"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/agentGetImportFilesReq"
            }
          }
        ],
        "tags": [
          "AgentService"
        ]
      }
    },
    "/api/v1/import/lightning-precheck": {
      "post": {
        "operationId": "LightningPrecheck",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/agentLightningPrecheckResp"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/agentLightningPrecheckReq"
            }
          }
        ],
        "tags": [
          "AgentService"
        ]
      }
    },
    "/api/v1/import/lightning-source-preview": {
      "post": {
        "operationId": "LightningSourcePreview",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/agentLightningSourcePreviewResp"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/agentLightningSourcePreviewReq"
            }
          }
        ],
        "tags": [
          "AgentService"
        ]
      }
    },
    "/api/v1/import/precheck-import-file": {
      "post": {
        "operationId": "PrecheckImportFile",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "type": "object",
              "properties": {}
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/agentPrecheckImportFileReq"
            }
          }
        ],
        "tags": [
          "AgentService"
        ]
      }
    },
    "/api/v1/import/preview-csv-file": {
      "post": {
        "operationId": "PreviewCsvFile",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/agentPreviewCsvFileResp"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/agentPreviewCsvFileReq"
            }
          }
        ],
        "tags": [
          "AgentService"
        ]
      }
    },
    "/api/v1/import/schemas-meta": {
      "post": {
        "operationId": "GetImportSchemasMeta",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/agentGetImportSchemasMetaResp"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/agentGetImportSchemasMetaReq"
            }
          }
        ],
        "tags": [
          "AgentService"
        ]
      }
    },
    "/api/v1/import/search-import-files": {
      "post": {
        "operationId": "SearchImportFiles",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/agentSearchImportFilesResp"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/agentSearchImportFilesReq"
            }
          }
        ],
        "tags": [
          "AgentService"
        ]
      }
    },
    "/api/v1/nslookup": {
      "post": {
        "operationId": "NsLookup",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/agentNsLookupResp"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/agentNsLookupReq"
            }
          }
        ],
        "tags": [
          "AgentService"
        ]
      }
    },
    "/api/v1/orgs/{org_id}/projects/{project_id}/clusters/{cluster_id}/imports:precheck": {
      "post": {
        "summary": "Precheck and return the scan result.",
        "operationId": "AgentService_PrecheckImportJob",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/agentPrecheckImportJobResp"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "org_id",
            "description": "Required. The organize ID.",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "project_id",
            "description": "Required. The project ID.",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "cluster_id",
            "description": "Required. The cluster ID.",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "type": "object",
              "properties": {
                "import_options": {
                  "$ref": "#/definitions/agentImportOptions",
                  "description": "Required. The options of the import."
                },
                "source": {
                  "$ref": "#/definitions/agentImportSource",
                  "description": "Required. The source of the import."
                },
                "target_cluster": {
                  "$ref": "#/definitions/agentCluster",
                  "description": "Required. The target cluster connection information."
                }
              },
              "required": [
                "import_options",
                "source",
                "target_cluster"
              ]
            }
          }
        ],
        "tags": [
          "AgentService"
        ]
      }
    },
    "/api/v1/s3/check_access": {
      "post": {
        "operationId": "CheckS3Access",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/agentCheckS3AccessResp"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/agentCheckS3AccessReq"
            }
          }
        ],
        "tags": [
          "AgentService"
        ]
      }
    },
    "/api/v1/source-tables": {
      "post": {
        "operationId": "GetSourceTables",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/agentGetSourceTablesResp"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/agentCheckDBConnectivityReq"
            }
          }
        ],
        "tags": [
          "AgentService"
        ]
      }
    },
    "/api/v1/source/binlog-status": {
      "post": {
        "summary": "get result of \"show master status\" on source",
        "operationId": "GetSourceBinlogStatus",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/agentGetSourceBinlogStatusResp"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/agentCheckDBConnectivityReq"
            }
          }
        ],
        "tags": [
          "AgentService"
        ]
      }
    },
    "/api/v1/tidb-server-secret": {
      "post": {
        "operationId": "GetTiDBServerSecret",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/agentGetTiDBServerSecretResp"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/agentGetTiDBServerSecretReq"
            }
          }
        ],
        "tags": [
          "AgentService"
        ]
      }
    },
    "/api/v1/user-file": {
      "post": {
        "operationId": "GetUserFileContent",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/agentGetUserFileResp"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/agentGetUserFileReq"
            }
          }
        ],
        "tags": [
          "AgentService"
        ]
      }
    }
  },
  "definitions": {
    "GetImportFilesRespCompression": {
      "type": "string",
      "enum": [
        "UNKNOWN",
        "GZ",
        "LZ4",
        "ZSTD",
        "XZ",
        "LZO",
        "SNAPPY"
      ],
      "default": "UNKNOWN",
      "title": "defined in github.com/pingcap/tidb/pkg/lightning/mydump/router.go"
    },
    "GetImportFilesRespDataFileMeta": {
      "type": "object",
      "properties": {
        "path": {
          "type": "string"
        },
        "size": {
          "type": "string",
          "format": "uint64"
        },
        "source_type": {
          "$ref": "#/definitions/GetImportFilesRespSourceType"
        },
        "compression": {
          "$ref": "#/definitions/GetImportFilesRespCompression"
        }
      }
    },
    "GetImportFilesRespSourceType": {
      "type": "string",
      "enum": [
        "UNKNOWN_TYPE",
        "SCHEMA_SCHEMA",
        "TABLE_SCHEMA",
        "SQL",
        "CSV",
        "PARQUET",
        "VIEW_SCHEMA"
      ],
      "default": "UNKNOWN_TYPE",
      "title": "defined in github.com/pingcap/tidb/pkg/lightning/mydump/router.go"
    },
    "GetImportFilesRespTableMeta": {
      "type": "object",
      "properties": {
        "database": {
          "type": "string"
        },
        "table": {
          "type": "string"
        },
        "data_files": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/GetImportFilesRespDataFileMeta"
          }
        },
        "total_size": {
          "type": "string",
          "format": "uint64"
        },
        "wildcard_path": {
          "type": "string"
        },
        "schema_file": {
          "type": "string"
        }
      }
    },
    "S3SourceRoleArn": {
      "type": "object",
      "properties": {
        "role_arn": {
          "type": "string",
          "title": "The role arn"
        },
        "external_id": {
          "type": "string",
          "title": "The aws external id"
        }
      },
      "required": [
        "role_arn",
        "external_id"
      ]
    },
    "SearchImportFilesReqTargetSource": {
      "type": "object",
      "properties": {
        "target_table": {
          "$ref": "#/definitions/commonTable"
        },
        "custom_file": {
          "type": "string"
        }
      }
    },
    "agentAzureBlobSource": {
      "type": "object",
      "properties": {
        "auth_type": {
          "$ref": "#/definitions/agentImportAzureBlobAuthTypeEnum",
          "description": "The Azure Blob URI of the import source."
        },
        "sas_token": {
          "type": "string",
          "description": "The sas token. This field is input-only."
        },
        "uri": {
          "type": "string",
          "description": "The Azure Blob URI of the import source. For example: azure://\u003caccount\u003e.blob.core.windows.net/\u003ccontainer\u003e/\u003cpath\u003e."
        },
        "target_table_infos": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/agentImportTargetTableInfo"
          },
          "description": "The target table information of the import."
        }
      },
      "required": [
        "auth_type",
        "uri"
      ]
    },
    "agentCheckAzblobAccessReq": {
      "type": "object",
      "properties": {
        "azblob_url": {
          "type": "string"
        },
        "sas_token": {
          "type": "string"
        }
      },
      "required": [
        "azblob_url",
        "sas_token"
      ]
    },
    "agentCheckAzblobAccessResp": {
      "type": "object",
      "properties": {
        "error_msg": {
          "type": "string"
        }
      },
      "required": [
        "error_msg"
      ]
    },
    "agentCheckDBConnectivityReq": {
      "type": "object",
      "properties": {
        "host": {
          "type": "string"
        },
        "port": {
          "type": "integer",
          "format": "int64"
        },
        "user": {
          "type": "string"
        },
        "password": {
          "type": "string"
        },
        "ssl_ca": {
          "type": "string"
        },
        "ssl_cert": {
          "type": "string"
        },
        "ssl_key": {
          "type": "string"
        },
        "request_id": {
          "type": "string"
        }
      }
    },
    "agentCheckDBConnectivityResp": {
      "type": "object",
      "properties": {
        "db_version": {
          "type": "string"
        }
      }
    },
    "agentCheckGcsAccessReq": {
      "type": "object",
      "properties": {
        "gcs_url": {
          "type": "string"
        },
        "gcs_options": {
          "$ref": "#/definitions/agentGcsOptions"
        }
      },
      "required": [
        "gcs_url"
      ]
    },
    "agentCheckGcsAccessResp": {
      "type": "object",
      "properties": {
        "error_msg": {
          "type": "string"
        }
      },
      "required": [
        "error_msg"
      ]
    },
    "agentCheckItem": {
      "type": "string",
      "enum": [
        "CHECK_ITEM_UNKNOWN",
        "CHECK_ITEM_TARGET_TABLE_EMPTY",
        "CHECK_ITEM_SOURCE_SCHEMA",
        "CHECK_ITEM_CSV_HEADER",
        "CHECK_ITEM_TARGET_CLUSTER_SIZE"
      ],
      "default": "CHECK_ITEM_UNKNOWN"
    },
    "agentCheckResult": {
      "type": "object",
      "properties": {
        "check_item": {
          "$ref": "#/definitions/agentCheckItem"
        },
        "has_passed": {
          "type": "boolean"
        },
        "msg": {
          "type": "string"
        }
      },
      "required": [
        "check_item",
        "has_passed",
        "msg"
      ]
    },
    "agentCheckS3AccessReq": {
      "type": "object",
      "properties": {
        "role_arn": {
          "type": "string"
        },
        "s3_url": {
          "type": "string"
        },
        "external_id": {
          "type": "string"
        },
        "aws_access_key_id": {
          "type": "string"
        },
        "aws_secret_access_key": {
          "type": "string"
        }
      },
      "required": [
        "role_arn",
        "s3_url",
        "external_id"
      ]
    },
    "agentCheckS3AccessResp": {
      "type": "object",
      "properties": {
        "error_msg": {
          "type": "string"
        }
      },
      "required": [
        "error_msg"
      ]
    },
    "agentClearEmptyTablesReq": {
      "type": "object",
      "properties": {
        "cluster": {
          "$ref": "#/definitions/agentCluster"
        },
        "tables": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/commonTable"
          }
        }
      }
    },
    "agentClearEmptyTablesResp": {
      "type": "object",
      "properties": {
        "results": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/agentClearSingleEmptyTableResult"
          }
        }
      }
    },
    "agentClearSingleEmptyTableResult": {
      "type": "object",
      "properties": {
        "table": {
          "$ref": "#/definitions/commonTable"
        },
        "result": {
          "$ref": "#/definitions/agentClearSingleEmptyTableResultResult"
        },
        "ErrMessage": {
          "type": "string"
        }
      }
    },
    "agentClearSingleEmptyTableResultResult": {
      "type": "string",
      "enum": [
        "Unknown",
        "Cleared",
        "NotExist",
        "NotEmpty",
        "HasError"
      ],
      "default": "Unknown"
    },
    "agentCluster": {
      "type": "object",
      "properties": {
        "cluster_id": {
          "type": "string",
          "format": "uint64"
        },
        "namespace": {
          "type": "string"
        },
        "user": {
          "type": "string"
        },
        "password": {
          "type": "string"
        },
        "read_timeout": {
          "type": "string",
          "format": "int64",
          "title": "unit is second"
        },
        "write_timeout": {
          "type": "string",
          "format": "int64"
        },
        "provider_type": {
          "type": "string"
        },
        "password_encrypted": {
          "type": "boolean"
        },
        "encrypted_password": {
          "$ref": "#/definitions/agentEncryptedData"
        }
      },
      "required": [
        "cluster_id",
        "namespace",
        "user",
        "password"
      ]
    },
    "agentColumnValue": {
      "type": "object",
      "properties": {
        "string_value": {
          "type": "string"
        },
        "int64_value": {
          "type": "string",
          "format": "int64"
        },
        "double_value": {
          "type": "number",
          "format": "double"
        },
        "bool_value": {
          "type": "boolean"
        },
        "timestamp_value": {
          "type": "string",
          "format": "date-time",
          "title": "for datetime, timestamp, date"
        }
      }
    },
    "agentCreateSchemasReq": {
      "type": "object",
      "properties": {
        "cluster_id": {
          "type": "string",
          "format": "uint64"
        },
        "user": {
          "type": "string"
        },
        "password": {
          "type": "string"
        },
        "source_uri": {
          "type": "string"
        }
      }
    },
    "agentCsvConfig": {
      "type": "object",
      "properties": {
        "separator": {
          "type": "string",
          "description": "Specifies the field separator. The default separator is ,."
        },
        "delimiter": {
          "type": "string",
          "title": "Specifies the field delimiter. The default delimiter is \""
        },
        "header": {
          "type": "boolean",
          "description": "Import CSV files of the tables with header. Default is true."
        },
        "backslash_escape": {
          "type": "boolean"
        },
        "trim_last_separator": {
          "type": "boolean"
        },
        "not_null": {
          "type": "boolean",
          "description": "Whether the columns in CSV files can be null. Default is false."
        },
        "null_value": {
          "type": "string",
          "description": "Representation of null values in CSV files. Default is \"\\N\"."
        }
      }
    },
    "agentDropClusterTablesReq": {
      "type": "object",
      "properties": {
        "tables": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/commonTable"
          }
        },
        "cluster": {
          "$ref": "#/definitions/agentCluster"
        }
      }
    },
    "agentEncryptedData": {
      "type": "object",
      "properties": {
        "data": {
          "type": "string",
          "format": "byte",
          "description": "The encrypted data."
        },
        "pem": {
          "type": "string",
          "format": "byte",
          "description": "The public key PEM string used for encryption."
        }
      }
    },
    "agentEstimateSourceDataSizeReq": {
      "type": "object",
      "properties": {
        "lightning_config": {
          "type": "string"
        },
        "cluster_namespace": {
          "type": "string"
        },
        "cluster_name_prefix": {
          "type": "string"
        }
      },
      "required": [
        "lightning_config"
      ]
    },
    "agentEstimateSourceDataSizeResp": {
      "type": "object",
      "properties": {
        "size_with_index": {
          "type": "string",
          "format": "uint64"
        },
        "size_without_index": {
          "type": "string",
          "format": "uint64"
        },
        "base_resp": {
          "$ref": "#/definitions/baseBaseResp"
        }
      }
    },
    "agentExecSQLReq": {
      "type": "object",
      "properties": {
        "cluster": {
          "$ref": "#/definitions/agentCluster"
        },
        "sql": {
          "type": "string"
        },
        "column_num": {
          "type": "string",
          "format": "uint64",
          "title": "column_num represents the column numbers in the SQL sentence"
        },
        "typed_columns": {
          "type": "boolean",
          "title": "if true, the response rows will contain typed column values"
        },
        "setup_sqls": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "required": [
        "cluster",
        "sql"
      ]
    },
    "agentExecSQLResp": {
      "type": "object",
      "properties": {
        "error_msg": {
          "type": "string"
        },
        "sql_result": {
          "type": "string"
        },
        "rows": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/agentRow"
          }
        },
        "column_names": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "required": [
        "error_msg",
        "sql_result"
      ]
    },
    "agentGCSSource": {
      "type": "object",
      "properties": {
        "uri": {
          "type": "string",
          "description": "The GCS URI of the import source."
        },
        "auth_type": {
          "$ref": "#/definitions/agentImportGcsAuthTypeEnum",
          "description": "The auth method of the import source."
        },
        "service_account_key": {
          "type": "string",
          "title": "The service account key"
        },
        "target_table_infos": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/agentImportTargetTableInfo"
          },
          "description": "The target table information of the import."
        }
      },
      "required": [
        "uri",
        "auth_type"
      ]
    },
    "agentGcsOptions": {
      "type": "object",
      "properties": {
        "impersonate_service_account": {
          "type": "string"
        }
      }
    },
    "agentGetClusterClientSecretReq": {
      "type": "object",
      "properties": {
        "cluster_name_prefix": {
          "type": "string"
        },
        "cluster_namespace": {
          "type": "string"
        },
        "provider_type": {
          "type": "string"
        },
        "request_id": {
          "type": "string"
        }
      }
    },
    "agentGetClusterClientSecretResp": {
      "type": "object",
      "properties": {
        "ssl_ca": {
          "type": "string"
        },
        "ssl_cert": {
          "type": "string"
        },
        "ssl_key": {
          "type": "string"
        }
      }
    },
    "agentGetClusterTablesResp": {
      "type": "object",
      "properties": {
        "schemas": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/agentSchema"
          }
        }
      }
    },
    "agentGetImportFilesReq": {
      "type": "object",
      "properties": {
        "cluster_id": {
          "type": "string",
          "format": "uint64"
        },
        "source_uri": {
          "type": "string"
        }
      }
    },
    "agentGetImportFilesResp": {
      "type": "object",
      "properties": {
        "table_meta": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/GetImportFilesRespTableMeta"
          }
        }
      }
    },
    "agentGetImportSchemasMetaReq": {
      "type": "object",
      "properties": {
        "lightning_config": {
          "type": "string"
        }
      },
      "required": [
        "lightning_config"
      ]
    },
    "agentGetImportSchemasMetaResp": {
      "type": "object",
      "properties": {
        "schemas_meta": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/definitions/agentImportsSchemaMeta"
          },
          "title": "map: \u003cschema id, schema meta\u003e"
        },
        "base_resp": {
          "$ref": "#/definitions/baseBaseResp"
        }
      },
      "required": [
        "schemas_meta"
      ]
    },
    "agentGetPublicKeyRequest": {
      "type": "object",
      "description": "GetPublicKeyRequest is the request for fetching the agent's public key."
    },
    "agentGetPublicKeyResponse": {
      "type": "object",
      "properties": {
        "pem": {
          "type": "string",
          "format": "byte",
          "description": "The public key in PEM format."
        }
      },
      "description": "GetPublicKeyResponse contains the agent's public key."
    },
    "agentGetSourceBinlogStatusResp": {
      "type": "object",
      "properties": {
        "binlog_name": {
          "type": "string"
        },
        "binlog_pos": {
          "type": "integer",
          "format": "int64"
        },
        "binlog_do_dbs": {
          "type": "string"
        },
        "binlog_ignore_dbs": {
          "type": "string"
        },
        "gtid_str": {
          "type": "string"
        }
      }
    },
    "agentGetSourceTablesResp": {
      "type": "object",
      "properties": {
        "schemas": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/agentSchema"
          }
        }
      }
    },
    "agentGetTiDBServerSecretReq": {
      "type": "object",
      "properties": {
        "cluster_name_prefix": {
          "type": "string"
        },
        "cluster_namespace": {
          "type": "string"
        },
        "provider_type": {
          "type": "string"
        },
        "request_id": {
          "type": "string"
        }
      }
    },
    "agentGetTiDBServerSecretResp": {
      "type": "object",
      "properties": {
        "ssl_ca": {
          "type": "string"
        },
        "ssl_cert": {
          "type": "string"
        },
        "ssl_key": {
          "type": "string"
        }
      }
    },
    "agentGetUserFileReq": {
      "type": "object",
      "properties": {
        "s3_url": {
          "type": "string",
          "title": "Deprecated: use `source_url` instead"
        },
        "role_arn": {
          "type": "string"
        },
        "external_id": {
          "type": "string"
        },
        "start_offset": {
          "type": "string",
          "format": "int64"
        },
        "end_offset": {
          "type": "string",
          "format": "int64"
        },
        "source_url": {
          "type": "string"
        },
        "data_source_type": {
          "type": "integer",
          "format": "int64"
        },
        "gcs_options": {
          "$ref": "#/definitions/agentGcsOptions"
        },
        "sas_token": {
          "type": "string"
        },
        "request_id": {
          "type": "string"
        }
      }
    },
    "agentGetUserFileResp": {
      "type": "object",
      "properties": {
        "content": {
          "type": "string"
        }
      }
    },
    "agentImportAzureBlobAuthTypeEnum": {
      "type": "string",
      "enum": [
        "UNSPECIFIED",
        "SAS_TOKEN"
      ],
      "default": "UNSPECIFIED",
      "description": " - UNSPECIFIED: The access method is unknown.\n - SAS_TOKEN: The access method is sas token."
    },
    "agentImportFileTypeEnum": {
      "type": "string",
      "enum": [
        "UNSPECIFIED",
        "CSV",
        "SQL",
        "AURORA_SNAPSHOT",
        "PARQUET"
      ],
      "default": "UNSPECIFIED",
      "description": " - UNSPECIFIED: The type of the file is unknown.\n - CSV: CSV type.\n - SQL: SQL type.\n - AURORA_SNAPSHOT: Aurora snapshot type.\n - PARQUET: Parquet type."
    },
    "agentImportGcsAuthTypeEnum": {
      "type": "string",
      "enum": [
        "AUTH_TYPE_UNSPECIFIED",
        "SERVICE_ACCOUNT_KEY"
      ],
      "default": "AUTH_TYPE_UNSPECIFIED",
      "description": " - AUTH_TYPE_UNSPECIFIED: The access method is unknown.\n - SERVICE_ACCOUNT_KEY: The access method is service account key."
    },
    "agentImportOptions": {
      "type": "object",
      "properties": {
        "file_type": {
          "$ref": "#/definitions/agentImportFileTypeEnum",
          "description": "The import file type."
        },
        "csv_config": {
          "$ref": "#/definitions/agentCsvConfig",
          "description": "Optional. The CSV format."
        },
        "need_drop_table": {
          "type": "boolean",
          "description": "Optional. Only used in tutorial."
        },
        "display_name": {
          "type": "string",
          "description": "Optional. The display name of the import."
        }
      },
      "required": [
        "file_type"
      ]
    },
    "agentImportPrecheckStatusTypeEnum": {
      "type": "string",
      "enum": [
        "UNSPECIFIED",
        "COMPLETED",
        "TIMEOUT",
        "TRUNCATED"
      ],
      "default": "UNSPECIFIED",
      "description": " - UNSPECIFIED: The precheck status is unknown.\n - COMPLETED: The precheck is completed.\n - TIMEOUT: The precheck is timeout and return partial result.\n - TRUNCATED: The precheck result is truncated."
    },
    "agentImportS3AuthTypeEnum": {
      "type": "string",
      "enum": [
        "UNSPECIFIED",
        "ROLE_ARN",
        "ACCESS_KEY"
      ],
      "default": "UNSPECIFIED",
      "description": " - UNSPECIFIED: The access method is unknown.\n - ROLE_ARN: The access method is role arn.\n - ACCESS_KEY: The access method is access key."
    },
    "agentImportSource": {
      "type": "object",
      "properties": {
        "type": {
          "$ref": "#/definitions/agentImportSourceTypeEnum",
          "description": "The import source type."
        },
        "s3": {
          "$ref": "#/definitions/agentS3Source"
        },
        "gcs": {
          "$ref": "#/definitions/agentGCSSource"
        },
        "azure_blob": {
          "$ref": "#/definitions/agentAzureBlobSource"
        }
      },
      "required": [
        "type"
      ]
    },
    "agentImportSourceTypeEnum": {
      "type": "string",
      "enum": [
        "UNSPECIFIED",
        "S3",
        "GCS",
        "AZURE_BLOB"
      ],
      "default": "UNSPECIFIED",
      "title": "- UNSPECIFIED: The source of the import is unknown.\n - S3: S3 source.\n - GCS: gcs source\n - AZURE_BLOB: azure blob source"
    },
    "agentImportTargetTableInfo": {
      "type": "object",
      "properties": {
        "target_table": {
          "$ref": "#/definitions/commonTable"
        },
        "custom_file": {
          "type": "string"
        }
      },
      "required": [
        "target_table",
        "custom_file"
      ]
    },
    "agentImportsSchemaMeta": {
      "type": "object",
      "properties": {
        "create_file": {
          "type": "string"
        },
        "max_data_file_size": {
          "type": "string",
          "format": "uint64"
        },
        "tables_meta": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/definitions/agentImportsTableMeta"
          },
          "title": "map: \u003ctable id, table meta\u003e"
        },
        "create_file_size": {
          "type": "string",
          "format": "uint64"
        }
      }
    },
    "agentImportsTableMeta": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "create_file": {
          "type": "string"
        },
        "data_file_num": {
          "type": "string",
          "format": "uint64"
        },
        "data_file_size": {
          "type": "string",
          "format": "uint64"
        },
        "first_data_file": {
          "type": "string"
        },
        "max_data_file_size": {
          "type": "string",
          "format": "uint64"
        },
        "create_file_size": {
          "type": "string",
          "format": "uint64"
        }
      }
    },
    "agentLightningPrecheckReq": {
      "type": "object",
      "properties": {
        "lightning_config": {
          "type": "string"
        },
        "check_items": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/agentCheckItem"
          }
        },
        "cluster_namespace": {
          "type": "string"
        },
        "cluster_name_prefix": {
          "type": "string"
        },
        "gen_gcp_credential": {
          "type": "boolean"
        },
        "provider_type": {
          "type": "string"
        }
      },
      "required": [
        "lightning_config"
      ]
    },
    "agentLightningPrecheckResp": {
      "type": "object",
      "properties": {
        "check_results": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/agentCheckResult"
          }
        },
        "base_resp": {
          "$ref": "#/definitions/baseBaseResp"
        }
      },
      "required": [
        "check_results"
      ]
    },
    "agentLightningSourcePreviewReq": {
      "type": "object",
      "properties": {
        "lightning_config": {
          "type": "string"
        },
        "cluster_namespace": {
          "type": "string"
        },
        "cluster_name_prefix": {
          "type": "string"
        }
      },
      "required": [
        "lightning_config",
        "cluster_namespace",
        "cluster_name_prefix"
      ]
    },
    "agentLightningSourcePreviewResp": {
      "type": "object",
      "properties": {
        "schemas": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/agentSchema"
          }
        },
        "base_resp": {
          "$ref": "#/definitions/baseBaseResp"
        }
      },
      "required": [
        "schemas"
      ]
    },
    "agentLoadDataReq": {
      "type": "object",
      "properties": {
        "cluster": {
          "$ref": "#/definitions/agentCluster"
        },
        "target_db": {
          "type": "string"
        },
        "target_table": {
          "type": "string"
        },
        "source_uri": {
          "type": "string"
        },
        "separator": {
          "type": "string"
        },
        "delimiter": {
          "type": "string"
        },
        "backslash_escape": {
          "type": "boolean"
        },
        "ignore_one_line": {
          "type": "boolean"
        },
        "terminator": {
          "type": "string"
        }
      },
      "required": [
        "cluster",
        "target_db",
        "target_table",
        "source_uri"
      ]
    },
    "agentLoadDataResp": {
      "type": "object",
      "properties": {
        "err_message": {
          "type": "string",
          "title": "string warning_message = 2;"
        }
      }
    },
    "agentNsLookupReq": {
      "type": "object",
      "properties": {
        "host": {
          "type": "string"
        },
        "request_id": {
          "type": "string"
        }
      }
    },
    "agentNsLookupResp": {
      "type": "object",
      "properties": {
        "ips": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "agentPrecheckDMJobReq": {
      "type": "object",
      "properties": {
        "req_id": {
          "type": "string"
        },
        "full_instance_migrate": {
          "type": "boolean"
        },
        "task_config": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "cluster_password": {
          "type": "string",
          "title": "TODO: support multiple sources"
        },
        "password": {
          "type": "string"
        }
      }
    },
    "agentPrecheckDMJobResp": {
      "type": "object",
      "properties": {
        "check_results": {
          "type": "string",
          "format": "byte"
        }
      }
    },
    "agentPrecheckImportFileReq": {
      "type": "object",
      "properties": {
        "sources": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/agentPrecheckImportFileReqSource"
          }
        },
        "data_format": {
          "type": "string",
          "format": "uint64"
        },
        "data_source": {
          "type": "string",
          "format": "uint64"
        },
        "csv_config": {
          "$ref": "#/definitions/agentCsvConfig"
        },
        "cluster": {
          "$ref": "#/definitions/agentCluster"
        },
        "aws_role_arn": {
          "type": "string"
        },
        "aws_external_id": {
          "type": "string"
        },
        "aws_access_key_id": {
          "type": "string"
        },
        "aws_secret_access_key": {
          "type": "string"
        },
        "sas_token": {
          "type": "string"
        },
        "source_url": {
          "type": "string"
        }
      }
    },
    "agentPrecheckImportFileReqSource": {
      "type": "object",
      "properties": {
        "table": {
          "$ref": "#/definitions/commonTable"
        },
        "file": {
          "type": "string"
        }
      }
    },
    "agentPrecheckImportJobResp": {
      "type": "object",
      "properties": {
        "target_tables": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/agentTableResult"
          },
          "description": "The list of tables which has matched data files."
        },
        "error_message": {
          "type": "string",
          "description": "The error message consists of the unmatched tables."
        },
        "total_data_files_count": {
          "type": "string",
          "format": "uint64",
          "description": "The total data files count."
        },
        "total_tables_count": {
          "type": "string",
          "format": "uint64",
          "description": "The total tables count."
        },
        "is_truncated": {
          "type": "boolean",
          "description": "If the result is truncated."
        },
        "status": {
          "$ref": "#/definitions/agentImportPrecheckStatusTypeEnum",
          "description": "The status."
        },
        "base_resp": {
          "$ref": "#/definitions/baseBaseResp"
        }
      }
    },
    "agentPreviewCsvFileReq": {
      "type": "object",
      "properties": {
        "source_uri": {
          "type": "string"
        },
        "csv_config": {
          "$ref": "#/definitions/agentCsvConfig"
        },
        "first_n": {
          "type": "string",
          "format": "uint64"
        },
        "aws_role_arn": {
          "type": "string"
        },
        "aws_external_id": {
          "type": "string"
        },
        "aws_access_key_id": {
          "type": "string"
        },
        "aws_secret_access_key": {
          "type": "string"
        }
      }
    },
    "agentPreviewCsvFileResp": {
      "type": "object",
      "properties": {
        "table": {
          "$ref": "#/definitions/agentTable"
        }
      }
    },
    "agentRow": {
      "type": "object",
      "properties": {
        "column_values": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "typed_column_values": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/agentColumnValue"
          }
        }
      }
    },
    "agentS3Source": {
      "type": "object",
      "properties": {
        "uri": {
          "type": "string",
          "description": "The S3 URI of the import source."
        },
        "auth_type": {
          "$ref": "#/definitions/agentImportS3AuthTypeEnum",
          "description": "The auth method of the import source."
        },
        "role_arn": {
          "$ref": "#/definitions/S3SourceRoleArn",
          "title": "The role arn"
        },
        "access_key": {
          "$ref": "#/definitions/agentS3SourceAccessKey",
          "description": "The access key."
        },
        "target_table_infos": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/agentImportTargetTableInfo"
          },
          "description": "The target table information of the import."
        }
      },
      "required": [
        "uri",
        "auth_type"
      ]
    },
    "agentS3SourceAccessKey": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "The access key id."
        },
        "secret": {
          "type": "string",
          "description": "The secret access key. This field is input-only."
        }
      },
      "required": [
        "id",
        "secret"
      ]
    },
    "agentSchema": {
      "type": "object",
      "properties": {
        "schema_name": {
          "type": "string"
        },
        "tables": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/agentTable"
          }
        }
      }
    },
    "agentSearchImportFilesReq": {
      "type": "object",
      "properties": {
        "target_source": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/SearchImportFilesReqTargetSource"
          }
        },
        "data_format": {
          "type": "integer",
          "format": "int64",
          "title": "1: sql\n2: aurora snapshot(parquet)\n3: csv\n4: parquet(not aurora)"
        },
        "data_source_type": {
          "type": "integer",
          "format": "int64",
          "title": "1: aws s3\n2: gcs\n3: azblob"
        },
        "source_uri": {
          "type": "string"
        },
        "aws_role_arn": {
          "type": "string"
        },
        "aws_external_id": {
          "type": "string"
        },
        "aws_access_key_id": {
          "type": "string"
        },
        "aws_secret_access_key": {
          "type": "string"
        },
        "gcs_options": {
          "$ref": "#/definitions/agentGcsOptions"
        },
        "sas_token": {
          "type": "string"
        }
      },
      "required": [
        "target_source",
        "data_format",
        "data_source_type",
        "source_uri"
      ]
    },
    "agentSearchImportFilesResp": {
      "type": "object",
      "properties": {
        "table_matches": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/agentSearchImportFilesRespTableMatch"
          }
        }
      }
    },
    "agentSearchImportFilesRespTableMatch": {
      "type": "object",
      "properties": {
        "target_table": {
          "$ref": "#/definitions/commonTable"
        },
        "source_uri": {
          "type": "string",
          "title": "if source_uri is empty, it means the table is not found in source"
        }
      }
    },
    "agentTable": {
      "type": "object",
      "properties": {
        "schema_name": {
          "type": "string"
        },
        "table_name": {
          "type": "string"
        },
        "row_headers": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "row_values": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/agentRow"
          }
        },
        "row_data_types": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "column_is_pk": {
          "type": "array",
          "items": {
            "type": "boolean"
          }
        },
        "column_auto_gen": {
          "type": "array",
          "items": {
            "type": "boolean"
          },
          "title": "column_auto_gen represents column is auto_increment or auto_random"
        }
      }
    },
    "agentTableResult": {
      "type": "object",
      "properties": {
        "target_table": {
          "$ref": "#/definitions/commonTable",
          "description": "The target table."
        },
        "error_message": {
          "type": "string",
          "description": "The error message."
        },
        "matched_data_files": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The matched data files."
        },
        "matched_schema_file": {
          "type": "string",
          "description": "The matched schema file."
        },
        "use_schema_file": {
          "type": "boolean",
          "description": "Whether the matched schema file is used in import."
        }
      }
    },
    "baseBaseResp": {
      "type": "object",
      "properties": {
        "tags": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "title": "such as: request_id, trace_id"
        },
        "err_code": {
          "type": "string",
          "format": "int64"
        },
        "err_msg": {
          "type": "string"
        }
      }
    },
    "commonTable": {
      "type": "object",
      "properties": {
        "schema": {
          "type": "string",
          "example": "database_name",
          "description": "The name of the database containing the target table."
        },
        "table": {
          "type": "string",
          "example": "table_name",
          "description": "The name of the table within the database."
        }
      }
    },
    "googlerpcStatus": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32"
        },
        "message": {
          "type": "string"
        },
        "details": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/protobufAny"
          }
        }
      }
    },
    "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    }"
    }
  }
}
