Table of Contents

Class TestTableItem

Namespace
Google.GenAI.Types
Assembly
Google.GenAI.dll
public record TestTableItem : IEquatable<TestTableItem>
Inheritance
TestTableItem
Implements
Inherited Members

Properties

ExceptionIfMldev

Expects an exception for MLDev matching the string.

[JsonPropertyName("exceptionIfMldev")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? ExceptionIfMldev { get; set; }

Property Value

string

ExceptionIfVertex

Expects an exception for Vertex matching the string.

[JsonPropertyName("exceptionIfVertex")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? ExceptionIfVertex { get; set; }

Property Value

string

HasUnion

True if the parameters contain an unsupported union type. This test will be skipped for languages that do not support the union type.

[JsonPropertyName("hasUnion")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public bool? HasUnion { get; set; }

Property Value

bool?

IgnoreKeys

Keys to ignore when comparing the request and response. This is useful for tests that are not deterministic.

[JsonPropertyName("ignoreKeys")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public List<string>? IgnoreKeys { get; set; }

Property Value

List<string>

Name

The name of the test. This is used to derive the replay id.

[JsonPropertyName("name")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? Name { get; set; }

Property Value

string

OverrideReplayId

Use if you don't want to use the default replay id which is derived from the test name.

[JsonPropertyName("overrideReplayId")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? OverrideReplayId { get; set; }

Property Value

string

Parameters

The parameters to the test. Use pydantic models.

[JsonPropertyName("parameters")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public Dictionary<string, object>? Parameters { get; set; }

Property Value

Dictionary<string, object>

SkipInApiMode

When set to a reason string, this test will be skipped in the API mode. Use this flag for tests that can not be reproduced with the real API. E.g. a test that deletes a resource.

[JsonPropertyName("skipInApiMode")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? SkipInApiMode { get; set; }

Property Value

string

Methods

FromJson(string, JsonSerializerOptions?)

Deserializes a JSON string to a TestTableItem object.

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

Parameters

jsonString string

The JSON string to deserialize.

options JsonSerializerOptions

Optional JsonSerializerOptions.

Returns

TestTableItem

The deserialized TestTableItem object, or null if deserialization fails.