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.psionic;
19  
20  import com.fasterxml.jackson.annotation.JsonInclude;
21  import de.kaiserpfalzedv.rpg.torg.model.actors.Clearance;
22  import de.kaiserpfalzedv.rpg.torg.model.core.Armor;
23  import de.kaiserpfalzedv.rpg.torg.model.core.Attack;
24  import de.kaiserpfalzedv.rpg.torg.model.core.Axiom;
25  import de.kaiserpfalzedv.rpg.torg.model.perks.Prerequisites;
26  import lombok.AllArgsConstructor;
27  import lombok.EqualsAndHashCode;
28  import lombok.Getter;
29  import lombok.ToString;
30  import lombok.experimental.SuperBuilder;
31  import lombok.extern.jackson.Jacksonized;
32  import org.eclipse.microprofile.openapi.annotations.media.Schema;
33  
34  import jakarta.validation.constraints.Size;
35  import java.io.Serializable;
36  import java.util.Set;
37  
38  /**
39   * PsiPowerData -- Data for a single magic spell.
40   *
41   * @author klenkes74 {@literal <rlichti@kaiserpfalz-edv.de>}
42   * @since 1.2.0  2021-05-23
43   */
44  @Jacksonized
45  @SuperBuilder(toBuilder = true)
46  @AllArgsConstructor
47  @Getter
48  @ToString(callSuper = true)
49  @EqualsAndHashCode(callSuper = false)
50  @JsonInclude(JsonInclude.Include.NON_ABSENT)
51  @Schema(description = "The spell definition.")
52  public class PsiPowerData implements Serializable {
53      @Size(max = 5000, message = "The textual description must not be larger than 5000 characters.")
54      @Schema(description = "A textual description of this spell.", nullable = true, maxLength = 5000)
55      private final String description;
56  
57      @Schema(description = "The minimum clearance level for this spell.")
58      private final Clearance clearance;
59  
60      @Schema(description = "The axioms of this spell", minItems = 1, maxItems = 2)
61      private final Set<Axiom> axioms;
62  
63      @Schema(description = "Notes to this spell.", minItems = 0)
64      private final Set<String> notes;
65  
66      @Schema(description = "Infos to this spell.", minItems = 0)
67      private final Set<String> info;
68  
69      @Schema(description = "Prerequisites for obtaining the spell", minItems = 0)
70      private final Set<Prerequisites> prerequisites;
71  
72      @Schema(description = "Possible attack (most spells are treated as attack to use the CharSheet for rolling).", minItems = 0)
73      private final Set<Attack> attack;
74  
75      @Schema(description = "Possible armor (some spells provide armor depending on success levels).", minItems = 0)
76      private final Set<Armor> armor;
77  }