com.geotab.model.search.FaultDataSearch Maven / Gradle / Ivy
package com.geotab.model.search;
import com.geotab.model.entity.faultdata.FaultData;
import java.time.LocalDateTime;
import java.util.List;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
/**
* The object used to specify the arguments when searching for a {@link FaultData}.
*
* This search has been designed to work efficiently with these combinations of parameters:
*
* -
* Id
*
* -
* DeviceSearch + DiagnosticSearch + FromDate and/or ToDate
*
* -
* GroupSearch + DiagnosticSearch + FromDate and/or ToDate
*
*
*
* Cannot be used with DriverGroups.
*/
@Getter @Setter
@NoArgsConstructor
public class FaultDataSearch extends Search {
/**
* The search options which are used to search for fault data for a device by id.
*
*
Available DeviceSearch options are:.
*
* - id
*
*/
private DeviceSearch deviceSearch;
/**
* Search for FaultData recorded for the diagnostic code using the DiagnosticSearch id.
*
* Available DiagnosticSearch options are:.
*
* - id
*
*/
private DiagnosticSearch diagnosticSearch;
/**
* The FaultData logs are searched for events which were recorded on or after this date.
*/
private LocalDateTime fromDate;
/**
* The Fault data logs are searched for events which were recorded on or before this date.
*/
private LocalDateTime toDate;
/**
* The groups which should be searched.
*
* Available GroupSearch options are:.
*
* - id
*
*/
private List groups;
@Builder
public FaultDataSearch(String id, DeviceSearch deviceSearch,
DiagnosticSearch diagnosticSearch, LocalDateTime fromDate, LocalDateTime toDate,
List groups) {
super(id);
this.deviceSearch = deviceSearch;
this.diagnosticSearch = diagnosticSearch;
this.fromDate = fromDate;
this.toDate = toDate;
this.groups = groups;
}
}