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/**
018 * Represents a constraint let statement used to assign the result of a Metapath
019 * expression to a variable.
020 */
021@Documented
022@Retention(RUNTIME)
023@Target(ElementType.ANNOTATION_TYPE)
024public @interface Let {
025  /**
026   * The variable name.
027   *
028   * @return the variable name
029   */
030  @NonNull
031  String name();
032
033  /**
034   * A Metapath to use the query the values assigned to the variable.
035   *
036   * @return the value Metapath
037   */
038  @NonNull
039  String target();
040
041  /**
042   * Any remarks about the let statement, encoded as an escaped Markdown string.
043   *
044   * @return an encoded Markdown string or an empty string if no remarks are
045   *         provided
046   */
047  @NonNull
048  String remarks() default "";
049}