patchNodeV1RuntimeClass method
Future<RuntimeClass>
patchNodeV1RuntimeClass({
- required RuntimeClass body,
- required String name,
- bool? pretty,
- PatchType patchType = PatchType.mergePatch,
Partially update the specified RuntimeClass.
name
Name of the RuntimeClass.
pretty
If true, then the output is pretty printed.
Implementation
Future<api_node_v1.RuntimeClass> patchNodeV1RuntimeClass({
required api_node_v1.RuntimeClass body,
required String name,
bool? pretty,
PatchType patchType = PatchType.mergePatch,
}) 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 _patchJsonMap(
'/apis/node.k8s.io/v1/runtimeclasses/$name$query', jsonBody, patchType);
return api_node_v1.RuntimeClass.fromJson(result);
}