GrpcRetryPolicy.fromJson constructor
GrpcRetryPolicy.fromJson(
- Map<String, dynamic> json
)
Implementation
factory GrpcRetryPolicy.fromJson(Map<String, dynamic> json) {
return GrpcRetryPolicy(
maxRetries: json['maxRetries'] as int,
perRetryTimeout:
Duration.fromJson(json['perRetryTimeout'] as Map<String, dynamic>),
grpcRetryEvents: (json['grpcRetryEvents'] as List?)
?.whereNotNull()
.map((e) => (e as String).toGrpcRetryPolicyEvent())
.toList(),
httpRetryEvents: (json['httpRetryEvents'] as List?)
?.whereNotNull()
.map((e) => e as String)
.toList(),
tcpRetryEvents: (json['tcpRetryEvents'] as List?)
?.whereNotNull()
.map((e) => (e as String).toTcpRetryPolicyEvent())
.toList(),
);
}