copyWith method
ListResourcesResult
copyWith({
- ResultMetaObject? meta,
- String? nextCursor,
- List<
Resource> ? resources, - ListResourcesResultCacheScope? cacheScope,
- String? resultType,
- int? ttlMs,
A copy with the given properties replaced; everything else, unknown keys included, is kept.
Implementation
ListResourcesResult copyWith({
ResultMetaObject? meta,
String? nextCursor,
List<Resource>? resources,
ListResourcesResultCacheScope? cacheScope,
String? resultType,
int? ttlMs,
}) =>
ListResourcesResult.fromJson({
...toJson(),
if (meta != null) '_meta': $encode(meta),
if (nextCursor != null) 'nextCursor': $encode(nextCursor),
if (resources != null) 'resources': $encode(resources),
if (cacheScope != null) 'cacheScope': $encode(cacheScope),
if (resultType != null) 'resultType': $encode(resultType),
if (ttlMs != null) 'ttlMs': $encode(ttlMs),
});