toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  return {
    'server_label': serverLabel,
    'server_url': serverUrl,
    if (authorization != null) 'authorization': authorization,
    if (allowedTools != null) 'allowed_tools': allowedTools,
    if (headers != null) 'headers': headers,
    if (requireApproval != null) 'require_approval': requireApproval,
    if (alwaysRequireApproval != null) 'always_require_approval': alwaysRequireApproval,
    if (neverRequireApproval != null) 'never_require_approval': neverRequireApproval,
    if (openaiConnectorId != null) 'openai_connector_id': openaiConnectorId,
  };
}