using Refit; namespace StabilityMatrix.Core.Models.Api; public class CivitModelsRequest { /// /// The number of results to be returned per page. This can be a number between 1 and 200. By default, each page will return 100 results /// [AliasAs("limit")] public int? Limit { get; set; } /// /// The page from which to start fetching models /// [AliasAs("page")] public int? Page { get; set; } /// /// Search query to filter models by name /// [AliasAs("query")] public string? Query { get; set; } /// /// Search query to filter models by tag /// [AliasAs("tag")] public string? Tag { get; set; } /// /// Search query to filter models by user /// [AliasAs("username")] public string? Username { get; set; } /// /// The type of model you want to filter with. If none is specified, it will return all types /// [AliasAs("types")] public CivitModelType[]? Types { get; set; } /// /// The order in which you wish to sort the results /// [AliasAs("sort")] public CivitSortMode? Sort { get; set; } /// /// The time frame in which the models will be sorted /// [AliasAs("period")] public CivitPeriod? Period { get; set; } /// /// The rating you wish to filter the models with. If none is specified, it will return models with any rating /// [AliasAs("rating")] public int? Rating { get; set; } /// /// Filter to models that require or don't require crediting the creator /// Requires Authentication /// [AliasAs("favorites")] public bool? Favorites { get; set; } /// /// Filter to hidden models of the authenticated user /// Requires Authentication /// [AliasAs("hidden")] public bool? Hidden { get; set; } /// /// Only include the primary file for each model (This will use your preferred format options if you use an API token or session cookie) /// [AliasAs("primaryFileOnly")] public bool? PrimaryFileOnly { get; set; } /// /// Filter to models that allow or don't allow creating derivatives /// [AliasAs("allowDerivatives")] public bool? AllowDerivatives { get; set; } /// /// Filter to models that allow or don't allow derivatives to have a different license /// [AliasAs("allowDifferentLicenses")] public bool? AllowDifferentLicenses { get; set; } /// /// Filter to models based on their commercial permissions /// [AliasAs("allowCommercialUse")] public CivitCommercialUse? AllowCommercialUse { get; set; } /// /// If false, will return safer images and hide models that don't have safe images /// [AliasAs("nsfw")] public string? Nsfw { get; set; } /// /// options:
/// SD 1.4
/// SD 1.5
/// SD 2.0
/// SD 2.0 768
/// SD 2.1
/// SD 2.1 768
/// SD 2.1 Unclip
/// SDXL 0.9
/// SDXL 1.0 ///
[AliasAs("baseModels")] public string? BaseModel { get; set; } [AliasAs("ids")] public string CommaSeparatedModelIds { get; set; } public override string ToString() { return $"Page: {Page}, " + $"Query: {Query}, " + $"Tag: {Tag}, " + $"Username: {Username}, " + $"Types: {Types}, " + $"Sort: {Sort}, " + $"Period: {Period}, " + $"Rating: {Rating}, " + $"Nsfw: {Nsfw}, " + $"BaseModel: {BaseModel}, " + $"CommaSeparatedModelIds: {CommaSeparatedModelIds}"; } }