Class FilePart
-
- All Implemented Interfaces:
public final class FilePart
Metadata for a non-image file uploaded through ChatKit.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final class
FilePart.Builder
A builder for FilePart.
-
Method Summary
Modifier and Type Method Description final String
id()
Unique identifier for the uploaded file. final Optional<String>
mimeType()
MIME type reported for the uploaded file. final Optional<String>
name()
Original filename supplied by the uploader. final JsonValue
_type()
Type discriminator that is always file
.final Optional<String>
uploadUrl()
Signed URL for downloading the uploaded file. final JsonField<String>
_id()
Returns the raw JSON value of id. final JsonField<String>
_mimeType()
Returns the raw JSON value of mimeType. final JsonField<String>
_name()
Returns the raw JSON value of name. final JsonField<String>
_uploadUrl()
Returns the raw JSON value of uploadUrl. final Map<String, JsonValue>
_additionalProperties()
final FilePart.Builder
toBuilder()
final FilePart
validate()
final Boolean
isValid()
Boolean
equals(Object other)
Integer
hashCode()
String
toString()
final static FilePart.Builder
builder()
Returns a mutable builder for constructing an instance of FilePart. -
-
Method Detail
-
mimeType
final Optional<String> mimeType()
MIME type reported for the uploaded file. Defaults to null when unknown.
-
name
final Optional<String> name()
Original filename supplied by the uploader. Defaults to null when unnamed.
-
_type
final JsonValue _type()
Type discriminator that is always
file
.Expected to always return the following:
JsonValue.from("file")
However, this method can be useful for debugging and logging (e.g. if the server responded with an unexpected value).
-
uploadUrl
final Optional<String> uploadUrl()
Signed URL for downloading the uploaded file. Defaults to null when no download link is available.
-
_id
final JsonField<String> _id()
Returns the raw JSON value of id.
Unlike id, this method doesn't throw if the JSON field has an unexpected type.
-
_mimeType
final JsonField<String> _mimeType()
Returns the raw JSON value of mimeType.
Unlike mimeType, this method doesn't throw if the JSON field has an unexpected type.
-
_name
final JsonField<String> _name()
Returns the raw JSON value of name.
Unlike name, this method doesn't throw if the JSON field has an unexpected type.
-
_uploadUrl
final JsonField<String> _uploadUrl()
Returns the raw JSON value of uploadUrl.
Unlike uploadUrl, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final FilePart.Builder toBuilder()
-
builder
final static FilePart.Builder builder()
Returns a mutable builder for constructing an instance of FilePart.
The following fields are required:
.id() .mimeType() .name() .uploadUrl()
-
-
-
-