{
  "swagger": "2.0",
  "info": {
    "title": "TiDB Cloud Dedicated Open API",
    "description": "TiDB Cloud Dedicated Open API",
    "version": "v1beta1"
  },
  "tags": [
    {
      "name": "BackupService"
    }
  ],
  "host": "dedicated.tidbapi.com",
  "schemes": [
    "https"
  ],
  "consumes": [
    "application/json"
  ],
  "produces": [
    "application/json"
  ],
  "paths": {
    "/v1beta1/backups": {
      "get": {
        "summary": "ListBackups",
        "description": "List all backup jobs",
        "operationId": "ListBackups",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1beta1ListBackupsResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "projectId",
            "description": "The ID of the project to list backups for",
            "in": "query",
            "required": true,
            "type": "string"
          },
          {
            "name": "clusterId",
            "description": "The ID of the cluster to list backups for",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "pageSize",
            "description": "The maximum number of backup jobs to return. If not specified, 20 items are returned by default.",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int32",
            "default": "20"
          },
          {
            "name": "pageToken",
            "description": "The next_page_token value returned from a previous List request, if any",
            "in": "query",
            "required": false,
            "type": "string"
          }
        ],
        "tags": [
          "BackupService"
        ]
      },
      "post": {
        "summary": "CreateBackup",
        "description": "Create a new backup job. Supports multiple backup scopes: full cluster, specific databases, specific tables, or custom filter rules.",
        "operationId": "CreateBackup",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/adminapiv1beta1Backup"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/v1beta1CreateBackupRequest"
            }
          }
        ],
        "tags": [
          "BackupService"
        ]
      }
    },
    "/v1beta1/backups/{backupId}": {
      "get": {
        "summary": "GetBackup",
        "description": "Retrieve a specific backup job by its ID",
        "operationId": "GetBackup",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/adminapiv1beta1Backup"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "backupId",
            "description": "The ID of the backup to retrieve",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "tags": [
          "BackupService"
        ]
      },
      "delete": {
        "summary": "DeleteBackup",
        "description": "Delete a specific backup job",
        "operationId": "DeleteBackup",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "type": "object",
              "properties": {}
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "backupId",
            "description": "The ID of the backup to delete",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "tags": [
          "BackupService"
        ]
      }
    },
    "/v1beta1/backups/{backupId}/exportProfile": {
      "get": {
        "summary": "GetBackupExportProfile",
        "description": "Get the export profile for a backup",
        "operationId": "GetBackupExportProfile",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1beta1BackupExportProfile"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "backupId",
            "description": "The ID of the backup to get export profile for",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "tags": [
          "BackupService"
        ]
      }
    },
    "/v1beta1/backups/{backupId}/exports": {
      "get": {
        "summary": "ListBackupExports",
        "description": "List all backup export jobs for a specific backup",
        "operationId": "ListBackupExports",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1beta1ListBackupExportsResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "backupId",
            "description": "The ID of the backup to list export jobs for",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "pageSize",
            "description": "The maximum number of items to return",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "pageToken",
            "description": "The next_page_token value returned from a previous List request, if any",
            "in": "query",
            "required": false,
            "type": "string"
          }
        ],
        "tags": [
          "BackupService"
        ]
      },
      "post": {
        "summary": "CreateBackupExport",
        "description": "Create a new backup export job",
        "operationId": "CreateBackupExport",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1beta1BackupExport"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "backupId",
            "description": "The ID of the backup to create an export for",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "type": "object",
              "properties": {
                "backupExport": {
                  "title": "The backup export configuration",
                  "allOf": [
                    {
                      "$ref": "#/definitions/v1beta1BackupExport"
                    }
                  ]
                },
                "dryRun": {
                  "type": "boolean"
                }
              },
              "title": "CreateBackupExportRequest represents the request for creating a backup export job",
              "required": [
                "backupExport"
              ]
            }
          }
        ],
        "tags": [
          "BackupService"
        ]
      }
    },
    "/v1beta1/backups/{backupId}/exports/{exportId}": {
      "get": {
        "summary": "GetBackupExport",
        "description": "Get a specific backup export job",
        "operationId": "GetBackupExport",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1beta1BackupExport"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "backupId",
            "description": "The ID of the backup",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "exportId",
            "description": "The ID of the export job",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "tags": [
          "BackupService"
        ]
      }
    },
    "/v1beta1/backups/{backupId}/exports/{exportId}:cancel": {
      "post": {
        "summary": "CancelBackupExport",
        "description": "Cancel a running backup export job",
        "operationId": "CancelBackupExport",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "type": "object",
              "properties": {}
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "backupId",
            "description": "The ID of the backup",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "exportId",
            "description": "The ID of the export job to cancel",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "type": "object",
              "title": "CancelBackupExportRequest represents the request for canceling a backup export job"
            }
          }
        ],
        "tags": [
          "BackupService"
        ]
      }
    },
    "/v1beta1/clusters/{clusterId}/backupOptions": {
      "get": {
        "summary": "GetBackupOptions",
        "description": "Get available backup configuration options for a cluster, including supported regions",
        "operationId": "GetBackupOptions",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1beta1BackupOptions"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "clusterId",
            "description": "The ID of the cluster to get backup options for",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "tags": [
          "BackupService"
        ]
      }
    },
    "/v1beta1/clusters/{clusterId}/backupSettings": {
      "get": {
        "summary": "GetBackupSettings",
        "description": "Retrieve current backup settings for a cluster",
        "operationId": "GetBackupSettings",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1beta1BackupSettings"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "clusterId",
            "description": "The ID of the cluster to get backup settings for",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "tags": [
          "BackupService"
        ]
      },
      "post": {
        "summary": "ModifyBackupSettings",
        "description": "Modify backup settings including regions, PITR configuration, and snapshot schedule",
        "operationId": "ModifyBackupSettings",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1beta1BackupSettings"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "clusterId",
            "description": "The ID of the cluster to modify backup settings for",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "type": "object",
              "properties": {
                "regions": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "Backup regions configuration.\nOmit this field to keep the current backup region setting unchanged.\n\nTo keep or switch to single-region backup, provide exactly 1 region:\nExample: [\"us-west-2\"].\n\nTo enable dual-region backup, provide exactly 2 regions:\nExample: [\"us-west-2\", \"us-east-1\"].\n\nConstraints:\n- The first region is the current primary/master region.\n- When dual-region backup is enabled, the second region must be different from the first one.\n- The allowed secondary regions are returned by GetBackupOptions.\n- Azure clusters support only single-region backup."
                },
                "pitrSetting": {
                  "title": "PITR (Point-in-Time Recovery) settings",
                  "allOf": [
                    {
                      "$ref": "#/definitions/v1beta1PITRSetting"
                    }
                  ]
                },
                "snapshotBackupSchedule": {
                  "title": "Snapshot backup schedule settings",
                  "allOf": [
                    {
                      "$ref": "#/definitions/v1beta1SnapshotBackupSchedule"
                    }
                  ]
                }
              },
              "title": "ModifyBackupSettingsRequest represents the request for modifying backup settings"
            }
          }
        ],
        "tags": [
          "BackupService"
        ]
      }
    },
    "/v1beta1/clusters/{clusterId}/backupSettings/pitrTimeRanges": {
      "get": {
        "summary": "GetBackupPITRTimeRanges",
        "description": "Retrieve PITR time ranges for a cluster, grouped by region.",
        "operationId": "GetBackupPITRTimeRanges",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1beta1GetBackupPITRTimeRangesResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "clusterId",
            "description": "The ID of the cluster to get PITR time ranges for",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "tags": [
          "BackupService"
        ]
      }
    }
  },
  "definitions": {
    "BackupExportProfileGCSProfile": {
      "type": "object",
      "properties": {
        "serviceAccount": {
          "type": "string",
          "title": "The service account to be used for Google Cloud Storage access"
        }
      },
      "title": "GCSProfile contains Google Cloud Storage specific configuration"
    },
    "BackupExportProfileS3Profile": {
      "type": "object",
      "properties": {
        "roleArn": {
          "type": "string",
          "title": "The role ARN to be used for S3 access"
        }
      },
      "title": "S3Profile contains AWS S3 specific configuration"
    },
    "StorageDestinationGCSDestination": {
      "type": "object",
      "properties": {
        "targetUri": {
          "type": "string",
          "title": "The target URI for Google Cloud Storage"
        }
      },
      "title": "GCSDestination contains Google Cloud Storage specific configuration",
      "required": [
        "targetUri"
      ]
    },
    "StorageDestinationS3Destination": {
      "type": "object",
      "properties": {
        "targetUri": {
          "type": "string",
          "title": "The target URI for AWS S3"
        },
        "region": {
          "type": "string",
          "title": "The target region of the S3 bucket, for example: us-east-1"
        }
      },
      "title": "S3Destination contains AWS S3 specific configuration",
      "required": [
        "targetUri",
        "region"
      ]
    },
    "adminapiv1beta1Backup": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "title": "The ID of backup\n(-- api-linter: core::0148::use-uid=disabled --)",
          "readOnly": true
        },
        "clusterId": {
          "type": "string",
          "title": "The ID of the cluster"
        },
        "name": {
          "type": "string",
          "title": "The name of the backup\n(-- api-linter: core::0203::resource-name-identifier=disabled)"
        },
        "description": {
          "type": "string",
          "title": "The description of the backup"
        },
        "createTime": {
          "type": "string",
          "format": "date-time",
          "title": "The time when the backup was created",
          "readOnly": true
        },
        "sizeBytes": {
          "type": "string",
          "format": "uint64",
          "title": "The size of the backup in bytes\n(-- api-linter: core::0141::forbidden-types=disabled --)",
          "readOnly": true
        },
        "state": {
          "title": "The States of the backup",
          "readOnly": true,
          "allOf": [
            {
              "$ref": "#/definitions/v1beta1BackupState"
            }
          ]
        },
        "type": {
          "title": "The type of the backup",
          "readOnly": true,
          "allOf": [
            {
              "$ref": "#/definitions/adminapiv1beta1BackupType"
            }
          ]
        },
        "expirationTime": {
          "type": "string",
          "format": "date-time",
          "title": "The expiration time of the back up file",
          "readOnly": true
        },
        "backupTime": {
          "type": "string",
          "format": "date-time",
          "title": "The physical backup start time, converted from the backup tso",
          "readOnly": true
        },
        "backupTso": {
          "type": "string",
          "format": "uint64",
          "title": "The tso of the backup\n(-- api-linter: core::0141::forbidden-types=disabled --)",
          "readOnly": true
        },
        "regions": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/adminapiv1beta1RegionInfo"
          },
          "title": "The region info of the backup",
          "readOnly": true
        },
        "scopeType": {
          "title": "The backup scope type indicates what level of data was backed up",
          "readOnly": true,
          "allOf": [
            {
              "$ref": "#/definitions/v1beta1BackupScopeType"
            }
          ]
        },
        "scopeDetails": {
          "title": "The scope details (databases, tables, or filter rules used)",
          "readOnly": true,
          "allOf": [
            {
              "$ref": "#/definitions/v1beta1BackupScopeDetails"
            }
          ]
        }
      },
      "title": "Backup represents a backup job",
      "required": [
        "clusterId"
      ]
    },
    "adminapiv1beta1BackupType": {
      "type": "string",
      "enum": [
        "BACKUP_TYPE_UNSPECIFIED",
        "AUTO",
        "MANUAL"
      ],
      "default": "BACKUP_TYPE_UNSPECIFIED",
      "description": "- BACKUP_TYPE_UNSPECIFIED: Unspecified\n - AUTO: Auto backup\n - MANUAL: Manual backup",
      "title": "BackupType defines the possible type of a backup job"
    },
    "adminapiv1beta1DualRegionOptions": {
      "type": "object",
      "properties": {
        "regionOptions": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/v1beta1RegionOption"
          },
          "title": "Available region options"
        },
        "clusterRegion": {
          "title": "Current cluster region",
          "allOf": [
            {
              "$ref": "#/definitions/adminapiv1beta1RegionInfo"
            }
          ]
        }
      },
      "title": "DualRegionOptions represents dual-region backup configuration options"
    },
    "adminapiv1beta1RegionInfo": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "title": "The name of the region"
        },
        "displayName": {
          "type": "string",
          "title": "The display name of the name"
        }
      },
      "title": "(-- api-linter: core::0123::resource-annotation=disabled)\nThe information of region"
    },
    "dataflowWeekDay": {
      "type": "string",
      "enum": [
        "SUNDAY",
        "MONDAY",
        "TUESDAY",
        "WEDNESDAY",
        "THURSDAY",
        "FRIDAY",
        "SATURDAY"
      ],
      "default": "SUNDAY"
    },
    "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    }"
    },
    "v1beta1BackupExport": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "title": "The ID of the backup export job\n(-- api-linter: core::0148::use-uid=disabled --)",
          "readOnly": true
        },
        "name": {
          "type": "string",
          "title": "(-- api-linter: core::0203::resource-name-identifier=disabled --)\nThe name of the backup export job",
          "readOnly": true
        },
        "backupId": {
          "type": "string",
          "title": "The ID of the backup being exported",
          "readOnly": true
        },
        "backupName": {
          "type": "string",
          "title": "The name of the backup\n(-- api-linter: core::0122::name-suffix=disabled)",
          "readOnly": true
        },
        "backupTime": {
          "type": "string",
          "format": "date-time",
          "title": "The time when the backup was created",
          "readOnly": true
        },
        "provider": {
          "type": "string",
          "title": "The cloud provider",
          "readOnly": true
        },
        "region": {
          "type": "string",
          "title": "The cloud region",
          "readOnly": true
        },
        "destination": {
          "title": "The destination storage configuration",
          "allOf": [
            {
              "$ref": "#/definitions/v1beta1StorageDestination"
            }
          ]
        },
        "createTime": {
          "type": "string",
          "format": "date-time",
          "title": "The time when the export job was created",
          "readOnly": true
        },
        "finishTime": {
          "type": "string",
          "format": "date-time",
          "title": "The time when the export job finished",
          "readOnly": true
        },
        "state": {
          "title": "The current state of the export job",
          "readOnly": true,
          "allOf": [
            {
              "$ref": "#/definitions/v1beta1BackupExportState"
            }
          ]
        },
        "message": {
          "type": "string",
          "title": "Additional message information",
          "readOnly": true
        }
      },
      "title": "BackupExport represents a backup export job",
      "required": [
        "destination"
      ]
    },
    "v1beta1BackupExportProfile": {
      "type": "object",
      "properties": {
        "gcs": {
          "title": "Google Cloud Storage specific configuration",
          "allOf": [
            {
              "$ref": "#/definitions/BackupExportProfileGCSProfile"
            }
          ]
        },
        "s3": {
          "$ref": "#/definitions/BackupExportProfileS3Profile"
        }
      },
      "title": "BackupExportProfile contains the credentials and configurations for different cloud storage providers"
    },
    "v1beta1BackupExportState": {
      "type": "string",
      "enum": [
        "STATE_UNSPECIFIED",
        "PENDING",
        "RUNNING",
        "FAILED",
        "SUCCEEDED",
        "CANCELLED"
      ],
      "default": "STATE_UNSPECIFIED",
      "description": "- STATE_UNSPECIFIED: Unspecified state\n - PENDING: The export job is pending\n - RUNNING: The export job is running\n - FAILED: The export job failed\n - SUCCEEDED: The export job succeeded\n - CANCELLED: The export job was canceled",
      "title": "BackupExportState defines the possible states of a backup export job"
    },
    "v1beta1BackupOptions": {
      "type": "object",
      "properties": {
        "clusterId": {
          "type": "string",
          "title": "The cluster ID",
          "readOnly": true
        },
        "dualRegionOptions": {
          "title": "Available regions for dual-region backup",
          "readOnly": true,
          "allOf": [
            {
              "$ref": "#/definitions/adminapiv1beta1DualRegionOptions"
            }
          ]
        }
      },
      "title": "BackupOptions represents available backup configuration options"
    },
    "v1beta1BackupScope": {
      "type": "object",
      "properties": {
        "type": {
          "example": "BACKUP_SCOPE_TYPE_FULL",
          "description": "The scope type of the backup.\n\nWhen this field is set, the corresponding scope payload should also be provided.\n\n- `\"BACKUP_SCOPE_TYPE_UNSPECIFIED\"`: the backup scope is not specified.\n\n- `\"BACKUP_SCOPE_TYPE_FULL\"`: back up the full cluster. Use with the `full` field.\n\n- `\"BACKUP_SCOPE_TYPE_DATABASE\"`: back up one or more databases. Use with the `database` field.\n\n- `\"BACKUP_SCOPE_TYPE_TABLE\"`: back up one or more tables. Use with the `table` field.\n\n- `\"BACKUP_SCOPE_TYPE_FILTER\"`: back up data by custom include or exclude rules. Use with the `filter` field.",
          "allOf": [
            {
              "$ref": "#/definitions/v1beta1BackupScopeType"
            }
          ]
        },
        "full": {
          "title": "Full cluster backup (default)",
          "allOf": [
            {
              "$ref": "#/definitions/v1beta1FullBackupScope"
            }
          ]
        },
        "database": {
          "title": "Database-level backup",
          "allOf": [
            {
              "$ref": "#/definitions/v1beta1DatabaseBackupScope"
            }
          ]
        },
        "table": {
          "title": "Table-level backup",
          "allOf": [
            {
              "$ref": "#/definitions/v1beta1TableBackupScope"
            }
          ]
        },
        "filter": {
          "title": "Custom filter-based backup",
          "allOf": [
            {
              "$ref": "#/definitions/v1beta1FilterBackupScope"
            }
          ]
        }
      },
      "description": "BackupScope represents the target scope of a backup request.\nThe `type` field declares which scope payload is intended.\nThe matching payload field should be provided together with the selected type.",
      "required": [
        "type"
      ]
    },
    "v1beta1BackupScopeDetails": {
      "type": "object",
      "properties": {
        "databases": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "title": "The list of databases (populated when scope_type is DATABASE)"
        },
        "tables": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "title": "The list of tables in \"database.table\" format (populated when scope_type is TABLE)"
        },
        "includeRules": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "title": "The include rules (populated when scope_type is FILTER)"
        },
        "excludeRules": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "title": "The exclude rules (populated when scope_type is FILTER)"
        }
      },
      "title": "BackupScopeDetails provides detailed information about what was backed up"
    },
    "v1beta1BackupScopeType": {
      "type": "string",
      "enum": [
        "BACKUP_SCOPE_TYPE_UNSPECIFIED",
        "BACKUP_SCOPE_TYPE_FULL",
        "BACKUP_SCOPE_TYPE_DATABASE",
        "BACKUP_SCOPE_TYPE_TABLE",
        "BACKUP_SCOPE_TYPE_FILTER"
      ],
      "default": "BACKUP_SCOPE_TYPE_UNSPECIFIED",
      "description": "- BACKUP_SCOPE_TYPE_UNSPECIFIED: Unspecified scope type\n - BACKUP_SCOPE_TYPE_FULL: Full cluster backup\n - BACKUP_SCOPE_TYPE_DATABASE: Database-level backup\n - BACKUP_SCOPE_TYPE_TABLE: Table-level backup\n - BACKUP_SCOPE_TYPE_FILTER: Custom filter-based backup",
      "title": "BackupScopeType defines the granularity level of a backup"
    },
    "v1beta1BackupSettingAction": {
      "type": "string",
      "enum": [
        "BACKUP_SETTING_ACTION_UNSPECIFIED",
        "BACKUP_SETTING_ACTION_EDIT_REGION",
        "BACKUP_SETTING_ACTION_EDIT_PITR",
        "BACKUP_SETTING_ACTION_EDIT_SNAPSHOT_BACKUP_SCHEDULE"
      ],
      "default": "BACKUP_SETTING_ACTION_UNSPECIFIED",
      "description": "- BACKUP_SETTING_ACTION_UNSPECIFIED: Unspecified action\n - BACKUP_SETTING_ACTION_EDIT_REGION: Edit region configuration\n - BACKUP_SETTING_ACTION_EDIT_PITR: Edit PITR configuration\n - BACKUP_SETTING_ACTION_EDIT_SNAPSHOT_BACKUP_SCHEDULE: Edit snapshot backup schedule",
      "title": "BackupSettingAction represents allowed actions on backup settings"
    },
    "v1beta1BackupSettingState": {
      "type": "string",
      "enum": [
        "BACKUP_SETTING_STATE_UNSPECIFIED",
        "BACKUP_SETTING_STATE_CREATING",
        "BACKUP_SETTING_STATE_EDITING_REGION",
        "BACKUP_SETTING_STATE_EDITING_PITR",
        "BACKUP_SETTING_STATE_NORMAL",
        "BACKUP_SETTING_STATE_DELETED",
        "BACKUP_SETTING_STATE_WAITING_FOR_EDITING_PITR"
      ],
      "default": "BACKUP_SETTING_STATE_UNSPECIFIED",
      "description": "- BACKUP_SETTING_STATE_UNSPECIFIED: Unspecified state\n - BACKUP_SETTING_STATE_CREATING: Creating backup settings\n - BACKUP_SETTING_STATE_EDITING_REGION: Editing region configuration\n - BACKUP_SETTING_STATE_EDITING_PITR: Editing PITR configuration\n - BACKUP_SETTING_STATE_NORMAL: Normal state\n - BACKUP_SETTING_STATE_DELETED: Deleted\n - BACKUP_SETTING_STATE_WAITING_FOR_EDITING_PITR: Waiting for PITR edit",
      "title": "BackupSettingState represents the state of backup settings"
    },
    "v1beta1BackupSettings": {
      "type": "object",
      "properties": {
        "clusterId": {
          "type": "string",
          "title": "The cluster ID",
          "readOnly": true
        },
        "regions": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/adminapiv1beta1RegionInfo"
          },
          "title": "Configured backup regions",
          "readOnly": true
        },
        "snapshotBackupSchedule": {
          "title": "Snapshot backup schedule settings",
          "readOnly": true,
          "allOf": [
            {
              "$ref": "#/definitions/v1beta1SnapshotBackupSchedule"
            }
          ]
        },
        "pitrSetting": {
          "title": "PITR settings",
          "readOnly": true,
          "allOf": [
            {
              "$ref": "#/definitions/v1beta1PITRSetting"
            }
          ]
        },
        "state": {
          "title": "Current state of the backup setting",
          "readOnly": true,
          "allOf": [
            {
              "$ref": "#/definitions/v1beta1BackupSettingState"
            }
          ]
        },
        "allowedActions": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/v1beta1BackupSettingAction"
          },
          "title": "Allowed actions on the backup setting",
          "readOnly": true
        }
      },
      "title": "BackupSettings represents the backup settings for a cluster"
    },
    "v1beta1BackupState": {
      "type": "string",
      "enum": [
        "STATE_UNSPECIFIED",
        "PENDING",
        "RUNNING",
        "FAILED",
        "SUCCEEDED",
        "SKIPPED",
        "TERMINATED"
      ],
      "default": "STATE_UNSPECIFIED",
      "description": "- STATE_UNSPECIFIED: Unspecified States\n - PENDING: Backup is pending\n - RUNNING: Backup is running\n - FAILED: Backup failed\n - SUCCEEDED: Backup succeeded\n - SKIPPED: Backup skipped due to cluster paused or schedule timeout\n - TERMINATED: User delete backups during backup",
      "title": "BackupState defines the possible statuses of a backup job"
    },
    "v1beta1CreateBackupRequest": {
      "type": "object",
      "properties": {
        "clusterId": {
          "type": "string",
          "title": "The ID of the cluster to create backup for"
        },
        "name": {
          "type": "string",
          "title": "The name of the backup"
        },
        "description": {
          "type": "string",
          "title": "The description of the backup"
        },
        "backupScope": {
          "description": "The backup scope defines what data to back up.\nIf not specified, the request defaults to a full cluster backup.",
          "allOf": [
            {
              "$ref": "#/definitions/v1beta1BackupScope"
            }
          ]
        }
      },
      "title": "CreateBackupRequest represents the request for creating a new backup",
      "required": [
        "clusterId",
        "name"
      ]
    },
    "v1beta1DailySchedule": {
      "type": "object",
      "properties": {
        "scheduleTime": {
          "type": "string",
          "title": "Daily backup time in HH:MM format (UTC)"
        }
      },
      "title": "DailySchedule represents daily backup schedule configuration",
      "required": [
        "scheduleTime"
      ]
    },
    "v1beta1DatabaseBackupScope": {
      "type": "object",
      "properties": {
        "databases": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "title": "List of database names to backup (at least one required)"
        }
      },
      "title": "DatabaseBackupScope represents a database-level backup",
      "required": [
        "databases"
      ]
    },
    "v1beta1FilterBackupScope": {
      "type": "object",
      "properties": {
        "includeRules": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "title": "Include rules using wildcard patterns\nSupported patterns:\n- \"db.*\" - all tables in database 'db'\n- \"db.prefix*\" - all tables starting with 'prefix' in database 'db'\n- \"db.table\" - specific table"
        },
        "excludeRules": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "title": "Exclude rules using wildcard patterns (optional)\nThese rules take precedence over include_rules\nExample: exclude temporary tables while backing up entire database"
        }
      },
      "title": "FilterBackupScope represents a custom filter-based backup",
      "required": [
        "includeRules"
      ]
    },
    "v1beta1FullBackupScope": {
      "type": "object",
      "description": "Full backup doesn't require additional parameters\n This is a marker message to explicitly indicate full backup intent",
      "title": "FullBackupScope represents a full cluster backup"
    },
    "v1beta1GetBackupPITRTimeRangesResponse": {
      "type": "object",
      "properties": {
        "items": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/v1beta1PITRRegionTimeRange"
          },
          "title": "PITR time ranges grouped by region",
          "readOnly": true
        },
        "message": {
          "type": "string",
          "title": "Optional message when no PITR time range is currently available",
          "readOnly": true
        }
      },
      "title": "GetBackupPITRTimeRangesResponse represents PITR time ranges for a cluster"
    },
    "v1beta1ListBackupExportsResponse": {
      "type": "object",
      "properties": {
        "backupExports": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/v1beta1BackupExport"
          },
          "title": "The list of backup export jobs"
        },
        "totalSize": {
          "type": "integer",
          "format": "int32",
          "title": "The total number of backup export jobs"
        },
        "nextPageToken": {
          "type": "string",
          "title": "A token to retrieve the next page of results"
        }
      },
      "title": "ListBackupExportsResponse represents the response for listing backup export jobs"
    },
    "v1beta1ListBackupsResponse": {
      "type": "object",
      "properties": {
        "backups": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/adminapiv1beta1Backup"
          },
          "title": "The list of backup jobs"
        },
        "totalSize": {
          "type": "integer",
          "format": "int32",
          "title": "The total number of backup jobs"
        },
        "nextPageToken": {
          "type": "string",
          "title": "A token to retrieve the next page of results"
        }
      },
      "title": "ListBackupsResponse represents the response for listing backup jobs"
    },
    "v1beta1PITRRegionTimeRange": {
      "type": "object",
      "properties": {
        "region": {
          "title": "Region information",
          "readOnly": true,
          "allOf": [
            {
              "$ref": "#/definitions/adminapiv1beta1RegionInfo"
            }
          ]
        },
        "timeRanges": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/v1beta1PITRTimeRange"
          },
          "title": "PITR time ranges available in this region",
          "readOnly": true
        }
      },
      "title": "PITRRegionTimeRange represents PITR time ranges in a specific region"
    },
    "v1beta1PITRSetting": {
      "type": "object",
      "properties": {
        "enabled": {
          "type": "boolean",
          "title": "Whether PITR is enabled"
        }
      },
      "title": "PITRSetting represents Point-in-Time Recovery settings"
    },
    "v1beta1PITRTimeRange": {
      "type": "object",
      "properties": {
        "startTime": {
          "type": "string",
          "format": "date-time",
          "title": "Start time of PITR coverage"
        },
        "endTime": {
          "type": "string",
          "format": "date-time",
          "title": "End time of PITR coverage (checkpoint)"
        }
      },
      "title": "PITRTimeRange represents the time range for PITR"
    },
    "v1beta1RegionOption": {
      "type": "object",
      "properties": {
        "region": {
          "title": "Region information",
          "allOf": [
            {
              "$ref": "#/definitions/adminapiv1beta1RegionInfo"
            }
          ]
        }
      },
      "title": "RegionOption represents a region option for backup"
    },
    "v1beta1SnapshotBackupSchedule": {
      "type": "object",
      "properties": {
        "enabled": {
          "type": "boolean",
          "title": "Whether snapshot backup is enabled"
        },
        "scheduleType": {
          "title": "Backup schedule type",
          "allOf": [
            {
              "$ref": "#/definitions/v1beta1SnapshotBackupScheduleType"
            }
          ]
        },
        "dailySchedule": {
          "title": "Daily backup schedule",
          "allOf": [
            {
              "$ref": "#/definitions/v1beta1DailySchedule"
            }
          ]
        },
        "weeklySchedule": {
          "title": "Weekly backup schedule",
          "allOf": [
            {
              "$ref": "#/definitions/v1beta1WeeklySchedule"
            }
          ]
        },
        "retentionDays": {
          "type": "integer",
          "format": "int32",
          "title": "Retention period in days"
        },
        "nextBackupTime": {
          "type": "string",
          "format": "date-time",
          "title": "Next scheduled backup time (output only)",
          "readOnly": true
        }
      },
      "title": "SnapshotBackupSchedule represents snapshot backup schedule configuration"
    },
    "v1beta1SnapshotBackupScheduleType": {
      "type": "string",
      "enum": [
        "SNAPSHOT_BACKUP_SCHEDULE_TYPE_UNSPECIFIED",
        "SNAPSHOT_BACKUP_SCHEDULE_TYPE_DAILY",
        "SNAPSHOT_BACKUP_SCHEDULE_TYPE_WEEKLY"
      ],
      "default": "SNAPSHOT_BACKUP_SCHEDULE_TYPE_UNSPECIFIED",
      "description": "- SNAPSHOT_BACKUP_SCHEDULE_TYPE_UNSPECIFIED: Unspecified schedule type\n - SNAPSHOT_BACKUP_SCHEDULE_TYPE_DAILY: Daily backup\n - SNAPSHOT_BACKUP_SCHEDULE_TYPE_WEEKLY: Weekly backup",
      "title": "SnapshotBackupScheduleType defines the backup schedule frequency"
    },
    "v1beta1StorageDestination": {
      "type": "object",
      "properties": {
        "gcs": {
          "title": "Google Cloud Storage storage configuration",
          "allOf": [
            {
              "$ref": "#/definitions/StorageDestinationGCSDestination"
            }
          ]
        },
        "s3": {
          "$ref": "#/definitions/StorageDestinationS3Destination"
        }
      },
      "title": "StorageDestination represents cloud storage destination configurations"
    },
    "v1beta1TableBackupScope": {
      "type": "object",
      "properties": {
        "tables": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "title": "List of table names to backup in format \"database.table\" (at least one required)\nExample: [\"mydb.users\", \"mydb.orders\"]\nSupports any valid TiDB table identifier including special characters with backticks"
        }
      },
      "title": "TableBackupScope represents a table-level backup",
      "required": [
        "tables"
      ]
    },
    "v1beta1WeeklySchedule": {
      "type": "object",
      "properties": {
        "scheduleTime": {
          "type": "string",
          "title": "Weekly backup time in HH:MM format (UTC)"
        },
        "weekDays": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/dataflowWeekDay"
          },
          "title": "Days of week for weekly backups (e.g., MONDAY, WEDNESDAY, FRIDAY)"
        }
      },
      "title": "WeeklySchedule represents weekly backup schedule configuration",
      "required": [
        "scheduleTime",
        "weekDays"
      ]
    }
  }
}
