CorsIssueDetails.fromJson constructor

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

Implementation

factory CorsIssueDetails.fromJson(Map<String, dynamic> json) {
  return CorsIssueDetails(
    corsErrorStatus: network.CorsErrorStatus.fromJson(
      json['corsErrorStatus'] as Map<String, dynamic>,
    ),
    isWarning: json['isWarning'] as bool? ?? false,
    request: AffectedRequest.fromJson(
      json['request'] as Map<String, dynamic>,
    ),
    location:
        json.containsKey('location')
            ? SourceCodeLocation.fromJson(
              json['location'] as Map<String, dynamic>,
            )
            : null,
    initiatorOrigin:
        json.containsKey('initiatorOrigin')
            ? json['initiatorOrigin'] as String
            : null,
    resourceIPAddressSpace:
        json.containsKey('resourceIPAddressSpace')
            ? network.IPAddressSpace.fromJson(
              json['resourceIPAddressSpace'] as String,
            )
            : null,
    clientSecurityState:
        json.containsKey('clientSecurityState')
            ? network.ClientSecurityState.fromJson(
              json['clientSecurityState'] as Map<String, dynamic>,
            )
            : null,
  );
}