updateFeed method
Implementation
Future<void> updateFeed({
required String projectId,
required String feedId,
required String name,
String description = '',
bool paused = false,
Map<String, String> annotations = const {},
Object? messageSchema,
}) async {
final encodedProjectId = Uri.encodeComponent(projectId);
final encodedFeedId = Uri.encodeComponent(feedId);
final uri = Uri.parse('$baseUrl/accounts/projects/$encodedProjectId/feeds/$encodedFeedId');
final body = {'name': name, 'description': description, 'paused': paused, 'annotations': annotations, 'message_schema': messageSchema};
final response = await httpClient.put(uri, body: jsonEncode(body));
if (response.statusCode >= 400) {
throw MeshagentException(
'Failed to update feed. '
'Status code: ${response.statusCode}, body: ${response.body}',
);
}
}