Class MaintenanceWorkRequest
- Namespace
- Geotab.Checkmate.ObjectModel.Maintenance
- Assembly
- Geotab.Checkmate.ObjectModel.dll
Maintenance Work Request for a particular device.
public class MaintenanceWorkRequest : NameEntityWithMaintenanceSource, IEntity, IComparable, IIdentifiable, IMaintenanceSource, IDeviceProvider, IDateTimeProvider
- Inheritance
-
MaintenanceWorkRequest
- Implements
- Inherited Members
Constructors
MaintenanceWorkRequest()
Initializes a new instance of the NameEntityWithMaintenanceSource class.Constructor.
public MaintenanceWorkRequest()
MaintenanceWorkRequest(Id)
Initializes a new instance of the MaintenanceWorkRequest class.Constructor.
public MaintenanceWorkRequest(Id id)
Parameters
MaintenanceWorkRequest(Id?, MaintenanceSchedule?, Device?, string?, string?, string?, string?, bool?, bool?, long?, long?, decimal?, string?, TimeSpan?, TimeSpan?, DateTime?, DateTime?, DateTime?, DateTime?, int?, EventType?, long?, TimeSpan?, DateTime?, MaintenanceWorkOrderJob?, DateTime?, string?, DateTime?, Dictionary<string, string>?, IList<string>?)
Initializes a new instance of the MaintenanceWorkRequest class.Constructor.
public MaintenanceWorkRequest(Id? id, MaintenanceSchedule? schedule, Device? device, string? name, string? description, string? recommendation, string? source, bool? isOverdue, bool? isPending, long? currentOdometer, long? serviceDueOnOdometer, decimal? estimateCost, string? costCurrency, TimeSpan? serviceDueOnEngineHours, TimeSpan? currentEngineHours, DateTime? snoozeDate, DateTime? snoozeUntilDate, DateTime? dueOnDate, DateTime? dateTime, int? severity, EventType? maintenanceType, long? lastOdometer, TimeSpan? lastEngineHours, DateTime? lastMaintenanceDate, MaintenanceWorkOrderJob? lastCompletedWorkOrderJob, DateTime? expirationDate, string? sourceDescription, DateTime? triggeredDateTime, Dictionary<string, string>? metadata, IList<string>? labels)
Parameters
idIdThe id.
scheduleMaintenanceScheduleThe schedule.
deviceDeviceThe Device.
namestringThe name.
descriptionstringThe description.
recommendationstringThe recommendation.
sourcestringThe source.
isOverduebool?Whether is overdue or not.
isPendingbool?Whether is pending or not.
currentOdometerlong?The current odometer of the device.
serviceDueOnOdometerlong?The odometer value at which the maintenance work request is due or overdue.
estimateCostdecimal?The estimate cost
costCurrencystringThe cost currency
serviceDueOnEngineHoursTimeSpan?The engine hours value at which the maintenance work request is due or overdue.
currentEngineHoursTimeSpan?The current engine hours of the device.
snoozeDateDateTime?The date of when the maintenance work request was snoozed.
snoozeUntilDateDateTime?The date until which the maintenance work request should remain snoozed.
dueOnDateDateTime?The due date for the maintenance work request.
dateTimeDateTime?The date of when the record has been added.
severityint?The severity.
maintenanceTypeEventTypeThe maintenance type.
lastOdometerlong?The odometer reported by the device from last maintenance.
lastEngineHoursTimeSpan?The engine hours reported by the device from last maintenance.
lastMaintenanceDateDateTime?The datetime of the last maintenance done.
lastCompletedWorkOrderJobMaintenanceWorkOrderJobThe last completed work order job related to the work request.
expirationDateDateTime?The datetime of when the work request should be expired.
sourceDescriptionstringThe description of the source.
triggeredDateTimeDateTime?The triggered date time of the work request.
metadataDictionary<string, string>The metadata of the work request.
labelsIList<string>The labels.
Properties
CostCurrency
Gets or sets the currency cost for the MaintenanceWorkRequest.
public string? CostCurrency { get; set; }
Property Value
CurrentEngineHours
Gets or sets the current engine hours of the Device.
public TimeSpan? CurrentEngineHours { get; set; }
Property Value
CurrentEngineHoursInHours
Gets the current engine hours of the Device rounded to the nearest whole hour.
public int? CurrentEngineHoursInHours { get; }
Property Value
CurrentOdometer
Gets or sets the current odometer of the Device.
public long? CurrentOdometer { get; set; }
Property Value
DateTime
Gets or sets the date the MaintenanceWorkRequest was created.
public DateTime? DateTime { get; set; }
Property Value
Description
Gets or sets the description of the MaintenanceWorkRequest.
public string? Description { get; set; }
Property Value
Device
Gets or sets the Device related to the MaintenanceWorkRequest.
public Device? Device { get; set; }
Property Value
DueOnDate
Gets or sets the date the MaintenanceWorkRequest is due.
public DateTime? DueOnDate { get; set; }
Property Value
EstimateCost
Gets or sets the estimate cost for the MaintenanceWorkRequest.
public decimal? EstimateCost { get; set; }
Property Value
ExpirationDate
Gets or sets the datetime of when the work request should expire.
public DateTime? ExpirationDate { get; set; }
Property Value
IsOverdue
Gets or sets whether the MaintenanceWorkRequest is overdue or not.
public bool? IsOverdue { get; set; }
Property Value
IsPending
Gets or sets whether the MaintenanceWorkRequest is pending or not to be solved.
public bool? IsPending { get; set; }
Property Value
IsVisible
Gets or sets whether the MaintenanceWorkRequest is visible or not.
public bool? IsVisible { get; set; }
Property Value
LastCompletedWorkOrderJob
Gets or sets the last completed work order job related to this work request.
public MaintenanceWorkOrderJob? LastCompletedWorkOrderJob { get; set; }
Property Value
LastEngineHours
Gets or sets the engine hours reported by the device from last maintenance.
public TimeSpan? LastEngineHours { get; set; }
Property Value
LastMaintenanceDate
Gets or sets the datetime of the last maintenance done.
public DateTime? LastMaintenanceDate { get; set; }
Property Value
LastOdometer
Gets or sets the engine hours reported by the device from last maintenance.
public long? LastOdometer { get; set; }
Property Value
MaintenanceType
Gets or sets the maintenance EventType of the MaintenanceWorkRequest.
public EventType? MaintenanceType { get; set; }
Property Value
Metadata
Gets or sets the metadata of the MaintenanceWorkRequest.
public Dictionary<string, string>? Metadata { get; set; }
Property Value
- Dictionary<string, string>
The metadata of the MaintenanceWorkRequest.
Recommendation
Gets or sets the recommendation for the MaintenanceWorkRequest.
public string? Recommendation { get; set; }
Property Value
Schedule
Gets or sets the MaintenanceSchedule related to the MaintenanceWorkRequest.
public MaintenanceSchedule? Schedule { get; set; }
Property Value
ServiceDueInEngineHours
Gets or sets the remaining engine hours of the Device before the MaintenanceWorkRequest becomes overdue. A negative value indicates that the service is overdue.
public TimeSpan? ServiceDueInEngineHours { get; set; }
Property Value
ServiceDueInKilometers
Gets or sets the remaining distance of the Device before the MaintenanceWorkRequest becomes overdue.
public double? ServiceDueInKilometers { get; set; }
Property Value
ServiceDueInMiles
Gets or sets the odometer reading in miles of the Device at which the MaintenanceWorkRequest is due. A negative value indicates that the service is overdue.
public double? ServiceDueInMiles { get; set; }
Property Value
ServiceDueOnEngineHours
Gets or sets the engine hours of the Device at which the MaintenanceWorkRequest is due.
public TimeSpan? ServiceDueOnEngineHours { get; set; }
Property Value
ServiceDueOnOdometer
Gets or sets the odometer reading the Device at which the MaintenanceWorkRequest is due.
public long? ServiceDueOnOdometer { get; set; }
Property Value
Severity
Gets or sets the severity of the MaintenanceWorkRequest.
public int? Severity { get; set; }
Property Value
SnoozeDate
Gets or sets the date when the MaintenanceWorkRequest was snoozed.
public DateTime? SnoozeDate { get; set; }
Property Value
SnoozeUntilDate
Gets or sets the date until which the MaintenanceWorkRequest is snoozed.
public DateTime? SnoozeUntilDate { get; set; }
Property Value
TriggeredDateTime
Gets or sets the triggered dateTime of the MaintenanceWorkRequest.
public DateTime? TriggeredDateTime { get; set; }
Property Value
Methods
Clone()
Creates a new object that is a copy of the current instance.
public override IEntity Clone()
Returns
- IEntity
A new object that is a copy of this instance.
FromIssue(MaintenanceIssue)
Function to create a MaintenanceWorkRequest from a MaintenanceIssue.
public static MaintenanceWorkRequest FromIssue(MaintenanceIssue issue)
Parameters
issueMaintenanceIssue
Returns
IsNotInitialized()
Determines if the MaintenanceWorkRequest is not initialized(requires due parameters reset/set).
public bool IsNotInitialized()