toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
  if (this.actor != null) {
    json[r'actor'] = this.actor;
  } else {
    json[r'actor'] = null;
  }
  if (this.agent != null) {
    json[r'agent'] = this.agent;
  } else {
    json[r'agent'] = null;
  }
  if (this.completionTokens != null) {
    json[r'completionTokens'] = this.completionTokens;
  } else {
    json[r'completionTokens'] = null;
  }
  if (this.createdAt != null) {
    json[r'createdAt'] = this.createdAt;
  } else {
    json[r'createdAt'] = null;
  }
  if (this.durationMs != null) {
    json[r'durationMs'] = this.durationMs;
  } else {
    json[r'durationMs'] = null;
  }
  if (this.error != null) {
    json[r'error'] = this.error;
  } else {
    json[r'error'] = null;
  }
  if (this.id != null) {
    json[r'id'] = this.id;
  } else {
    json[r'id'] = null;
  }
  if (this.input != null) {
    json[r'input'] = this.input;
  } else {
    json[r'input'] = null;
  }
  if (this.model != null) {
    json[r'model'] = this.model;
  } else {
    json[r'model'] = null;
  }
  if (this.output != null) {
    json[r'output'] = this.output;
  } else {
    json[r'output'] = null;
  }
  if (this.promptTokens != null) {
    json[r'promptTokens'] = this.promptTokens;
  } else {
    json[r'promptTokens'] = null;
  }
  if (this.status != null) {
    json[r'status'] = this.status;
  } else {
    json[r'status'] = null;
  }
  if (this.toolCalls != null) {
    json[r'toolCalls'] = this.toolCalls;
  } else {
    json[r'toolCalls'] = null;
  }
  if (this.traceId != null) {
    json[r'traceId'] = this.traceId;
  } else {
    json[r'traceId'] = null;
  }
  return json;
}