LimitedPriorityLevelConfiguration.fromJson constructor

LimitedPriorityLevelConfiguration.fromJson(
  1. Map<String, dynamic> json
)

Creates a LimitedPriorityLevelConfiguration from JSON data.

Implementation

factory LimitedPriorityLevelConfiguration.fromJson(
    Map<String, dynamic> json) {
  final tempAssuredConcurrencySharesJson = json['assuredConcurrencyShares'];
  final tempBorrowingLimitPercentJson = json['borrowingLimitPercent'];
  final tempLendablePercentJson = json['lendablePercent'];
  final tempLimitResponseJson = json['limitResponse'];

  final int? tempAssuredConcurrencyShares = tempAssuredConcurrencySharesJson;
  final int? tempBorrowingLimitPercent = tempBorrowingLimitPercentJson;
  final int? tempLendablePercent = tempLendablePercentJson;
  final LimitResponse? tempLimitResponse = tempLimitResponseJson != null
      ? LimitResponse.fromJson(tempLimitResponseJson)
      : null;

  return LimitedPriorityLevelConfiguration(
    assuredConcurrencyShares: tempAssuredConcurrencyShares,
    borrowingLimitPercent: tempBorrowingLimitPercent,
    lendablePercent: tempLendablePercent,
    limitResponse: tempLimitResponse,
  );
}