copyWith method

UserToolConfirmationEvent copyWith({
  1. String? id,
  2. String? toolUseId,
  3. UserToolConfirmationResult? result,
  4. Object? denyMessage = unsetCopyWithValue,
  5. Object? processedAt = unsetCopyWithValue,
})

Creates a copy with replaced values.

Implementation

UserToolConfirmationEvent copyWith({
  String? id,
  String? toolUseId,
  UserToolConfirmationResult? result,
  Object? denyMessage = unsetCopyWithValue,
  Object? processedAt = unsetCopyWithValue,
}) {
  return UserToolConfirmationEvent(
    id: id ?? this.id,
    toolUseId: toolUseId ?? this.toolUseId,
    result: result ?? this.result,
    denyMessage: denyMessage == unsetCopyWithValue
        ? this.denyMessage
        : denyMessage as String?,
    processedAt: processedAt == unsetCopyWithValue
        ? this.processedAt
        : processedAt as DateTime?,
  );
}