toMap method

Map<String, dynamic> toMap()

Implementation

Map<String, dynamic> toMap() => {
  'hash': hash,
  if (name != null) 'name': name,
  if (label != null) 'label': label,
  if (creatorUserId != null) 'creator_user_id': creatorUserId,
  if (createdAt != null) 'created_at': _toUtcIso8601(createdAt!),
  if (updatedAt != null) 'updated_at': _toUtcIso8601(updatedAt!),
  if (expiresAt != null) 'expires_at': _toUtcIso8601(expiresAt!),
  'disabled': disabled,
  if (includeByokInLimit != null) 'include_byok_in_limit': includeByokInLimit,
  if (limit != null) 'limit': limit,
  if (limitRemaining != null) 'limit_remaining': limitRemaining,
  if (limitReset != null) 'limit_reset': limitReset!.wireValue,
  if (usage != null) 'usage': usage,
  if (usageDaily != null) 'usage_daily': usageDaily,
  if (usageWeekly != null) 'usage_weekly': usageWeekly,
  if (usageMonthly != null) 'usage_monthly': usageMonthly,
  if (byokUsage != null) 'byok_usage': byokUsage,
  if (byokUsageDaily != null) 'byok_usage_daily': byokUsageDaily,
  if (byokUsageWeekly != null) 'byok_usage_weekly': byokUsageWeekly,
  if (byokUsageMonthly != null) 'byok_usage_monthly': byokUsageMonthly,
};