copyWithWrapped method

SafetyEvaluation copyWithWrapped({
  1. Wrapped<bool?>? isUnsafe,
  2. Wrapped<String?>? llmReason,
  3. Wrapped<int?>? safetyPromptVersion,
  4. Wrapped<List<SafetyRule>?>? matchedRuleId,
})

Implementation

SafetyEvaluation copyWithWrapped(
    {Wrapped<bool?>? isUnsafe,
    Wrapped<String?>? llmReason,
    Wrapped<int?>? safetyPromptVersion,
    Wrapped<List<enums.SafetyRule>?>? matchedRuleId}) {
  return SafetyEvaluation(
      isUnsafe: (isUnsafe != null ? isUnsafe.value : this.isUnsafe),
      llmReason: (llmReason != null ? llmReason.value : this.llmReason),
      safetyPromptVersion: (safetyPromptVersion != null
          ? safetyPromptVersion.value
          : this.safetyPromptVersion),
      matchedRuleId:
          (matchedRuleId != null ? matchedRuleId.value : this.matchedRuleId));
}