Class TimeSpanDetails
- Namespace
- CivitaiSharp.Sdk.Models.Results
- Assembly
- CivitaiSharp.Sdk.dll
A JSON representation of a .NET TimeSpan returned by the Civitai API.
public sealed record TimeSpanDetails : IEquatable<TimeSpanDetails>
- Inheritance
-
TimeSpanDetails
- Implements
- Inherited Members
Remarks
The API returns a structured object (ticks plus derived components), not the ISO-8601 duration string. This avoids ambiguity and is easy to consume in many languages.
Constructors
TimeSpanDetails(long?, int?, int?, int?, int?, int?, int?, int?, double?, double?, double?, double?, double?, double?, double?)
A JSON representation of a .NET TimeSpan returned by the Civitai API.
public TimeSpanDetails(long? Ticks, int? Days, int? Hours, int? Milliseconds, int? Microseconds, int? Nanoseconds, int? Minutes, int? Seconds, double? TotalDays, double? TotalHours, double? TotalMilliseconds, double? TotalMicroseconds, double? TotalNanoseconds, double? TotalMinutes, double? TotalSeconds)
Parameters
Tickslong?Daysint?Hoursint?Millisecondsint?Microsecondsint?Nanosecondsint?Minutesint?Secondsint?TotalDaysdouble?TotalHoursdouble?TotalMillisecondsdouble?TotalMicrosecondsdouble?TotalNanosecondsdouble?TotalMinutesdouble?TotalSecondsdouble?
Remarks
The API returns a structured object (ticks plus derived components), not the ISO-8601 duration string. This avoids ambiguity and is easy to consume in many languages.
Properties
Days
[JsonPropertyName("days")]
public int? Days { get; init; }
Property Value
- int?
Hours
[JsonPropertyName("hours")]
public int? Hours { get; init; }
Property Value
- int?
Microseconds
[JsonPropertyName("microseconds")]
public int? Microseconds { get; init; }
Property Value
- int?
Milliseconds
[JsonPropertyName("milliseconds")]
public int? Milliseconds { get; init; }
Property Value
- int?
Minutes
[JsonPropertyName("minutes")]
public int? Minutes { get; init; }
Property Value
- int?
Nanoseconds
[JsonPropertyName("nanoseconds")]
public int? Nanoseconds { get; init; }
Property Value
- int?
Seconds
[JsonPropertyName("seconds")]
public int? Seconds { get; init; }
Property Value
- int?
Ticks
[JsonPropertyName("ticks")]
public long? Ticks { get; init; }
Property Value
- long?
TotalDays
[JsonPropertyName("totalDays")]
public double? TotalDays { get; init; }
Property Value
TotalHours
[JsonPropertyName("totalHours")]
public double? TotalHours { get; init; }
Property Value
TotalMicroseconds
[JsonPropertyName("totalMicroseconds")]
public double? TotalMicroseconds { get; init; }
Property Value
TotalMilliseconds
[JsonPropertyName("totalMilliseconds")]
public double? TotalMilliseconds { get; init; }
Property Value
TotalMinutes
[JsonPropertyName("totalMinutes")]
public double? TotalMinutes { get; init; }
Property Value
TotalNanoseconds
[JsonPropertyName("totalNanoseconds")]
public double? TotalNanoseconds { get; init; }
Property Value
TotalSeconds
[JsonPropertyName("totalSeconds")]
public double? TotalSeconds { get; init; }