fromJson static method

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

Switch-based factory that dispatches to the correct subclass.

Implementation

static ResponseWebSearchCallCompleted fromJson(Map<String, dynamic> json) {
  switch (json['type']) {
    case 'response.web_search_call.completed':
      return ResponseWebSearchCallCompleted(json);
    default:
      throw ArgumentError(
        'Unknown web-search event type "${json['type']}".',
      );
  }
}