replaceCoreV1Node method
Replace the specified Node.
name
Name of the Node.
pretty
If true, then the output is pretty printed.
Implementation
Future<api_core_v1.Node> replaceCoreV1Node({
required api_core_v1.Node body,
required String name,
bool? pretty,
}) async {
final queryStrings = <String, Object>{};
if (pretty != null) {
queryStrings['pretty'] = pretty;
}
final query =
queryStrings.isEmpty ? '' : '?${_joinQueryStrings(queryStrings)}';
final jsonBody = jsonEncode(body.toJson());
final result = await _putJsonMap('/api/v1/nodes/$name$query', jsonBody);
return api_core_v1.Node.fromJson(result);
}