Package com.google.genai.types
Class UploadFileConfig
-
- All Implemented Interfaces:
public abstract class UploadFileConfig extends JsonSerializable
Used to override the default configuration.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public abstract classUploadFileConfig.BuilderBuilder for UploadFileConfig.
-
Field Summary
Fields Modifier and Type Field Description public final static StringMAX_READ_LENGTH_PROPERTY
-
Constructor Summary
Constructors Constructor Description UploadFileConfig()
-
Method Summary
Modifier and Type Method Description abstract Optional<HttpOptions>httpOptions()Used to override HTTP request options. abstract Optional<String>name()The name of the file in the destination (e.g., 'files/sample-image'. abstract Optional<String>mimeType()mime_type: The MIME type of the file. abstract Optional<String>displayName()Optional display name of the file. static UploadFileConfig.Builderbuilder()Instantiates a builder for UploadFileConfig. abstract UploadFileConfig.BuildertoBuilder()Creates a builder with the same values as this instance. static UploadFileConfigfromJson(String jsonString)Deserializes a JSON string to a UploadFileConfig 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
-
httpOptions
abstract Optional<HttpOptions> httpOptions()
Used to override HTTP request options.
-
name
abstract Optional<String> name()
The name of the file in the destination (e.g., 'files/sample-image'. If not provided one will be generated.
-
mimeType
abstract Optional<String> mimeType()
mime_type: The MIME type of the file. If not provided, it will be inferred from the file extension.
-
displayName
abstract Optional<String> displayName()
Optional display name of the file.
-
builder
static UploadFileConfig.Builder builder()
Instantiates a builder for UploadFileConfig.
-
toBuilder
abstract UploadFileConfig.Builder toBuilder()
Creates a builder with the same values as this instance.
-
fromJson
static UploadFileConfig fromJson(String jsonString)
Deserializes a JSON string to a UploadFileConfig object.
-
-
-
-