copyWith method

RealtimeSessionCreateRequest copyWith({
  1. String? model,
  2. Object? type = unsetCopyWithValue,
  3. Object? audio = unsetCopyWithValue,
  4. Object? outputModalities = unsetCopyWithValue,
  5. Object? instructions = unsetCopyWithValue,
  6. Object? tools = unsetCopyWithValue,
  7. Object? toolChoice = unsetCopyWithValue,
  8. Object? maxOutputTokens = unsetCopyWithValue,
  9. Object? parallelToolCalls = unsetCopyWithValue,
  10. Object? reasoning = unsetCopyWithValue,
  11. Object? tracing = unsetCopyWithValue,
  12. Object? truncation = unsetCopyWithValue,
  13. Object? include = unsetCopyWithValue,
})

Returns a copy of this RealtimeSessionCreateRequest with the given fields replaced. Pass null for any nullable field to clear the existing value.

Implementation

RealtimeSessionCreateRequest copyWith({
  String? model,
  Object? type = unsetCopyWithValue,
  Object? audio = unsetCopyWithValue,
  Object? outputModalities = unsetCopyWithValue,
  Object? instructions = unsetCopyWithValue,
  Object? tools = unsetCopyWithValue,
  Object? toolChoice = unsetCopyWithValue,
  Object? maxOutputTokens = unsetCopyWithValue,
  Object? parallelToolCalls = unsetCopyWithValue,
  Object? reasoning = unsetCopyWithValue,
  Object? tracing = unsetCopyWithValue,
  Object? truncation = unsetCopyWithValue,
  Object? include = unsetCopyWithValue,
}) => RealtimeSessionCreateRequest(
  model: model ?? this.model,
  type: identical(type, unsetCopyWithValue) ? this.type : type as String?,
  audio: identical(audio, unsetCopyWithValue)
      ? this.audio
      : audio as RealtimeAudioConfig?,
  outputModalities: identical(outputModalities, unsetCopyWithValue)
      ? this.outputModalities
      : outputModalities as List<String>?,
  instructions: identical(instructions, unsetCopyWithValue)
      ? this.instructions
      : instructions as String?,
  tools: identical(tools, unsetCopyWithValue)
      ? this.tools
      : tools as List<RealtimeTool>?,
  toolChoice: identical(toolChoice, unsetCopyWithValue)
      ? this.toolChoice
      : toolChoice as RealtimeToolChoice?,
  maxOutputTokens: identical(maxOutputTokens, unsetCopyWithValue)
      ? this.maxOutputTokens
      : maxOutputTokens as InfOrInt?,
  parallelToolCalls: identical(parallelToolCalls, unsetCopyWithValue)
      ? this.parallelToolCalls
      : parallelToolCalls as bool?,
  reasoning: identical(reasoning, unsetCopyWithValue)
      ? this.reasoning
      : reasoning as RealtimeReasoning?,
  tracing: identical(tracing, unsetCopyWithValue)
      ? this.tracing
      : tracing as RealtimeTracingConfig?,
  truncation: identical(truncation, unsetCopyWithValue)
      ? this.truncation
      : truncation as RealtimeTruncation?,
  include: identical(include, unsetCopyWithValue)
      ? this.include
      : include as List<String>?,
);