SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigThresholdConfig.fromJson constructor
SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigThresholdConfig.fromJson(
- Object? j
Implementation
factory SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigThresholdConfig.fromJson(
Object? j,
) {
final json = j as Map<String, Object?>;
return SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigThresholdConfig(
autoDeployConfidenceThreshold:
switch (json['autoDeployConfidenceThreshold']) {
null => null,
Object $1 => decodeDouble($1),
},
autoDeployExpirationSec: switch (json['autoDeployExpirationSec']) {
null => null,
Object $1 => decodeInt($1),
},
autoDeployImpactedBaselineThreshold:
switch (json['autoDeployImpactedBaselineThreshold']) {
null => null,
Object $1 => decodeDouble($1),
},
autoDeployLoadThreshold: switch (json['autoDeployLoadThreshold']) {
null => null,
Object $1 => decodeDouble($1),
},
detectionAbsoluteQps: switch (json['detectionAbsoluteQps']) {
null => null,
Object $1 => decodeDouble($1),
},
detectionLoadThreshold: switch (json['detectionLoadThreshold']) {
null => null,
Object $1 => decodeDouble($1),
},
detectionRelativeToBaselineQps:
switch (json['detectionRelativeToBaselineQps']) {
null => null,
Object $1 => decodeDouble($1),
},
name: switch (json['name']) {
null => null,
Object $1 => decodeString($1),
},
trafficGranularityConfigs: switch (json['trafficGranularityConfigs']) {
null => [],
List<Object?> $1 => [
for (final i in $1)
SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfigThresholdConfigTrafficGranularityConfig.fromJson(
i,
),
],
_ => throw const FormatException(
'"trafficGranularityConfigs" is not a list',
),
},
);
}