VirtualInterface.fromJson constructor

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

Implementation

factory VirtualInterface.fromJson(Map<String, dynamic> json) {
  return VirtualInterface(
    addressFamily: (json['addressFamily'] as String?)?.toAddressFamily(),
    amazonAddress: json['amazonAddress'] as String?,
    amazonSideAsn: json['amazonSideAsn'] as int?,
    asn: json['asn'] as int?,
    authKey: json['authKey'] as String?,
    awsDeviceV2: json['awsDeviceV2'] as String?,
    bgpPeers: (json['bgpPeers'] as List?)
        ?.whereNotNull()
        .map((e) => BGPPeer.fromJson(e as Map<String, dynamic>))
        .toList(),
    connectionId: json['connectionId'] as String?,
    customerAddress: json['customerAddress'] as String?,
    customerRouterConfig: json['customerRouterConfig'] as String?,
    directConnectGatewayId: json['directConnectGatewayId'] as String?,
    jumboFrameCapable: json['jumboFrameCapable'] as bool?,
    location: json['location'] as String?,
    mtu: json['mtu'] as int?,
    ownerAccount: json['ownerAccount'] as String?,
    region: json['region'] as String?,
    routeFilterPrefixes: (json['routeFilterPrefixes'] as List?)
        ?.whereNotNull()
        .map((e) => RouteFilterPrefix.fromJson(e as Map<String, dynamic>))
        .toList(),
    tags: (json['tags'] as List?)
        ?.whereNotNull()
        .map((e) => Tag.fromJson(e as Map<String, dynamic>))
        .toList(),
    virtualGatewayId: json['virtualGatewayId'] as String?,
    virtualInterfaceId: json['virtualInterfaceId'] as String?,
    virtualInterfaceName: json['virtualInterfaceName'] as String?,
    virtualInterfaceState:
        (json['virtualInterfaceState'] as String?)?.toVirtualInterfaceState(),
    virtualInterfaceType: json['virtualInterfaceType'] as String?,
    vlan: json['vlan'] as int?,
  );
}