copyWith method

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

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

Implementation

RealtimeSessionCreateResponse copyWith({
  String? id,
  String? object,
  String? type,
  Object? model = unsetCopyWithValue,
  Object? expiresAt = 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,
}) => RealtimeSessionCreateResponse(
  id: id ?? this.id,
  object: object ?? this.object,
  type: type ?? this.type,
  model: identical(model, unsetCopyWithValue) ? this.model : model as String?,
  expiresAt: identical(expiresAt, unsetCopyWithValue)
      ? this.expiresAt
      : expiresAt as int?,
  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>?,
);