Class ApiAuthApiKeyConfig

java.lang.Object
com.google.genai.JsonSerializable
com.google.genai.types.ApiAuthApiKeyConfig

public abstract class ApiAuthApiKeyConfig extends JsonSerializable
The API secret.
  • Constructor Details

    • ApiAuthApiKeyConfig

      public ApiAuthApiKeyConfig()
  • Method Details

    • apiKeySecretVersion

      public abstract Optional<String> apiKeySecretVersion()
      Required. The SecretManager secret version resource name storing API key. e.g. projects/{project}/secrets/{secret}/versions/{version}
    • apiKeyString

      public abstract Optional<String> apiKeyString()
      The API key string. Either this or `api_key_secret_version` must be set.
    • builder

      public static ApiAuthApiKeyConfig.Builder builder()
      Instantiates a builder for ApiAuthApiKeyConfig.
    • toBuilder

      public abstract ApiAuthApiKeyConfig.Builder toBuilder()
      Creates a builder with the same values as this instance.
    • fromJson

      public static ApiAuthApiKeyConfig fromJson(String jsonString)
      Deserializes a JSON string to a ApiAuthApiKeyConfig object.