SamplingRule.fromJson constructor

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

Implementation

factory SamplingRule.fromJson(Map<String, dynamic> json) {
  return SamplingRule(
    fixedRate: json['FixedRate'] as double,
    hTTPMethod: json['HTTPMethod'] as String,
    host: json['Host'] as String,
    priority: json['Priority'] as int,
    reservoirSize: json['ReservoirSize'] as int,
    resourceARN: json['ResourceARN'] as String,
    serviceName: json['ServiceName'] as String,
    serviceType: json['ServiceType'] as String,
    uRLPath: json['URLPath'] as String,
    version: json['Version'] as int,
    attributes: (json['Attributes'] as Map<String, dynamic>?)
        ?.map((k, e) => MapEntry(k, e as String)),
    ruleARN: json['RuleARN'] as String?,
    ruleName: json['RuleName'] as String?,
  );
}