Table of Contents

Class ApiAuth

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

The generic reusable api auth config. Deprecated. Please use AuthConfig (google/cloud/aiplatform/master/auth.proto) instead. This data type is not supported in Gemini API.

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

Properties

ApiKeyConfig

The API secret.

[JsonPropertyName("apiKeyConfig")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public ApiAuthApiKeyConfig? ApiKeyConfig { get; set; }

Property Value

ApiAuthApiKeyConfig

Methods

FromJson(string, JsonSerializerOptions?)

Deserializes a JSON string to a ApiAuth object.

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

Parameters

jsonString string

The JSON string to deserialize.

options JsonSerializerOptions

Optional JsonSerializerOptions.

Returns

ApiAuth

The deserialized ApiAuth object, or null if deserialization fails.