Package com.google.genai.types
Class ApiAuthApiKeyConfig
-
- All Implemented Interfaces:
public abstract class ApiAuthApiKeyConfig extends JsonSerializable
The API secret. This data type is not supported in Gemini API.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public abstract classApiAuthApiKeyConfig.BuilderBuilder for ApiAuthApiKeyConfig.
-
Field Summary
Fields Modifier and Type Field Description public final static StringMAX_READ_LENGTH_PROPERTY
-
Constructor Summary
Constructors Constructor Description ApiAuthApiKeyConfig()
-
Method Summary
Modifier and Type Method Description abstract Optional<String>apiKeySecretVersion()Required. abstract Optional<String>apiKeyString()The API key string. static ApiAuthApiKeyConfig.Builderbuilder()Instantiates a builder for ApiAuthApiKeyConfig. abstract ApiAuthApiKeyConfig.BuildertoBuilder()Creates a builder with the same values as this instance. static ApiAuthApiKeyConfigfromJson(String jsonString)Deserializes a JSON string to a ApiAuthApiKeyConfig object. -
Methods inherited from class com.google.genai.JsonSerializable
fromJsonNode, fromJsonString, objectMapper, setMaxReadLength, stringToJsonNode, toJson, toJsonNode, toJsonString -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
apiKeySecretVersion
abstract Optional<String> apiKeySecretVersion()
Required. The SecretManager secret version resource name storing API key. e.g. projects/{project}/secrets/{secret}/versions/{version}
-
apiKeyString
abstract Optional<String> apiKeyString()
The API key string. Either this or `api_key_secret_version` must be set.
-
builder
static ApiAuthApiKeyConfig.Builder builder()
Instantiates a builder for ApiAuthApiKeyConfig.
-
toBuilder
abstract ApiAuthApiKeyConfig.Builder toBuilder()
Creates a builder with the same values as this instance.
-
fromJson
static ApiAuthApiKeyConfig fromJson(String jsonString)
Deserializes a JSON string to a ApiAuthApiKeyConfig object.
-
-
-
-