HttpRouteAction.fromJson constructor

HttpRouteAction.fromJson(
  1. Map json_
)

Implementation

HttpRouteAction.fromJson(core.Map json_)
    : this(
        corsPolicy: json_.containsKey('corsPolicy')
            ? CorsPolicy.fromJson(
                json_['corsPolicy'] as core.Map<core.String, core.dynamic>)
            : null,
        faultInjectionPolicy: json_.containsKey('faultInjectionPolicy')
            ? HttpFaultInjection.fromJson(json_['faultInjectionPolicy']
                as core.Map<core.String, core.dynamic>)
            : null,
        maxStreamDuration: json_.containsKey('maxStreamDuration')
            ? Duration.fromJson(json_['maxStreamDuration']
                as core.Map<core.String, core.dynamic>)
            : null,
        requestMirrorPolicy: json_.containsKey('requestMirrorPolicy')
            ? RequestMirrorPolicy.fromJson(json_['requestMirrorPolicy']
                as core.Map<core.String, core.dynamic>)
            : null,
        retryPolicy: json_.containsKey('retryPolicy')
            ? HttpRetryPolicy.fromJson(
                json_['retryPolicy'] as core.Map<core.String, core.dynamic>)
            : null,
        timeout: json_.containsKey('timeout')
            ? Duration.fromJson(
                json_['timeout'] as core.Map<core.String, core.dynamic>)
            : null,
        urlRewrite: json_.containsKey('urlRewrite')
            ? UrlRewrite.fromJson(
                json_['urlRewrite'] as core.Map<core.String, core.dynamic>)
            : null,
        weightedBackendServices: json_.containsKey('weightedBackendServices')
            ? (json_['weightedBackendServices'] as core.List)
                .map((value) => WeightedBackendService.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
      );