Class ModelFile
- Namespace
- CivitaiSharp.Core.Models
- Assembly
- CivitaiSharp.Core.dll
File associated with a model version.
public sealed record ModelFile : IEquatable<ModelFile>
- Inheritance
-
ModelFile
- Implements
- Inherited Members
Constructors
ModelFile(long, double, string, string, string?, string?, string?, string?, DateTime?, FileMetadata?, Hashes?, string?, bool?)
File associated with a model version.
public ModelFile(long Id, double SizeKilobytes, string Name, string Type, string? PickleScanResult, string? PickleScanMessage, string? VirusScanResult, string? VirusScanMessage, DateTime? ScannedAt, FileMetadata? Metadata, Hashes? Hashes, string? DownloadUrl, bool? Primary)
Parameters
IdlongThe unique identifier for the file. Maps to JSON property "id".
SizeKilobytesdoubleThe size of the model file in kilobytes. Maps to JSON property "sizeKB".
NamestringThe filename of the model file. Maps to JSON property "name".
TypestringThe type of file (e.g., "Model", "Training Data"). Maps to JSON property "type".
PickleScanResultstringResults of the pickle scan for security ("Pending", "Success", "Danger", "Error"). Maps to JSON property "pickleScanResult".
PickleScanMessagestringDetails or error message from the pickle scan. Maps to JSON property "pickleScanMessage".
VirusScanResultstringResults of the virus scan for security ("Pending", "Success", "Danger", "Error"). Maps to JSON property "virusScanResult".
VirusScanMessagestringDetails or error message from the virus scan. Maps to JSON property "virusScanMessage".
ScannedAtDateTime?The date and time when the file was scanned for security. Maps to JSON property "scannedAt".
MetadataFileMetadataMetadata about the file format and configuration. Maps to JSON property "metadata".
HashesHashesHash values of the file using various algorithms. Maps to JSON property "hashes".
DownloadUrlstringDirect download URL for this file. Maps to JSON property "downloadUrl".
Primarybool?Indicates whether this is the primary file for the model version. Maps to JSON property "primary".
Properties
DownloadUrl
Direct download URL for this file. Maps to JSON property "downloadUrl".
[JsonPropertyName("downloadUrl")]
public string? DownloadUrl { get; init; }
Property Value
Hashes
Hash values of the file using various algorithms. Maps to JSON property "hashes".
[JsonPropertyName("hashes")]
public Hashes? Hashes { get; init; }
Property Value
Id
The unique identifier for the file. Maps to JSON property "id".
[JsonPropertyName("id")]
public long Id { get; init; }
Property Value
Metadata
Metadata about the file format and configuration. Maps to JSON property "metadata".
[JsonPropertyName("metadata")]
public FileMetadata? Metadata { get; init; }
Property Value
Name
The filename of the model file. Maps to JSON property "name".
[JsonPropertyName("name")]
public string Name { get; init; }
Property Value
PickleScanMessage
Details or error message from the pickle scan. Maps to JSON property "pickleScanMessage".
[JsonPropertyName("pickleScanMessage")]
public string? PickleScanMessage { get; init; }
Property Value
PickleScanResult
Results of the pickle scan for security ("Pending", "Success", "Danger", "Error"). Maps to JSON property "pickleScanResult".
[JsonPropertyName("pickleScanResult")]
public string? PickleScanResult { get; init; }
Property Value
Primary
Indicates whether this is the primary file for the model version. Maps to JSON property "primary".
[JsonPropertyName("primary")]
public bool? Primary { get; init; }
Property Value
- bool?
ScannedAt
The date and time when the file was scanned for security. Maps to JSON property "scannedAt".
[JsonPropertyName("scannedAt")]
public DateTime? ScannedAt { get; init; }
Property Value
SizeKilobytes
The size of the model file in kilobytes. Maps to JSON property "sizeKB".
[JsonPropertyName("sizeKB")]
public double SizeKilobytes { get; init; }
Property Value
Type
The type of file (e.g., "Model", "Training Data"). Maps to JSON property "type".
[JsonPropertyName("type")]
public string Type { get; init; }
Property Value
VirusScanMessage
Details or error message from the virus scan. Maps to JSON property "virusScanMessage".
[JsonPropertyName("virusScanMessage")]
public string? VirusScanMessage { get; init; }
Property Value
VirusScanResult
Results of the virus scan for security ("Pending", "Success", "Danger", "Error"). Maps to JSON property "virusScanResult".
[JsonPropertyName("virusScanResult")]
public string? VirusScanResult { get; init; }