generated from 2martens/template-service
75 lines
2.8 KiB
Java
75 lines
2.8 KiB
Java
package de.twomartens.oparlservice.entity;
|
|
|
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
|
import io.swagger.v3.oas.annotations.media.Schema;
|
|
import lombok.*;
|
|
import lombok.experimental.SuperBuilder;
|
|
|
|
import java.time.LocalDate;
|
|
import java.util.List;
|
|
|
|
@SuperBuilder
|
|
@Getter
|
|
@ToString
|
|
@EqualsAndHashCode(callSuper = true)
|
|
@AllArgsConstructor(access = AccessLevel.PRIVATE)
|
|
@NoArgsConstructor(force = true, access = AccessLevel.PRIVATE)
|
|
@Schema(allOf = CommonFields.class)
|
|
public class File extends CommonFields {
|
|
@Schema(description = "name of the file without file ending", nullable = true)
|
|
private final String name;
|
|
|
|
@Schema(description = "file name of the file", nullable = true)
|
|
private final String fileName;
|
|
|
|
@Schema(description = "mime type of this file", nullable = true)
|
|
private final String mimeType;
|
|
|
|
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
|
@Schema(description = "date which is used, for example, as a reference for deadlines", nullable = true)
|
|
private final LocalDate date;
|
|
|
|
@Schema(description = "size of the file in bytes")
|
|
private final int size;
|
|
|
|
@Schema(description = "SHA1 checksum of the file content in hexadecimal form", deprecated = true, nullable = true)
|
|
private final String sha1Checksum;
|
|
|
|
@Schema(description = "SHA512 checksum of the file content in hexadecimal form", nullable = true)
|
|
private final String sha512Checksum;
|
|
|
|
@Schema(description = "pure text representation of the file content if possible", nullable = true)
|
|
private final String text;
|
|
|
|
@NonNull
|
|
@Schema(description = "URL to access the file", required = true)
|
|
private final String accessUrl;
|
|
|
|
@Schema(description = "URL to download the file", nullable = true)
|
|
private final String downloadUrl;
|
|
|
|
@Schema(description = "URL to an additional access possibility", nullable = true)
|
|
private final String externalServiceUrl;
|
|
|
|
@Schema(description = "URL to the master file from which this file was derived", nullable = true)
|
|
private final String masterFile;
|
|
|
|
@Schema(description = "List of URLs to files that were derived from this file", nullable = true)
|
|
private final List<String> derivativeFile;
|
|
|
|
@Schema(description = "URL to the license for this file", nullable = true)
|
|
private final String fileLicense;
|
|
|
|
@Schema(description = "List of URLs to meetings this file is referenced in", nullable = true)
|
|
private final List<String> meeting;
|
|
|
|
@Schema(description = "List of URLs to agenda items this file is referenced in", nullable = true)
|
|
private final List<String> agendaItem;
|
|
|
|
@Schema(description = "URL to the person which uses this file as image", nullable = true)
|
|
private final String person;
|
|
|
|
@Schema(description = "List of URLs to papers this file is referenced in", nullable = true)
|
|
private final List<String> paper;
|
|
}
|