{
  "swagger": "2.0",
  "info": {
    "title": "global/serverless/v1/services.proto",
    "version": "version not set"
  },
  "tags": [
    {
      "name": "ServerlessService"
    },
    {
      "name": "SqlUserService"
    },
    {
      "name": "CloudProviderService"
    },
    {
      "name": "RegionService"
    },
    {
      "name": "ServerlessPGBackupProxyService"
    },
    {
      "name": "RegionalServerProxyService"
    },
    {
      "name": "ServerlessImportService"
    },
    {
      "name": "ServerlessDMService"
    },
    {
      "name": "ServerlessPrivateLinkConnectionService"
    }
  ],
  "consumes": [
    "application/json"
  ],
  "produces": [
    "application/json"
  ],
  "paths": {},
  "definitions": {
    "DMPrecheckBlockAllowRules": {
      "type": "object",
      "properties": {
        "doDbs": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "doTables": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/serverlessv1Table"
          },
          "title": "support blocklist in the future\n repeated string ignore_dbs = 3;\n repeated Table ignore_tables = 4;"
        }
      }
    },
    "DMPrecheckConnProfile": {
      "type": "object",
      "properties": {
        "host": {
          "type": "string"
        },
        "port": {
          "type": "integer",
          "format": "int32"
        },
        "user": {
          "type": "string"
        },
        "password": {
          "type": "string"
        },
        "security": {
          "title": "optional, if not set, use default",
          "allOf": [
            {
              "$ref": "#/definitions/DMPrecheckSecurity"
            }
          ]
        }
      }
    },
    "DMPrecheckSecurity": {
      "type": "object",
      "properties": {
        "certAllowedCn": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "sslCaContent": {
          "type": "string",
          "format": "byte"
        },
        "sslCertContent": {
          "type": "string",
          "format": "byte"
        },
        "sslKeyContent": {
          "type": "string",
          "format": "byte"
        }
      }
    },
    "DMPrecheckSource": {
      "type": "object",
      "properties": {
        "connProfile": {
          "$ref": "#/definitions/DMPrecheckConnProfile"
        },
        "rules": {
          "$ref": "#/definitions/DMPrecheckBlockAllowRules"
        },
        "binlogName": {
          "type": "string",
          "x-nullable": true
        },
        "binlogPos": {
          "type": "integer",
          "format": "int32",
          "x-nullable": true
        },
        "binlogGtid": {
          "type": "string",
          "x-nullable": true
        },
        "needPkCheck": {
          "type": "boolean"
        },
        "routeRules": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/DMPrecheckTableRouteRule"
          }
        }
      }
    },
    "DMPrecheckTableRouteRule": {
      "type": "object",
      "properties": {
        "schemaPattern": {
          "type": "string"
        },
        "tablePattern": {
          "type": "string"
        },
        "targetSchema": {
          "type": "string"
        },
        "targetTable": {
          "type": "string"
        }
      }
    },
    "DMPrecheckTargetDatabase": {
      "type": "object",
      "properties": {
        "host": {
          "type": "string"
        },
        "port": {
          "type": "integer",
          "format": "int32"
        },
        "user": {
          "type": "string"
        },
        "password": {
          "type": "string"
        }
      }
    },
    "DMPrecheckTaskMode": {
      "type": "string",
      "enum": [
        "TASK_MODE_ALL",
        "TASK_MODE_INCREMENTAL"
      ]
    },
    "ServerlessServiceClusterAttributes": {
      "type": "object",
      "properties": {
        "withBuiltinCdcAdminRole": {
          "type": "boolean",
          "x-nullable": true
        }
      }
    },
    "SqlUserAuthMethod": {
      "type": "string",
      "enum": [
        "AUTH_METHOD_PASSWORD",
        "AUTH_METHOD_TOKEN"
      ],
      "title": "- AUTH_METHOD_TOKEN: only delegate user can use this method now"
    },
    "SqlUserBuiltinRole": {
      "type": "string",
      "enum": [
        "BUILTIN_ROLE_USER_ADMIN",
        "BUILTIN_ROLE_CDC_ADMIN"
      ],
      "description": "used for cdc, enable the cdc component could make changes in the secondary cluster.",
      "title": "- BUILTIN_ROLE_USER_ADMIN: db admin role, include the majority of privileges exclude some server management privileges\n - BUILTIN_ROLE_CDC_ADMIN: BUILTIN_ROLE_USER_MEMBER = 2; // unused\nBUILTIN_ROLE_USER_OBSERVER = 3; // unused"
    },
    "SqlUserServiceCreateSqlUserRequestSettings": {
      "type": "object",
      "properties": {
        "ignoreExists": {
          "type": "boolean",
          "title": "check the user whether exists and ignore if already exists before trying to create"
        }
      }
    },
    "VpcEndpointDetailsAlicloudDetail": {
      "type": "object",
      "properties": {
        "endpointState": {
          "type": "string"
        },
        "connectionState": {
          "type": "string"
        }
      }
    },
    "VpcEndpointDetailsProviderType": {
      "type": "string",
      "enum": [
        "TYPE_ALICLOUD"
      ]
    },
    "commonv1RegionState": {
      "type": "string",
      "enum": [
        "ACTIVE",
        "INACTIVE"
      ]
    },
    "commonv1ServicePlan": {
      "type": "string",
      "enum": [
        "Starter",
        "Essential",
        "Premium",
        "BYOC",
        "Premium_Reserved",
        "Essential_V2"
      ]
    },
    "globalcommonv1CloudProvider": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/definitions/v1CloudProviderName"
        },
        "displayName": {
          "type": "string"
        },
        "state": {
          "$ref": "#/definitions/v1CloudProviderState"
        },
        "regions": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/globalcommonv1Region"
          }
        },
        "isPublic": {
          "type": "boolean"
        },
        "servicePlan": {
          "$ref": "#/definitions/commonv1ServicePlan"
        },
        "servicePlans": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/commonv1ServicePlan"
          }
        }
      },
      "required": [
        "id",
        "displayName"
      ]
    },
    "globalcommonv1Region": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/definitions/v1RegionName"
        },
        "cloudProviderId": {
          "$ref": "#/definitions/v1CloudProviderName"
        },
        "displayName": {
          "type": "string",
          "title": "display name of the region"
        },
        "openedTenantIds": {
          "type": "array",
          "items": {
            "type": "string",
            "format": "uint64"
          },
          "title": "if public is false, only these tenants can use this region"
        },
        "sortPriority": {
          "type": "integer",
          "format": "int32",
          "title": "not used now"
        },
        "area": {
          "type": "string",
          "title": "for example: Europe, Americas"
        },
        "countryCode": {
          "type": "string",
          "title": "such as: CN, US"
        },
        "state": {
          "title": "region state, if state is inactive, the region is not available, can not use it",
          "allOf": [
            {
              "$ref": "#/definitions/commonv1RegionState"
            }
          ]
        },
        "isPublic": {
          "type": "boolean",
          "title": "whether the region is public, if true, all organizations can use it"
        },
        "defaultBackupTime": {
          "type": "string",
          "title": "cluster's default auto backup time in this region(dataflow-service), such as \"10:00\""
        },
        "serviceAddress": {
          "type": "string",
          "title": "regional service address"
        },
        "logicalName": {
          "type": "string",
          "title": "logic region name, such as \"cn-north-1\" , if local name is not equal to id , is a byoc region and only set public to false"
        },
        "servicePlan": {
          "title": "service plan of the region, if not set, use default service plan",
          "allOf": [
            {
              "$ref": "#/definitions/commonv1ServicePlan"
            }
          ]
        },
        "sharedBucketUrl": {
          "type": "string",
          "x-nullable": true,
          "title": "shared bucket url of the region, if not set, keep empty"
        },
        "opsAuditLogSetting": {
          "title": "ops audit log setting of the region",
          "allOf": [
            {
              "$ref": "#/definitions/v1RegionOpsAuditLogSetting"
            }
          ]
        },
        "regionWhiteLists": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/v1RegionWhiteList"
          }
        },
        "engineType": {
          "$ref": "#/definitions/v1RegionEngineType"
        },
        "sys9Config": {
          "$ref": "#/definitions/v1RegionSys9Config"
        }
      },
      "required": [
        "id",
        "cloudProviderId",
        "displayName"
      ]
    },
    "globalserverlessv1AttachVpcToAliCloudDNSPrivateHostedZoneResponse": {
      "type": "object"
    },
    "globalserverlessv1CheckCloudStoragePermissionRequestFeatureName": {
      "type": "string",
      "enum": [
        "FEATURE_NAME_AUDITLOG",
        "FEATURE_NAME_EXPORT",
        "FEATURE_NAME_CHANGEFEED"
      ]
    },
    "globalserverlessv1CheckCloudStoragePermissionResponse": {
      "type": "object"
    },
    "globalserverlessv1CheckImportPermissionResponse": {
      "type": "object"
    },
    "globalserverlessv1ClusterFilter": {
      "type": "object",
      "properties": {
        "cloudProviderNames": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/v1CloudProviderName"
          }
        },
        "states": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/serverlessv1ClusterState"
          },
          "title": "TODO TBD: maybe we should use UserClusterStatus?"
        },
        "tenantIds": {
          "type": "array",
          "items": {
            "type": "string",
            "format": "uint64"
          },
          "title": "repeated internal_usage.serverless.regional.v1.ClusterState exclude_states = 4;"
        },
        "projectIds": {
          "type": "array",
          "items": {
            "type": "string",
            "format": "uint64"
          }
        },
        "clusterIds": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "deleted": {
          "type": "boolean",
          "x-nullable": true
        },
        "showDetails": {
          "type": "boolean"
        },
        "refreshCache": {
          "type": "boolean"
        },
        "originalProjectIds": {
          "type": "array",
          "items": {
            "type": "string",
            "format": "uint64"
          }
        },
        "engineTypes": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "globalserverlessv1CreateAWSRoute53PrivateHostedZoneResponse": {
      "type": "object",
      "properties": {
        "hostedZoneId": {
          "type": "string"
        }
      }
    },
    "globalserverlessv1CreateAWSRoute53RecordsResponse": {
      "type": "object",
      "properties": {
        "changeId": {
          "type": "string"
        }
      }
    },
    "globalserverlessv1CreateAWSVpcEndpointResponse": {
      "type": "object",
      "properties": {
        "endpoint": {
          "$ref": "#/definitions/v1AWSVpcEndpoint"
        }
      }
    },
    "globalserverlessv1CreateAliCloudDNSPrivateHostedZoneResponse": {
      "type": "object",
      "properties": {
        "hostedZoneId": {
          "type": "string"
        }
      }
    },
    "globalserverlessv1CreateAliCloudDNSRecordResponse": {
      "type": "object",
      "properties": {
        "recordId": {
          "type": "string",
          "format": "int64"
        }
      }
    },
    "globalserverlessv1CreateAliCloudVpcEndpointResponse": {
      "type": "object",
      "properties": {
        "endpoint": {
          "$ref": "#/definitions/v1AliCloudVpcEndpoint"
        }
      }
    },
    "globalserverlessv1CreateMSKVPCConnectionResponse": {
      "type": "object",
      "properties": {
        "mskVpcConnection": {
          "$ref": "#/definitions/v1MSKVpcConnection"
        }
      }
    },
    "globalserverlessv1CreateVpcEndpointResponse": {
      "type": "object",
      "properties": {
        "endpointDetails": {
          "$ref": "#/definitions/v1VpcEndpointDetails"
        }
      }
    },
    "globalserverlessv1DeleteAWSRoute53PrivateHostedZoneResponse": {
      "type": "object"
    },
    "globalserverlessv1DeleteAWSRoute53RecordsResponse": {
      "type": "object",
      "properties": {
        "changeId": {
          "type": "string"
        }
      }
    },
    "globalserverlessv1DeleteAliCloudDNSPrivateHostedZoneResponse": {
      "type": "object"
    },
    "globalserverlessv1DeleteMSKVPCConnectionResponse": {
      "type": "object"
    },
    "globalserverlessv1DescribeAWSVpcEndpointResponse": {
      "type": "object",
      "properties": {
        "endpoint": {
          "$ref": "#/definitions/v1AWSVpcEndpoint"
        }
      }
    },
    "globalserverlessv1DescribeAliCloudVpcEndpointResponse": {
      "type": "object",
      "properties": {
        "endpoint": {
          "$ref": "#/definitions/v1AliCloudVpcEndpoint"
        }
      }
    },
    "globalserverlessv1DescribeVpcEndpointResponse": {
      "type": "object",
      "properties": {
        "endpointDetails": {
          "$ref": "#/definitions/v1VpcEndpointDetails"
        }
      }
    },
    "globalserverlessv1DetachVpcFromAliCloudDNSPrivateHostedZoneResponse": {
      "type": "object"
    },
    "globalserverlessv1GetAWSRoute53ChangeResponse": {
      "type": "object",
      "properties": {
        "changeId": {
          "type": "string"
        },
        "state": {
          "$ref": "#/definitions/v1Route53ChangeStateEnum"
        }
      }
    },
    "globalserverlessv1GetMSKVPCConnectionResponse": {
      "type": "object",
      "properties": {
        "mskVpcConnection": {
          "$ref": "#/definitions/v1MSKVpcConnection"
        }
      }
    },
    "globalserverlessv1GetZoneIdsResponse": {
      "type": "object",
      "properties": {
        "zoneIds": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "accountId": {
          "type": "string",
          "description": "The AWS account that creates the VPC connection from the endpoint VPC.\nCustomers should allowlist this account in the target MSK cluster policy.\nIt is populated for AWS; callers should keep their existing fallback for other providers."
        }
      }
    },
    "globalserverlessv1ListAliCloudVpcEndpointZonesResponse": {
      "type": "object",
      "properties": {
        "zones": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/v1AliCloudVpcEndpointZone"
          }
        }
      }
    },
    "globalserverlessv1ListVpcEndpointZonesResponse": {
      "type": "object",
      "properties": {
        "zones": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/v1VpcEndpointZone"
          }
        }
      }
    },
    "globalserverlessv1PrecheckResponse": {
      "type": "object",
      "properties": {
        "tableResults": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/v1TableResult"
          }
        },
        "status": {
          "$ref": "#/definitions/v1ImportPrecheckStatus"
        }
      }
    },
    "googlerpcStatus": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32",
          "description": "The status code, which should be an enum value of\n[google.rpc.Code][google.rpc.Code]."
        },
        "message": {
          "type": "string",
          "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\n[google.rpc.Status.details][google.rpc.Status.details] field, or localized\nby the client."
        },
        "details": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/protobufAny"
          },
          "description": "A list of messages that carry the error details.  There is a common set of\nmessage types for APIs to use."
        }
      },
      "description": "The `Status` type defines a logical error model that is suitable for\ndifferent programming environments, including REST APIs and RPC APIs. It is\nused by [gRPC](https://github.com/grpc). Each `Status` message contains\nthree pieces of data: error code, error message, and error details.\n\nYou can find out more about this error model and how to work with it in the\n[API Design Guide](https://cloud.google.com/apis/design/errors)."
    },
    "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. As of May 2023, there are no widely used type server\nimplementations and no plans to implement one.\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    // or ...\n    if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n      foo = any.unpack(Foo.getDefaultInstance());\n    }\n\n Example 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\n Example 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\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    }"
    },
    "regionalserverlessv1AzureBlobCloudStorage": {
      "type": "object",
      "properties": {
        "authType": {
          "$ref": "#/definitions/v1AzureBlobCloudStorageAuthType"
        },
        "sasToken": {
          "type": "string",
          "title": "The SAS token to access Azure Blob Storage"
        }
      }
    },
    "regionalserverlessv1CloudProvider": {
      "type": "string",
      "enum": [
        "CLOUD_PROVIDER_AWS",
        "CLOUD_PROVIDER_GCP",
        "CLOUD_PROVIDER_AZURE",
        "CLOUD_PROVIDER_ALICLOUD"
      ],
      "title": "TODO: move to base definition"
    },
    "regionalserverlessv1CloudStorage": {
      "type": "object",
      "properties": {
        "cloudStorageType": {
          "$ref": "#/definitions/regionalserverlessv1CloudStorageType"
        },
        "s3": {
          "$ref": "#/definitions/regionalserverlessv1S3CloudStorage"
        },
        "gcs": {
          "$ref": "#/definitions/regionalserverlessv1GCSCloudStorage"
        },
        "azureBlob": {
          "$ref": "#/definitions/regionalserverlessv1AzureBlobCloudStorage"
        },
        "s3Compatible": {
          "$ref": "#/definitions/v1S3CompatibleCloudStorage"
        },
        "oss": {
          "$ref": "#/definitions/regionalserverlessv1OSSCloudStorage"
        },
        "uri": {
          "type": "string",
          "description": "The URI of the cloud storage data dir."
        }
      }
    },
    "regionalserverlessv1CloudStorageType": {
      "type": "string",
      "enum": [
        "S3",
        "GCS",
        "AZURE_BLOB",
        "OSS",
        "S3_COMPATIBLE",
        "INTERNAL"
      ],
      "title": "- S3_COMPATIBLE: S3 compatible storage\n - INTERNAL: Internal source storage, no authentication required"
    },
    "regionalserverlessv1GCSCloudStorage": {
      "type": "object",
      "properties": {
        "authType": {
          "$ref": "#/definitions/v1GCSCloudStorageAuthType"
        },
        "serviceAccountKey": {
          "type": "string"
        }
      }
    },
    "regionalserverlessv1OSSCloudStorage": {
      "type": "object",
      "properties": {
        "authType": {
          "$ref": "#/definitions/v1OSSCloudStorageAuthType"
        },
        "roleArn": {
          "title": "The role arn",
          "allOf": [
            {
              "$ref": "#/definitions/v1OSSCloudStorageRoleArn"
            }
          ]
        },
        "accessKey": {
          "title": "The access key to access OSS",
          "allOf": [
            {
              "$ref": "#/definitions/regionalserverlessv1OSSCloudStorageAccessKey"
            }
          ]
        }
      }
    },
    "regionalserverlessv1OSSCloudStorageAccessKey": {
      "type": "object",
      "properties": {
        "accessKeyId": {
          "type": "string",
          "title": "The access key ID to access OSS"
        },
        "accessKeySecret": {
          "type": "string",
          "title": "The access key secret to access OSS"
        }
      }
    },
    "regionalserverlessv1Region": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "displayName": {
          "type": "string"
        },
        "cloudProvider": {
          "$ref": "#/definitions/regionalserverlessv1CloudProvider"
        }
      },
      "title": "TODO: move to base definition"
    },
    "regionalserverlessv1S3CloudStorage": {
      "type": "object",
      "properties": {
        "authType": {
          "$ref": "#/definitions/v1S3CloudStorageAuthType"
        },
        "roleArn": {
          "title": "The role arn",
          "allOf": [
            {
              "$ref": "#/definitions/v1S3CloudStorageRoleArn"
            }
          ]
        },
        "accessKey": {
          "description": "The access key.",
          "allOf": [
            {
              "$ref": "#/definitions/regionalserverlessv1S3CloudStorageAccessKey"
            }
          ]
        }
      }
    },
    "regionalserverlessv1S3CloudStorageAccessKey": {
      "type": "object",
      "properties": {
        "accessKeyId": {
          "type": "string",
          "title": "The access key ID to access S3"
        },
        "secretAccessKey": {
          "type": "string",
          "title": "The secret access key to access S3"
        }
      }
    },
    "serverlessv1AutomatedBackupPolicy": {
      "type": "object",
      "properties": {
        "backupTime": {
          "type": "string"
        },
        "retentionDays": {
          "type": "string",
          "format": "uint64"
        }
      }
    },
    "serverlessv1ClusterState": {
      "type": "string",
      "enum": [
        "CLUSTER_STATE_READY",
        "CLUSTER_STATE_CREATING",
        "CLUSTER_STATE_DELETING",
        "CLUSTER_STATE_DELETED"
      ],
      "description": "- CLUSTER_STATE_READY: The cluster can be accessed only when it is `READY`",
      "title": "These is the regional related cluster status info, not the same with global\ndefinition"
    },
    "serverlessv1EncryptionConfig": {
      "type": "object",
      "properties": {
        "enhancedEncryptionEnabled": {
          "type": "boolean"
        }
      }
    },
    "serverlessv1Endpoints": {
      "type": "object",
      "properties": {
        "public": {
          "$ref": "#/definitions/serverlessv1PublicEndpoint"
        },
        "private": {
          "$ref": "#/definitions/v1PrivateEndpoint"
        }
      }
    },
    "serverlessv1PublicEndpoint": {
      "type": "object",
      "properties": {
        "host": {
          "type": "string"
        },
        "port": {
          "type": "string",
          "format": "int64"
        },
        "disabled": {
          "type": "boolean"
        },
        "authorizedNetwork": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/v1PublicEndpointAuthorizedNetwork"
          }
        }
      },
      "title": "TODO: move to base definition"
    },
    "serverlessv1RedeemRootPasswordResponse": {
      "type": "object",
      "properties": {
        "rotating": {
          "type": "boolean"
        },
        "password": {
          "type": "string"
        }
      }
    },
    "serverlessv1RotateRootPasswordResponse": {
      "type": "object",
      "properties": {
        "rotating": {
          "type": "boolean"
        }
      }
    },
    "serverlessv1Table": {
      "type": "object",
      "properties": {
        "schema": {
          "type": "string"
        },
        "table": {
          "type": "string"
        }
      }
    },
    "v1AWSVpcEndpoint": {
      "type": "object",
      "properties": {
        "endpointId": {
          "type": "string"
        },
        "endpointServiceName": {
          "type": "string"
        },
        "endpointServiceRegion": {
          "type": "string"
        },
        "state": {
          "$ref": "#/definitions/v1AWSVpcEndpointStateEnum"
        },
        "vpcId": {
          "type": "string"
        },
        "createTs": {
          "type": "string",
          "format": "int64"
        },
        "domains": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "failureMessage": {
          "type": "string"
        },
        "availableZones": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "title": "A map of availability zone ID to availability zone name"
        }
      }
    },
    "v1AWSVpcEndpointStateEnum": {
      "type": "string",
      "enum": [
        "PENDING",
        "PENDING_ACCEPTANCE",
        "REJECTED",
        "EXPIRED",
        "FAILED",
        "DELETED",
        "DELETING",
        "AVAILABLE"
      ]
    },
    "v1AliCloudVpcEndpoint": {
      "type": "object",
      "properties": {
        "endpointId": {
          "type": "string"
        },
        "endpointServiceName": {
          "type": "string"
        },
        "state": {
          "$ref": "#/definitions/v1AliCloudVpcEndpointStateEnum"
        },
        "connectionState": {
          "$ref": "#/definitions/v1AliCloudVpcEndpointConnectionStateEnum"
        },
        "vpcId": {
          "type": "string"
        },
        "createTs": {
          "type": "string",
          "format": "int64"
        },
        "domain": {
          "type": "string"
        }
      }
    },
    "v1AliCloudVpcEndpointConnectionStateEnum": {
      "type": "string",
      "enum": [
        "CONNECTING",
        "PENDING",
        "CONNECTED",
        "DISCONNECTED",
        "DISCONNECTING",
        "DELETING"
      ]
    },
    "v1AliCloudVpcEndpointStateEnum": {
      "type": "string",
      "enum": [
        "PENDING",
        "CREATING",
        "ACTIVE",
        "DELETING"
      ]
    },
    "v1AliCloudVpcEndpointZone": {
      "type": "object",
      "properties": {
        "zoneId": {
          "type": "string"
        },
        "zoneStatus": {
          "type": "string",
          "title": "The state of the zone (e.g. Creating, Wait, Connected, Deleting, Disconnecting, Disconnected, Connecting)"
        }
      }
    },
    "v1AlicloudPrivateEndpoint": {
      "type": "object",
      "properties": {
        "serviceName": {
          "type": "string"
        },
        "availabilityZone": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "v1AvailableFeature": {
      "type": "string",
      "enum": [
        "DISABLE_PUBLIC_LB",
        "DELEGATE_USER",
        "PRIVATELINK",
        "VECTOR_TYPE"
      ],
      "title": "Available feature for a cluster"
    },
    "v1AwsPrivateEndpoint": {
      "type": "object",
      "properties": {
        "serviceName": {
          "type": "string"
        },
        "availabilityZone": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "title": "TODO: move to base definition"
    },
    "v1AzureBlobCloudStorageAuthType": {
      "type": "string",
      "enum": [
        "SAS_TOKEN"
      ],
      "title": "- SAS_TOKEN: Use SAS token to access Azure Blob Storage"
    },
    "v1ChangeSqlUserPasswdResponse": {
      "type": "object"
    },
    "v1CloudProviderName": {
      "type": "string",
      "enum": [
        "AWS",
        "GCP",
        "AZURE",
        "ALICLOUD"
      ],
      "description": "Refer to terraform provider name: https://registry.terraform.io/browse/providers."
    },
    "v1CloudProviderServiceListResponse": {
      "type": "object",
      "properties": {
        "cloudProviders": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/globalcommonv1CloudProvider"
          }
        },
        "total": {
          "type": "integer",
          "format": "int64",
          "readOnly": true
        }
      }
    },
    "v1CloudProviderState": {
      "type": "string",
      "enum": [
        "ACTIVE",
        "INACTIVE"
      ]
    },
    "v1ClusterProxyError": {
      "type": "object",
      "properties": {
        "sqlErrNo": {
          "type": "integer",
          "format": "int64",
          "description": "see https://mariadb.com/kb/en/mariadb-error-codes/ to get all errno.\n\nthe errno returned from tidb when execute this request"
        },
        "sqlErrMsg": {
          "type": "string",
          "title": "the errmsg returned from tidb when execute this request"
        }
      }
    },
    "v1CreatePGBackupResponse": {
      "type": "object",
      "properties": {
        "backupId": {
          "type": "string",
          "format": "uint64"
        }
      }
    },
    "v1DMPrecheck": {
      "type": "object",
      "properties": {
        "sources": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/DMPrecheckSource"
          }
        },
        "targetDb": {
          "$ref": "#/definitions/DMPrecheckTargetDatabase"
        },
        "mode": {
          "$ref": "#/definitions/DMPrecheckTaskMode"
        },
        "fullInstanceMigration": {
          "type": "boolean"
        },
        "item": {
          "$ref": "#/definitions/v1DMPrecheckPrecheckItem"
        }
      }
    },
    "v1DMPrecheckPrecheckItem": {
      "type": "string",
      "enum": [
        "PRECHECK_ITEM_DUMP_PRIVILEGE_CHECKING",
        "PRECHECK_ITEM_REPLICATION_PRIVILEGE_CHECKING",
        "PRECHECK_ITEM_VERSION_CHECKING",
        "PRECHECK_ITEM_SERVER_ID_CHECKING",
        "PRECHECK_ITEM_BINLOG_ENABLE_CHECKING",
        "PRECHECK_ITEM_BINLOG_FORMAT_CHECKING",
        "PRECHECK_ITEM_BINLOG_ROW_IMAGE_CHECKING",
        "PRECHECK_ITEM_TABLE_SCHEMA_CHECKING",
        "PRECHECK_ITEM_BINLOG_DB_CHECKING",
        "PRECHECK_ITEM_CONN_NUMBER_CHECKING",
        "PRECHECK_ITEM_TARGET_DB_PRIVILEGE_CHECKING",
        "PRECHECK_ITEM_META_POSITION_CHECKING",
        "PRECHECK_ITEM_PRIMARY_KEY_CHECKING"
      ]
    },
    "v1DatabaseCredential": {
      "type": "object",
      "properties": {
        "userName": {
          "type": "string"
        },
        "credential": {
          "type": "string",
          "title": "password or auth token"
        }
      }
    },
    "v1FileRouteRule": {
      "type": "object",
      "properties": {
        "pattern": {
          "type": "string"
        },
        "schema": {
          "type": "string"
        },
        "table": {
          "type": "string"
        },
        "type": {
          "type": "string"
        }
      }
    },
    "v1GCSCloudStorageAuthType": {
      "type": "string",
      "enum": [
        "SERVICE_ACCOUNT_KEY"
      ],
      "title": "- SERVICE_ACCOUNT_KEY: Use service account key to access GCS"
    },
    "v1GcpPrivateEndpoint": {
      "type": "object",
      "properties": {
        "targetServiceAttachment": {
          "type": "string"
        },
        "availabilityZone": {
          "type": "string"
        }
      }
    },
    "v1GetPGBackupPolicyResponse": {
      "type": "object",
      "properties": {
        "backupPolicy": {
          "$ref": "#/definitions/serverlessv1AutomatedBackupPolicy"
        }
      }
    },
    "v1GetPGBackupResponse": {
      "type": "object",
      "properties": {
        "backup": {
          "$ref": "#/definitions/v1PGPhysicalBackup"
        }
      }
    },
    "v1ImportPrecheckStatus": {
      "type": "string",
      "enum": [
        "COMPLETED",
        "TIMEOUT",
        "TRUNCATED"
      ],
      "description": " - COMPLETED: The precheck is completed.\n - TIMEOUT: The precheck is timeout and return partial result.\n - TRUNCATED: The precheck result is truncated."
    },
    "v1ListPGBackupsResponse": {
      "type": "object",
      "properties": {
        "items": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/v1PGPhysicalBackup"
          }
        },
        "hasMore": {
          "type": "boolean"
        }
      }
    },
    "v1ListSqlUsersFilter": {
      "type": "object",
      "properties": {
        "plugin": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "passwordExpired": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "accountLocked": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "ignoreUsers": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "users": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "v1ListSqlUsersResponse": {
      "type": "object",
      "properties": {
        "resultMap": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/definitions/v1SqlValues"
          },
          "title": "key：the filed in mysql.user,such as  [USER, PLUGIN,ACCOUNT_LOCKED]"
        },
        "dbUsers": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/v1SqlUser"
          }
        },
        "proxyError": {
          "description": "If the base_resp.Code == 150100033, we MAY provide the 'proxy_error' to explain what error happen when trying to execute this request.",
          "allOf": [
            {
              "$ref": "#/definitions/v1ClusterProxyError"
            }
          ]
        }
      }
    },
    "v1MSKVpcConnection": {
      "type": "object",
      "properties": {
        "mskArn": {
          "type": "string"
        },
        "mskVpcConnectionArn": {
          "type": "string"
        },
        "state": {
          "$ref": "#/definitions/v1MSKVpcConnectionStateEnum"
        },
        "bootstrapBroker": {
          "type": "string"
        },
        "availableZones": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "title": "A map of availability zone ID to availability zone name"
        }
      }
    },
    "v1MSKVpcConnectionStateEnum": {
      "type": "string",
      "enum": [
        "CREATING",
        "AVAILABLE",
        "INACTIVE",
        "DEACTIVATING",
        "DELETING",
        "FAILED",
        "REJECTED",
        "REJECTING"
      ]
    },
    "v1OSSCloudStorageAuthType": {
      "type": "string",
      "enum": [
        "ROLE_ARN",
        "ACCESS_KEY"
      ],
      "title": "- ROLE_ARN: Use role ARN to access OSS\n - ACCESS_KEY: Use access key and secret access key to access OSS"
    },
    "v1OSSCloudStorageRoleArn": {
      "type": "object",
      "properties": {
        "roleArn": {
          "type": "string",
          "title": "The role ARN to access OSS"
        },
        "externalId": {
          "type": "string",
          "title": "The external ID to access OSS"
        }
      }
    },
    "v1PGPhysicalBackup": {
      "type": "object",
      "properties": {
        "backupId": {
          "type": "string",
          "format": "uint64"
        },
        "backupName": {
          "type": "string"
        },
        "backupTime": {
          "type": "string",
          "format": "date-time"
        },
        "labels": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "Opaque source metadata for debugging and replay."
        }
      }
    },
    "v1PrivateEndpoint": {
      "type": "object",
      "properties": {
        "host": {
          "type": "string"
        },
        "port": {
          "type": "string",
          "format": "int64"
        },
        "disabled": {
          "type": "boolean"
        },
        "cloudProvider": {
          "title": "TODO: TBD: this field is redundant with the cluster's, remove it ?",
          "allOf": [
            {
              "$ref": "#/definitions/regionalserverlessv1CloudProvider"
            }
          ]
        },
        "aws": {
          "$ref": "#/definitions/v1AwsPrivateEndpoint"
        },
        "gcp": {
          "$ref": "#/definitions/v1GcpPrivateEndpoint"
        },
        "alicloud": {
          "title": "AzurePrivateEndpoint azure = 7;",
          "allOf": [
            {
              "$ref": "#/definitions/v1AlicloudPrivateEndpoint"
            }
          ]
        },
        "authorizedNetwork": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/v1PrivateEndpointAuthorizedNetwork"
          }
        }
      }
    },
    "v1PrivateEndpointAuthorizedNetwork": {
      "type": "object",
      "properties": {
        "vpcEndpointId": {
          "type": "string"
        },
        "displayName": {
          "type": "string"
        }
      }
    },
    "v1PublicEndpointAuthorizedNetwork": {
      "type": "object",
      "properties": {
        "startIpAddress": {
          "type": "string"
        },
        "endIpAddress": {
          "type": "string"
        },
        "displayName": {
          "type": "string"
        }
      }
    },
    "v1RegionEngineType": {
      "type": "string",
      "enum": [
        "MYSQL_COMPATIBLE",
        "POSTGRESQL_COMPATIBLE"
      ]
    },
    "v1RegionName": {
      "type": "string",
      "enum": [
        "AWS_US_EAST_2",
        "AWS_US_EAST_1",
        "AWS_US_WEST_1",
        "AWS_US_WEST_2",
        "AWS_AF_SOUTH_1",
        "AWS_AP_EAST_1",
        "AWS_AP_SOUTH_2",
        "AWS_AP_SOUTHEAST_3",
        "AWS_AP_SOUTHEAST_4",
        "AWS_AP_SOUTH_1",
        "AWS_AP_NORTHEAST_3",
        "AWS_AP_NORTHEAST_2",
        "AWS_AP_SOUTHEAST_1",
        "AWS_AP_SOUTHEAST_2",
        "AWS_AP_NORTHEAST_1",
        "AWS_CA_CENTRAL_1",
        "AWS_CA_WEST_1",
        "AWS_EU_CENTRAL_1",
        "AWS_EU_WEST_1",
        "AWS_EU_WEST_2",
        "AWS_EU_SOUTH_1",
        "AWS_EU_WEST_3",
        "AWS_EU_SOUTH_2",
        "AWS_EU_NORTH_1",
        "AWS_EU_CENTRAL_2",
        "AWS_IL_CENTRAL_1",
        "AWS_ME_SOUTH_1",
        "AWS_ME_CENTRAL_1",
        "AWS_SA_EAST_1",
        "AWS_AP_SOUTHEAST_5",
        "AWS_AP_SOUTHEAST_6",
        "AWS_AP_SOUTHEAST_7",
        "AWS_MX_CENTRAL_1",
        "GCP_ASIA_EAST1",
        "GCP_ASIA_EAST2",
        "GCP_ASIA_NORTHEAST1",
        "GCP_ASIA_NORTHEAST2",
        "GCP_ASIA_NORTHEAST3",
        "GCP_ASIA_SOUTH1",
        "GCP_ASIA_SOUTH2",
        "GCP_ASIA_SOUTHEAST1",
        "GCP_ASIA_SOUTHEAST2",
        "GCP_AUSTRALIA_SOUTHEAST1",
        "GCP_AUSTRALIA_SOUTHEAST2",
        "GCP_EUROPE_CENTRAL2",
        "GCP_EUROPE_NORTH1",
        "GCP_EUROPE_SOUTHWEST1",
        "GCP_EUROPE_WEST1",
        "GCP_EUROPE_WEST10",
        "GCP_EUROPE_WEST12",
        "GCP_EUROPE_WEST2",
        "GCP_EUROPE_WEST3",
        "GCP_EUROPE_WEST4",
        "GCP_EUROPE_WEST6",
        "GCP_EUROPE_WEST8",
        "GCP_EUROPE_WEST9",
        "GCP_ME_CENTRAL1",
        "GCP_ME_CENTRAL2",
        "GCP_ME_WEST1",
        "GCP_NORTHAMERICA_NORTHEAST1",
        "GCP_NORTHAMERICA_NORTHEAST2",
        "GCP_SOUTHAMERICA_EAST1",
        "GCP_SOUTHAMERICA_WEST1",
        "GCP_US_CENTRAL1",
        "GCP_US_EAST1",
        "GCP_US_EAST4",
        "GCP_US_EAST5",
        "GCP_US_SOUTH1",
        "GCP_US_WEST1",
        "GCP_US_WEST2",
        "GCP_US_WEST3",
        "GCP_US_WEST4",
        "AZURE_EASTUS",
        "AZURE_SOUTHCENTRALUS",
        "AZURE_WESTUS2",
        "AZURE_WESTUS3",
        "AZURE_AUSTRALIAEAST",
        "AZURE_SOUTHEASTASIA",
        "AZURE_NORTHEUROPE",
        "AZURE_SWEDENCENTRAL",
        "AZURE_UKSOUTH",
        "AZURE_WESTEUROPE",
        "AZURE_CENTRALUS",
        "AZURE_SOUTHAFRICANORTH",
        "AZURE_CENTRALINDIA",
        "AZURE_EASTASIA",
        "AZURE_JAPANEAST",
        "AZURE_KOREACENTRAL",
        "AZURE_CANADACENTRAL",
        "AZURE_FRANCECENTRAL",
        "AZURE_GERMANYWESTCENTRAL",
        "AZURE_ITALYNORTH",
        "AZURE_NORWAYEAST",
        "AZURE_POLANDCENTRAL",
        "AZURE_SPAINCENTRAL",
        "AZURE_SWITZERLANDNORTH",
        "AZURE_MEXICOCENTRAL",
        "AZURE_UAENORTH",
        "AZURE_BRAZILSOUTH",
        "AZURE_ISRAELCENTRAL",
        "AZURE_QATARCENTRAL",
        "AZURE_CENTRALUSSTAGE",
        "AZURE_EASTUSSTAGE",
        "AZURE_EASTUS2STAGE",
        "AZURE_NORTHCENTRALUSSTAGE",
        "AZURE_SOUTHCENTRALUSSTAGE",
        "AZURE_WESTUSSTAGE",
        "AZURE_WESTUS2STAGE",
        "AZURE_ASIA",
        "AZURE_ASIAPACIFIC",
        "AZURE_AUSTRALIA",
        "AZURE_BRAZIL",
        "AZURE_CANADA",
        "AZURE_EUROPE",
        "AZURE_FRANCE",
        "AZURE_GERMANY",
        "AZURE_GLOBAL",
        "AZURE_INDIA",
        "AZURE_ISRAEL",
        "AZURE_ITALY",
        "AZURE_JAPAN",
        "AZURE_KOREA",
        "AZURE_NEWZEALAND",
        "AZURE_NORWAY",
        "AZURE_POLAND",
        "AZURE_QATAR",
        "AZURE_SINGAPORE",
        "AZURE_SOUTHAFRICA",
        "AZURE_SWEDEN",
        "AZURE_SWITZERLAND",
        "AZURE_UAE",
        "AZURE_UK",
        "AZURE_UNITEDSTATES",
        "AZURE_UNITEDSTATESEUAP",
        "AZURE_EASTASIASTAGE",
        "AZURE_SOUTHEASTASIASTAGE",
        "AZURE_BRAZILUS",
        "AZURE_EASTUS2",
        "AZURE_EASTUSSTG",
        "AZURE_NORTHCENTRALUS",
        "AZURE_WESTUS",
        "AZURE_JAPANWEST",
        "AZURE_JIOINDIAWEST",
        "AZURE_CENTRALUSEUAP",
        "AZURE_EASTUS2EUAP",
        "AZURE_WESTCENTRALUS",
        "AZURE_SOUTHAFRICAWEST",
        "AZURE_AUSTRALIACENTRAL",
        "AZURE_AUSTRALIACENTRAL2",
        "AZURE_AUSTRALIASOUTHEAST",
        "AZURE_JIOINDIACENTRAL",
        "AZURE_KOREASOUTH",
        "AZURE_SOUTHINDIA",
        "AZURE_WESTINDIA",
        "AZURE_CANADAEAST",
        "AZURE_FRANCESOUTH",
        "AZURE_GERMANYNORTH",
        "AZURE_NORWAYWEST",
        "AZURE_SWITZERLANDWEST",
        "AZURE_UKWEST",
        "AZURE_UAECENTRAL",
        "AZURE_BRAZILSOUTHEAST",
        "ALICLOUD_AP_SOUTHEAST_1",
        "ALICLOUD_AP_NORTHEAST_1",
        "ALICLOUD_AP_NORTHEAST_2",
        "ALICLOUD_AP_SOUTHEAST_3",
        "ALICLOUD_AP_SOUTHEAST_5",
        "ALICLOUD_AP_SOUTHEAST_6",
        "ALICLOUD_AP_SOUTHEAST_7",
        "ALICLOUD_NA_SOUTH_1",
        "ALICLOUD_US_WEST_1",
        "ALICLOUD_US_EAST_1",
        "ALICLOUD_EU_CENTRAL_1",
        "ALICLOUD_EU_WEST_1",
        "ALICLOUD_ME_EAST_1",
        "ALICLOUD_ME_CENTRAL_1",
        "ALICLOUD_CN_HONGKONG"
      ],
      "description": "- AWS_US_EAST_2: AWS.\n - GCP_ASIA_EAST1: GCP.\n - AZURE_EASTUS: Azure\n - ALICLOUD_AP_SOUTHEAST_1: AliCloud",
      "title": "Refer to:\n  - AWS: https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints.\n  - GCP: https://console.cloud.google.com/compute/zones\n  - Azure: https://gist.github.com/ausfestivus/04e55c7d80229069bf3bc75870630ec8"
    },
    "v1RegionOpsAuditLogSetting": {
      "type": "object",
      "properties": {
        "enabled": {
          "type": "boolean"
        },
        "logLocation": {
          "$ref": "#/definitions/v1RegionOpsAuditLogSettingLogLocation"
        },
        "logRotation": {
          "$ref": "#/definitions/v1RegionOpsAuditLogSettingLogRotation"
        }
      },
      "required": [
        "enabled"
      ]
    },
    "v1RegionOpsAuditLogSettingLogLocation": {
      "type": "object",
      "properties": {
        "type": {
          "$ref": "#/definitions/v1RegionOpsAuditLogSettingType"
        },
        "bucketUri": {
          "type": "string"
        },
        "roleArn": {
          "type": "string"
        },
        "externalId": {
          "type": "string"
        },
        "accountId": {
          "type": "string"
        }
      },
      "required": [
        "type",
        "bucketUri",
        "roleArn",
        "externalId",
        "accountId"
      ]
    },
    "v1RegionOpsAuditLogSettingLogRotation": {
      "type": "object",
      "properties": {
        "fileSizeLimitInMb": {
          "type": "string",
          "format": "uint64"
        },
        "rotationIntervalInMin": {
          "type": "string",
          "format": "uint64"
        }
      },
      "required": [
        "fileSizeLimitInMb",
        "rotationIntervalInMin"
      ]
    },
    "v1RegionOpsAuditLogSettingType": {
      "type": "string",
      "enum": [
        "TYPE_STANDARD",
        "TYPE_CUSTOMIZED"
      ]
    },
    "v1RegionServiceListResponse": {
      "type": "object",
      "properties": {
        "regions": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/globalcommonv1Region"
          }
        },
        "total": {
          "type": "integer",
          "format": "int64",
          "readOnly": true
        }
      }
    },
    "v1RegionSys9Config": {
      "type": "object",
      "properties": {
        "oemProfileRef": {
          "type": "string"
        },
        "authMode": {
          "type": "string"
        },
        "tokenTtlSec": {
          "type": "integer",
          "format": "int64"
        },
        "sessionRefreshBeforeSec": {
          "type": "integer",
          "format": "int64"
        },
        "retryPolicyRef": {
          "type": "string"
        }
      }
    },
    "v1RegionWhiteList": {
      "type": "object",
      "properties": {
        "servicePlan": {
          "$ref": "#/definitions/commonv1ServicePlan"
        },
        "isPublic": {
          "type": "boolean"
        },
        "openedTenantIds": {
          "type": "array",
          "items": {
            "type": "string",
            "format": "uint64"
          }
        }
      },
      "required": [
        "servicePlan"
      ]
    },
    "v1RegionalServerProxyServiceBatchSetResponse": {
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean"
        }
      }
    },
    "v1RegionalServerProxyServiceDeleteAllResponse": {
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean"
        }
      }
    },
    "v1RegionalServerProxyServiceDeleteResponse": {
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean"
        }
      }
    },
    "v1RegionalServerProxyServiceGetDataByIdsResponse": {
      "type": "object",
      "properties": {
        "exist": {
          "type": "boolean"
        },
        "clusters": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/v1ServerlessRegionalServiceClusterInfo"
          }
        }
      }
    },
    "v1RegionalServerProxyServiceSetResponse": {
      "type": "object",
      "properties": {
        "ok": {
          "type": "boolean"
        }
      }
    },
    "v1Route53ChangeStateEnum": {
      "type": "string",
      "enum": [
        "PENDING",
        "INSYNC"
      ]
    },
    "v1S3CloudStorageAuthType": {
      "type": "string",
      "enum": [
        "ROLE_ARN",
        "ACCESS_KEY"
      ],
      "title": "- ROLE_ARN: Use role ARN to access S3\n - ACCESS_KEY: Use access key and secret access key to access S3"
    },
    "v1S3CloudStorageRoleArn": {
      "type": "object",
      "properties": {
        "roleArn": {
          "type": "string",
          "title": "The role ARN to access S3"
        },
        "externalId": {
          "type": "string",
          "title": "The external ID to access S3"
        }
      }
    },
    "v1S3CompatibleCloudStorage": {
      "type": "object",
      "properties": {
        "authType": {
          "$ref": "#/definitions/v1S3CompatibleCloudStorageAuthType"
        },
        "accessKey": {
          "title": "The access key to access S3 compatible storage",
          "allOf": [
            {
              "$ref": "#/definitions/v1S3CompatibleCloudStorageAccessKey"
            }
          ]
        },
        "endpoint": {
          "type": "string",
          "title": "The endpoint of the S3 compatible storage"
        }
      }
    },
    "v1S3CompatibleCloudStorageAccessKey": {
      "type": "object",
      "properties": {
        "accessKeyId": {
          "type": "string",
          "title": "The access key ID to access S3 compatible storage"
        },
        "secretAccessKey": {
          "type": "string",
          "title": "The secret access key to access S3 compatible storage"
        }
      }
    },
    "v1S3CompatibleCloudStorageAuthType": {
      "type": "string",
      "enum": [
        "ACCESS_KEY"
      ],
      "title": "- ACCESS_KEY: Use access key and secret access key to access S3 compatible storage"
    },
    "v1ServerlessDMServicePrecheckResponse": {
      "type": "object",
      "properties": {
        "result": {
          "type": "string",
          "format": "byte"
        }
      }
    },
    "v1ServerlessRegionalServiceClusterInfo": {
      "type": "object",
      "properties": {
        "clusterId": {
          "type": "string",
          "title": "The cluster-id should equal to the request one"
        },
        "createTs": {
          "type": "string",
          "format": "int64",
          "title": "The creating request timestamp"
        },
        "createdTs": {
          "type": "string",
          "format": "int64",
          "title": "The creating finished timestamp"
        },
        "deleteTs": {
          "type": "string",
          "format": "int64",
          "title": "The deleting request timestamp"
        },
        "updatedTs": {
          "type": "string",
          "format": "int64",
          "title": "The most recent status updated timestamp"
        },
        "tenantId": {
          "type": "string",
          "format": "uint64"
        },
        "projectId": {
          "type": "string",
          "format": "uint64"
        },
        "version": {
          "type": "string",
          "title": "The cluster version"
        },
        "region": {
          "title": "The cluster region",
          "allOf": [
            {
              "$ref": "#/definitions/regionalserverlessv1Region"
            }
          ]
        },
        "endpoints": {
          "title": "The cluster endpoints",
          "allOf": [
            {
              "$ref": "#/definitions/serverlessv1Endpoints"
            }
          ]
        },
        "state": {
          "$ref": "#/definitions/serverlessv1ClusterState"
        },
        "userPrefix": {
          "type": "string"
        },
        "proxyEndpoint": {
          "type": "string"
        },
        "tokenBasedAuthEnabled": {
          "type": "boolean"
        },
        "enhancedEncryptionEnabled": {
          "type": "boolean"
        },
        "restoreCluster": {
          "type": "boolean"
        },
        "zoneRedundantEnabled": {
          "type": "boolean"
        },
        "kubernetes": {
          "type": "string"
        },
        "providerType": {
          "type": "string"
        },
        "auditLogConfig": {
          "$ref": "#/definitions/v1ServerlessRegionalServiceClusterInfoAuditLogConfig"
        },
        "keyspaceId": {
          "type": "integer",
          "format": "int64"
        },
        "annotations": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "title": "The underlying regional cluster annotations, originally from the cluster cr"
        },
        "autoScaling": {
          "$ref": "#/definitions/v1ServerlessRegionalServiceClusterInfoAutoScaling"
        }
      }
    },
    "v1ServerlessRegionalServiceClusterInfoAuditLogConfig": {
      "type": "object",
      "properties": {
        "enabled": {
          "type": "boolean",
          "x-nullable": true
        },
        "unredacted": {
          "type": "boolean",
          "x-nullable": true
        },
        "cloudStorage": {
          "$ref": "#/definitions/regionalserverlessv1CloudStorage"
        },
        "rotationIntervalSeconds": {
          "type": "string",
          "format": "int64",
          "x-nullable": true,
          "title": "The rotation interval in seconds"
        },
        "rotationSizeBytes": {
          "type": "string",
          "format": "int64",
          "x-nullable": true,
          "title": "The rotation size in bytes"
        }
      }
    },
    "v1ServerlessRegionalServiceClusterInfoAutoScaling": {
      "type": "object",
      "properties": {
        "minRcu": {
          "type": "integer",
          "format": "int64"
        },
        "maxRcu": {
          "type": "integer",
          "format": "int64"
        }
      }
    },
    "v1ServerlessServiceCluster": {
      "type": "object",
      "properties": {
        "clusterId": {
          "type": "string"
        },
        "cluster": {
          "$ref": "#/definitions/v1ServerlessRegionalServiceClusterInfo"
        },
        "tenantId": {
          "type": "string",
          "format": "uint64"
        },
        "cloudProvider": {
          "type": "string"
        },
        "region": {
          "type": "string"
        },
        "hasSetPwd": {
          "type": "boolean"
        },
        "backupPolicy": {
          "$ref": "#/definitions/serverlessv1AutomatedBackupPolicy"
        },
        "spendLimit": {
          "$ref": "#/definitions/v1SpendLimit"
        },
        "userStatus": {
          "$ref": "#/definitions/v1UserClusterStatus"
        },
        "attributes": {
          "$ref": "#/definitions/ServerlessServiceClusterAttributes"
        },
        "features": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/v1AvailableFeature"
          }
        },
        "projectId": {
          "type": "string",
          "format": "uint64"
        },
        "creationFinishedAt": {
          "type": "string",
          "format": "int64",
          "x-nullable": true
        },
        "internalEndpoint": {
          "type": "string"
        },
        "rootPassword": {
          "type": "string"
        },
        "originalProjectId": {
          "type": "string",
          "format": "uint64"
        },
        "ruVersion": {
          "type": "integer",
          "format": "int32"
        },
        "engineType": {
          "type": "string"
        }
      }
    },
    "v1ServerlessServiceCountClustersResponse": {
      "type": "object",
      "properties": {
        "count": {
          "type": "string",
          "format": "int64"
        }
      }
    },
    "v1ServerlessServiceCreateResponse": {
      "type": "object",
      "properties": {
        "cluster": {
          "$ref": "#/definitions/v1ServerlessServiceCluster"
        }
      }
    },
    "v1ServerlessServiceDeleteResponse": {
      "type": "object",
      "properties": {
        "cluster": {
          "$ref": "#/definitions/v1ServerlessServiceCluster"
        }
      }
    },
    "v1ServerlessServiceGetEncryptedCloudAdminPwdResponse": {
      "type": "object",
      "properties": {
        "encryptedPasswd": {
          "type": "string"
        }
      }
    },
    "v1ServerlessServiceListResponse": {
      "type": "object",
      "properties": {
        "total": {
          "type": "integer",
          "format": "int64"
        },
        "items": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/v1ServerlessServiceCluster"
          }
        }
      }
    },
    "v1ServerlessServiceUpdateResponse": {
      "type": "object",
      "properties": {
        "cluster": {
          "$ref": "#/definitions/v1ServerlessServiceCluster"
        }
      }
    },
    "v1SpendLimit": {
      "type": "object",
      "properties": {
        "monthly": {
          "type": "integer",
          "format": "int64"
        },
        "daily": {
          "type": "integer",
          "format": "int64"
        },
        "freeCredit": {
          "type": "integer",
          "format": "int64"
        }
      }
    },
    "v1SqlUser": {
      "type": "object",
      "properties": {
        "username": {
          "type": "string"
        },
        "builtinRole": {
          "title": "optional",
          "allOf": [
            {
              "$ref": "#/definitions/SqlUserBuiltinRole"
            }
          ]
        },
        "customRoles": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "title": "optional"
        },
        "plugin": {
          "type": "string",
          "title": "optional"
        },
        "accountLocked": {
          "type": "string",
          "title": "optional"
        }
      }
    },
    "v1SqlUserOperator": {
      "type": "object",
      "properties": {
        "username": {
          "type": "string",
          "title": "the operator user must be delegate user"
        },
        "authMethod": {
          "$ref": "#/definitions/SqlUserAuthMethod"
        },
        "credential": {
          "type": "string",
          "title": "the credential for auth:\n* use tidb auth token if the auth_method is TOKEN\n* use encrypted and base64-encoded password if the auth_method is PASSWORD, refer to:\n  https://github.com/tidbcloud/pkgv2/blob/main/secret/encrypt/encryptor.go#L24"
        }
      }
    },
    "v1SqlUserServiceCreateSqlRoleResponse": {
      "type": "object"
    },
    "v1SqlUserServiceCreateSqlUserResponse": {
      "type": "object"
    },
    "v1SqlUserServiceDeleteSqlUserResponse": {
      "type": "object"
    },
    "v1SqlUserServiceGetSqlUserResponse": {
      "type": "object",
      "properties": {
        "user": {
          "$ref": "#/definitions/v1SqlUser"
        }
      }
    },
    "v1SqlUserServiceIsSqlUserExistingResponse": {
      "type": "object",
      "properties": {
        "existing": {
          "type": "boolean"
        }
      }
    },
    "v1SqlUserServiceUpdateSqlRoleResponse": {
      "type": "object"
    },
    "v1SqlUserServiceUpdateSqlUserResponse": {
      "type": "object"
    },
    "v1SqlUserType": {
      "type": "string",
      "enum": [
        "TYPE_USER_DEFINED",
        "TYPE_DELEGATE"
      ],
      "title": "- TYPE_USER_DEFINED: User Defined User\n - TYPE_DELEGATE: delegate user"
    },
    "v1SqlValues": {
      "type": "object",
      "properties": {
        "values": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "v1TableResult": {
      "type": "object",
      "properties": {
        "dataFiles": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "schemaFile": {
          "type": "string"
        },
        "table": {
          "$ref": "#/definitions/serverlessv1Table"
        },
        "errorMsg": {
          "type": "string"
        },
        "useSchemaFile": {
          "type": "boolean",
          "title": "If true, the schema_file is used to create the table"
        }
      }
    },
    "v1UpdateAuditLogConfigResponse": {
      "type": "object"
    },
    "v1UpdatePGBackupPolicyResponse": {
      "type": "object",
      "properties": {
        "backupPolicy": {
          "$ref": "#/definitions/serverlessv1AutomatedBackupPolicy"
        }
      }
    },
    "v1UserClusterStatus": {
      "type": "string",
      "enum": [
        "USER_CLUSTER_STATUS_NORMAL",
        "USER_CLUSTER_STATUS_CREATING",
        "USER_CLUSTER_STATUS_UNAVAILABLE",
        "USER_CLUSTER_STATUS_RECOVERING",
        "USER_CLUSTER_STATUS_IMPORTING",
        "USER_CLUSTER_STATUS_MAINTAINING",
        "USER_CLUSTER_STATUS_DELETED"
      ]
    },
    "v1VpcEndpointDetails": {
      "type": "object",
      "properties": {
        "endpointId": {
          "type": "string"
        },
        "serviceName": {
          "type": "string"
        },
        "state": {
          "$ref": "#/definitions/v1VpcEndpointState"
        },
        "vpcId": {
          "type": "string"
        },
        "creationTimestamp": {
          "type": "string"
        },
        "domain": {
          "type": "string"
        },
        "type": {
          "$ref": "#/definitions/VpcEndpointDetailsProviderType"
        },
        "alicloud": {
          "$ref": "#/definitions/VpcEndpointDetailsAlicloudDetail"
        }
      }
    },
    "v1VpcEndpointState": {
      "type": "string",
      "enum": [
        "VPC_ENDPOINT_STATE_NOT_READY",
        "VPC_ENDPOINT_STATE_ACTIVE",
        "VPC_ENDPOINT_STATE_DELETED",
        "VPC_ENDPOINT_STATE_FAILED",
        "VPC_ENDPOINT_STATE_PENDING_APPROVE",
        "VPC_ENDPOINT_STATE_NOT_CONNECTED"
      ],
      "description": "VpcEndpointState represents the lifecycle state of a VPC endpoint.\n\n - VPC_ENDPOINT_STATE_NOT_READY: The endpoint is being created or configured. Users should continue polling until it becomes Active.\n - VPC_ENDPOINT_STATE_ACTIVE: The endpoint is ready and can be used by users.\n - VPC_ENDPOINT_STATE_DELETED: The endpoint has been successfully deleted.\n - VPC_ENDPOINT_STATE_FAILED: The endpoint is in an unrecoverable state. Users need to create a new endpoint.\n - VPC_ENDPOINT_STATE_PENDING_APPROVE: The endpoint is pending approval.\n - VPC_ENDPOINT_STATE_NOT_CONNECTED: The endpoint is not connected."
    },
    "v1VpcEndpointZone": {
      "type": "object",
      "properties": {
        "zoneId": {
          "type": "string"
        },
        "zoneStatus": {
          "type": "string",
          "title": "The state of the zone (e.g. Creating, Wait, Connected, Deleting, Disconnecting, Disconnected, Connecting)"
        }
      },
      "title": "Details of a VPC endpoint zone"
    }
  }
}
