Class Image
An image.
public record Image : IEquatable<Image>
- Inheritance
-
Image
- Implements
- Inherited Members
Properties
GcsUri
The Cloud Storage URI of the image. Image can contain a value for this field or the
image_bytes field but not both.
[JsonPropertyName("gcsUri")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? GcsUri { get; set; }
Property Value
ImageBytes
The image bytes data. Image can contain a value for this field or the gcs_uri field
but not both.
[JsonPropertyName("imageBytes")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public byte[]? ImageBytes { get; set; }
Property Value
- byte[]
MimeType
The MIME type of the image.
[JsonPropertyName("mimeType")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? MimeType { get; set; }
Property Value
Methods
FromFile(string, string?)
public static Image FromFile(string location, string? mimeType = null)
Parameters
Returns
FromJson(string, JsonSerializerOptions?)
Deserializes a JSON string to a Image object.
public static Image? FromJson(string jsonString, JsonSerializerOptions? options = null)
Parameters
jsonStringstringThe JSON string to deserialize.
optionsJsonSerializerOptionsOptional JsonSerializerOptions.
Returns
- Image
The deserialized Image object, or null if deserialization fails.