toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final maxRetries = this.maxRetries;
  final perRetryTimeout = this.perRetryTimeout;
  final grpcRetryEvents = this.grpcRetryEvents;
  final httpRetryEvents = this.httpRetryEvents;
  final tcpRetryEvents = this.tcpRetryEvents;
  return {
    'maxRetries': maxRetries,
    'perRetryTimeout': perRetryTimeout,
    if (grpcRetryEvents != null)
      'grpcRetryEvents': grpcRetryEvents.map((e) => e.toValue()).toList(),
    if (httpRetryEvents != null) 'httpRetryEvents': httpRetryEvents,
    if (tcpRetryEvents != null)
      'tcpRetryEvents': tcpRetryEvents.map((e) => e.toValue()).toList(),
  };
}