001// Generated from: ../../../../../../../../oscal/src/metaschema/oscal_control-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.StringAdapter;
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 dev.metaschema.oscal.lib.model.control.AbstractControlMatching;
015import edu.umd.cs.findbugs.annotations.Nullable;
016import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
017import org.apache.commons.lang3.builder.ToStringStyle;
018
019/**
020 * Selecting a set of controls by matching their IDs with a wildcard pattern.
021 */
022@MetaschemaAssembly(
023    formalName = "Match Controls by Pattern",
024    description = "Selecting a set of controls by matching their IDs with a wildcard pattern.",
025    name = "matching",
026    moduleClass = OscalControlCommonModule.class
027)
028public class ProfileMatching extends AbstractControlMatching implements IBoundObject {
029  private final IMetaschemaData __metaschemaData;
030
031  /**
032   * A <a href="https://en.wikipedia.org/wiki/Glob_(programming)">glob expression</a> matching the IDs of one or more controls to be selected.
033   */
034  @BoundFlag(
035      formalName = "Pattern",
036      description = "A [glob expression](https://en.wikipedia.org/wiki/Glob_(programming)) matching the IDs of one or more controls to be selected.",
037      name = "pattern",
038      typeAdapter = StringAdapter.class
039  )
040  private String _pattern;
041
042  /**
043   * Additional commentary about the containing object.
044   */
045  @BoundField(
046      formalName = "Remarks",
047      description = "Additional commentary about the containing object.",
048      useName = "remarks",
049      typeAdapter = MarkupMultilineAdapter.class
050  )
051  private MarkupMultiline _remarks;
052
053  /**
054   * Constructs a new {@code dev.metaschema.oscal.lib.model.ProfileMatching} instance with no metadata.
055   */
056  public ProfileMatching() {
057    this(null);
058  }
059
060  /**
061   * Constructs a new {@code dev.metaschema.oscal.lib.model.ProfileMatching} instance with the specified metadata.
062   *
063   * @param data
064   *           the metaschema data, or {@code null} if none
065   */
066  public ProfileMatching(IMetaschemaData data) {
067    this.__metaschemaData = data;
068  }
069
070  @Override
071  public IMetaschemaData getMetaschemaData() {
072    return __metaschemaData;
073  }
074
075  /**
076   * Get the "{@literal Pattern}".
077   *
078   * <p>
079   * A <a href="https://en.wikipedia.org/wiki/Glob_(programming)">glob expression</a> matching the IDs of one or more controls to be selected.
080   *
081   * @return the pattern value, or {@code null} if not set
082   */
083  @Nullable
084  public String getPattern() {
085    return _pattern;
086  }
087
088  /**
089   * Set the "{@literal Pattern}".
090   *
091   * <p>
092   * A <a href="https://en.wikipedia.org/wiki/Glob_(programming)">glob expression</a> matching the IDs of one or more controls to be selected.
093   *
094   * @param value
095   *           the pattern value to set, or {@code null} to clear
096   */
097  public void setPattern(@Nullable String value) {
098    _pattern = value;
099  }
100
101  /**
102   * Get the "{@literal Remarks}".
103   *
104   * <p>
105   * Additional commentary about the containing object.
106   *
107   * @return the remarks value, or {@code null} if not set
108   */
109  @Nullable
110  public MarkupMultiline getRemarks() {
111    return _remarks;
112  }
113
114  /**
115   * Set the "{@literal Remarks}".
116   *
117   * <p>
118   * Additional commentary about the containing object.
119   *
120   * @param value
121   *           the remarks value to set, or {@code null} to clear
122   */
123  public void setRemarks(@Nullable MarkupMultiline value) {
124    _remarks = value;
125  }
126
127  @Override
128  public String toString() {
129    return ObjectUtils.notNull(new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString());
130  }
131}