{
  "openapi": "3.0.3",
  "info": {
    "title": "Databend Cloud Warehouse API",
    "description": "Warehouse operations API for Databend Cloud tenants",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "/lake/api/v1"
    }
  ],
  "tags": [
    {
      "name": "feature-warehouse",
      "description": "Warehouse operations"
    }
  ],
  "paths": {
    "/lake/api/v1/my/orgs": {
      "get": {
        "summary": "list current user's organizations",
        "tags": ["feature-org"],
        "operationId": "listMyOrgs",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/controllers.SuccessReply"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/dto.OrgMembershipDTO"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/controllers.ErrorReply"
                }
              }
            }
          }
        }
      }
    },
    "/lake/api/v1/orgs/{orgId}": {
      "get": {
        "summary": "get organization info",
        "tags": ["feature-org"],
        "operationId": "getOrgInfo",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Org's url slug"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/controllers.SuccessReply"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/dto.OrgInfoDTO"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/controllers.ErrorReply"
                }
              }
            }
          }
        }
      }
    },
    "/lake/api/v1/orgs/{orgId}/tenant/warehouse-history/{warehouseName}": {
      "get": {
        "summary": "get warehouse history",
        "tags": ["feature-warehouse"],
        "operationId": "getWarehouseHistory",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Org's url id"
          },
          {
            "name": "warehouseName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "the name of warehouse"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/controllers.SuccessReply"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/dto.WarehouseHistoryInfoBody"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/controllers.ErrorReply"
                }
              }
            }
          }
        }
      }
    },
    "/lake/api/v1/orgs/{orgId}/tenant/warehouses": {
      "get": {
        "summary": "get the warehouses list for a tenant",
        "tags": ["feature-warehouse"],
        "operationId": "listWarehouses",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Org's url id"
          },
          {
            "name": "warehouseName",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "query param"
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "filter by warehouse state, e.g. Running, Suspended"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/controllers.SuccessReply"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/dto.WarehouseInfoDTO"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/controllers.ErrorReply"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "create a warehouse in a tenant",
        "tags": ["feature-warehouse"],
        "operationId": "createWarehouse",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Org's url slug"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/dto.CreateWarehouseRequestBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/controllers.SuccessReply"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/controllers.ErrorReply"
                }
              }
            }
          }
        }
      }
    },
    "/lake/api/v1/orgs/{orgId}/tenant/warehouses/{warehouseName}": {
      "get": {
        "summary": "get warehouse status",
        "tags": ["feature-warehouse"],
        "operationId": "getWarehouseStatus",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Org's url id"
          },
          {
            "name": "warehouseName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Warehouse's name"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/controllers.SuccessReply"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/dto.WarehouseInfoDTO"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/controllers.ErrorReply"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "remove a warehouse in a tenant",
        "tags": ["feature-warehouse"],
        "operationId": "deleteWarehouse",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Org's url slug"
          },
          {
            "name": "warehouseName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "warehouse's name"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/controllers.SuccessReply"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/controllers.ErrorReply"
                }
              }
            }
          }
        }
      }
    },
    "/lake/api/v1/orgs/{orgId}/tenant/warehouses/{warehouseName}/connect-info": {
      "get": {
        "summary": "get warehouse connection info",
        "tags": ["feature-warehouse"],
        "operationId": "getWarehouseConnectInfo",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Org's url id"
          },
          {
            "name": "warehouseName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "the name of warehouse"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/controllers.SuccessReply"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "$ref": "#/components/schemas/dto.WarehouseConnectionInfoBody"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/controllers.ErrorReply"
                }
              }
            }
          }
        }
      }
    },
    "/lake/api/v1/orgs/{orgId}/tenant/warehouses/{warehouseName}/processes": {
      "get": {
        "summary": "get warehouse process list",
        "tags": ["feature-warehouse"],
        "operationId": "listWarehouseProcesses",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Org's url id"
          },
          {
            "name": "warehouseName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Warehouse's name"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/controllers.SuccessReply"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/dto.WarehouseProcessInfo"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/controllers.ErrorReply"
                }
              }
            }
          }
        }
      }
    },
    "/lake/api/v1/orgs/{orgId}/tenant/warehouses/{warehouseName}/rename": {
      "post": {
        "summary": "rename a warehouse in a tenant",
        "tags": ["feature-warehouse"],
        "operationId": "renameWarehouse",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Org's url id"
          },
          {
            "name": "warehouseName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "warehouse's name"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/dto.RenameWarehouseRequestBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/controllers.SuccessReply"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/controllers.ErrorReply"
                }
              }
            }
          }
        }
      }
    },
    "/lake/api/v1/orgs/{orgId}/tenant/warehouses/{warehouseName}/resume": {
      "post": {
        "summary": "resume a warehouse in a tenant",
        "tags": ["feature-warehouse"],
        "operationId": "resumeWarehouse",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Org's url id"
          },
          {
            "name": "warehouseName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "warehouse name"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/controllers.SuccessReply"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/controllers.ErrorReply"
                }
              }
            }
          }
        }
      }
    },
    "/lake/api/v1/orgs/{orgId}/tenant/warehouses/{warehouseName}/suspend": {
      "post": {
        "summary": "suspend a warehouse in a tenant",
        "tags": ["feature-warehouse"],
        "operationId": "suspendWarehouse",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Org's url id"
          },
          {
            "name": "warehouseName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "warehouse name"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/controllers.SuccessReply"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/controllers.ErrorReply"
                }
              }
            }
          }
        }
      }
    },
    "/lake/api/v1/orgs/{orgId}/tenant/warehouses/{warehouseName}/update": {
      "post": {
        "summary": "scale a warehouse in a tenant",
        "tags": ["feature-warehouse"],
        "operationId": "scaleWarehouse",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Org's url id"
          },
          {
            "name": "warehouseName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "warehouse name"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/dto.UpdateWarehouseRequestBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/controllers.SuccessReply"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/controllers.ErrorReply"
                }
              }
            }
          }
        }
      }
    },
    "/lake/api/v1/orgs/{orgId}/warehouse-sizes": {
      "get": {
        "summary": "get the cloud warehouse sizes list for an org",
        "tags": ["feature-warehouse"],
        "operationId": "listWarehouseSizes",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Org's url id"
          },
          {
            "name": "provider",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "the cloud provider"
          },
          {
            "name": "region",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "the cloud region"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/controllers.SuccessReply"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/dto.WarehouseSizeInfoDTO"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/controllers.ErrorReply"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "controllers.ErrorReply": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string"
          },
          "fields": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "message": {
            "type": "string"
          }
        }
      },
      "controllers.SuccessReply": {
        "type": "object",
        "properties": {
          "data": {},
          "success": {
            "type": "boolean"
          }
        }
      },
      "dto.CreateWarehouseRequestBody": {
        "type": "object",
        "properties": {
          "autoResume": {
            "type": "boolean"
          },
          "autoSuspend": {
            "type": "integer",
            "default": 300
          },
          "endpoint": {
            "type": "boolean"
          },
          "maxAutoScaleClusters": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "size": {
            "type": "string"
          },
          "tags": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          }
        }
      },
      "dto.RenameWarehouseRequestBody": {
        "type": "object",
        "required": ["newName"],
        "properties": {
          "newName": {
            "type": "string"
          }
        }
      },
      "dto.UpdateWarehouseRequestBody": {
        "type": "object",
        "properties": {
          "autoResume": {
            "type": "boolean"
          },
          "autoSuspend": {
            "type": "integer"
          },
          "endpoint": {
            "type": "boolean"
          },
          "maxAutoScaleClusters": {
            "type": "integer"
          },
          "replicas": {
            "type": "integer"
          },
          "role": {
            "type": "string"
          },
          "size": {
            "type": "string"
          },
          "tags": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          }
        }
      },
      "dto.WarehouseConnectionInfoBody": {
        "type": "object",
        "properties": {
          "host": {
            "type": "string"
          },
          "password": {
            "type": "string"
          },
          "username": {
            "type": "string"
          }
        }
      },
      "dto.WarehouseCreditLogInfo": {
        "type": "object",
        "properties": {
          "beginTime": {
            "type": "string"
          },
          "computeUnits": {
            "type": "number"
          },
          "creditCost": {
            "type": "number"
          },
          "duration": {
            "type": "integer"
          },
          "size": {
            "type": "string"
          },
          "stopTime": {
            "type": "string"
          },
          "unit": {
            "type": "string"
          },
          "unitPrice": {
            "type": "number"
          }
        }
      },
      "dto.WarehouseHistoryInfoBody": {
        "type": "object",
        "properties": {
          "bucket": {
            "type": "string"
          },
          "logs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/dto.WarehouseCreditLogInfo"
            }
          }
        }
      },
      "dto.WarehouseProcessInfo": {
        "type": "object",
        "properties": {
          "clientAddress": {
            "type": "string"
          },
          "cluster": {
            "type": "string"
          },
          "createdTime": {
            "type": "string"
          },
          "currentQueryID": {
            "type": "string"
          },
          "database": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "memoryUsage": {
            "type": "integer"
          },
          "mysqlConnectionID": {
            "type": "integer"
          },
          "sessionExtraInfo": {
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "statusInfo": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "user": {
            "type": "string"
          }
        }
      },
      "dto.WarehouseSizeInfoDTO": {
        "type": "object",
        "properties": {
          "computeUnitsPerHour": {
            "type": "number"
          },
          "creditCostPerHour": {
            "type": "number"
          },
          "creditCurrency": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "vCPUs": {
            "type": "integer"
          },
          "value": {
            "type": "string"
          }
        }
      },
      "dto.ClusterStatus": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "integer"
          },
          "running": {
            "type": "integer"
          },
          "starting": {
            "type": "integer"
          }
        }
      },
      "dto.EndpointStatus": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "hostname": {
            "type": "string"
          }
        }
      },
      "dto.WarehouseInfoDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "size": {
            "type": "string"
          },
          "state": {
            "type": "string",
            "example": "Started,Running,Suspended,Failed"
          },
          "createdBy": {
            "type": "string"
          },
          "creatorAvatarUrl": {
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "clusterStatus": {
            "$ref": "#/components/schemas/dto.ClusterStatus"
          },
          "endpointStatus": {
            "$ref": "#/components/schemas/dto.EndpointStatus"
          },
          "autoSuspend": {
            "type": "integer"
          },
          "autoResume": {
            "type": "boolean"
          },
          "maxAutoScaleClusters": {
            "type": "integer"
          },
          "comment": {
            "type": "string"
          },
          "tags": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "arch": {
            "type": "string"
          }
        }
      },
      "dto.OrgMembershipDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "accountID": {
            "type": "integer",
            "nullable": true
          },
          "accountName": {
            "type": "string"
          },
          "accountEmail": {
            "type": "string"
          },
          "orgAvatarURL": {
            "type": "string"
          },
          "accountAvatarURL": {
            "type": "string"
          },
          "orgSlug": {
            "type": "string"
          },
          "orgName": {
            "type": "string"
          },
          "orgState": {
            "type": "string"
          },
          "orgSuspendReason": {
            "type": "string"
          },
          "tenantID": {
            "type": "string"
          },
          "orgCreatorID": {
            "type": "integer",
            "nullable": true
          },
          "orgCreatorName": {
            "type": "string"
          },
          "orgCreatorEmail": {
            "type": "string"
          },
          "region": {
            "type": "string"
          },
          "regionTitle": {
            "type": "string"
          },
          "provider": {
            "type": "string"
          },
          "gateway": {
            "type": "string"
          },
          "memberPermissions": {
            "type": "array",
            "nullable": true,
            "items": {
              "type": "string"
            }
          },
          "memberKind": {
            "type": "string"
          },
          "memberRole": {
            "type": "string"
          },
          "memberState": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastLoginTime": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        }
      },
      "dto.OrgInfoDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "avatarUrl": {
            "type": "string"
          },
          "company": {
            "type": "string"
          },
          "location": {
            "type": "string"
          },
          "province": {
            "type": "string"
          },
          "city": {
            "type": "string"
          },
          "postCode": {
            "type": "string"
          },
          "domain": {
            "type": "string"
          },
          "industry": {
            "type": "string"
          },
          "memberCount": {
            "type": "integer",
            "format": "int64"
          },
          "tenantID": {
            "type": "string"
          },
          "state": {
            "type": "string",
            "example": "initializing,active,suspended,removed"
          },
          "suspendReason": {
            "type": "string"
          },
          "planInfo": {
            "$ref": "#/components/schemas/dto.MyOrgPlanInfoDTO"
          },
          "storageInfo": {
            "$ref": "#/components/schemas/dto.StorageInfoDTO"
          },
          "spendLimit": {
            "$ref": "#/components/schemas/dto.OrgSpendLimitDTO"
          },
          "aiSettings": {
            "$ref": "#/components/schemas/dto.AISettingsDTO"
          },
          "marketProvider": {
            "type": "string"
          },
          "marketProductId": {
            "type": "string"
          },
          "marketOrderId": {
            "type": "string"
          },
          "clusterCode": {
            "type": "string"
          },
          "certificationState": {
            "type": "string"
          },
          "certificationType": {
            "type": "string"
          },
          "paymentMethods": {
            "type": "array",
            "nullable": true,
            "items": {
              "$ref": "#/components/schemas/dto.PaymentMethodInfoDTO"
            }
          },
          "createID": {
            "type": "integer"
          },
          "creator": {
            "type": "string"
          },
          "creatorEmail": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "dto.MyOrgPlanInfoDTO": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "warehouseLimit": {
            "type": "integer"
          },
          "warehouseLargeLimit": {
            "type": "integer"
          },
          "memberLimit": {
            "type": "integer"
          },
          "storageLimit": {
            "type": "integer",
            "format": "int64"
          },
          "pipeEnabled": {
            "type": "boolean"
          },
          "taxInvoiceEnabled": {
            "type": "boolean"
          },
          "startAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "expireAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "manualInvoice": {
            "type": "boolean"
          },
          "computeUnitPrice": {
            "type": "number",
            "nullable": true
          },
          "requestUnitPrice": {
            "type": "number",
            "nullable": true
          },
          "cloudServiceCostQuota": {
            "type": "number",
            "nullable": true
          },
          "multiClusterWarehouseEnabled": {
            "type": "boolean"
          },
          "warehouseRoleEnabled": {
            "type": "boolean"
          },
          "features": {
            "$ref": "#/components/schemas/dto.TenantFeatureDTO"
          },
          "quota": {
            "$ref": "#/components/schemas/dto.TenantQuotaDTO"
          }
        }
      },
      "dto.TenantFeatureDTO": {
        "type": "object",
        "properties": {
          "customize": {
            "type": "boolean"
          },
          "tracing": {
            "type": "boolean"
          },
          "metrics": {
            "type": "boolean"
          },
          "aiFunctions": {
            "type": "boolean"
          },
          "history": {
            "type": "boolean"
          },
          "warehouseEndpoint": {
            "type": "boolean"
          },
          "warehouseRole": {
            "type": "boolean"
          },
          "multiCluster": {
            "type": "boolean"
          },
          "systemTable": {
            "type": "boolean"
          },
          "loki": {
            "type": "boolean"
          },
          "internal": {
            "type": "boolean"
          }
        }
      },
      "dto.TenantQuotaDTO": {
        "type": "object",
        "properties": {
          "warehouseLimit": {
            "type": "integer",
            "format": "int32"
          },
          "warehouseLargeLimit": {
            "type": "integer",
            "format": "int32"
          },
          "memberLimit": {
            "type": "integer",
            "format": "int32"
          },
          "storageLimit": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "dto.StorageInfoDTO": {
        "type": "object",
        "properties": {
          "provider": {
            "type": "string"
          },
          "region": {
            "type": "string"
          },
          "regionTitle": {
            "type": "string"
          },
          "storagePricePerTBMonth": {
            "type": "number"
          },
          "storageProviderUrl": {
            "type": "string"
          },
          "storageUsed": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "dto.OrgSpendLimitDTO": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "nullable": true
          },
          "state": {
            "type": "string"
          },
          "creditLimit": {
            "type": "number",
            "nullable": true
          },
          "limitPolicy": {
            "type": "string"
          }
        }
      },
      "dto.AISettingsDTO": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean"
          }
        }
      },
      "dto.PaymentMethodInfoDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "object": {
            "type": "string"
          },
          "brand": {
            "type": "string"
          },
          "country": {
            "type": "string"
          },
          "pass": {
            "type": "string"
          },
          "expYear": {
            "type": "integer"
          },
          "expMonth": {
            "type": "integer"
          },
          "fingerprint": {
            "type": "string"
          },
          "funding": {
            "type": "string"
          },
          "last4": {
            "type": "string"
          }
        }
      }
    }
  }
}
