copyWith method
A copy with the given properties replaced; everything else, unknown keys included, is kept.
Implementation
ToolAnnotations copyWith({
bool? destructiveHint,
bool? idempotentHint,
bool? openWorldHint,
bool? readOnlyHint,
String? title,
}) =>
ToolAnnotations.fromJson({
...toJson(),
if (destructiveHint != null) 'destructiveHint': $encode(destructiveHint),
if (idempotentHint != null) 'idempotentHint': $encode(idempotentHint),
if (openWorldHint != null) 'openWorldHint': $encode(openWorldHint),
if (readOnlyHint != null) 'readOnlyHint': $encode(readOnlyHint),
if (title != null) 'title': $encode(title),
});