// Code generated by sdkgen. DO NOT EDIT.

//nolint
package mysql

import (
	"context"

	"google.golang.org/grpc"

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

//revive:disable

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

var _ mysql.BackupServiceClient = &BackupServiceClient{}

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

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