oparl-service/oparl-server/src/main/java/de/twomartens/oparlservice/entity/dto/Person.java

100 lines
3.2 KiB
Java

package de.twomartens.oparlservice.entity.dto;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.time.ZonedDateTime;
import java.util.List;
@Builder
@Getter
@ToString
@EqualsAndHashCode
@AllArgsConstructor(access = AccessLevel.PRIVATE)
@NoArgsConstructor(force = true, access = AccessLevel.PRIVATE)
@JsonInclude(JsonInclude.Include.NON_NULL)
public class Person {
@NonNull
@Schema(required = true, description = "The unique identifier of the object")
private final String id;
@NonNull
@Schema(required = true, description = "Namespace URL to the object type schema")
private final String type;
@NonNull
@JsonFormat(shape = JsonFormat.Shape.STRING)
@Schema(required = true, description = "Date and time of the creation of the object")
private final ZonedDateTime created;
@NonNull
@JsonFormat(shape = JsonFormat.Shape.STRING)
@Schema(required = true, description = "Date and time of the last update of the object")
private final ZonedDateTime modified;
@Schema(description = "URL to the license")
private String license;
@Schema(description = "Categorization of the object")
private String keyword;
@Schema(description = "URL of a website that presents the object in the browser")
private String web;
@Schema(description = "True, if the object was deleted")
private final boolean deleted;
@Schema(description = "URL to the body this person belongs so")
private final String body;
@Schema(description = "full name of this person including academic title")
private final String name;
@Schema(description = "family name of this person")
private final String familyName;
@Schema(description = "given name of this person")
private final String givenName;
@Schema(description = "form of address of this person")
private final String formOfAddress;
@Schema(description = "applicable affix to the name of this person")
private final String affix;
@Schema(description = "List of academic titles")
private final List<String> title;
@Schema(description = "gender of this person in English", example = "female, male, ...")
private final String gender;
@Schema(description = "List of phone number of this person")
private final List<String> phone;
@Schema(description = "List of email addresses of this person")
private final List<String> email;
@Schema(description = "URL to the contact address of this person")
private final String location;
@Schema(description = "contact address of this person")
private final Location locationObject;
@Schema(description = "List of roles in the body")
private final List<String> status;
@Schema(description = "List of memberships of this person, both current and former")
private final List<Membership> membership;
@Schema(description = "image of this person")
private final File image;
@Schema(description = "short info text about this person", maxLength = 300)
private final String life;
@Schema(description = "source for the info in life field")
private final String lifeSource;
}