Table of Contents

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

id Id

Id

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

id Id

The id.

schedule MaintenanceSchedule

The schedule.

device Device

The Device.

name string

The name.

description string

The description.

recommendation string

The recommendation.

source string

The source.

isOverdue bool?

Whether is overdue or not.

isPending bool?

Whether is pending or not.

currentOdometer long?

The current odometer of the device.

serviceDueOnOdometer long?

The odometer value at which the maintenance work request is due or overdue.

estimateCost decimal?

The estimate cost

costCurrency string

The cost currency

serviceDueOnEngineHours TimeSpan?

The engine hours value at which the maintenance work request is due or overdue.

currentEngineHours TimeSpan?

The current engine hours of the device.

snoozeDate DateTime?

The date of when the maintenance work request was snoozed.

snoozeUntilDate DateTime?

The date until which the maintenance work request should remain snoozed.

dueOnDate DateTime?

The due date for the maintenance work request.

dateTime DateTime?

The date of when the record has been added.

severity int?

The severity.

maintenanceType EventType

The maintenance type.

lastOdometer long?

The odometer reported by the device from last maintenance.

lastEngineHours TimeSpan?

The engine hours reported by the device from last maintenance.

lastMaintenanceDate DateTime?

The datetime of the last maintenance done.

lastCompletedWorkOrderJob MaintenanceWorkOrderJob

The last completed work order job related to the work request.

expirationDate DateTime?

The datetime of when the work request should be expired.

sourceDescription string

The description of the source.

triggeredDateTime DateTime?

The triggered date time of the work request.

metadata Dictionary<string, string>

The metadata of the work request.

labels IList<string>

The labels.

Properties

CostCurrency

Gets or sets the currency cost for the MaintenanceWorkRequest.

public string? CostCurrency { get; set; }

Property Value

string

Currency

CurrentEngineHours

Gets or sets the current engine hours of the Device.

public TimeSpan? CurrentEngineHours { get; set; }

Property Value

TimeSpan?

TimeSpan

CurrentEngineHoursInHours

Gets the current engine hours of the Device rounded to the nearest whole hour.

public int? CurrentEngineHoursInHours { get; }

Property Value

int?

int

CurrentOdometer

Gets or sets the current odometer of the Device.

public long? CurrentOdometer { get; set; }

Property Value

long?

long

DateTime

Gets or sets the date the MaintenanceWorkRequest was created.

public DateTime? DateTime { get; set; }

Property Value

DateTime?

DateTime

Description

Gets or sets the description of the MaintenanceWorkRequest.

public string? Description { get; set; }

Property Value

string

string

Device

Gets or sets the Device related to the MaintenanceWorkRequest.

public Device? Device { get; set; }

Property Value

Device

Device

DueOnDate

Gets or sets the date the MaintenanceWorkRequest is due.

public DateTime? DueOnDate { get; set; }

Property Value

DateTime?

DateTime

EstimateCost

Gets or sets the estimate cost for the MaintenanceWorkRequest.

public decimal? EstimateCost { get; set; }

Property Value

decimal?

double

ExpirationDate

Gets or sets the datetime of when the work request should expire.

public DateTime? ExpirationDate { get; set; }

Property Value

DateTime?

DateTime

IsOverdue

Gets or sets whether the MaintenanceWorkRequest is overdue or not.

public bool? IsOverdue { get; set; }

Property Value

bool?

bool

IsPending

Gets or sets whether the MaintenanceWorkRequest is pending or not to be solved.

public bool? IsPending { get; set; }

Property Value

bool?

bool

IsVisible

Gets or sets whether the MaintenanceWorkRequest is visible or not.

public bool? IsVisible { get; set; }

Property Value

bool?

bool

LastCompletedWorkOrderJob

Gets or sets the last completed work order job related to this work request.

public MaintenanceWorkOrderJob? LastCompletedWorkOrderJob { get; set; }

Property Value

MaintenanceWorkOrderJob

DateTime

LastEngineHours

Gets or sets the engine hours reported by the device from last maintenance.

public TimeSpan? LastEngineHours { get; set; }

Property Value

TimeSpan?

TimeSpan

LastMaintenanceDate

Gets or sets the datetime of the last maintenance done.

public DateTime? LastMaintenanceDate { get; set; }

Property Value

DateTime?

DateTime

LastOdometer

Gets or sets the engine hours reported by the device from last maintenance.

public long? LastOdometer { get; set; }

Property Value

long?

long

MaintenanceType

Gets or sets the maintenance EventType of the MaintenanceWorkRequest.

public EventType? MaintenanceType { get; set; }

Property Value

EventType

EventType

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

string

string

Schedule

Gets or sets the MaintenanceSchedule related to the MaintenanceWorkRequest.

public MaintenanceSchedule? Schedule { get; set; }

Property Value

MaintenanceSchedule

MaintenanceSchedule

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

TimeSpan?

TimeSpan

ServiceDueInKilometers

Gets or sets the remaining distance of the Device before the MaintenanceWorkRequest becomes overdue.

public double? ServiceDueInKilometers { get; set; }

Property Value

double?

long

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

double?

long

ServiceDueOnEngineHours

Gets or sets the engine hours of the Device at which the MaintenanceWorkRequest is due.

public TimeSpan? ServiceDueOnEngineHours { get; set; }

Property Value

TimeSpan?

TimeSpan

ServiceDueOnOdometer

Gets or sets the odometer reading the Device at which the MaintenanceWorkRequest is due.

public long? ServiceDueOnOdometer { get; set; }

Property Value

long?

long

Severity

Gets or sets the severity of the MaintenanceWorkRequest.

public int? Severity { get; set; }

Property Value

int?

int

SnoozeDate

Gets or sets the date when the MaintenanceWorkRequest was snoozed.

public DateTime? SnoozeDate { get; set; }

Property Value

DateTime?

DateTime

SnoozeUntilDate

Gets or sets the date until which the MaintenanceWorkRequest is snoozed.

public DateTime? SnoozeUntilDate { get; set; }

Property Value

DateTime?

DateTime

TriggeredDateTime

Gets or sets the triggered dateTime of the MaintenanceWorkRequest.

public DateTime? TriggeredDateTime { get; set; }

Property Value

DateTime?

DateTime

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

issue MaintenanceIssue

A MaintenanceIssue

Returns

MaintenanceWorkRequest

MaintenanceWorkRequest

IsNotInitialized()

Determines if the MaintenanceWorkRequest is not initialized(requires due parameters reset/set).

public bool IsNotInitialized()

Returns

bool

bool