001// Generated from: ../../../../../../../../oscal/src/metaschema/oscal_assessment-common_metaschema.xml
002// Do not edit - changes will be lost when regenerated.
003package dev.metaschema.oscal.lib.model;
004
005import dev.metaschema.core.datatype.adapter.TokenAdapter;
006import dev.metaschema.core.datatype.markup.MarkupMultiline;
007import dev.metaschema.core.datatype.markup.MarkupMultilineAdapter;
008import dev.metaschema.core.model.IBoundObject;
009import dev.metaschema.core.model.IMetaschemaData;
010import dev.metaschema.core.util.ObjectUtils;
011import dev.metaschema.databind.model.annotations.BoundField;
012import dev.metaschema.databind.model.annotations.BoundFlag;
013import dev.metaschema.databind.model.annotations.MetaschemaAssembly;
014import edu.umd.cs.findbugs.annotations.NonNull;
015import edu.umd.cs.findbugs.annotations.Nullable;
016import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
017import org.apache.commons.lang3.builder.ToStringStyle;
018
019/**
020 * Used to select a control objective for inclusion/exclusion based on the control objective's identifier.
021 */
022@MetaschemaAssembly(
023    formalName = "Select Objective",
024    description = "Used to select a control objective for inclusion/exclusion based on the control objective's identifier.",
025    name = "select-objective-by-id",
026    moduleClass = OscalAssessmentCommonModule.class
027)
028public class SelectObjectiveById implements IBoundObject {
029  private final IMetaschemaData __metaschemaData;
030
031  /**
032   * Points to an assessment objective.
033   */
034  @BoundFlag(
035      formalName = "Objective ID",
036      description = "Points to an assessment objective.",
037      name = "objective-id",
038      required = true,
039      typeAdapter = TokenAdapter.class
040  )
041  private String _objectiveId;
042
043  /**
044   * Additional commentary about the containing object.
045   */
046  @BoundField(
047      formalName = "Remarks",
048      description = "Additional commentary about the containing object.",
049      useName = "remarks",
050      typeAdapter = MarkupMultilineAdapter.class
051  )
052  private MarkupMultiline _remarks;
053
054  /**
055   * Constructs a new {@code dev.metaschema.oscal.lib.model.SelectObjectiveById} instance with no metadata.
056   */
057  public SelectObjectiveById() {
058    this(null);
059  }
060
061  /**
062   * Constructs a new {@code dev.metaschema.oscal.lib.model.SelectObjectiveById} instance with the specified metadata.
063   *
064   * @param data
065   *           the metaschema data, or {@code null} if none
066   */
067  public SelectObjectiveById(IMetaschemaData data) {
068    this.__metaschemaData = data;
069  }
070
071  @Override
072  public IMetaschemaData getMetaschemaData() {
073    return __metaschemaData;
074  }
075
076  /**
077   * Get the "{@literal Objective ID}".
078   *
079   * <p>
080   * Points to an assessment objective.
081   *
082   * @return the objective-id value
083   */
084  @NonNull
085  public String getObjectiveId() {
086    return _objectiveId;
087  }
088
089  /**
090   * Set the "{@literal Objective ID}".
091   *
092   * <p>
093   * Points to an assessment objective.
094   *
095   * @param value
096   *           the objective-id value to set
097   */
098  public void setObjectiveId(@NonNull String value) {
099    _objectiveId = value;
100  }
101
102  /**
103   * Get the "{@literal Remarks}".
104   *
105   * <p>
106   * Additional commentary about the containing object.
107   *
108   * @return the remarks value, or {@code null} if not set
109   */
110  @Nullable
111  public MarkupMultiline getRemarks() {
112    return _remarks;
113  }
114
115  /**
116   * Set the "{@literal Remarks}".
117   *
118   * <p>
119   * Additional commentary about the containing object.
120   *
121   * @param value
122   *           the remarks value to set, or {@code null} to clear
123   */
124  public void setRemarks(@Nullable MarkupMultiline value) {
125    _remarks = value;
126  }
127
128  @Override
129  public String toString() {
130    return ObjectUtils.notNull(new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString());
131  }
132}