Table of Contents

Class GenerateImagesResponse

Namespace
Google.GenAI.Types
Assembly
Google.GenAI.dll

The output images response.

public record GenerateImagesResponse : IEquatable<GenerateImagesResponse>
Inheritance
GenerateImagesResponse
Implements
Inherited Members

Properties

GeneratedImages

List of generated images.

[JsonPropertyName("generatedImages")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public List<GeneratedImage>? GeneratedImages { get; set; }

Property Value

List<GeneratedImage>

PositivePromptSafetyAttributes

Safety attributes of the positive prompt. Only populated if include_safety_attributes is set to True.

[JsonPropertyName("positivePromptSafetyAttributes")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public SafetyAttributes? PositivePromptSafetyAttributes { get; set; }

Property Value

SafetyAttributes

SdkHttpResponse

Used to retain the full HTTP response.

[JsonPropertyName("sdkHttpResponse")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public HttpResponse? SdkHttpResponse { get; set; }

Property Value

HttpResponse

Methods

FromJson(string, JsonSerializerOptions?)

Deserializes a JSON string to a GenerateImagesResponse object.

public static GenerateImagesResponse? FromJson(string jsonString, JsonSerializerOptions? options = null)

Parameters

jsonString string

The JSON string to deserialize.

options JsonSerializerOptions

Optional JsonSerializerOptions.

Returns

GenerateImagesResponse

The deserialized GenerateImagesResponse object, or null if deserialization fails.