Package com.google.genai.types
Class CreateFileParameters
-
- All Implemented Interfaces:
@InternalApi() public abstract class CreateFileParameters extends JsonSerializable
Generates the parameters for the private _create method.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public abstract classCreateFileParameters.BuilderBuilder for CreateFileParameters.
-
Field Summary
Fields Modifier and Type Field Description public final static StringMAX_READ_LENGTH_PROPERTY
-
Constructor Summary
Constructors Constructor Description CreateFileParameters()
-
Method Summary
Modifier and Type Method Description abstract Optional<File>file()The file to be uploaded. abstract Optional<CreateFileConfig>config()Used to override the default configuration. static CreateFileParameters.Builderbuilder()Instantiates a builder for CreateFileParameters. abstract CreateFileParameters.BuildertoBuilder()Creates a builder with the same values as this instance. static CreateFileParametersfromJson(String jsonString)Deserializes a JSON string to a CreateFileParameters 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
-
file
abstract Optional<File> file()
The file to be uploaded. mime_type: (Required) The MIME type of the file. Must be provided. name: (Optional) The name of the file in the destination (e.g. 'files/sample-image'). display_name: (Optional) The display name of the file.
-
config
abstract Optional<CreateFileConfig> config()
Used to override the default configuration.
-
builder
static CreateFileParameters.Builder builder()
Instantiates a builder for CreateFileParameters.
-
toBuilder
abstract CreateFileParameters.Builder toBuilder()
Creates a builder with the same values as this instance.
-
fromJson
static CreateFileParameters fromJson(String jsonString)
Deserializes a JSON string to a CreateFileParameters object.
-
-
-
-