BackendService.fromJson constructor

BackendService.fromJson(
  1. Map json_
)

Implementation

BackendService.fromJson(core.Map json_)
    : this(
        affinityCookieTtlSec: json_.containsKey('affinityCookieTtlSec')
            ? json_['affinityCookieTtlSec'] as core.int
            : null,
        backends: json_.containsKey('backends')
            ? (json_['backends'] as core.List)
                .map((value) => Backend.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        cdnPolicy: json_.containsKey('cdnPolicy')
            ? BackendServiceCdnPolicy.fromJson(
                json_['cdnPolicy'] as core.Map<core.String, core.dynamic>)
            : null,
        circuitBreakers: json_.containsKey('circuitBreakers')
            ? CircuitBreakers.fromJson(json_['circuitBreakers']
                as core.Map<core.String, core.dynamic>)
            : null,
        compressionMode: json_.containsKey('compressionMode')
            ? json_['compressionMode'] as core.String
            : null,
        connectionDraining: json_.containsKey('connectionDraining')
            ? ConnectionDraining.fromJson(json_['connectionDraining']
                as core.Map<core.String, core.dynamic>)
            : null,
        connectionTrackingPolicy:
            json_.containsKey('connectionTrackingPolicy')
                ? BackendServiceConnectionTrackingPolicy.fromJson(
                    json_['connectionTrackingPolicy']
                        as core.Map<core.String, core.dynamic>)
                : null,
        consistentHash: json_.containsKey('consistentHash')
            ? ConsistentHashLoadBalancerSettings.fromJson(
                json_['consistentHash']
                    as core.Map<core.String, core.dynamic>)
            : null,
        creationTimestamp: json_.containsKey('creationTimestamp')
            ? json_['creationTimestamp'] as core.String
            : null,
        customRequestHeaders: json_.containsKey('customRequestHeaders')
            ? (json_['customRequestHeaders'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        customResponseHeaders: json_.containsKey('customResponseHeaders')
            ? (json_['customResponseHeaders'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        description: json_.containsKey('description')
            ? json_['description'] as core.String
            : null,
        edgeSecurityPolicy: json_.containsKey('edgeSecurityPolicy')
            ? json_['edgeSecurityPolicy'] as core.String
            : null,
        enableCDN: json_.containsKey('enableCDN')
            ? json_['enableCDN'] as core.bool
            : null,
        failoverPolicy: json_.containsKey('failoverPolicy')
            ? BackendServiceFailoverPolicy.fromJson(json_['failoverPolicy']
                as core.Map<core.String, core.dynamic>)
            : null,
        fingerprint: json_.containsKey('fingerprint')
            ? json_['fingerprint'] as core.String
            : null,
        healthChecks: json_.containsKey('healthChecks')
            ? (json_['healthChecks'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        iap: json_.containsKey('iap')
            ? BackendServiceIAP.fromJson(
                json_['iap'] as core.Map<core.String, core.dynamic>)
            : null,
        id: json_.containsKey('id') ? json_['id'] as core.String : null,
        kind: json_.containsKey('kind') ? json_['kind'] as core.String : null,
        loadBalancingScheme: json_.containsKey('loadBalancingScheme')
            ? json_['loadBalancingScheme'] as core.String
            : null,
        localityLbPolicies: json_.containsKey('localityLbPolicies')
            ? (json_['localityLbPolicies'] as core.List)
                .map((value) =>
                    BackendServiceLocalityLoadBalancingPolicyConfig.fromJson(
                        value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        localityLbPolicy: json_.containsKey('localityLbPolicy')
            ? json_['localityLbPolicy'] as core.String
            : null,
        logConfig: json_.containsKey('logConfig')
            ? BackendServiceLogConfig.fromJson(
                json_['logConfig'] as core.Map<core.String, core.dynamic>)
            : null,
        maxStreamDuration: json_.containsKey('maxStreamDuration')
            ? Duration.fromJson(json_['maxStreamDuration']
                as core.Map<core.String, core.dynamic>)
            : null,
        metadatas: json_.containsKey('metadatas')
            ? (json_['metadatas'] as core.Map<core.String, core.dynamic>).map(
                (key, value) => core.MapEntry(
                  key,
                  value as core.String,
                ),
              )
            : null,
        name: json_.containsKey('name') ? json_['name'] as core.String : null,
        network: json_.containsKey('network')
            ? json_['network'] as core.String
            : null,
        outlierDetection: json_.containsKey('outlierDetection')
            ? OutlierDetection.fromJson(json_['outlierDetection']
                as core.Map<core.String, core.dynamic>)
            : null,
        port: json_.containsKey('port') ? json_['port'] as core.int : null,
        portName: json_.containsKey('portName')
            ? json_['portName'] as core.String
            : null,
        protocol: json_.containsKey('protocol')
            ? json_['protocol'] as core.String
            : null,
        region: json_.containsKey('region')
            ? json_['region'] as core.String
            : null,
        securityPolicy: json_.containsKey('securityPolicy')
            ? json_['securityPolicy'] as core.String
            : null,
        securitySettings: json_.containsKey('securitySettings')
            ? SecuritySettings.fromJson(json_['securitySettings']
                as core.Map<core.String, core.dynamic>)
            : null,
        selfLink: json_.containsKey('selfLink')
            ? json_['selfLink'] as core.String
            : null,
        serviceBindings: json_.containsKey('serviceBindings')
            ? (json_['serviceBindings'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        serviceLbPolicy: json_.containsKey('serviceLbPolicy')
            ? json_['serviceLbPolicy'] as core.String
            : null,
        sessionAffinity: json_.containsKey('sessionAffinity')
            ? json_['sessionAffinity'] as core.String
            : null,
        subsetting: json_.containsKey('subsetting')
            ? Subsetting.fromJson(
                json_['subsetting'] as core.Map<core.String, core.dynamic>)
            : null,
        timeoutSec: json_.containsKey('timeoutSec')
            ? json_['timeoutSec'] as core.int
            : null,
        usedBy: json_.containsKey('usedBy')
            ? (json_['usedBy'] as core.List)
                .map((value) => BackendServiceUsedBy.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
      );