toJson method
Implementation
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'kind'] = this.kind;
if (this.token != null) {
json[r'token'] = this.token;
} else {
json[r'token'] = null;
}
if (this.name != null) {
json[r'name'] = this.name;
} else {
json[r'name'] = null;
}
if (this.expiry != null) {
json[r'expiry'] = this.expiry!.toUtc().toIso8601String();
} else {
json[r'expiry'] = null;
}
if (this.maxActivations != null) {
json[r'maxActivations'] = this.maxActivations;
} else {
json[r'maxActivations'] = null;
}
if (this.activations != null) {
json[r'activations'] = this.activations;
} else {
json[r'activations'] = null;
}
if (this.maxDeactivations != null) {
json[r'maxDeactivations'] = this.maxDeactivations;
} else {
json[r'maxDeactivations'] = null;
}
if (this.deactivations != null) {
json[r'deactivations'] = this.deactivations;
} else {
json[r'deactivations'] = null;
}
json[r'created'] = this.created.toUtc().toIso8601String();
json[r'updated'] = this.updated.toUtc().toIso8601String();
return json;
}