LicenseAttributes class

Constructors

LicenseAttributes({String? name, required String key, DateTime? expiry, required LicenseAttributesStatusEnum status, required int uses, required bool protected, String? version, required bool suspended, required bool floating, LicenseAttributesSchemeEnum? scheme, required bool strict, required int? maxMachines, int? maxProcesses, int? maxCores, int? maxUses, required bool requireHeartbeat, required bool requireCheckIn, DateTime? lastValidated, DateTime? lastCheckOut, DateTime? lastCheckIn, DateTime? nextCheckIn, Map<String, Object> metadata = const {}, required DateTime created, required DateTime updated})
Returns a new LicenseAttributes instance.

Properties

created DateTime
When the license was created.
getter/setter pair
expiry DateTime?
When the license will expire. Calculated from the license's policy, i.e. time.now + policy.duration, at the time of creation and/or renewal.
getter/setter pair
floating bool
Whether or not the license is floating. This is inherited from the policy.
getter/setter pair
hashCode int
The hash code for this object.
no setteroverride
key String
A unique pre-determined key for the license. License keys are immutable values. Cannot be used on legacy encrypted licenses. This attribute will be automatically generated or popped from the remaining pool if left blank and the chosen scheme supports auto-generated keys. Depending on the policy's cryptographic scheme (if any), the key attribute may be required for a 'seed' dataset to embed into the final key, and the key may have other requirements that must be met regarding dataset length and formatting. The key and its signature may be base64url encoded, depending on the chosen scheme.
getter/setter pair
lastCheckIn DateTime?
When the license was last checked-in. This is null if the policy does not require check-ins.
getter/setter pair
lastCheckOut DateTime?
When the license was last checked-out.
getter/setter pair
lastValidated DateTime?
When the license was last validated.
getter/setter pair
maxCores int?
The maximum number of machine CPU cores the license can have associated with it. The count is the sum of all cores for the license's machines. This is by default inherited from the policy, but can be overridden on a per-license basis.
getter/setter pair
maxMachines int?
The maximum number of machines the license can have associated with it. This is by default inherited from the policy, but can be overridden on a per-license basis.
getter/setter pair
maxProcesses int?
The maximum number of machine processes the license can have associated with it. This is by default inherited from the policy, but can be overridden on a per-license basis.
getter/setter pair
maxUses int?
The maximum number of uses the license is allowed to have. This is by default inherited from the policy, but can be overridden on a per-license basis.
getter/setter pair
metadata Map<String, Object>
Object containing license metadata.
getter/setter pair
name String?
The name of the license. This can be used to distinguish licenses from each other.
getter/setter pair
nextCheckIn DateTime?
The time at which the license is required to check-in by. This is null if the policy does not require check-ins.
getter/setter pair
protected bool
The license's last validated release version.
getter/setter pair
requireCheckIn bool
Whether or not the license will require check-in at a predefined interval to continue to pass validation i.e. if a license misses a check-in, it will be invalidated. This is inherited from the policy.
getter/setter pair
requireHeartbeat bool
Whether or not machines require heartbeat pings. This is inherited from the policy.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scheme LicenseAttributesSchemeEnum?
The cryptographic encryption/signature scheme used on the license's key. Can be used to implement offline licensing by securely storing arbitrary data within a license's key.
getter/setter pair
status LicenseAttributesStatusEnum
The license's status, for filtering purposes and to ascertain overall status at-a-glance. An active license is a license that has been created, validated, checked out, or checked in within the last 90 days. An expiring license is a license that is expiring within the next 3 days. One of: ACTIVE, INACTIVE, EXPIRING, EXPIRED, SUSPENDED, or BANNED.
getter/setter pair
strict bool
Whether or not the policy is strict. This is inherited from the policy.
getter/setter pair
suspended bool
Whether or not the license is suspended. A suspended license will always fail validation.
getter/setter pair
updated DateTime
When the license was last updated.
getter/setter pair
uses int
The license's current usage count. This can be incremented, decremented, or reset using the license's usage-related actions. Cannot exceed 2,147,483,647, which is the maximum value of a 4 byte integer.
getter/setter pair
version String?
The version of the license. This is useful for versioning your licenses, e.g. for a beta program. This attribute is not taken into account during license validation. See the license's usage-related actions for more details.
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override

Static Methods

fromJson(dynamic value) LicenseAttributes?
Returns a new LicenseAttributes instance and imports its values from value if it's a Map, null otherwise.
listFromJson(dynamic json, {bool growable = false}) List<LicenseAttributes>
mapFromJson(dynamic json) Map<String, LicenseAttributes>
mapListFromJson(dynamic json, {bool growable = false}) Map<String, List<LicenseAttributes>>

Constants

requiredKeys → const Set<String>
The list of required keys that must be present in a JSON.