toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
  if (this.completionTokens != null) {
    json[r'completionTokens'] = this.completionTokens;
  } else {
    json[r'completionTokens'] = null;
  }
  if (this.costCents != null) {
    json[r'costCents'] = this.costCents;
  } else {
    json[r'costCents'] = null;
  }
  if (this.costPct != null) {
    json[r'costPct'] = this.costPct;
  } else {
    json[r'costPct'] = null;
  }
  if (this.errorRate != null) {
    json[r'errorRate'] = this.errorRate;
  } else {
    json[r'errorRate'] = null;
  }
  if (this.errors != null) {
    json[r'errors'] = this.errors;
  } else {
    json[r'errors'] = null;
  }
  if (this.model != null) {
    json[r'model'] = this.model;
  } else {
    json[r'model'] = null;
  }
  if (this.modelCount != null) {
    json[r'modelCount'] = this.modelCount;
  } else {
    json[r'modelCount'] = null;
  }
  if (this.p50Ms != null) {
    json[r'p50Ms'] = this.p50Ms;
  } else {
    json[r'p50Ms'] = null;
  }
  if (this.p95Ms != null) {
    json[r'p95Ms'] = this.p95Ms;
  } else {
    json[r'p95Ms'] = null;
  }
  if (this.p99Ms != null) {
    json[r'p99Ms'] = this.p99Ms;
  } else {
    json[r'p99Ms'] = null;
  }
  if (this.promptTokens != null) {
    json[r'promptTokens'] = this.promptTokens;
  } else {
    json[r'promptTokens'] = null;
  }
  if (this.provider != null) {
    json[r'provider'] = this.provider;
  } else {
    json[r'provider'] = null;
  }
  if (this.requests != null) {
    json[r'requests'] = this.requests;
  } else {
    json[r'requests'] = null;
  }
  if (this.totalTokens != null) {
    json[r'totalTokens'] = this.totalTokens;
  } else {
    json[r'totalTokens'] = null;
  }
  return json;
}