using adas_core.Domain.Models.Filter;
using adas_core.Domain.Models.MongoModels;
using adas_core.Domain.Models.Responses;
using MongoDB.Bson;
namespace adas_core.Application.Services.Interfaces;
public interface ICameraService
{
///
/// Retrieves the camera associated with the specified relay identifier.
///
/// The unique identifier of the relay used to look up the camera.
/// A task that represents the asynchronous operation. The task result contains the if a matching record is found; otherwise, null.
Task GetById(ObjectId relayId);
///
/// Retrieves the list of cameras associated with the specified configuration relay identifiers.
///
/// The list of configuration relay object identifiers used to look up the associated cameras.
/// A list of cameras that correspond to the provided configuration relay identifiers.
List GetCameraInList(List configurationRelayList);
///
/// Retrieves a paginated list of cameras based on the provided pagination filter.
///
/// The pagination filter containing the page size, page number, and optional search criteria used to query cameras.
/// A task that represents the asynchronous operation. The task result contains a with the requested page of cameras and pagination metadata.
Task> GetPaginatedCameras(PaginationFilter request);
///
/// Inserts a new camera into the system asynchronously.
///
/// The camera entity to insert.
/// A task that represents the asynchronous operation. The task result contains the inserted camera with its generated identifier, or null if the camera could not be inserted.
Task InsertCamera(Camera camera);
///
/// Updates an existing camera identified by the specified object identifier with the provided camera data.
/// Returns when no camera with the given identifier exists.
///
/// The unique identifier of the camera to update.
/// The camera data containing the updated values to apply.
/// A task that represents the asynchronous operation. The task result contains the updated camera, or if the camera was not found.
Task UpdateCameraById(ObjectId objectId, Camera camera);
///
/// Deletes a camera identified by the specified object identifier.
///
/// The unique identifier of the camera to delete.
/// A task that represents the asynchronous delete operation. The result is true if the camera was successfully deleted; otherwise, false.
Task DeleteCamera(ObjectId objectId);
///
/// Asynchronously retrieves a list of cameras whose names match the specified search text.
///
/// The text used to search camera names.
/// A task that represents the asynchronous operation. The task result contains a list of objects matching the search criteria; an empty list is returned if no matches are found.
Task> GetSearchByNameCameras(string textToSearch);
}