using System.Text.Json.Serialization; namespace eprintServer.Requests { public class GeminiImageRequest { [JsonPropertyName("prompt")] public string Prompt { get; set; } = string.Empty; [JsonPropertyName("aspect_ratio")] public string? AspectRatio { get; set; } = "1:1"; [JsonPropertyName("resolution")] public string? Resolution { get; set; } = "1K"; [JsonPropertyName("width")] public int? Width { get; set; } [JsonPropertyName("height")] public int? Height { get; set; } } public class GeminiApiRequest { public Content[] Contents { get; set; } = Array.Empty(); public GenerationConfig GenerationConfig { get; set; } = new(); } public class Content { public Part[] Parts { get; set; } = Array.Empty(); } public class Part { public string? Text { get; set; } public InlineData? InlineData { get; set; } } public class InlineData { public string MimeType { get; set; } = string.Empty; public string Data { get; set; } = string.Empty; } public class GenerationConfig { public string[] ResponseModalities { get; set; } = Array.Empty(); public ImageConfig ImageConfig { get; set; } = new(); } public class ImageConfig { public string AspectRatio { get; set; } = "1:1"; public string ImageSize { get; set; } = "1K"; } public class GeminiResponse { public Candidate[]? Candidates { get; set; } } public class Candidate { public Content Content { get; set; } = new(); } public class ImageGenerationResponse { public string Url { get; set; } = string.Empty; public int Width { get; set; } public int Height { get; set; } } }