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

105 lines
3.7 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.ZonedDateTime;
import java.util.List;
@SuperBuilder
@Getter
@ToString
@EqualsAndHashCode(callSuper = true)
@AllArgsConstructor(access = AccessLevel.PRIVATE)
@NoArgsConstructor(force = true, access = AccessLevel.PRIVATE)
public class Body extends CommonFields {
@Schema(description = "URL to the system this body belongs to", nullable = true)
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", nullable = true)
private final String shortName;
@Schema(description = "URL of the website of the body", nullable = true)
private final String website;
@JsonFormat(shape = JsonFormat.Shape.STRING)
@Schema(description = "Date and time from which the specified license is valid", nullable = true)
private final ZonedDateTime licenseValidSince;
@JsonFormat(shape = JsonFormat.Shape.STRING)
@Schema(description = "Date and time from which OParl API has been offered", nullable = true)
private final ZonedDateTime oparlSince;
@Schema(description = "The eight character long official body identifier", nullable = true)
private final String ags;
@Schema(description = "The 12 character long regional identifier", nullable = true)
private final String rgs;
@Schema(description = "list of additional URLs that represent this body", nullable = true)
private final List<String> equivalent;
@Schema(description = "E-Mail-Address for requests related to the body and the parliamentary information system", nullable = true)
private final String contactEmail;
@Schema(description = "Name of the contact person or office reachable by contactEmail", nullable = true)
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", nullable = true)
private final Location location;
@Schema(description = "classification of the body")
private final String classification;
}