LeaseSpec.fromJson constructor
Creates a LeaseSpec from JSON data.
Implementation
factory LeaseSpec.fromJson(Map<String, dynamic> json) {
final tempAcquireTimeJson = json['acquireTime'];
final tempHolderIdentityJson = json['holderIdentity'];
final tempLeaseDurationSecondsJson = json['leaseDurationSeconds'];
final tempLeaseTransitionsJson = json['leaseTransitions'];
final tempRenewTimeJson = json['renewTime'];
final String? tempAcquireTime = tempAcquireTimeJson;
final String? tempHolderIdentity = tempHolderIdentityJson;
final int? tempLeaseDurationSeconds = tempLeaseDurationSecondsJson;
final int? tempLeaseTransitions = tempLeaseTransitionsJson;
final String? tempRenewTime = tempRenewTimeJson;
return LeaseSpec(
acquireTime: tempAcquireTime,
holderIdentity: tempHolderIdentity,
leaseDurationSeconds: tempLeaseDurationSeconds,
leaseTransitions: tempLeaseTransitions,
renewTime: tempRenewTime,
);
}