Class JobEvent
- Namespace
- CivitaiSharp.Sdk.Models.Results
- Assembly
- CivitaiSharp.Sdk.dll
Represents a single event in the lifecycle of a job. Check the Type property to determine job outcome (Succeeded, Failed, etc.). The API does not provide an ErrorMessage property - use Context for error details when Type is Failed.
public sealed record JobEvent : IEquatable<JobEvent>
- Inheritance
-
JobEvent
- Implements
- Inherited Members
Constructors
JobEvent(Guid?, JobEventType, DateTime?, Provider, string?, IReadOnlyDictionary<string, JsonElement>?, TimeSpanDetails?, TimeSpanDetails?, int?, decimal?, IReadOnlyDictionary<string, JsonElement>?, string?, int?, bool?, bool?)
Represents a single event in the lifecycle of a job. Check the Type property to determine job outcome (Succeeded, Failed, etc.). The API does not provide an ErrorMessage property - use Context for error details when Type is Failed.
public JobEvent(Guid? JobId, JobEventType Type, DateTime? DateTime, Provider Provider, string? WorkerId, IReadOnlyDictionary<string, JsonElement>? Context, TimeSpanDetails? ClaimDuration, TimeSpanDetails? JobDuration, int? RetryAttempt, decimal? Cost, IReadOnlyDictionary<string, JsonElement>? JobProperties, string? JobType, int? JobPriority, bool? ClaimHasCompleted, bool? JobHasCompleted)
Parameters
JobIdGuid?TypeJobEventTypeDateTimeDateTime?ProviderProviderWorkerIdstringContextIReadOnlyDictionary<string, JsonElement>ClaimDurationTimeSpanDetailsJobDurationTimeSpanDetailsRetryAttemptint?Costdecimal?JobPropertiesIReadOnlyDictionary<string, JsonElement>JobTypestringJobPriorityint?ClaimHasCompletedbool?JobHasCompletedbool?
Properties
ClaimDuration
[JsonPropertyName("claimDuration")]
public TimeSpanDetails? ClaimDuration { get; init; }
Property Value
ClaimHasCompleted
[JsonPropertyName("claimHasCompleted")]
public bool? ClaimHasCompleted { get; init; }
Property Value
- bool?
Context
[JsonPropertyName("context")]
public IReadOnlyDictionary<string, JsonElement>? Context { get; init; }
Property Value
Cost
[JsonPropertyName("cost")]
public decimal? Cost { get; init; }
Property Value
DateTime
[JsonPropertyName("dateTime")]
public DateTime? DateTime { get; init; }
Property Value
JobDuration
[JsonPropertyName("jobDuration")]
public TimeSpanDetails? JobDuration { get; init; }
Property Value
JobHasCompleted
[JsonPropertyName("jobHasCompleted")]
public bool? JobHasCompleted { get; init; }
Property Value
- bool?
JobId
[JsonPropertyName("jobId")]
public Guid? JobId { get; init; }
Property Value
- Guid?
JobPriority
[JsonPropertyName("jobPriority")]
public int? JobPriority { get; init; }
Property Value
- int?
JobProperties
[JsonPropertyName("jobProperties")]
public IReadOnlyDictionary<string, JsonElement>? JobProperties { get; init; }
Property Value
JobType
[JsonPropertyName("jobType")]
public string? JobType { get; init; }
Property Value
Provider
[JsonRequired]
[JsonPropertyName("provider")]
public Provider Provider { get; init; }
Property Value
RetryAttempt
[JsonPropertyName("retryAttempt")]
public int? RetryAttempt { get; init; }
Property Value
- int?
Type
[JsonRequired]
[JsonPropertyName("type")]
public JobEventType Type { get; init; }
Property Value
WorkerId
[JsonPropertyName("workerId")]
public string? WorkerId { get; init; }