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  @Documented
18  @Retention(RUNTIME)
19  @Target(ElementType.ANNOTATION_TYPE)
20  public @interface ValueConstraints {
21    /**
22     * Get the let statements for the type of field this annotation is applied to.
23     *
24     * @return the let statements or an empty array if no let statements are defined
25     */
26    @NonNull
27    Let[] lets() default {};
28  
29    /**
30     * Get the allowed value constraints for the type or field this annotation is
31     * applied to.
32     *
33     * @return the allowed values or an empty array if no allowed values constraints
34     *         are defined
35     */
36    @NonNull
37    AllowedValues[] allowedValues() default {};
38  
39    /**
40     * Get the matches constraints for the type or field this annotation is applied
41     * to.
42     *
43     * @return the allowed values or an empty array if no allowed values constraints
44     *         are defined
45     */
46    @NonNull
47    Matches[] matches() default {};
48  
49    /**
50     * Get the index-has-key constraints for the type or field this annotation is
51     * applied to.
52     *
53     * @return the allowed values or an empty array if no allowed values constraints
54     *         are defined
55     */
56    @NonNull
57    IndexHasKey[] indexHasKey() default {};
58  
59    /**
60     * Get the expect constraints for the type or field this annotation is applied
61     * to.
62     *
63     * @return the expected constraints or an empty array if no expected constraints
64     *         are defined
65     */
66    @NonNull
67    Expect[] expect() default {};
68  }