Session.fromJson constructor
Session.fromJson(
- Map<String, dynamic> json
)
Implementation
factory Session.fromJson(Map<String, dynamic> json) {
return Session(
fleetName: json['FleetName'] as String,
id: json['Id'] as String,
stackName: json['StackName'] as String,
state: (json['State'] as String).toSessionState(),
userId: json['UserId'] as String,
authenticationType:
(json['AuthenticationType'] as String?)?.toAuthenticationType(),
connectionState:
(json['ConnectionState'] as String?)?.toSessionConnectionState(),
maxExpirationTime: timeStampFromJson(json['MaxExpirationTime']),
networkAccessConfiguration: json['NetworkAccessConfiguration'] != null
? NetworkAccessConfiguration.fromJson(
json['NetworkAccessConfiguration'] as Map<String, dynamic>)
: null,
startTime: timeStampFromJson(json['StartTime']),
);
}