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.model.IBoundObject;
007import dev.metaschema.core.model.IMetaschemaData;
008import dev.metaschema.core.util.ObjectUtils;
009import dev.metaschema.databind.model.annotations.BoundFlag;
010import dev.metaschema.databind.model.annotations.MetaschemaAssembly;
011import edu.umd.cs.findbugs.annotations.NonNull;
012import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
013import org.apache.commons.lang3.builder.ToStringStyle;
014
015/**
016 * Used to select a control objective for inclusion/exclusion based on the control objective's identifier.
017 */
018@MetaschemaAssembly(
019    formalName = "Select Objective",
020    description = "Used to select a control objective for inclusion/exclusion based on the control objective's identifier.",
021    name = "select-objective-by-id",
022    moduleClass = OscalAssessmentCommonModule.class
023)
024public class SelectObjectiveById implements IBoundObject {
025  private final IMetaschemaData __metaschemaData;
026
027  /**
028   * Points to an assessment objective.
029   */
030  @BoundFlag(
031      formalName = "Objective ID",
032      description = "Points to an assessment objective.",
033      name = "objective-id",
034      required = true,
035      typeAdapter = TokenAdapter.class
036  )
037  private String _objectiveId;
038
039  /**
040   * Constructs a new {@code dev.metaschema.oscal.lib.model.SelectObjectiveById} instance with no metadata.
041   */
042  public SelectObjectiveById() {
043    this(null);
044  }
045
046  /**
047   * Constructs a new {@code dev.metaschema.oscal.lib.model.SelectObjectiveById} instance with the specified metadata.
048   *
049   * @param data
050   *           the metaschema data, or {@code null} if none
051   */
052  public SelectObjectiveById(IMetaschemaData data) {
053    this.__metaschemaData = data;
054  }
055
056  @Override
057  public IMetaschemaData getMetaschemaData() {
058    return __metaschemaData;
059  }
060
061  /**
062   * Get the "{@literal Objective ID}".
063   *
064   * <p>
065   * Points to an assessment objective.
066   *
067   * @return the objective-id value
068   */
069  @NonNull
070  public String getObjectiveId() {
071    return _objectiveId;
072  }
073
074  /**
075   * Set the "{@literal Objective ID}".
076   *
077   * <p>
078   * Points to an assessment objective.
079   *
080   * @param value
081   *           the objective-id value to set
082   */
083  public void setObjectiveId(@NonNull String value) {
084    _objectiveId = value;
085  }
086
087  @Override
088  public String toString() {
089    return ObjectUtils.notNull(new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString());
090  }
091}