Table of Contents

Class DeviceShare

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

A device share represents the sharing of steaming data from a device into multiple databases. A database which is the primary device subscriber may share the data with one or many other databases.

public class DeviceShare : NameEntityWithVersion, IEntity, IComparable, IIdentifiable, IVersion, IDateTimeProvider
Inheritance
DeviceShare
Implements
Inherited Members

Constructors

DeviceShare()

Initializes a new instance of the DeviceShare class.

public DeviceShare()

DeviceShare(Id?, int?, string?, DateTime?, DateTime?, DateTime?, DateTime?, string?, string?, DeviceShareStatus?, DeviceShareType?, DevicePlan?, DevicePlanBillingInfo?, DeviceShareOptions?, long?)

Initializes a new instance of the DeviceShare class.

public DeviceShare(Id? id, int? myAdminId, string? serialNumber, DateTime? dateTime, DateTime? updatedDateTime, DateTime? acceptedDateTime, DateTime? terminatedDateTime, string? sourceDatabaseName, string? targetDatabaseName, DeviceShareStatus? shareStatus, DeviceShareType? shareType, DevicePlan? devicePlan, DevicePlanBillingInfo? devicePlanBillingInfo, DeviceShareOptions? options, long? version)

Parameters

id Id

The Id of this entity.

myAdminId int?

The id that MyAdmin associates with this DeviceShare.

serialNumber string

The serial number to the device accociated with this DeviceShare.

dateTime DateTime?

The date time of when the DeviceShare was created.

updatedDateTime DateTime?

The date time of when the DeviceShare status was updated. This is when the share request was accepted/rejected by a target-database user or cancelled by a source-database user.

acceptedDateTime DateTime?

The date that the DeviceShare was accepted.

terminatedDateTime DateTime?

The date that the DeviceShare was terminated.

sourceDatabaseName string

The name of the source database for this DeviceShare.

targetDatabaseName string

The name of the target database for this DeviceShare.

shareStatus DeviceShareStatus?

The status of this DeviceShare.

shareType DeviceShareType?

The type of this DeviceShare.

devicePlan DevicePlan?

The rate plan for this DeviceShare.

devicePlanBillingInfo DevicePlanBillingInfo

The DevicePlanBillingInfo.

options DeviceShareOptions

The DeviceShareOptions.

version long?

The version of this entity.

DeviceShare(Id?, int?, string?, DateTime?, DateTime?, DateTime?, DateTime?, string?, string?, DeviceShareStatus?, DeviceShareType?, DevicePlan?, DevicePlanBillingInfo?, long?)

Initializes a new instance of the DeviceShare class.

public DeviceShare(Id? id, int? myAdminId, string? serialNumber, DateTime? dateTime, DateTime? updatedDateTime, DateTime? acceptedDateTime, DateTime? terminatedDateTime, string? sourceDatabaseName, string? targetDatabaseName, DeviceShareStatus? shareStatus, DeviceShareType? shareType, DevicePlan? devicePlan, DevicePlanBillingInfo? devicePlanBillingInfo, long? version)

Parameters

id Id

The Id of this entity.

myAdminId int?

The id that MyAdmin associates with this DeviceShare.

serialNumber string

The serial number to the device associated with this DeviceShare.

dateTime DateTime?

The date time of when the DeviceShare was created.

updatedDateTime DateTime?

The date time of when the DeviceShare status was updated. This is when the share request was accepted/rejected by a target-database user or cancelled by a source-database user.

acceptedDateTime DateTime?

The date that the DeviceShare was accepted.

terminatedDateTime DateTime?

The date that the DeviceShare was terminated.

sourceDatabaseName string

The name of the source database for this DeviceShare.

targetDatabaseName string

The name of the target database for this DeviceShare.

shareStatus DeviceShareStatus?

The status of this DeviceShare.

shareType DeviceShareType?

The type of this DeviceShare.

devicePlan DevicePlan?

The rate plan for this DeviceShare.

devicePlanBillingInfo DevicePlanBillingInfo

The DevicePlanBillingInfo.

version long?

The version of this entity.

Properties

AcceptedDateTime

Gets or sets the date that the DeviceShare was accepted.

public DateTime? AcceptedDateTime { get; set; }

Property Value

DateTime?

DateTime

DateTime

Gets or sets the date time of when the DeviceShare was created.

public DateTime? DateTime { get; set; }

Property Value

DateTime?

DateTime

Device

Gets or sets the Device to populate Device created from DeviceShare.

public Device? Device { get; set; }

Property Value

Device

Device

DevicePlan

Gets or sets the DevicePlan for this DeviceShare.

[Obsolete("Obsolete. Please use DevicePlanBillingInfo property instead.", false)]
public DevicePlan? DevicePlan { get; set; }

Property Value

DevicePlan?

DevicePlan

DevicePlanBillingInfo

Gets or sets the DevicePlanBillingInfo of this DeviceShare.

public DevicePlanBillingInfo? DevicePlanBillingInfo { get; set; }

Property Value

DevicePlanBillingInfo

DevicePlanBillingInfo

LastUpdatedBy

Gets or sets the User that last updated this DeviceShare.

public User? LastUpdatedBy { get; set; }

Property Value

User

User

MyAdminId

Gets or sets the int id that MyAdmin associates with this DeviceShare.

public int? MyAdminId { get; set; }

Property Value

int?

int

Options

Gets or sets the DeviceShareOptions of this DeviceShare.

public DeviceShareOptions? Options { get; set; }

Property Value

DeviceShareOptions

DeviceShareOptions

SerialNumber

Gets or sets the string serial number of the device associated with this DeviceShare.

public string? SerialNumber { get; set; }

Property Value

string

string

ShareStatus

Gets or sets the DeviceShareStatus of this DeviceShare.

public DeviceShareStatus? ShareStatus { get; set; }

Property Value

DeviceShareStatus?

DeviceShareStatus

ShareType

Gets or sets the DeviceShareType of this DeviceShare.

public DeviceShareType? ShareType { get; set; }

Property Value

DeviceShareType?

DeviceShareType

SourceDatabaseGuid

Gets or sets Guid of the source database; internal use only.

public Guid? SourceDatabaseGuid { get; set; }

Property Value

Guid?

Guid

SourceDatabaseName

Gets or sets the name of the source database for this device share. This is the database that owns the device and is allowing the sharing to occur.

public string? SourceDatabaseName { get; set; }

Property Value

string

The string name of the source database.

TargetDatabaseGuid

Gets or sets Guid of the target database; internal use only.

public Guid? TargetDatabaseGuid { get; set; }

Property Value

Guid?

Guid

TargetDatabaseName

Gets or sets the name of the target database for this device share. This is the database that the device's data is being shared to, and does not own the device.

public string? TargetDatabaseName { get; set; }

Property Value

string

The string name of the target database.

TerminatedDateTime

Gets or sets the date that the DeviceShare was terminated.

public DateTime? TerminatedDateTime { get; set; }

Property Value

DateTime?

DateTime

UpdatedDateTime

Gets or sets the date time of when the DeviceShare status was updated. This is when the share request was accepted/rejected by a target-database user or cancelled by a source-database user.

public DateTime? UpdatedDateTime { get; set; }

Property Value

DateTime?

DeviceShare status updated 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.

IsInTerminalState()

Verifies if the share is in a terminal state.

public bool IsInTerminalState()

Returns

bool

true if it is, false otherwise.

IsValidNewTransientStatus()

Verifies if a status is a valid new transient status.

public bool IsValidNewTransientStatus()

Returns

bool

true if it is valid, false otherwise.

PopulateDefaults()

Populate fields with default values.

public DeviceShare PopulateDefaults()

Returns

DeviceShare

This DeviceShare instance.