BatchingSettingsProto.fromJson constructor

BatchingSettingsProto.fromJson(
  1. Object? j
)

Implementation

factory BatchingSettingsProto.fromJson(Object? j) {
  final json = j as Map<String, Object?>;
  return BatchingSettingsProto(
    elementCountThreshold: switch (json['elementCountThreshold']) {
      null => 0,
      Object $1 => decodeInt($1),
    },
    requestByteThreshold: switch (json['requestByteThreshold']) {
      null => 0,
      Object $1 => decodeInt64($1),
    },
    delayThreshold: switch (json['delayThreshold']) {
      null => null,
      Object $1 => Duration.fromJson($1),
    },
    elementCountLimit: switch (json['elementCountLimit']) {
      null => 0,
      Object $1 => decodeInt($1),
    },
    requestByteLimit: switch (json['requestByteLimit']) {
      null => 0,
      Object $1 => decodeInt($1),
    },
    flowControlElementLimit: switch (json['flowControlElementLimit']) {
      null => 0,
      Object $1 => decodeInt($1),
    },
    flowControlByteLimit: switch (json['flowControlByteLimit']) {
      null => 0,
      Object $1 => decodeInt($1),
    },
    flowControlLimitExceededBehavior:
        switch (json['flowControlLimitExceededBehavior']) {
          null => FlowControlLimitExceededBehaviorProto.$default,
          Object $1 => FlowControlLimitExceededBehaviorProto.fromJson($1),
        },
  );
}