Class ApiAuthApiKeyConfig
The API secret. This data type is not supported in Gemini API.
public record ApiAuthApiKeyConfig : IEquatable<ApiAuthApiKeyConfig>
- Inheritance
-
ApiAuthApiKeyConfig
- Implements
- Inherited Members
Properties
ApiKeySecretVersion
The SecretManager secret version resource name storing API key. e.g. projects/{project}/secrets/{secret}/versions/{version}
[JsonPropertyName("apiKeySecretVersion")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? ApiKeySecretVersion { get; set; }
Property Value
ApiKeyString
The API key string. Either this or api_key_secret_version must be set.
[JsonPropertyName("apiKeyString")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? ApiKeyString { get; set; }
Property Value
Methods
FromJson(string, JsonSerializerOptions?)
Deserializes a JSON string to a ApiAuthApiKeyConfig object.
public static ApiAuthApiKeyConfig? FromJson(string jsonString, JsonSerializerOptions? options = null)
Parameters
jsonStringstringThe JSON string to deserialize.
optionsJsonSerializerOptionsOptional JsonSerializerOptions.
Returns
- ApiAuthApiKeyConfig
The deserialized ApiAuthApiKeyConfig object, or null if deserialization fails.