View Javadoc
1   /*
2    * Copyright (c) 2022 Kaiserpfalz EDV-Service, Roland T. Lichti.
3    *
4    * This program is free software: you can redistribute it and/or modify
5    * it under the terms of the GNU General Public License as published by
6    * the Free Software Foundation, either version 3 of the License, or
7    * (at your option) any later version.
8    *
9    * This program is distributed in the hope that it will be useful,
10   * but WITHOUT ANY WARRANTY; without even the implied warranty of
11   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12   * GNU General Public License for more details.
13   *
14   * You should have received a copy of the GNU General Public License
15   * along with this program.  If not, see <https://www.gnu.org/licenses/>.
16   */
17  
18  package de.kaiserpfalzedv.rpg.torg.model.perks;
19  
20  import com.fasterxml.jackson.annotation.JsonInclude;
21  import de.kaiserpfalzedv.rpg.torg.model.actors.Clearance;
22  import de.kaiserpfalzedv.rpg.torg.model.actors.SkillValue;
23  import lombok.AllArgsConstructor;
24  import lombok.Builder;
25  import lombok.Getter;
26  import lombok.ToString;
27  import lombok.extern.jackson.Jacksonized;
28  import org.eclipse.microprofile.openapi.annotations.media.Schema;
29  
30  import java.io.Serializable;
31  import java.util.Set;
32  
33  /**
34   * Prerequisites -- The prerequisites for obtaining a perk.
35   *
36   * @author klenkes74 {@literal <rlichti@kaiserpfalz-edv.de>}
37   * @since 0.3.0  2021-05-23
38   */
39  @Jacksonized
40  @Builder(toBuilder = true)
41  @AllArgsConstructor
42  @Getter
43  @ToString
44  @JsonInclude(JsonInclude.Include.NON_ABSENT)
45  @Schema(description = "The prerequisites for obtaining a perk.")
46  public class Prerequisites implements Serializable {
47      @Schema(description = "Skills that are a prerequisite.", nullable = true, minItems = 0)
48      private Set<SkillValue> skills;
49  
50      @Schema(description = "Minimum clearance level as prerequisite", nullable = true)
51      @Builder.Default
52      private Clearance clearance = Clearance.ALPHA;
53  }