Table of Contents

Class EventRule

Namespace
Geotab.Checkmate.ObjectModel
Assembly
Geotab.Checkmate.ObjectModel.dll

The rule describing an event.

[ReportClass]
public class EventRule : NameEntity, IEntity, IComparable, IIdentifiable, IDateTimeProvider, IGroupLinked
Inheritance
EventRule
Implements
Inherited Members

Constructors

EventRule()

Initializes a new instance of the EventRule class.

public EventRule()

EventRule(Id)

Initializes a new instance of the EventRule class.Constructor.

public EventRule(Id id)

Parameters

id Id

Id

EventRule(Id?, EventType?, string?, int?, int?, DateTime?, TimeSpan?, string?, int?, NotificationBinaryFile?, IList<Group>?, int?, int?, int?, string?, bool?)

Initializes a new instance of the EventRule class.

public EventRule(Id? id, EventType? eventType, string? name, int? kilometers, int? months, DateTime? eventDate, TimeSpan? engineHours, string? comment, int? days, NotificationBinaryFile? notificationTemplate = null, IList<Group>? nodes = null, int? dayOfMonth = null, int? weeks = null, int? dayOfWeek = null, string? source = "manual", bool? active = true)

Parameters

id Id

The Id.

eventType EventType

Type of the event.

name string

The name.

kilometers int?

The kilometers.

months int?

The months.

eventDate DateTime?

The event date.

engineHours TimeSpan?

The EngineHours.

comment string

The comment.

days int?

The days

notificationTemplate NotificationBinaryFile

The notification template NotificationBinaryFile

nodes IList<Group>

Group collection this EventRule belongs to.

dayOfMonth int?

The day of month.

weeks int?

The weeks.

dayOfWeek int?

The day of week.

source string

The source of the reminder.

active bool?

The active of the reminder.

Fields

DataInsightSource

Identifier indicating the source is Data Insight

public const string DataInsightSource = "Data Insight"

Field Value

string

ManualSource

Identifier indicating the source is manual

public const string ManualSource = "manual"

Field Value

string

UnplannedMaintenance

Identifier indicating the magic event rule ID of an unplanned maintenace record.

public const string UnplannedMaintenance = "UnplannedMaintenance"

Field Value

string

Properties

Active

Gets or sets a value indicating whether gets or sets if the event rule is active.

public bool? Active { get; set; }

Property Value

bool?

Whether the event rule is active or not.

AssetCount

Gets or sets the number of assets associated with this event rule.

public int? AssetCount { get; set; }

Property Value

int?

The asset count.

Comment

Gets or sets free text field where any user information can be stored and referenced for this entity.

[ExcelColumnHeader(new ReportHeading[] { ReportHeading.EventRuleComment })]
public string? Comment { get; set; }

Property Value

string

The comment.

DateTime

Gets or sets the DateTime of the event.

[ExcelColumnHeader(new ReportHeading[] { ReportHeading.EventRuleDateTime })]
public DateTime? DateTime { get; set; }

Property Value

DateTime?

The DateTime of the event.

DayOfMonth

Gets or sets the day of month.

[ExcelColumnHeader(new ReportHeading[] { ReportHeading.EventRuleDayOfMonthSelect })]
public int? DayOfMonth { get; set; }

Property Value

int?

The day of month.

DayOfWeek

Gets or sets the day of week.

public int? DayOfWeek { get; set; }

Property Value

int?

The day of week.

DayOfWeekName

Gets or sets the day of week name.

[ExcelColumnHeader(new ReportHeading[] { ReportHeading.EventRuleDayOfWeekSelect }, IsDayOfWeekName = true)]
public string? DayOfWeekName { get; set; }

Property Value

string

The day of week name.

Days

Gets or sets the days.

[ExcelColumnHeader(new ReportHeading[] { ReportHeading.EventRuleDays })]
public int? Days { get; set; }

Property Value

int?

The days.

EngineHours

Gets or sets the engine hours.

[ExcelColumnHeader(new ReportHeading[] { ReportHeading.EventRuleEngineHours })]
public TimeSpan? EngineHours { get; set; }

Property Value

TimeSpan?

The engine hours.

EventDate

Gets or sets the event date.

public DateTime? EventDate { get; set; }

Property Value

DateTime?

The event date.

EventType

Gets or sets the type of the event.

[ExcelColumnHeader(new ReportHeading[] { ReportHeading.EventOccurrenceEventType }, IsEventTypeName = true)]
public EventType? EventType { get; set; }

Property Value

EventType

The type of the event.

Groups

Gets or sets a list of Group(s) assigned to the event rule.

[ExcelColumnHeader(new ReportHeading[] { ReportHeading.EventRuleGroups }, IsList = true)]
public IList<Group>? Groups { get; set; }

Property Value

IList<Group>

IList<T>

Id

Gets or sets Gets or sets the unique identifier for this entity. See Id.

[ExcelColumnHeader(new ReportHeading[] { ReportHeading.EventRuleId })]
public override Id? Id { get; set; }

Property Value

Id

Id .

Kilometers

Gets or sets the kilometers.

[ExcelColumnHeader(new ReportHeading[] { ReportHeading.EventRuleKilometers }, IsSpeedOrDistance = true)]
public int? Kilometers { get; set; }

Property Value

int?

The kilometers.

Months

Gets or sets the months.

[ExcelColumnHeader(new ReportHeading[] { ReportHeading.EventRuleMonths })]
public int? Months { get; set; }

Property Value

int?

The months.

Name

Gets or sets the name of this entity which identifies it and is used when displaying this entity.

[ExcelColumnHeader(new ReportHeading[] { ReportHeading.EventRuleName })]
public override string? Name { get; set; }

Property Value

string

The name.

NotificationTemplate

Gets or sets the notification template NotificationBinaryFile for the event.

public NotificationBinaryFile? NotificationTemplate { get; set; }

Property Value

NotificationBinaryFile

The NotificationBinaryFile template for the event

Source

Gets or sets the source of this entity which identifies from where this rule was generated.

[ExcelColumnHeader(new ReportHeading[] { ReportHeading.ReminderSource })]
public string? Source { get; set; }

Property Value

string

The source.

Weeks

Gets or sets the weeks.

[ExcelColumnHeader(new ReportHeading[] { ReportHeading.EventRuleWeeks })]
public int? Weeks { get; set; }

Property Value

int?

The weeks.

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.