001// Generated from: ../../../../../../../../oscal/src/metaschema/oscal_component_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.UuidAdapter; 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 java.util.UUID; 016import org.apache.commons.lang3.builder.ReflectionToStringBuilder; 017import org.apache.commons.lang3.builder.ToStringStyle; 018 019/** 020 * The collection of components comprising this capability. 021 */ 022@MetaschemaAssembly( 023 formalName = "Incorporates Component", 024 description = "The collection of components comprising this capability.", 025 name = "incorporates-component", 026 moduleClass = OscalComponentDefinitionModule.class 027) 028public class IncorporatesComponent implements IBoundObject { 029 private final IMetaschemaData __metaschemaData; 030 031 /** 032 * A <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented">machine-oriented</a> identifier reference to a <code>component</code>. 033 */ 034 @BoundFlag( 035 formalName = "Component Reference", 036 description = "A [machine-oriented](https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented) identifier reference to a `component`.", 037 name = "component-uuid", 038 required = true, 039 typeAdapter = UuidAdapter.class 040 ) 041 private UUID _componentUuid; 042 043 /** 044 * A description of the component, including information about its function. 045 */ 046 @BoundField( 047 formalName = "Component Description", 048 description = "A description of the component, including information about its function.", 049 useName = "description", 050 minOccurs = 1, 051 typeAdapter = MarkupMultilineAdapter.class 052 ) 053 private MarkupMultiline _description; 054 055 /** 056 * Constructs a new {@code dev.metaschema.oscal.lib.model.IncorporatesComponent} instance with no metadata. 057 */ 058 public IncorporatesComponent() { 059 this(null); 060 } 061 062 /** 063 * Constructs a new {@code dev.metaschema.oscal.lib.model.IncorporatesComponent} instance with the specified metadata. 064 * 065 * @param data 066 * the metaschema data, or {@code null} if none 067 */ 068 public IncorporatesComponent(IMetaschemaData data) { 069 this.__metaschemaData = data; 070 } 071 072 @Override 073 public IMetaschemaData getMetaschemaData() { 074 return __metaschemaData; 075 } 076 077 /** 078 * Get the "{@literal Component Reference}". 079 * 080 * <p> 081 * A <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented">machine-oriented</a> identifier reference to a <code>component</code>. 082 * 083 * @return the component-uuid value 084 */ 085 @NonNull 086 public UUID getComponentUuid() { 087 return _componentUuid; 088 } 089 090 /** 091 * Set the "{@literal Component Reference}". 092 * 093 * <p> 094 * A <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented">machine-oriented</a> identifier reference to a <code>component</code>. 095 * 096 * @param value 097 * the component-uuid value to set 098 */ 099 public void setComponentUuid(@NonNull UUID value) { 100 _componentUuid = value; 101 } 102 103 /** 104 * Get the "{@literal Component Description}". 105 * 106 * <p> 107 * A description of the component, including information about its function. 108 * 109 * @return the description value 110 */ 111 @NonNull 112 public MarkupMultiline getDescription() { 113 return _description; 114 } 115 116 /** 117 * Set the "{@literal Component Description}". 118 * 119 * <p> 120 * A description of the component, including information about its function. 121 * 122 * @param value 123 * the description value to set 124 */ 125 public void setDescription(@NonNull MarkupMultiline value) { 126 _description = value; 127 } 128 129 @Override 130 public String toString() { 131 return ObjectUtils.notNull(new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString()); 132 } 133}