// Code generated by sdkgen. DO NOT EDIT.

//nolint
package mongodb

import (
	"context"

	"google.golang.org/grpc"

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

//revive:disable

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

var _ mongodb.BackupServiceClient = &BackupServiceClient{}

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

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