001// Generated from: ../../../../../../../../oscal/src/metaschema/oscal_ssp_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.UriReferenceAdapter; 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 java.net.URI; 017import org.apache.commons.lang3.builder.ReflectionToStringBuilder; 018import org.apache.commons.lang3.builder.ToStringStyle; 019 020/** 021 * Used to import the OSCAL profile representing the system's control baseline. 022 */ 023@MetaschemaAssembly( 024 formalName = "Import Profile", 025 description = "Used to import the OSCAL profile representing the system's control baseline.", 026 name = "import-profile", 027 moduleClass = OscalSspModule.class 028) 029public class ImportProfile implements IBoundObject { 030 private final IMetaschemaData __metaschemaData; 031 032 /** 033 * A resolvable URL reference to the profile or catalog to use as the system's control baseline. 034 */ 035 @BoundFlag( 036 formalName = "Profile Reference", 037 description = "A resolvable URL reference to the profile or catalog to use as the system's control baseline.", 038 name = "href", 039 required = true, 040 typeAdapter = UriReferenceAdapter.class, 041 remarks = "This value may be one of:\n" 042 + "\n" 043 + "1. an [absolute URI](https://pages.nist.gov/OSCAL/concepts/uri-use/#absolute-uri) that points to a network resolvable resource,\n" 044 + "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" 045 + "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" 046 + "\n" 047 + "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" 048 + "\n" 049 + "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." 050 ) 051 private URI _href; 052 053 /** 054 * Additional commentary about the containing object. 055 */ 056 @BoundField( 057 formalName = "Remarks", 058 description = "Additional commentary about the containing object.", 059 useName = "remarks", 060 typeAdapter = MarkupMultilineAdapter.class 061 ) 062 private MarkupMultiline _remarks; 063 064 /** 065 * Constructs a new {@code dev.metaschema.oscal.lib.model.ImportProfile} instance with no metadata. 066 */ 067 public ImportProfile() { 068 this(null); 069 } 070 071 /** 072 * Constructs a new {@code dev.metaschema.oscal.lib.model.ImportProfile} instance with the specified metadata. 073 * 074 * @param data 075 * the metaschema data, or {@code null} if none 076 */ 077 public ImportProfile(IMetaschemaData data) { 078 this.__metaschemaData = data; 079 } 080 081 @Override 082 public IMetaschemaData getMetaschemaData() { 083 return __metaschemaData; 084 } 085 086 /** 087 * Get the "{@literal Profile Reference}". 088 * 089 * <p> 090 * A resolvable URL reference to the profile or catalog to use as the system's control baseline. 091 * 092 * @return the href value 093 */ 094 @NonNull 095 public URI getHref() { 096 return _href; 097 } 098 099 /** 100 * Set the "{@literal Profile Reference}". 101 * 102 * <p> 103 * A resolvable URL reference to the profile or catalog to use as the system's control baseline. 104 * 105 * @param value 106 * the href value to set 107 */ 108 public void setHref(@NonNull URI value) { 109 _href = value; 110 } 111 112 /** 113 * Get the "{@literal Remarks}". 114 * 115 * <p> 116 * Additional commentary about the containing object. 117 * 118 * @return the remarks value, or {@code null} if not set 119 */ 120 @Nullable 121 public MarkupMultiline getRemarks() { 122 return _remarks; 123 } 124 125 /** 126 * Set the "{@literal Remarks}". 127 * 128 * <p> 129 * Additional commentary about the containing object. 130 * 131 * @param value 132 * the remarks value to set, or {@code null} to clear 133 */ 134 public void setRemarks(@Nullable MarkupMultiline value) { 135 _remarks = value; 136 } 137 138 @Override 139 public String toString() { 140 return ObjectUtils.notNull(new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString()); 141 } 142}