using System.Collections.Immutable;
using Connected.Annotations;
using Connected.Notifications;
using Connected.ServiceModel;
namespace Logistics.Types.Serials;
///
/// The service for manipulating with serials. A is a fundamental
/// entity used by labeling and traceability systems.
///
[Service]
[ServiceUrl(LogisticsUrls.Serials)]
public interface ISerialService : IServiceNotifications
{
///
/// Queries all serial numbers.
///
/// The optional arguments specifiying the
/// behavior of the result set.
/// A list of entities.
[ServiceMethod(ServiceMethodVerbs.Get | ServiceMethodVerbs.Post)]
Task> Query(QueryArgs? args);
///
/// Performs a lookup on the serials for the specified set of ids.
///
/// The arguments containing the list of ids for
/// which the entities will be returned.
/// A list of entities that matches the specified ids.
[ServiceMethod(ServiceMethodVerbs.Get | ServiceMethodVerbs.Post)]
Task> Query(PrimaryKeyListArgs args);
///
/// Returns the first serial that matches the specified id.
///
/// The arguments containing the id of the entity.
/// The if found, null otherwise.
[ServiceMethod(ServiceMethodVerbs.Get | ServiceMethodVerbs.Post)]
Task Select(PrimaryKeyArgs args);
///
/// Returns the first serial with the specified value.
///
/// The arguments containing the value for which serial
/// entity will be returned.
/// The if found, null otherwise.
[ServiceMethod(ServiceMethodVerbs.Get | ServiceMethodVerbs.Post)]
Task Select(SelectSerialArgs args);
///
/// Inserts a new serial number.
///
/// The arguments containing the properties of the new serial.
/// The id of the newly inserted serial.
[ServiceMethod(ServiceMethodVerbs.Post | ServiceMethodVerbs.Put)]
Task Insert(InsertSerialArgs args);
///
/// Updates an existing serial.
///
/// The arguments containing properties which will change the entity.
[ServiceMethod(ServiceMethodVerbs.Post | ServiceMethodVerbs.Patch)]
Task Update(UpdateSerialArgs args);
///
/// Performs a partial update on the serial.
///
/// The arguments containing properties which has to be updated.
[ServiceMethod(ServiceMethodVerbs.Post | ServiceMethodVerbs.Patch)]
Task Patch(PatchArgs args);
///
/// Peranently deletes the serial from the storage.
///
/// The arguments containing the id of the entity to be deleted.
[ServiceMethod(ServiceMethodVerbs.Post | ServiceMethodVerbs.Delete)]
Task Delete(PrimaryKeyArgs args);
}