Connection.fromJson constructor

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

Implementation

factory Connection.fromJson(Map<String, dynamic> json) {
  return Connection(
    awsDevice: json['awsDevice'] as String?,
    awsDeviceV2: json['awsDeviceV2'] as String?,
    bandwidth: json['bandwidth'] as String?,
    connectionId: json['connectionId'] as String?,
    connectionName: json['connectionName'] as String?,
    connectionState:
        (json['connectionState'] as String?)?.toConnectionState(),
    hasLogicalRedundancy:
        (json['hasLogicalRedundancy'] as String?)?.toHasLogicalRedundancy(),
    jumboFrameCapable: json['jumboFrameCapable'] as bool?,
    lagId: json['lagId'] as String?,
    loaIssueTime: timeStampFromJson(json['loaIssueTime']),
    location: json['location'] as String?,
    ownerAccount: json['ownerAccount'] as String?,
    partnerName: json['partnerName'] as String?,
    providerName: json['providerName'] as String?,
    region: json['region'] as String?,
    tags: (json['tags'] as List?)
        ?.whereNotNull()
        .map((e) => Tag.fromJson(e as Map<String, dynamic>))
        .toList(),
    vlan: json['vlan'] as int?,
  );
}