001package gov.nist.secauto.oscal.lib.model;
002
003import gov.nist.secauto.metaschema.core.datatype.adapter.UriReferenceAdapter;
004import gov.nist.secauto.metaschema.core.datatype.markup.MarkupMultiline;
005import gov.nist.secauto.metaschema.core.datatype.markup.MarkupMultilineAdapter;
006import gov.nist.secauto.metaschema.core.model.IBoundObject;
007import gov.nist.secauto.metaschema.core.model.IMetaschemaData;
008import gov.nist.secauto.metaschema.databind.model.annotations.BoundField;
009import gov.nist.secauto.metaschema.databind.model.annotations.BoundFlag;
010import gov.nist.secauto.metaschema.databind.model.annotations.MetaschemaAssembly;
011import java.lang.Override;
012import java.lang.String;
013import java.net.URI;
014import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
015import org.apache.commons.lang3.builder.ToStringStyle;
016
017/**
018 * Used to import the OSCAL profile representing the system's control baseline.
019 */
020@MetaschemaAssembly(
021    formalName = "Import Profile",
022    description = "Used to import the OSCAL profile representing the system's control baseline.",
023    name = "import-profile",
024    moduleClass = OscalSspModule.class
025)
026public class ImportProfile implements IBoundObject {
027  private final IMetaschemaData __metaschemaData;
028
029  /**
030   * "A resolvable URL reference to the profile or catalog to use as the system's control baseline."
031   */
032  @BoundFlag(
033      formalName = "Profile Reference",
034      description = "A resolvable URL reference to the profile or catalog to use as the system's control baseline.",
035      name = "href",
036      required = true,
037      typeAdapter = UriReferenceAdapter.class,
038      remarks = "This value may be one of:\n"
039              + "\n"
040              + "1. an [absolute URI](https://pages.nist.gov/OSCAL/concepts/uri-use/#absolute-uri) that points to a network resolvable resource,\n"
041              + "2. a [relative reference](https://pages.nist.gov/OSCAL/concepts/uri-use/#relative-reference) pointing to a network resolvable resource whose base URI is the URI of the containing document, or\n"
042              + "3. a bare URI fragment (i.e., \\`#uuid\\`) pointing to a `back-matter` resource in this or an imported document (see [linking to another OSCAL object](https://pages.nist.gov/OSCAL/concepts/uri-use/#linking-to-another-oscal-object)).\n"
043              + "\n"
044              + "If the resource is an OSCAL profile, it is expected that a tool will resolve the profile according to the OSCAL [profile resolution specification](https://pages.nist.gov/OSCAL/concepts/processing/profile-resolution/) to produce a resolved profile for use when processing the containing system security plan. This allows a system security plan processor to use the baseline as a catalog of controls.\n"
045              + "\n"
046              + "While it is possible to reference a previously resolved OSCAL profile as a catalog, this practice is discouraged since the unresolved form of the profile communicates more information about selections and changes to the underlying catalog. Furthermore, the underlying catalog can be maintained separately from the profile, which also has maintenance advantages for distinct maintainers, ensuring that the best available information is produced through profile resolution."
047  )
048  private URI _href;
049
050  @BoundField(
051      formalName = "Remarks",
052      description = "Additional commentary about the containing object.",
053      useName = "remarks",
054      typeAdapter = MarkupMultilineAdapter.class
055  )
056  private MarkupMultiline _remarks;
057
058  public ImportProfile() {
059    this(null);
060  }
061
062  public ImportProfile(IMetaschemaData data) {
063    this.__metaschemaData = data;
064  }
065
066  @Override
067  public IMetaschemaData getMetaschemaData() {
068    return __metaschemaData;
069  }
070
071  public URI getHref() {
072    return _href;
073  }
074
075  public void setHref(URI value) {
076    _href = value;
077  }
078
079  public MarkupMultiline getRemarks() {
080    return _remarks;
081  }
082
083  public void setRemarks(MarkupMultiline value) {
084    _remarks = value;
085  }
086
087  @Override
088  public String toString() {
089    return new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString();
090  }
091}