{
  "swagger": "2.0",
  "info": {
    "title": "Serverless Changefeed APIs for TiDB Cloud",
    "version": "alpha"
  },
  "tags": [
    {
      "name": "ChangefeedService"
    }
  ],
  "schemes": ["https"],
  "consumes": ["application/json"],
  "produces": ["application/json"],
  "paths": {
    "/api/v1/serverless/orgs/{org_id}/projects/{project_id}/clusters/{cluster_id}/changefeeds": {
      "get": {
        "operationId": "ChangefeedService_ListChangefeeds",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/Changefeeds"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/Status"
            }
          }
        },
        "parameters": [
          {
            "name": "org_id",
            "description": "The organize ID",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "project_id",
            "description": "The project ID",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "cluster_id",
            "description": "The ID of the cluster.",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "page_size",
            "description": "The maximum number of changefeeds to return. Default is 10.",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "page_token",
            "description": "The page token from the previous response for pagination.",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "changefeed_type",
            "description": "The type of the changefeed. DEFAULT is all.\n\n - KAFKA: Kafka changefeed type.\n - MYSQL: MySQL changefeed type.",
            "in": "query",
            "required": false,
            "type": "string",
            "enum": ["KAFKA", "MYSQL"]
          }
        ],
        "tags": ["ChangefeedService"]
      },
      "post": {
        "operationId": "ChangefeedService_CreateChangefeed",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/Changefeed"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/Status"
            }
          }
        },
        "parameters": [
          {
            "name": "org_id",
            "description": "The organize ID",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "project_id",
            "description": "The project ID",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "cluster_id",
            "description": "The ID of the cluster.",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/ChangefeedService.CreateChangefeedBody"
            }
          }
        ],
        "tags": ["ChangefeedService"]
      }
    },
    "/api/v1/serverless/orgs/{org_id}/projects/{project_id}/clusters/{cluster_id}/changefeeds/{changefeed_id}": {
      "get": {
        "operationId": "ChangefeedService_GetChangefeed",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/Changefeed"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/Status"
            }
          }
        },
        "parameters": [
          {
            "name": "org_id",
            "description": "The organize ID",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "project_id",
            "description": "The project ID",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "cluster_id",
            "description": "The ID of the cluster.",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "changefeed_id",
            "description": "The ID of the changefeed.",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "tags": ["ChangefeedService"]
      },
      "delete": {
        "operationId": "ChangefeedService_DeleteChangefeed",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/Changefeed"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/Status"
            }
          }
        },
        "parameters": [
          {
            "name": "org_id",
            "description": "The organize ID",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "project_id",
            "description": "The project ID",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "cluster_id",
            "description": "The ID of the cluster.",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "changefeed_id",
            "description": "The ID of the changefeed.",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "tags": ["ChangefeedService"]
      },
      "patch": {
        "operationId": "ChangefeedService_EditChangefeed",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/Changefeed"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/Status"
            }
          }
        },
        "parameters": [
          {
            "name": "org_id",
            "description": "The organize ID",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "project_id",
            "description": "The project ID",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "cluster_id",
            "description": "The ID of the cluster.",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "changefeed_id",
            "description": "The ID of the changefeed.",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/ChangefeedService.EditChangefeedBody"
            }
          }
        ],
        "tags": ["ChangefeedService"]
      }
    },
    "/api/v1/serverless/orgs/{org_id}/projects/{project_id}/clusters/{cluster_id}/changefeeds/{changefeed_id}:scale": {
      "post": {
        "operationId": "ChangefeedService_ScaleChangefeed",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/Changefeed"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/Status"
            }
          }
        },
        "parameters": [
          {
            "name": "org_id",
            "description": "The organize ID",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "project_id",
            "description": "The project ID",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "cluster_id",
            "description": "The ID of the cluster.",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "changefeed_id",
            "description": "The ID of the changefeed.",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/ChangefeedService.ScaleChangefeedBody"
            }
          }
        ],
        "tags": ["ChangefeedService"]
      }
    },
    "/api/v1/serverless/orgs/{org_id}/projects/{project_id}/clusters/{cluster_id}/changefeeds/{changefeed_id}:start": {
      "post": {
        "operationId": "ChangefeedService_StartChangefeed",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/Changefeed"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/Status"
            }
          }
        },
        "parameters": [
          {
            "name": "org_id",
            "description": "The organize ID",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "project_id",
            "description": "The project ID",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "cluster_id",
            "description": "The ID of the cluster.",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "changefeed_id",
            "description": "The ID of the changefeed.",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/ChangefeedService.StartChangefeedBody"
            }
          }
        ],
        "tags": ["ChangefeedService"]
      }
    },
    "/api/v1/serverless/orgs/{org_id}/projects/{project_id}/clusters/{cluster_id}/changefeeds/{changefeed_id}:stop": {
      "post": {
        "operationId": "ChangefeedService_StopChangefeed",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/Changefeed"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/Status"
            }
          }
        },
        "parameters": [
          {
            "name": "org_id",
            "description": "The organize ID",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "project_id",
            "description": "The project ID",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "cluster_id",
            "description": "The ID of the cluster.",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "changefeed_id",
            "description": "The ID of the changefeed.",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/ChangefeedService.StopChangefeedBody"
            }
          }
        ],
        "tags": ["ChangefeedService"]
      }
    },
    "/api/v1/serverless/orgs/{org_id}/projects/{project_id}/clusters/{cluster_id}/changefeeds:describeSchemaTable": {
      "post": {
        "operationId": "ChangefeedService_DescribeSchemaTable",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/DescribeSchemaTableResp"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/Status"
            }
          }
        },
        "parameters": [
          {
            "name": "org_id",
            "description": "The organize ID",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "project_id",
            "description": "The project ID",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "cluster_id",
            "description": "The ID of the cluster.",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/ChangefeedService.DescribeSchemaTableBody"
            }
          }
        ],
        "tags": ["ChangefeedService"]
      }
    },
    "/api/v1/serverless/orgs/{org_id}/projects/{project_id}/clusters/{cluster_id}/changefeeds:listSpecifications": {
      "get": {
        "operationId": "ChangefeedService_ListChangefeedSpecifications",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/ListChangefeedSpecificationsResp"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/Status"
            }
          }
        },
        "parameters": [
          {
            "name": "org_id",
            "description": "The organize ID",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "project_id",
            "description": "The project ID",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "cluster_id",
            "description": "The ID of the cluster.",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "tags": ["ChangefeedService"]
      }
    },
    "/api/v1/serverless/orgs/{org_id}/projects/{project_id}/clusters/{cluster_id}/changefeeds:test": {
      "post": {
        "operationId": "ChangefeedService_TestChangefeed",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/TestChangefeedResp"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/Status"
            }
          }
        },
        "parameters": [
          {
            "name": "org_id",
            "description": "The organize ID",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "project_id",
            "description": "The project ID",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "cluster_id",
            "description": "The ID of the cluster.",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/ChangefeedService.TestChangefeedBody"
            }
          }
        ],
        "tags": ["ChangefeedService"]
      }
    }
  },
  "definitions": {
    "Any": {
      "type": "object",
      "additionalProperties": {},
      "properties": {
        "@type": {
          "type": "string"
        }
      }
    },
    "AvroConfig": {
      "type": "object",
      "properties": {
        "decimal_handling_mode": {
          "$ref": "#/definitions/DecimalHandlingMode.Enum"
        },
        "bigint_unsigned_handling_mode": {
          "$ref": "#/definitions/BigintUnsignedHandlingMode.Enum"
        },
        "confluent_schema_registry": {
          "description": "Confluent Schema Registry.",
          "$ref": "#/definitions/ConfluentSchemaRegistry"
        },
        "aws_glue_schema_registry": {
          "description": "AWS Glue Schema Registry.",
          "$ref": "#/definitions/GlueSchemaRegistry"
        }
      }
    },
    "BaseResp": {
      "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"
        }
      }
    },
    "BigintUnsignedHandlingMode.Enum": {
      "description": " - LONG: Long handling mode for unsigned bigint.\n - STRING: String handling mode for unsigned bigint.",
      "type": "string",
      "enum": ["LONG", "STRING"]
    },
    "Changefeed": {
      "type": "object",
      "properties": {
        "cluster_id": {
          "description": "The ID of the cluster.",
          "type": "string"
        },
        "changefeed_id": {
          "description": "The ID of the changefeed.",
          "type": "string",
          "readOnly": true
        },
        "state": {
          "description": "The state of the changefeed.\n\nThe name of the changefeed.",
          "$ref": "#/definitions/ChangefeedState.Enum",
          "readOnly": true
        },
        "display_name": {
          "description": "The name of the changefeed.",
          "type": "string"
        },
        "sink": {
          "description": "The sink of the changefeed.",
          "$ref": "#/definitions/SinkInfo"
        },
        "filter": {
          "description": "The filter of the changefeed.",
          "$ref": "#/definitions/ChangefeedFilter"
        },
        "start_position": {
          "description": "The start position of the changefeed.",
          "$ref": "#/definitions/StartPosition"
        },
        "checkpoint": {
          "description": "The current checkpoint for the changefeed.",
          "$ref": "#/definitions/Checkpoint",
          "readOnly": true
        },
        "error": {
          "description": "The error message.",
          "type": "string",
          "readOnly": true
        },
        "arch": {
          "$ref": "#/definitions/ChangefeedArch.Enum",
          "description": "The architecture used by the changefeed.",
          "readOnly": true
        },
        "rcu": {
          "type": "integer",
          "format": "int64",
          "description": "The requested RCU for the changefeed.",
          "readOnly": true
        },
        "create_time": {
          "description": "Timestamp when the changefeed was created.",
          "type": "string",
          "format": "date-time",
          "readOnly": true
        },
        "update_time": {
          "description": "Timestamp when the changefeed was updated.",
          "type": "string",
          "format": "date-time",
          "readOnly": true
        },
        "base_resp": {
          "$ref": "#/definitions/BaseResp"
        }
      },
      "required": ["cluster_id", "sink", "filter", "start_position"]
    },
    "ChangefeedArch.Enum": {
      "type": "string",
      "enum": ["REPLICATION_WORKER", "TICDC_NEWARCH"]
    },
    "ChangefeedFilter": {
      "type": "object",
      "properties": {
        "filter_rule": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "mode": {
          "$ref": "#/definitions/TableMode.Enum"
        },
        "event_filter_rule": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/EventFilterRule"
          }
        },
        "case_sensitive": {
          "type": "boolean"
        }
      }
    },
    "ChangefeedService.CreateChangefeedBody": {
      "type": "object",
      "properties": {
        "display_name": {
          "description": "The name of the changefeed.",
          "type": "string"
        },
        "sink": {
          "description": "The sink of the changefeed.",
          "$ref": "#/definitions/SinkInfo"
        },
        "filter": {
          "description": "The filter of the changefeed.",
          "$ref": "#/definitions/ChangefeedFilter"
        },
        "start_position": {
          "description": "The start position of the changefeed.",
          "$ref": "#/definitions/StartPosition"
        },
        "arch": {
          "$ref": "#/definitions/ChangefeedArch.Enum",
          "description": "The architecture used by this changefeed."
        },
        "rcu": {
          "type": "integer",
          "format": "int64",
          "description": "The requested RCU for this changefeed. Defaults to 3."
        }
      },
      "required": ["sink", "filter"]
    },
    "ChangefeedService.DescribeSchemaTableBody": {
      "type": "object",
      "properties": {
        "filter_rules": {
          "description": "The filter rules for schema tables.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "case_sensitive": {
          "description": "Whether the filter is case sensitive, default is false.",
          "type": "boolean"
        }
      }
    },
    "ChangefeedService.EditChangefeedBody": {
      "type": "object",
      "properties": {
        "display_name": {
          "description": "The name of the changefeed.",
          "type": "string"
        },
        "sink": {
          "description": "The sink of the changefeed.",
          "$ref": "#/definitions/SinkInfo"
        },
        "filter": {
          "description": "The filter of the changefeed.",
          "$ref": "#/definitions/ChangefeedFilter"
        }
      },
      "required": ["sink", "filter"]
    },
    "ChangefeedService.ScaleChangefeedBody": {
      "type": "object",
      "properties": {
        "rcu": {
          "type": "integer",
          "format": "int64",
          "description": "The target RCU."
        }
      },
      "required": ["rcu"]
    },
    "ChangefeedService.StartChangefeedBody": {
      "type": "object"
    },
    "ChangefeedService.StopChangefeedBody": {
      "type": "object"
    },
    "ChangefeedService.TestChangefeedBody": {
      "type": "object",
      "properties": {
        "sink": {
          "description": "The sink of the changefeed.",
          "$ref": "#/definitions/SinkInfo"
        }
      },
      "required": ["sink"]
    },
    "ChangefeedSpecification": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "Human-readable identifier (e.g. \"3rcu\", \"8rcu\"). Stable id callers\nuse to refer to a tier.",
          "readOnly": true
        },
        "rcu": {
          "type": "integer",
          "format": "int64",
          "description": "The capacity unit for the tier. Matches the `rcu` field on Create /\nScale requests.",
          "readOnly": true
        },
        "rps_limit": {
          "type": "integer",
          "format": "int64",
          "description": "Maximum rows-per-second the kernel will admit on this tier. 0 means\nunspecified.",
          "readOnly": true
        }
      }
    },
    "ChangefeedState.Enum": {
      "description": " - RUNNING: The changefeed is running.\n - CREATE_FAILED: The changefeed has failed during creation.\n - RUNNING_FAILED: The changefeed has failed during running.\n - CREATING: The changefeed is being created.\n - PAUSED: The changefeed is paused.\n - DELETED: The changefeed is deleted.\n - WARNING: The changefeed has a warning.",
      "type": "string",
      "enum": ["RUNNING", "CREATE_FAILED", "RUNNING_FAILED", "CREATING", "PAUSED", "DELETED", "WARNING"]
    },
    "ChangefeedType.Enum": {
      "description": " - KAFKA: Kafka changefeed type.\n - MYSQL: MySQL changefeed type.",
      "type": "string",
      "enum": ["KAFKA", "MYSQL"]
    },
    "Changefeeds": {
      "type": "object",
      "properties": {
        "changefeeds": {
          "description": "The list of changefeeds.",
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/Changefeed"
          }
        },
        "next_page_token": {
          "description": "The token provided to retrieve the next page of results.",
          "type": "string"
        },
        "total_size": {
          "description": "The total number of changefeeds.",
          "type": "integer",
          "format": "int64"
        },
        "base_resp": {
          "$ref": "#/definitions/BaseResp"
        }
      }
    },
    "Checkpoint": {
      "type": "object",
      "properties": {
        "tso": {
          "description": "The checkpoint TSO.",
          "type": "string",
          "format": "uint64",
          "readOnly": true
        },
        "time": {
          "description": "The checkpoint in time.",
          "type": "string",
          "format": "date-time",
          "readOnly": true
        }
      }
    },
    "ConfluentSchemaRegistry": {
      "type": "object",
      "properties": {
        "endpoint": {
          "description": "The schema registry endpoint.",
          "type": "string"
        },
        "enable_http_auth": {
          "description": "Enable HTTP authentication.",
          "type": "boolean"
        },
        "username": {
          "description": "The username for HTTP authentication.",
          "type": "string"
        },
        "password": {
          "description": "The password for HTTP authentication.",
          "type": "string"
        }
      },
      "required": ["endpoint"]
    },
    "DebeziumConfig": {
      "type": "object",
      "properties": {
        "disable_output_old_value": {
          "type": "boolean",
          "title": "whether disable output old value, default to false"
        },
        "disable_schema": {
          "type": "boolean",
          "title": "disable schema in debezium message, default to false"
        }
      }
    },
    "DecimalHandlingMode.Enum": {
      "description": " - PRECISE: Precise handling mode for decimals.\n - STRING: String handling mode for decimals.",
      "type": "string",
      "enum": ["PRECISE", "STRING"]
    },
    "DescribeSchemaTableResp": {
      "type": "object",
      "properties": {
        "cluster_id": {
          "description": "The ID of the cluster.",
          "type": "string"
        },
        "handle_key_tables": {
          "description": "The tables with handle key(pk or not null uk), up to 1000 tables will be returned.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "non_handle_key_tables": {
          "description": "The tables without handle key(pk or not null uk), up to 1000 tables will be returned.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "gc_safe_point": {
          "description": "The GC safe point timestamp.",
          "type": "string",
          "format": "date-time"
        },
        "base_resp": {
          "$ref": "#/definitions/BaseResp"
        }
      },
      "required": ["cluster_id"]
    },
    "EventFilterRule": {
      "type": "object",
      "properties": {
        "matcher": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "ignore_event": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "GlueSchemaRegistry": {
      "type": "object",
      "properties": {
        "region": {
          "description": "The region of schema registry.",
          "type": "string"
        },
        "name": {
          "description": "The name of schema registry.",
          "type": "string"
        },
        "access_key_id": {
          "description": "The AWS access key ID.",
          "type": "string"
        },
        "secret_access_key": {
          "description": "The AWS secret access key.",
          "type": "string"
        }
      },
      "required": ["region", "name", "access_key_id", "secret_access_key"]
    },
    "Kafka": {
      "type": "object",
      "properties": {
        "network": {
          "$ref": "#/definitions/Kafka.Network"
        },
        "broker": {
          "$ref": "#/definitions/Kafka.Broker"
        },
        "authentication": {
          "$ref": "#/definitions/Kafka.Authentication"
        },
        "data_format": {
          "$ref": "#/definitions/Kafka.DataFormat"
        },
        "topic_partition_config": {
          "$ref": "#/definitions/Kafka.TopicPartitionConfig"
        },
        "column_selectors": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/Kafka.ColumnSelector"
          }
        },
        "output_raw_change_event": {
          "type": "boolean"
        }
      }
    },
    "Kafka.Authentication": {
      "type": "object",
      "properties": {
        "auth_type": {
          "$ref": "#/definitions/KafkaAuthType.Enum"
        },
        "username": {
          "type": "string"
        },
        "password": {
          "type": "string"
        },
        "enable_tls": {
          "type": "boolean"
        },
        "server_name": {
          "description": "server name for tls verification. Specify this field when your server rely on TLS SNI, for example, Confluent Cloud Dedicated clusters.\nIf you use private link network, you must attach related domain for the server name to work properly.",
          "type": "string"
        }
      }
    },
    "Kafka.Broker": {
      "type": "object",
      "properties": {
        "kafka_version": {
          "$ref": "#/definitions/KafkaVersion.Enum"
        },
        "compression": {
          "$ref": "#/definitions/KafkaCompressionType.Enum"
        }
      }
    },
    "Kafka.ColumnSelector": {
      "type": "object",
      "properties": {
        "matcher": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "columns": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "Kafka.DataFormat": {
      "type": "object",
      "properties": {
        "protocol": {
          "$ref": "#/definitions/KafkaProtocol.Enum"
        },
        "enable_tidb_extension": {
          "type": "boolean",
          "title": "only available when protocol is CANAL_JSON and AVRO"
        },
        "avro_config": {
          "$ref": "#/definitions/AvroConfig"
        },
        "debezium_config": {
          "$ref": "#/definitions/DebeziumConfig"
        }
      }
    },
    "Kafka.Network": {
      "type": "object",
      "properties": {
        "network_type": {
          "$ref": "#/definitions/KafkaNetworkType.Enum"
        },
        "private_link": {
          "$ref": "#/definitions/Kafka.PrivateLink"
        },
        "public_endpoints": {
          "type": "string"
        }
      }
    },
    "Kafka.PartitionDispatcherConfig": {
      "type": "object",
      "properties": {
        "partition_type": {
          "$ref": "#/definitions/PartitionDispatcher.Enum"
        },
        "matcher": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "index_name": {
          "type": "string"
        },
        "columns": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "Kafka.PrivateLink": {
      "type": "object",
      "properties": {
        "private_link_connection_id": {
          "type": "string"
        },
        "port": {
          "type": "integer",
          "format": "int32"
        }
      }
    },
    "Kafka.TopicPartitionConfig": {
      "type": "object",
      "properties": {
        "dispatch_type": {
          "$ref": "#/definitions/TopicDispatchType.Enum"
        },
        "default_topic": {
          "type": "string"
        },
        "topic_prefix": {
          "type": "string"
        },
        "separator": {
          "type": "string"
        },
        "topic_suffix": {
          "type": "string"
        },
        "replication_factor": {
          "type": "integer",
          "format": "int64"
        },
        "partition_num": {
          "type": "integer",
          "format": "int64"
        },
        "partition_dispatchers": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/Kafka.PartitionDispatcherConfig"
          }
        }
      }
    },
    "KafkaAuthType.Enum": {
      "description": " - DISABLE: No authentication.\n - SASL_PLAIN: SASL/PLAIN authentication.\n - SASL_SCRAM_SHA_256: SASL/SCRAM-SHA-256 authentication.\n - SASL_SCRAM_SHA_512: SASL/SCRAM-SHA-512 authentication.",
      "type": "string",
      "enum": ["DISABLE", "SASL_PLAIN", "SASL_SCRAM_SHA_256", "SASL_SCRAM_SHA_512"]
    },
    "KafkaCompressionType.Enum": {
      "type": "string",
      "enum": ["NONE", "GZIP", "SNAPPY", "LZ4", "ZSTD"]
    },
    "KafkaNetworkType.Enum": {
      "description": " - PUBLIC: Public network.\n - PRIVATE_LINK: Private Link network.",
      "type": "string",
      "enum": ["PUBLIC", "PRIVATE_LINK"]
    },
    "KafkaProtocol.Enum": {
      "description": " - CANAL_JSON: Canal-JSON protocol.\n - OPEN_PROTOCOL: Open Protocol.\n - AVRO: Avro protocol.\n - DEBEZIUM: Debezium protocol.",
      "type": "string",
      "enum": ["CANAL_JSON", "OPEN_PROTOCOL", "AVRO", "DEBEZIUM"]
    },
    "KafkaVersion.Enum": {
      "description": " - VERSION_2XX: Kafka 2.x.x version.\n - VERSION_3XX: Kafka 3.x.x version.",
      "type": "string",
      "enum": ["VERSION_2XX", "VERSION_3XX"]
    },
    "ListChangefeedSpecificationsResp": {
      "type": "object",
      "properties": {
        "items": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/ChangefeedSpecification"
          }
        },
        "total": {
          "type": "integer",
          "format": "int64"
        }
      }
    },
    "MySQL": {
      "type": "object",
      "properties": {
        "network": {
          "description": "The network configuration for the MySQL instance.",
          "$ref": "#/definitions/MySQL.Network"
        },
        "authentication": {
          "description": "The authentication information for the MySQL instance.",
          "$ref": "#/definitions/MySQL.Authentication"
        }
      },
      "required": ["network", "authentication"]
    },
    "MySQL.Authentication": {
      "type": "object",
      "properties": {
        "user_name": {
          "description": "The username for the MySQL instance.",
          "type": "string"
        },
        "password": {
          "description": "The password for the MySQL instance.",
          "type": "string"
        },
        "enable_tls": {
          "description": "Enable TLS for the MySQL connection.",
          "type": "boolean"
        }
      },
      "required": ["user_name", "password"]
    },
    "MySQL.Network": {
      "type": "object",
      "properties": {
        "network_type": {
          "$ref": "#/definitions/MySQLNetworkType.Enum"
        },
        "public_endpoint": {
          "type": "string"
        },
        "private_link": {
          "$ref": "#/definitions/MySQL.PrivateLink"
        }
      },
      "required": ["network_type"]
    },
    "MySQL.PrivateLink": {
      "type": "object",
      "properties": {
        "private_link_connection_id": {
          "type": "string"
        },
        "port": {
          "type": "integer",
          "format": "int32"
        }
      },
      "required": ["private_link_connection_id", "port"]
    },
    "MySQLNetworkType.Enum": {
      "description": " - PUBLIC: Public network.\n - PRIVATE_LINK: Private network.",
      "type": "string",
      "enum": ["PUBLIC", "PRIVATE_LINK"]
    },
    "PartitionDispatcher.Enum": {
      "description": " - TABLE: Partition by table.\n - INDEX_VALUE: Partition by index value.\n - TS: Partition by timestamp.\n - COLUMNS: Partition by columns.",
      "type": "string",
      "enum": ["TABLE", "INDEX_VALUE", "TS", "COLUMNS"]
    },
    "SinkInfo": {
      "type": "object",
      "properties": {
        "type": {
          "description": "The type of the sink.",
          "$ref": "#/definitions/ChangefeedType.Enum"
        },
        "kafka": {
          "description": "The Kafka sink information.",
          "$ref": "#/definitions/Kafka"
        },
        "mysql": {
          "description": "The MySQL sink information.",
          "$ref": "#/definitions/MySQL"
        }
      },
      "required": ["type"]
    },
    "StartMode.Enum": {
      "description": " - FROM_NOW: Start from now.\n - FROM_TSO: Start from TSO.\n - FROM_TIME: Start from Time.",
      "type": "string",
      "enum": ["FROM_NOW", "FROM_TSO", "FROM_TIME"]
    },
    "StartPosition": {
      "type": "object",
      "properties": {
        "mode": {
          "$ref": "#/definitions/StartMode.Enum"
        },
        "tso": {
          "type": "string",
          "format": "uint64",
          "title": "The start position in TSO"
        },
        "time": {
          "type": "string",
          "format": "date-time",
          "title": "The start position in time"
        }
      }
    },
    "Status": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32"
        },
        "message": {
          "type": "string"
        },
        "details": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/Any"
          }
        }
      }
    },
    "TableMode.Enum": {
      "description": " - IGNORE_NOT_SUPPORT_TABLE: Ignore tables that are not supported.\n - FORCE_SYNC: Force synchronize all tables.",
      "type": "string",
      "enum": ["IGNORE_NOT_SUPPORT_TABLE", "FORCE_SYNC"]
    },
    "TestChangefeedResp": {
      "type": "object",
      "properties": {
        "base_resp": {
          "$ref": "#/definitions/BaseResp"
        }
      }
    },
    "TopicDispatchType.Enum": {
      "description": " - ONE_TOPIC: One topic for all data.\n - BY_TABLE: Dispatch by table.\n - BY_DATABASE: Dispatch by database.",
      "type": "string",
      "enum": ["ONE_TOPIC", "BY_TABLE", "BY_DATABASE"]
    }
  },
  "securityDefinitions": {
    "bearer": {
      "type": "apiKey",
      "description": "Authentication token, prefixed by Bearer: 'Bearer token'",
      "name": "Authorization",
      "in": "header"
    }
  }
}
