Table of Contents

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

Id long

The unique identifier for the file. Maps to JSON property "id".

SizeKilobytes double

The size of the model file in kilobytes. Maps to JSON property "sizeKB".

Name string

The filename of the model file. Maps to JSON property "name".

Type string

The type of file (e.g., "Model", "Training Data"). Maps to JSON property "type".

PickleScanResult string

Results of the pickle scan for security ("Pending", "Success", "Danger", "Error"). Maps to JSON property "pickleScanResult".

PickleScanMessage string

Details or error message from the pickle scan. Maps to JSON property "pickleScanMessage".

VirusScanResult string

Results of the virus scan for security ("Pending", "Success", "Danger", "Error"). Maps to JSON property "virusScanResult".

VirusScanMessage string

Details or error message from the virus scan. Maps to JSON property "virusScanMessage".

ScannedAt DateTime?

The date and time when the file was scanned for security. Maps to JSON property "scannedAt".

Metadata FileMetadata

Metadata about the file format and configuration. Maps to JSON property "metadata".

Hashes Hashes

Hash values of the file using various algorithms. Maps to JSON property "hashes".

DownloadUrl string

Direct download URL for this file. Maps to JSON property "downloadUrl".

Primary bool?

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

string

Hashes

Hash values of the file using various algorithms. Maps to JSON property "hashes".

[JsonPropertyName("hashes")]
public Hashes? Hashes { get; init; }

Property Value

Hashes

Id

The unique identifier for the file. Maps to JSON property "id".

[JsonPropertyName("id")]
public long Id { get; init; }

Property Value

long

Metadata

Metadata about the file format and configuration. Maps to JSON property "metadata".

[JsonPropertyName("metadata")]
public FileMetadata? Metadata { get; init; }

Property Value

FileMetadata

Name

The filename of the model file. Maps to JSON property "name".

[JsonPropertyName("name")]
public string Name { get; init; }

Property Value

string

PickleScanMessage

Details or error message from the pickle scan. Maps to JSON property "pickleScanMessage".

[JsonPropertyName("pickleScanMessage")]
public string? PickleScanMessage { get; init; }

Property Value

string

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

string

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

DateTime?

SizeKilobytes

The size of the model file in kilobytes. Maps to JSON property "sizeKB".

[JsonPropertyName("sizeKB")]
public double SizeKilobytes { get; init; }

Property Value

double

Type

The type of file (e.g., "Model", "Training Data"). Maps to JSON property "type".

[JsonPropertyName("type")]
public string Type { get; init; }

Property Value

string

VirusScanMessage

Details or error message from the virus scan. Maps to JSON property "virusScanMessage".

[JsonPropertyName("virusScanMessage")]
public string? VirusScanMessage { get; init; }

Property Value

string

VirusScanResult

Results of the virus scan for security ("Pending", "Success", "Danger", "Error"). Maps to JSON property "virusScanResult".

[JsonPropertyName("virusScanResult")]
public string? VirusScanResult { get; init; }

Property Value

string