RouterNat.fromJson constructor

RouterNat.fromJson(
  1. Map json_
)

Implementation

RouterNat.fromJson(core.Map json_)
    : this(
        autoNetworkTier: json_.containsKey('autoNetworkTier')
            ? json_['autoNetworkTier'] as core.String
            : null,
        drainNatIps: json_.containsKey('drainNatIps')
            ? (json_['drainNatIps'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        enableDynamicPortAllocation:
            json_.containsKey('enableDynamicPortAllocation')
                ? json_['enableDynamicPortAllocation'] as core.bool
                : null,
        enableEndpointIndependentMapping:
            json_.containsKey('enableEndpointIndependentMapping')
                ? json_['enableEndpointIndependentMapping'] as core.bool
                : null,
        endpointTypes: json_.containsKey('endpointTypes')
            ? (json_['endpointTypes'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        icmpIdleTimeoutSec: json_.containsKey('icmpIdleTimeoutSec')
            ? json_['icmpIdleTimeoutSec'] as core.int
            : null,
        logConfig: json_.containsKey('logConfig')
            ? RouterNatLogConfig.fromJson(
                json_['logConfig'] as core.Map<core.String, core.dynamic>)
            : null,
        maxPortsPerVm: json_.containsKey('maxPortsPerVm')
            ? json_['maxPortsPerVm'] as core.int
            : null,
        minPortsPerVm: json_.containsKey('minPortsPerVm')
            ? json_['minPortsPerVm'] as core.int
            : null,
        name: json_.containsKey('name') ? json_['name'] as core.String : null,
        natIpAllocateOption: json_.containsKey('natIpAllocateOption')
            ? json_['natIpAllocateOption'] as core.String
            : null,
        natIps: json_.containsKey('natIps')
            ? (json_['natIps'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        rules: json_.containsKey('rules')
            ? (json_['rules'] as core.List)
                .map((value) => RouterNatRule.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        sourceSubnetworkIpRangesToNat:
            json_.containsKey('sourceSubnetworkIpRangesToNat')
                ? json_['sourceSubnetworkIpRangesToNat'] as core.String
                : null,
        subnetworks: json_.containsKey('subnetworks')
            ? (json_['subnetworks'] as core.List)
                .map((value) => RouterNatSubnetworkToNat.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        tcpEstablishedIdleTimeoutSec:
            json_.containsKey('tcpEstablishedIdleTimeoutSec')
                ? json_['tcpEstablishedIdleTimeoutSec'] as core.int
                : null,
        tcpTimeWaitTimeoutSec: json_.containsKey('tcpTimeWaitTimeoutSec')
            ? json_['tcpTimeWaitTimeoutSec'] as core.int
            : null,
        tcpTransitoryIdleTimeoutSec:
            json_.containsKey('tcpTransitoryIdleTimeoutSec')
                ? json_['tcpTransitoryIdleTimeoutSec'] as core.int
                : null,
        type: json_.containsKey('type') ? json_['type'] as core.String : null,
        udpIdleTimeoutSec: json_.containsKey('udpIdleTimeoutSec')
            ? json_['udpIdleTimeoutSec'] as core.int
            : null,
      );