View Javadoc
1   package fr.tiogars.inception.client;
2   
3   import java.time.Instant;
4   
5   /**
6    * Represents a DomainTemplate returned by the DomainTemplate API.
7    *
8    * @param id persistent identifier
9    * @param code unique template code
10   * @param label display label
11   * @param description optional description
12   * @param createdDate creation timestamp
13   * @param lastModifiedDate last modification timestamp
14   * @param createdBy username at creation
15   * @param lastModifiedBy username at the last modification
16   * @since 0.1.0
17   */
18  public record DomainTemplate(
19          Long id,
20          String code,
21          String label,
22          String description,
23          Instant createdDate,
24          Instant lastModifiedDate,
25          String createdBy,
26          String lastModifiedBy
27  ) {
28      /**
29       * Creates a template without audit actors for compatibility with older API responses.
30       *
31       * @param id persistent identifier
32       * @param code unique template code
33       * @param label display label
34       * @param description optional description
35       * @param createdDate creation timestamp
36       * @param lastModifiedDate last modification timestamp
37       */
38      public DomainTemplate(Long id, String code, String label, String description,
39              Instant createdDate, Instant lastModifiedDate) {
40          this(id, code, label, description, createdDate, lastModifiedDate, null, null);
41      }
42  }