DirectConnectGatewayAssociation.fromJson constructor

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

Implementation

factory DirectConnectGatewayAssociation.fromJson(Map<String, dynamic> json) {
  return DirectConnectGatewayAssociation(
    allowedPrefixesToDirectConnectGateway:
        (json['allowedPrefixesToDirectConnectGateway'] as List?)
            ?.whereNotNull()
            .map((e) => RouteFilterPrefix.fromJson(e as Map<String, dynamic>))
            .toList(),
    associatedGateway: json['associatedGateway'] != null
        ? AssociatedGateway.fromJson(
            json['associatedGateway'] as Map<String, dynamic>)
        : null,
    associationId: json['associationId'] as String?,
    associationState: (json['associationState'] as String?)
        ?.toDirectConnectGatewayAssociationState(),
    directConnectGatewayId: json['directConnectGatewayId'] as String?,
    directConnectGatewayOwnerAccount:
        json['directConnectGatewayOwnerAccount'] as String?,
    stateChangeError: json['stateChangeError'] as String?,
    virtualGatewayId: json['virtualGatewayId'] as String?,
    virtualGatewayOwnerAccount: json['virtualGatewayOwnerAccount'] as String?,
    virtualGatewayRegion: json['virtualGatewayRegion'] as String?,
  );
}