001/*
002 * SPDX-FileCopyrightText: none
003 * SPDX-License-Identifier: CC0-1.0
004 */
005
006package gov.nist.secauto.metaschema.databind.model.annotations;
007
008import static java.lang.annotation.RetentionPolicy.RUNTIME;
009
010import java.lang.annotation.Documented;
011import java.lang.annotation.ElementType;
012import java.lang.annotation.Retention;
013import java.lang.annotation.Target;
014
015import edu.umd.cs.findbugs.annotations.NonNull;
016
017@Documented
018@Retention(RUNTIME)
019@Target(ElementType.ANNOTATION_TYPE)
020public @interface ValueConstraints {
021  /**
022   * Get the let statements for the type of field this annotation is applied to.
023   *
024   * @return the let statements or an empty array if no let statements are defined
025   */
026  @NonNull
027  Let[] lets() default {};
028
029  /**
030   * Get the allowed value constraints for the type or field this annotation is
031   * applied to.
032   *
033   * @return the allowed values or an empty array if no allowed values constraints
034   *         are defined
035   */
036  @NonNull
037  AllowedValues[] allowedValues() default {};
038
039  /**
040   * Get the matches constraints for the type or field this annotation is applied
041   * to.
042   *
043   * @return the allowed values or an empty array if no allowed values constraints
044   *         are defined
045   */
046  @NonNull
047  Matches[] matches() default {};
048
049  /**
050   * Get the index-has-key constraints for the type or field this annotation is
051   * applied to.
052   *
053   * @return the allowed values or an empty array if no allowed values constraints
054   *         are defined
055   */
056  @NonNull
057  IndexHasKey[] indexHasKey() default {};
058
059  /**
060   * Get the expect constraints for the type or field this annotation is applied
061   * to.
062   *
063   * @return the expected constraints or an empty array if no expected constraints
064   *         are defined
065   */
066  @NonNull
067  Expect[] expect() default {};
068}