1   /*
2    * SPDX-FileCopyrightText: none
3    * SPDX-License-Identifier: CC0-1.0
4    */
5   
6   package gov.nist.secauto.metaschema.databind.model.annotations;
7   
8   import static java.lang.annotation.RetentionPolicy.RUNTIME;
9   
10  import java.lang.annotation.Documented;
11  import java.lang.annotation.ElementType;
12  import java.lang.annotation.Retention;
13  import java.lang.annotation.Target;
14  
15  import edu.umd.cs.findbugs.annotations.NonNull;
16  
17  /**
18   * Represents a constraint let statement used to assign the result of a Metapath
19   * expression to a variable.
20   */
21  @Documented
22  @Retention(RUNTIME)
23  @Target(ElementType.ANNOTATION_TYPE)
24  public @interface Let {
25    /**
26     * The variable name.
27     *
28     * @return the variable name
29     */
30    @NonNull
31    String name();
32  
33    /**
34     * A Metapath to use the query the values assigned to the variable.
35     *
36     * @return the value Metapath
37     */
38    @NonNull
39    String target();
40  
41    /**
42     * Any remarks about the let statement, encoded as an escaped Markdown string.
43     *
44     * @return an encoded Markdown string or an empty string if no remarks are
45     *         provided
46     */
47    @NonNull
48    String remarks() default "";
49  }