// Code generated by sdkgen. DO NOT EDIT.

//nolint
package clickhouse

import (
	"context"

	"google.golang.org/grpc"

	"github.com/yandex-cloud/go-genproto/yandex/cloud/mdb/clickhouse/v1"
)

//revive:disable

// BackupServiceClient is a clickhouse.BackupServiceClient with
// lazy GRPC connection initialization.
type BackupServiceClient struct {
	getConn func(ctx context.Context) (*grpc.ClientConn, error)
}

var _ clickhouse.BackupServiceClient = &BackupServiceClient{}

// Get implements clickhouse.BackupServiceClient
func (c *BackupServiceClient) Get(ctx context.Context, in *clickhouse.GetBackupRequest, opts ...grpc.CallOption) (*clickhouse.Backup, error) {
	conn, err := c.getConn(ctx)
	if err != nil {
		return nil, err
	}
	return clickhouse.NewBackupServiceClient(conn).Get(ctx, in, opts...)
}

// List implements clickhouse.BackupServiceClient
func (c *BackupServiceClient) List(ctx context.Context, in *clickhouse.ListBackupsRequest, opts ...grpc.CallOption) (*clickhouse.ListBackupsResponse, error) {
	conn, err := c.getConn(ctx)
	if err != nil {
		return nil, err
	}
	return clickhouse.NewBackupServiceClient(conn).List(ctx, in, opts...)
}
