// Code generated by go-swagger; DO NOT EDIT.

package backup_service

// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

import (
	"github.com/go-openapi/runtime"
	httptransport "github.com/go-openapi/runtime/client"
	"github.com/go-openapi/strfmt"
)

// New creates a new backup service API client.
func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService {
	return &Client{transport: transport, formats: formats}
}

// New creates a new backup service API client with basic auth credentials.
// It takes the following parameters:
// - host: http host (github.com).
// - basePath: any base path for the API client ("/v1", "/v3").
// - scheme: http scheme ("http", "https").
// - user: user for basic authentication header.
// - password: password for basic authentication header.
func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService {
	transport := httptransport.New(host, basePath, []string{scheme})
	transport.DefaultAuthentication = httptransport.BasicAuth(user, password)
	return &Client{transport: transport, formats: strfmt.Default}
}

// New creates a new backup service API client with a bearer token for authentication.
// It takes the following parameters:
// - host: http host (github.com).
// - basePath: any base path for the API client ("/v1", "/v3").
// - scheme: http scheme ("http", "https").
// - bearerToken: bearer token for Bearer authentication header.
func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService {
	transport := httptransport.New(host, basePath, []string{scheme})
	transport.DefaultAuthentication = httptransport.BearerToken(bearerToken)
	return &Client{transport: transport, formats: strfmt.Default}
}

/*
Client for backup service API
*/
type Client struct {
	transport runtime.ClientTransport
	formats   strfmt.Registry
}

// ClientOption may be used to customize the behavior of Client methods.
type ClientOption func(*runtime.ClientOperation)

// ClientService is the interface for Client methods
type ClientService interface {
	CreateBackupSchedule(params *CreateBackupScheduleParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateBackupScheduleOK, error)

	DeleteBackup(params *DeleteBackupParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteBackupOK, error)

	DeleteDeletedClusterAndBackups(params *DeleteDeletedClusterAndBackupsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteDeletedClusterAndBackupsOK, error)

	GetAutoBackupSetting(params *GetAutoBackupSettingParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetAutoBackupSettingOK, error)

	GetBackupOptions(params *GetBackupOptionsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetBackupOptionsOK, error)

	GetBackupSetting(params *GetBackupSettingParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetBackupSettingOK, error)

	GetRestoreProgress(params *GetRestoreProgressParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetRestoreProgressOK, error)

	ListBackups(params *ListBackupsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListBackupsOK, error)

	ListLogBackups(params *ListLogBackupsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListLogBackupsOK, error)

	ListPiTRTimeRanges(params *ListPiTRTimeRangesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListPiTRTimeRangesOK, error)

	ListRecycleBinClusters(params *ListRecycleBinClustersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListRecycleBinClustersOK, error)

	ListServerlessPiTRTimeRanges(params *ListServerlessPiTRTimeRangesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListServerlessPiTRTimeRangesOK, error)

	ListServerlessRestores(params *ListServerlessRestoresParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListServerlessRestoresOK, error)

	ModifyBackupSetting(params *ModifyBackupSettingParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ModifyBackupSettingOK, error)

	RestoreBackup(params *RestoreBackupParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RestoreBackupOK, error)

	SetTransport(transport runtime.ClientTransport)
}

/*
CreateBackupSchedule create backup schedule API
*/
func (a *Client) CreateBackupSchedule(params *CreateBackupScheduleParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateBackupScheduleOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewCreateBackupScheduleParams()
	}
	op := &runtime.ClientOperation{
		ID:                 "CreateBackupSchedule",
		Method:             "POST",
		PathPattern:        "/api/v1/orgs/{org_id}/projects/{project_id}/clusters/{cluster_id}/backups/schedules",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"https"},
		Params:             params,
		Reader:             &CreateBackupScheduleReader{formats: a.formats},
		AuthInfo:           authInfo,
		Context:            params.Context,
		Client:             params.HTTPClient,
	}
	for _, opt := range opts {
		opt(op)
	}

	result, err := a.transport.Submit(op)
	if err != nil {
		return nil, err
	}
	success, ok := result.(*CreateBackupScheduleOK)
	if ok {
		return success, nil
	}
	// unexpected success response
	unexpectedSuccess := result.(*CreateBackupScheduleDefault)
	return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
}

/*
DeleteBackup delete backup API
*/
func (a *Client) DeleteBackup(params *DeleteBackupParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteBackupOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewDeleteBackupParams()
	}
	op := &runtime.ClientOperation{
		ID:                 "DeleteBackup",
		Method:             "DELETE",
		PathPattern:        "/api/v1/orgs/{org_id}/projects/{project_id}/clusters/{cluster_id}/backups/{id}",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"https"},
		Params:             params,
		Reader:             &DeleteBackupReader{formats: a.formats},
		AuthInfo:           authInfo,
		Context:            params.Context,
		Client:             params.HTTPClient,
	}
	for _, opt := range opts {
		opt(op)
	}

	result, err := a.transport.Submit(op)
	if err != nil {
		return nil, err
	}
	success, ok := result.(*DeleteBackupOK)
	if ok {
		return success, nil
	}
	// unexpected success response
	unexpectedSuccess := result.(*DeleteBackupDefault)
	return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
}

/*
DeleteDeletedClusterAndBackups delete deleted cluster and backups API
*/
func (a *Client) DeleteDeletedClusterAndBackups(params *DeleteDeletedClusterAndBackupsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteDeletedClusterAndBackupsOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewDeleteDeletedClusterAndBackupsParams()
	}
	op := &runtime.ClientOperation{
		ID:                 "DeleteDeletedClusterAndBackups",
		Method:             "DELETE",
		PathPattern:        "/api/v1/orgs/{org_id}/projects/{project_id}/recycle-bin/{cluster_id}/backups",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"https"},
		Params:             params,
		Reader:             &DeleteDeletedClusterAndBackupsReader{formats: a.formats},
		AuthInfo:           authInfo,
		Context:            params.Context,
		Client:             params.HTTPClient,
	}
	for _, opt := range opts {
		opt(op)
	}

	result, err := a.transport.Submit(op)
	if err != nil {
		return nil, err
	}
	success, ok := result.(*DeleteDeletedClusterAndBackupsOK)
	if ok {
		return success, nil
	}
	// unexpected success response
	unexpectedSuccess := result.(*DeleteDeletedClusterAndBackupsDefault)
	return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
}

/*
GetAutoBackupSetting get auto backup setting API
*/
func (a *Client) GetAutoBackupSetting(params *GetAutoBackupSettingParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetAutoBackupSettingOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewGetAutoBackupSettingParams()
	}
	op := &runtime.ClientOperation{
		ID:                 "GetAutoBackupSetting",
		Method:             "GET",
		PathPattern:        "/api/v1/orgs/{org_id}/projects/{project_id}/clusters/{cluster_id}/backups/schedules",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"https"},
		Params:             params,
		Reader:             &GetAutoBackupSettingReader{formats: a.formats},
		AuthInfo:           authInfo,
		Context:            params.Context,
		Client:             params.HTTPClient,
	}
	for _, opt := range opts {
		opt(op)
	}

	result, err := a.transport.Submit(op)
	if err != nil {
		return nil, err
	}
	success, ok := result.(*GetAutoBackupSettingOK)
	if ok {
		return success, nil
	}
	// unexpected success response
	unexpectedSuccess := result.(*GetAutoBackupSettingDefault)
	return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
}

/*
GetBackupOptions get backup options API
*/
func (a *Client) GetBackupOptions(params *GetBackupOptionsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetBackupOptionsOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewGetBackupOptionsParams()
	}
	op := &runtime.ClientOperation{
		ID:                 "GetBackupOptions",
		Method:             "GET",
		PathPattern:        "/api/v1/orgs/{org_id}/projects/{project_id}/clusters/{cluster_id}/backups/options",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"https"},
		Params:             params,
		Reader:             &GetBackupOptionsReader{formats: a.formats},
		AuthInfo:           authInfo,
		Context:            params.Context,
		Client:             params.HTTPClient,
	}
	for _, opt := range opts {
		opt(op)
	}

	result, err := a.transport.Submit(op)
	if err != nil {
		return nil, err
	}
	success, ok := result.(*GetBackupOptionsOK)
	if ok {
		return success, nil
	}
	// unexpected success response
	unexpectedSuccess := result.(*GetBackupOptionsDefault)
	return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
}

/*
GetBackupSetting get backup setting API
*/
func (a *Client) GetBackupSetting(params *GetBackupSettingParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetBackupSettingOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewGetBackupSettingParams()
	}
	op := &runtime.ClientOperation{
		ID:                 "GetBackupSetting",
		Method:             "GET",
		PathPattern:        "/api/v1/orgs/{org_id}/projects/{project_id}/clusters/{cluster_id}/backups/setting",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"https"},
		Params:             params,
		Reader:             &GetBackupSettingReader{formats: a.formats},
		AuthInfo:           authInfo,
		Context:            params.Context,
		Client:             params.HTTPClient,
	}
	for _, opt := range opts {
		opt(op)
	}

	result, err := a.transport.Submit(op)
	if err != nil {
		return nil, err
	}
	success, ok := result.(*GetBackupSettingOK)
	if ok {
		return success, nil
	}
	// unexpected success response
	unexpectedSuccess := result.(*GetBackupSettingDefault)
	return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
}

/*
GetRestoreProgress get restore progress API
*/
func (a *Client) GetRestoreProgress(params *GetRestoreProgressParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetRestoreProgressOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewGetRestoreProgressParams()
	}
	op := &runtime.ClientOperation{
		ID:                 "GetRestoreProgress",
		Method:             "GET",
		PathPattern:        "/api/v1/orgs/{org_id}/projects/{project_id}/clusters/{cluster_id}/backups/restores/progress",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"https"},
		Params:             params,
		Reader:             &GetRestoreProgressReader{formats: a.formats},
		AuthInfo:           authInfo,
		Context:            params.Context,
		Client:             params.HTTPClient,
	}
	for _, opt := range opts {
		opt(op)
	}

	result, err := a.transport.Submit(op)
	if err != nil {
		return nil, err
	}
	success, ok := result.(*GetRestoreProgressOK)
	if ok {
		return success, nil
	}
	// unexpected success response
	unexpectedSuccess := result.(*GetRestoreProgressDefault)
	return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
}

/*
ListBackups list backups API
*/
func (a *Client) ListBackups(params *ListBackupsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListBackupsOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewListBackupsParams()
	}
	op := &runtime.ClientOperation{
		ID:                 "ListBackups",
		Method:             "GET",
		PathPattern:        "/api/v1/orgs/{org_id}/projects/{project_id}/clusters/{cluster_id}/backups",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"https"},
		Params:             params,
		Reader:             &ListBackupsReader{formats: a.formats},
		AuthInfo:           authInfo,
		Context:            params.Context,
		Client:             params.HTTPClient,
	}
	for _, opt := range opts {
		opt(op)
	}

	result, err := a.transport.Submit(op)
	if err != nil {
		return nil, err
	}
	success, ok := result.(*ListBackupsOK)
	if ok {
		return success, nil
	}
	// unexpected success response
	unexpectedSuccess := result.(*ListBackupsDefault)
	return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
}

/*
ListLogBackups list log backups API
*/
func (a *Client) ListLogBackups(params *ListLogBackupsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListLogBackupsOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewListLogBackupsParams()
	}
	op := &runtime.ClientOperation{
		ID:                 "ListLogBackups",
		Method:             "GET",
		PathPattern:        "/api/v1/orgs/{org_id}/projects/{project_id}/clusters/{cluster_id}/backups/log-backups",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"https"},
		Params:             params,
		Reader:             &ListLogBackupsReader{formats: a.formats},
		AuthInfo:           authInfo,
		Context:            params.Context,
		Client:             params.HTTPClient,
	}
	for _, opt := range opts {
		opt(op)
	}

	result, err := a.transport.Submit(op)
	if err != nil {
		return nil, err
	}
	success, ok := result.(*ListLogBackupsOK)
	if ok {
		return success, nil
	}
	// unexpected success response
	unexpectedSuccess := result.(*ListLogBackupsDefault)
	return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
}

/*
ListPiTRTimeRanges list pi t r time ranges API
*/
func (a *Client) ListPiTRTimeRanges(params *ListPiTRTimeRangesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListPiTRTimeRangesOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewListPiTRTimeRangesParams()
	}
	op := &runtime.ClientOperation{
		ID:                 "ListPiTRTimeRanges",
		Method:             "GET",
		PathPattern:        "/api/v1/orgs/{org_id}/projects/{project_id}/clusters/{cluster_id}/backups/pitr/ranges",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"https"},
		Params:             params,
		Reader:             &ListPiTRTimeRangesReader{formats: a.formats},
		AuthInfo:           authInfo,
		Context:            params.Context,
		Client:             params.HTTPClient,
	}
	for _, opt := range opts {
		opt(op)
	}

	result, err := a.transport.Submit(op)
	if err != nil {
		return nil, err
	}
	success, ok := result.(*ListPiTRTimeRangesOK)
	if ok {
		return success, nil
	}
	// unexpected success response
	unexpectedSuccess := result.(*ListPiTRTimeRangesDefault)
	return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
}

/*
ListRecycleBinClusters list recycle bin clusters API
*/
func (a *Client) ListRecycleBinClusters(params *ListRecycleBinClustersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListRecycleBinClustersOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewListRecycleBinClustersParams()
	}
	op := &runtime.ClientOperation{
		ID:                 "ListRecycleBinClusters",
		Method:             "GET",
		PathPattern:        "/api/v1/orgs/{org_id}/projects/{project_id}/recycle-bin",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"https"},
		Params:             params,
		Reader:             &ListRecycleBinClustersReader{formats: a.formats},
		AuthInfo:           authInfo,
		Context:            params.Context,
		Client:             params.HTTPClient,
	}
	for _, opt := range opts {
		opt(op)
	}

	result, err := a.transport.Submit(op)
	if err != nil {
		return nil, err
	}
	success, ok := result.(*ListRecycleBinClustersOK)
	if ok {
		return success, nil
	}
	// unexpected success response
	unexpectedSuccess := result.(*ListRecycleBinClustersDefault)
	return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
}

/*
ListServerlessPiTRTimeRanges list serverless pi t r time ranges API
*/
func (a *Client) ListServerlessPiTRTimeRanges(params *ListServerlessPiTRTimeRangesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListServerlessPiTRTimeRangesOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewListServerlessPiTRTimeRangesParams()
	}
	op := &runtime.ClientOperation{
		ID:                 "ListServerlessPiTRTimeRanges",
		Method:             "GET",
		PathPattern:        "/api/v1/orgs/{org_id}/projects/{project_id}/clusters/{cluster_id}/backups/serverless_pitr_ranges",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"https"},
		Params:             params,
		Reader:             &ListServerlessPiTRTimeRangesReader{formats: a.formats},
		AuthInfo:           authInfo,
		Context:            params.Context,
		Client:             params.HTTPClient,
	}
	for _, opt := range opts {
		opt(op)
	}

	result, err := a.transport.Submit(op)
	if err != nil {
		return nil, err
	}
	success, ok := result.(*ListServerlessPiTRTimeRangesOK)
	if ok {
		return success, nil
	}
	// unexpected success response
	unexpectedSuccess := result.(*ListServerlessPiTRTimeRangesDefault)
	return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
}

/*
ListServerlessRestores serverlesses dedicated a p is
*/
func (a *Client) ListServerlessRestores(params *ListServerlessRestoresParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListServerlessRestoresOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewListServerlessRestoresParams()
	}
	op := &runtime.ClientOperation{
		ID:                 "ListServerlessRestores",
		Method:             "GET",
		PathPattern:        "/api/v1/orgs/{org_id}/projects/{project_id}/clusters/{cluster_id}/backups/serverless_restores",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"https"},
		Params:             params,
		Reader:             &ListServerlessRestoresReader{formats: a.formats},
		AuthInfo:           authInfo,
		Context:            params.Context,
		Client:             params.HTTPClient,
	}
	for _, opt := range opts {
		opt(op)
	}

	result, err := a.transport.Submit(op)
	if err != nil {
		return nil, err
	}
	success, ok := result.(*ListServerlessRestoresOK)
	if ok {
		return success, nil
	}
	// unexpected success response
	unexpectedSuccess := result.(*ListServerlessRestoresDefault)
	return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
}

/*
ModifyBackupSetting modify backup setting API
*/
func (a *Client) ModifyBackupSetting(params *ModifyBackupSettingParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ModifyBackupSettingOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewModifyBackupSettingParams()
	}
	op := &runtime.ClientOperation{
		ID:                 "ModifyBackupSetting",
		Method:             "POST",
		PathPattern:        "/api/v1/orgs/{org_id}/projects/{project_id}/clusters/{cluster_id}/backups/setting",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"https"},
		Params:             params,
		Reader:             &ModifyBackupSettingReader{formats: a.formats},
		AuthInfo:           authInfo,
		Context:            params.Context,
		Client:             params.HTTPClient,
	}
	for _, opt := range opts {
		opt(op)
	}

	result, err := a.transport.Submit(op)
	if err != nil {
		return nil, err
	}
	success, ok := result.(*ModifyBackupSettingOK)
	if ok {
		return success, nil
	}
	// unexpected success response
	unexpectedSuccess := result.(*ModifyBackupSettingDefault)
	return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
}

/*
RestoreBackup restore backup API
*/
func (a *Client) RestoreBackup(params *RestoreBackupParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RestoreBackupOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewRestoreBackupParams()
	}
	op := &runtime.ClientOperation{
		ID:                 "RestoreBackup",
		Method:             "POST",
		PathPattern:        "/api/v1/orgs/{org_id}/projects/{project_id}/clusters/{cluster_id}/backups/{id}/restore",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"https"},
		Params:             params,
		Reader:             &RestoreBackupReader{formats: a.formats},
		AuthInfo:           authInfo,
		Context:            params.Context,
		Client:             params.HTTPClient,
	}
	for _, opt := range opts {
		opt(op)
	}

	result, err := a.transport.Submit(op)
	if err != nil {
		return nil, err
	}
	success, ok := result.(*RestoreBackupOK)
	if ok {
		return success, nil
	}
	// unexpected success response
	unexpectedSuccess := result.(*RestoreBackupDefault)
	return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code())
}

// SetTransport changes the transport on the client
func (a *Client) SetTransport(transport runtime.ClientTransport) {
	a.transport = transport
}
