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

138 lines
4.7 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 Body {
@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 system this body belongs to")
private final String system;
@NonNull
@Schema(required = true, description = "official long name of the body")
private final String name;
@Schema(description = "short name of the body")
private final String shortName;
@Schema(description = "URL of the website of the body")
private final String website;
@JsonFormat(shape = JsonFormat.Shape.STRING)
@Schema(description = "Date and time from which the specified license is valid")
private final ZonedDateTime licenseValidSince;
@JsonFormat(shape = JsonFormat.Shape.STRING)
@Schema(description = "Date and time from which OParl API has been offered")
private final ZonedDateTime oparlSince;
@Schema(description = "The eight character long official body identifier")
private final String ags;
@Schema(description = "The 12 character long regional identifier")
private final String rgs;
@Schema(description = "list of additional URLs that represent this body")
private final List<String> equivalent;
@Schema(description = "E-Mail-Address for requests related to the body and the parliamentary information system")
private final String contactEmail;
@Schema(description = "Name of the contact person or office reachable by contactEmail")
private final String contactName;
@NonNull
@Schema(required = true, description = "URL to list of organizations in this body")
private final String organization;
@NonNull
@Schema(required = true, description = "URL to list of persons in this body")
private final String person;
@NonNull
@Schema(required = true, description = "URL to list of meetings in this body")
private final String meeting;
@NonNull
@Schema(required = true, description = "URL to list of papers (Drucksachen) in this body")
private final String paper;
@NonNull
@Schema(required = true, description = "List of all legislative terms of this body")
private final List<LegislativeTerm> legislativeTerm;
@NonNull
@Schema(required = true, description = "URL to list of all agenda items in this body")
private final String agendaItem;
@NonNull
@Schema(required = true, description = "URL to list of all consultations in this body")
private final String consultation;
@NonNull
@Schema(required = true, description = "URL to list of all files in this body")
private final String file;
@NonNull
@Schema(required = true, description = "URL to list of all locations in this body")
private final String locationList;
@NonNull
@Schema(required = true, description = "URL to list of all legislative terms in this body")
private final String legislativeTermList;
@NonNull
@Schema(required = true, description = "URL to list of all memberships in this body")
private final String membership;
@Schema(description = "physical location of the body")
private final Location location;
@Schema(description = "classification of the body")
private final String classification;
@Schema(description = "URL to the main organization of this body")
private final String mainOrganization;
}