using adas_core.Domain.Models.DTO;
using adas_core.Domain.Models.MongoModels;
using MongoDB.Bson;
namespace adas_core.Application.Services.Interfaces;
public interface IDeviceService
{
///
/// Creates a new from the provided .
///
/// The data transfer object containing the information used to create the device.
/// A task that represents the asynchronous create operation. The task result contains the created , or if the device could not be created.
Task Create(DeviceDto device);
///
/// Asynchronously deletes the object identified by the specified identifier.
///
/// The unique identifier of the object to delete.
/// A task that represents the asynchronous delete operation. The result is true if the object was deleted; otherwise, false.
Task Delete(ObjectId objectId);
///
/// Updates an existing device using the provided data transfer object.
///
/// The data transfer object containing the updated device information.
/// A task that represents the asynchronous operation. The task result contains the updated device, or null if the device was not found.
Task Update(DeviceDto device);
///
/// Processes an incoming event for the specified device and returns the associated .
/// Returns null when the device referenced by the event cannot be found.
///
/// The device data transfer object carrying the event information to be processed.
/// A task that represents the asynchronous operation, containing the resolved or null if no matching device was found.
Task ReceiveEvent(DeviceDto device);
}