@ApiOperation(nickname = "ManagementOperationNotificationCount", value = "Counts the ManagementOperationNotifications", notes = "Counts the ManagementOperationNotifications with the given ManagementOperationNotificationQuery parameter returning the number of matching ManagementOperationNotifications", response = CountResult.class)
@POST
@Path("_count")
@Consumes({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
@Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
public CountResult count(
@ApiParam(value = "The ScopeId in which to count results.", required = true, defaultValue = DEFAULT_SCOPE_ID) @PathParam("scopeId") ScopeId scopeId,
@ApiParam(value = "The device id to filter results.") @PathParam("deviceId") EntityId deviceId,
@ApiParam(value = "The id of the Device in which to count results") @PathParam("operationId") EntityId operationId,
@ApiParam(value = "The ManagementOperationNotificationQuery to use to filter count results", required = true) ManagementOperationNotificationQuery query) throws Exception {
query.setScopeId(scopeId);
query.setPredicate(new AttributePredicateImpl<>(ManagementOperationNotificationAttributes.OPERATION_ID, operationId));
return new CountResult(managementOperationNotificationService.count(query));
}