// Copyright 2017 PingCAP, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// See the License for the specific language governing permissions and
// limitations under the License.package spec

package server

import "github.com/pingcap/tidb-cloud-manager/pkg/manager"

const (
	apiPrefix = "/pingcap.com/api/v1"
)

type Manager struct {
	*manager.Manager
}

type Password struct {
	RootPassword string `json:"root_password"`
}

type Response struct {
	Action     string  `json:"action"`
	StatusCode int     `json:"status_code"`
	Message    string  `json:"message,omitempty"`
	Payload    Payload `json:"payload,omitempty"`
}

type Payload struct {
	Job          *manager.Job          `json:"job,omitempty"`
	Clusters     []*manager.Cluster    `json:"clusters,omitempty"`
	Nodes        []*manager.Node       `json:"nodes,omitempty"`
	Volumes      []manager.Volume      `json:"volumes,omitempty"`
	BackupStatus *manager.BackupStatus `json:"backup_status,omitempty"`
}
