Table of Contents

Class MediaFile

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

The entity which describes the binary media.

public class MediaFile : NameEntityWithVersion, IEntity, IComparable, IIdentifiable, IVersion, IDeviceProvider, IDriverProvider, IDefaultable
Inheritance
MediaFile
Implements
Derived
Inherited Members

Constructors

MediaFile()

Initializes a new instance of the MediaFile class.

public MediaFile()

MediaFile(MediaFile)

Initializes a new instance of the MediaFile class.

public MediaFile(MediaFile file)

Parameters

file MediaFile

The MediaFile.

MediaFile(Id?, long?, string?)

Initializes a new instance of the MediaFile class.

protected MediaFile(Id? id, long? version, string? name)

Parameters

id Id

The Id.

version long?

The version.

name string

The name.

MediaFile(Id?, long?, string?, MediaType?, Device?, Driver?, DateTime?, DateTime?, Status?, string?, List<Tag>?, List<MediaFile>?, Id?)

Initializes a new instance of the MediaFile class.

public MediaFile(Id? id, long? version, string? name, MediaType? mediaType, Device? device, Driver? driver, DateTime? fromDate, DateTime? toDate, Status? status, string? metaData, List<Tag>? tags, List<MediaFile>? thumbnails, Id? solutionId)

Parameters

id Id

The Id.

version long?

The version.

name string

The name.

mediaType MediaType?

The MediaType.

device Device

The Device.

driver Driver

The Driver.

fromDate DateTime?

The from date.

toDate DateTime?

The to date.

status Status?

The Status.

metaData string

The metadata.

tags List<Tag>

The list of tags.

thumbnails List<MediaFile>

The list of thumbnails.

solutionId Id

The Id of the solution this data belongs to.

Fields

SupportedFileTypes

List of MediaType allowed for the MediaFile entity.

public static readonly ImmutableHashSet<MediaType> SupportedFileTypes

Field Value

ImmutableHashSet<MediaType>

Properties

Device

Gets or sets the Device associated with the file.

public Device? Device { get; set; }

Property Value

Device

Device

Driver

Gets or sets the Driver associated with the file.

public Driver? Driver { get; set; }

Property Value

Driver

Driver

FromDate

Gets or sets the from date.

public DateTime? FromDate { get; set; }

Property Value

DateTime?

DateTime

MediaType

Gets or sets the MediaType.

public MediaType? MediaType { get; set; }

Property Value

MediaType?

MediaType

MetaData

Gets or sets file metadata in JSON format.

public string? MetaData { get; set; }

Property Value

string

object

SolutionId

Gets or sets the Id of the solution which added the data.

public Id? SolutionId { get; set; }

Property Value

Id

Id

Status

Gets or sets the file processing Status.

public Status? Status { get; set; }

Property Value

Status?

Status

Tags

Gets or sets the list of tags to provide context to the file.

public List<Tag>? Tags { get; set; }

Property Value

List<Tag>

List<T>

Thumbnails

Gets or sets the list of files which serve as the thumbnail for this file.

public List<MediaFile>? Thumbnails { get; set; }

Property Value

List<MediaFile>

List<T>

ToDate

Gets or sets the to date.

public DateTime? ToDate { 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.

GetFileName()

Gets the stored file name.

public string? GetFileName()

Returns

string

The string file name.

PopulateDefaults()

Populate non-required empty (null) properties with default values.

public virtual void PopulateDefaults()