copyWith method
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,
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>?,
);