001// Generated from: ../../../../../../../../oscal/src/metaschema/oscal_implementation-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.DateAdapter; 006import dev.metaschema.core.datatype.adapter.DateTimeAdapter; 007import dev.metaschema.core.datatype.adapter.IPv4AddressAdapter; 008import dev.metaschema.core.datatype.adapter.IPv6AddressAdapter; 009import dev.metaschema.core.datatype.adapter.StringAdapter; 010import dev.metaschema.core.datatype.adapter.TokenAdapter; 011import dev.metaschema.core.datatype.adapter.UriAdapter; 012import dev.metaschema.core.datatype.adapter.UuidAdapter; 013import dev.metaschema.core.datatype.markup.MarkupLine; 014import dev.metaschema.core.datatype.markup.MarkupLineAdapter; 015import dev.metaschema.core.datatype.markup.MarkupMultiline; 016import dev.metaschema.core.datatype.markup.MarkupMultilineAdapter; 017import dev.metaschema.core.model.IBoundObject; 018import dev.metaschema.core.model.IMetaschemaData; 019import dev.metaschema.core.model.JsonGroupAsBehavior; 020import dev.metaschema.core.model.constraint.IConstraint; 021import dev.metaschema.core.util.ObjectUtils; 022import dev.metaschema.databind.model.annotations.AllowedValue; 023import dev.metaschema.databind.model.annotations.AllowedValues; 024import dev.metaschema.databind.model.annotations.AssemblyConstraints; 025import dev.metaschema.databind.model.annotations.BoundAssembly; 026import dev.metaschema.databind.model.annotations.BoundField; 027import dev.metaschema.databind.model.annotations.BoundFlag; 028import dev.metaschema.databind.model.annotations.GroupAs; 029import dev.metaschema.databind.model.annotations.IndexHasKey; 030import dev.metaschema.databind.model.annotations.IsUnique; 031import dev.metaschema.databind.model.annotations.KeyField; 032import dev.metaschema.databind.model.annotations.Matches; 033import dev.metaschema.databind.model.annotations.MetaschemaAssembly; 034import dev.metaschema.databind.model.annotations.ValueConstraints; 035import edu.umd.cs.findbugs.annotations.NonNull; 036import edu.umd.cs.findbugs.annotations.Nullable; 037import java.util.LinkedList; 038import java.util.List; 039import java.util.UUID; 040import org.apache.commons.lang3.builder.ReflectionToStringBuilder; 041import org.apache.commons.lang3.builder.ToStringStyle; 042 043/** 044 * A defined component that can be part of an implemented system. 045 */ 046@MetaschemaAssembly( 047 formalName = "Component", 048 description = "A defined component that can be part of an implemented system.", 049 name = "system-component", 050 moduleClass = OscalImplementationCommonModule.class, 051 remarks = "Components may be products, services, application programming interface (APIs), policies, processes, plans, guidance, standards, or other tangible items that enable security and/or privacy.\n" 052 + "\n" 053 + "The `type` indicates which of these component types is represented.\n" 054 + "\n" 055 + "When defining a `service` component where are relationship to other components is known, one or more `link` entries with rel values of provided-by and used-by can be used to link to the specific component identifier(s) that provide and use the service respectively.", 056 valueConstraints = @ValueConstraints(allowedValues = {@AllowedValues(id = "oscal-component-prop-name-values", level = IConstraint.Level.ERROR, target = "prop[has-oscal-namespace('http://csrc.nist.gov/ns/oscal')]/@name", values = {@AllowedValue(value = "implementation-point", description = "Relative placement of component ('internal' or 'external') to the system."), @AllowedValue(value = "leveraged-authorization-uuid", description = "UUID of the related leveraged-authorization assembly in this SSP."), @AllowedValue(value = "inherited-uuid", description = "UUID of the component as it was assigned in the leveraged system's SSP."), @AllowedValue(value = "asset-type", description = "Simple indication of the asset's function, such as Router, Storage Array, DNS Server."), @AllowedValue(value = "asset-id", description = "An organizationally specific identifier that is used to uniquely identify a logical or tangible item by the organization that owns the item."), @AllowedValue(value = "asset-tag", description = "An asset tag assigned by the organization responsible for maintaining the logical or tangible item."), @AllowedValue(value = "public", description = "Identifies whether the asset is publicly accessible (yes/no)"), @AllowedValue(value = "virtual", description = "Identifies whether the asset is virtualized (yes/no)"), @AllowedValue(value = "vlan-id", description = "Virtual LAN identifier of the asset."), @AllowedValue(value = "network-id", description = "The network identifier of the asset."), @AllowedValue(value = "label", description = "A human-readable label for the parent context."), @AllowedValue(value = "sort-id", description = "An alternative identifier, whose value is easily sortable among other such values in the document."), @AllowedValue(value = "baseline-configuration-name", description = "The name of the baseline configuration for the asset."), @AllowedValue(value = "allows-authenticated-scan", description = "Can the asset be check with an authenticated scan? (yes/no)"), @AllowedValue(value = "function", description = "The function provided by the asset for the system."), @AllowedValue(value = "hardware-model", description = "\\*\\*(deprecated)\\*\\* Use 'model' instead.", deprecatedVersion = "1.2.0"), @AllowedValue(value = "model", description = "The model of the component."), @AllowedValue(value = "os-name", description = "The name of the operating system used by the asset."), @AllowedValue(value = "os-version", description = "The version of the operating system used by the asset."), @AllowedValue(value = "software-name", description = "The software product name used by the asset."), @AllowedValue(value = "software-version", description = "The software product version used by the asset."), @AllowedValue(value = "software-patch-level", description = "The software product patch level used by the asset."), @AllowedValue(value = "version", description = "The version of the component."), @AllowedValue(value = "patch-level", description = "The specific patch level of the component."), @AllowedValue(value = "release-date", description = "The date the component was released, such as a software release date or policy publication date."), @AllowedValue(value = "validation-type", description = "Used with component-type='validation' to provide a well-known name for a kind of validation."), @AllowedValue(value = "validation-reference", description = "Used with component-type='validation' to indicate the validating body's assigned identifier for their validation of this component.")}), @AllowedValues(id = "oscal-component-link-rel-values", level = IConstraint.Level.ERROR, target = "link/@rel", allowOthers = true, values = {@AllowedValue(value = "depends-on", description = "A reference to another component that this component has a dependency on."), @AllowedValue(value = "validation", description = "A reference to another component of component-type=validation, that is a validation (e.g., FIPS 140-2) for this component"), @AllowedValue(value = "proof-of-compliance", description = "A pointer to a validation record (e.g., FIPS 140-2) or other compliance information."), @AllowedValue(value = "baseline-template", description = "A reference to the baseline template used to configure the asset."), @AllowedValue(value = "uses-service", description = "This service is used by the referenced component identifier."), @AllowedValue(value = "system-security-plan", description = "A link to the system security plan of the external system."), @AllowedValue(value = "uses-network", description = "This component uses the network provided by the identified network component."), @AllowedValue(value = "imported-from", description = "The hyperlink identifies a URI pointing to the `component` in a `component-definition` that originally defined the `component`.")}), @AllowedValues(id = "oscal-component-responsible-role-id-values", level = IConstraint.Level.ERROR, target = "responsible-role/@role-id", allowOthers = true, values = {@AllowedValue(value = "asset-owner", description = "Accountable for ensuring the asset is managed in accordance with organizational policies and procedures."), @AllowedValue(value = "asset-administrator", description = "Responsible for administering a set of assets."), @AllowedValue(value = "security-operations", description = "Members of the security operations center (SOC)."), @AllowedValue(value = "network-operations", description = "Members of the network operations center (NOC)."), @AllowedValue(value = "incident-response", description = "Responsible for responding to an event that could lead to loss of, or disruption to, an organization's operations, services or functions."), @AllowedValue(value = "help-desk", description = "Responsible for providing information and support to users."), @AllowedValue(value = "configuration-management", description = "Responsible for the configuration management processes governing changes to the asset."), @AllowedValue(value = "maintainer", description = "Responsible for the creation and maintenance of a component."), @AllowedValue(value = "provider", description = "Organization responsible for providing the component, if this is different from the \"maintainer\" (e.g., a reseller).")}), @AllowedValues(id = "oscal-component-prop-asset-type-values", level = IConstraint.Level.ERROR, target = "prop[has-oscal-namespace('http://csrc.nist.gov/ns/oscal') and @name='asset-type']/@value", allowOthers = true, values = {@AllowedValue(value = "operating-system", description = "System software that manages computer hardware, software resources, and provides common services for computer programs."), @AllowedValue(value = "database", description = "An electronic collection of data, or information, that is specially organized for rapid search and retrieval."), @AllowedValue(value = "web-server", description = "A system that delivers content or services to end users over the Internet or an intranet."), @AllowedValue(value = "dns-server", description = "A system that resolves domain names to internet protocol (IP) addresses."), @AllowedValue(value = "email-server", description = "A computer system that sends and receives electronic mail messages."), @AllowedValue(value = "directory-server", description = "A system that stores, organizes and provides access to directory information in order to unify network resources."), @AllowedValue(value = "pbx", description = "A private branch exchange (PBX) provides a a private telephone switchboard."), @AllowedValue(value = "firewall", description = "A network security system that monitors and controls incoming and outgoing network traffic based on predetermined security rules."), @AllowedValue(value = "router", description = "A physical or virtual networking device that forwards data packets between computer networks."), @AllowedValue(value = "switch", description = "A physical or virtual networking device that connects devices within a computer network by using packet switching to receive and forward data to the destination device."), @AllowedValue(value = "storage-array", description = "A consolidated, block-level data storage capability."), @AllowedValue(value = "appliance", description = "A physical or virtual machine that centralizes hardware, software, or services for a specific purpose.")}), @AllowedValues(id = "oscal-component-prop-allows-authenticated-scan-values", level = IConstraint.Level.ERROR, target = "prop[has-oscal-namespace('http://csrc.nist.gov/ns/oscal') and @name='allows-authenticated-scan']/@value", values = {@AllowedValue(value = "yes", description = "The component allows an authenticated scan."), @AllowedValue(value = "no", description = "The component does not allow an authenticated scan.")}), @AllowedValues(id = "oscal-component-prop-is-public-values", level = IConstraint.Level.ERROR, target = "prop[has-oscal-namespace('http://csrc.nist.gov/ns/oscal') and @name='public']/@value", values = {@AllowedValue(value = "yes", description = "The component is publicly accessible."), @AllowedValue(value = "no", description = "The component is not publicly accessible.")}), @AllowedValues(id = "oscal-component-prop-is-virtual-values", level = IConstraint.Level.ERROR, target = "prop[has-oscal-namespace('http://csrc.nist.gov/ns/oscal') and @name='virtual']/@value", values = {@AllowedValue(value = "yes", description = "The component is virtualized."), @AllowedValue(value = "no", description = "The component is not virtualized.")}), @AllowedValues(id = "oscal-component-prop-implementation-point-values", level = IConstraint.Level.ERROR, target = "prop[has-oscal-namespace('http://csrc.nist.gov/ns/oscal') and @name='implementation-point']/@value", values = {@AllowedValue(value = "internal", description = "The component is implemented within the system boundary."), @AllowedValue(value = "external", description = "The component is implemented outside the system boundary.")}), @AllowedValues(id = "oscal-component-hardware-service-software-prop-name-values", level = IConstraint.Level.ERROR, target = "(.)[@type=('software', 'hardware', 'service')]/prop[has-oscal-namespace('http://csrc.nist.gov/ns/oscal')]/@name", values = @AllowedValue(value = "vendor-name", description = "The name of the company or organization")), @AllowedValues(id = "oscal-component-prop-validation-link-rel-values", level = IConstraint.Level.ERROR, target = "(.)[@type='validation']/link/@rel", allowOthers = true, values = @AllowedValue(value = "validation-details", description = "A link to an online information provided by the authorizing body.")), @AllowedValues(id = "oscal-component-software-prop-name-values", level = IConstraint.Level.ERROR, target = "(.)[@type='software']/prop[has-oscal-namespace('http://csrc.nist.gov/ns/oscal')]/@name", values = @AllowedValue(value = "software-identifier", description = "If a \"software\" component-type, the identifier, such as a SWID tag, for the software component.")), @AllowedValues(id = "oscal-component-service-link-rel-values", level = IConstraint.Level.ERROR, target = "(.)[@type='service']/link/@rel", allowOthers = true, values = {@AllowedValue(value = "provided-by", description = "This service is provided by the referenced component identifier."), @AllowedValue(value = "used-by", description = "This service is used by the referenced component identifier.")}), @AllowedValues(id = "oscal-component-interconnection-prop-name-values", level = IConstraint.Level.ERROR, target = "(.)[@type='interconnection']/prop[has-oscal-namespace('http://csrc.nist.gov/ns/oscal')]/@name", values = {@AllowedValue(value = "isa-title", description = "Title of the Interconnection Security Agreement (ISA)."), @AllowedValue(value = "isa-date", description = "Date of the Interconnection Security Agreement (ISA)."), @AllowedValue(value = "isa-remote-system-name", description = "The name of the remote interconnected system."), @AllowedValue(value = "ipv4-address", description = "The Internet Protocol Version 4 address is for an interconnection, service, or software component."), @AllowedValue(value = "ipv6-address", description = "The Internet Protocol Version 6 address is for an interconnection, service, or software component."), @AllowedValue(value = "direction", description = "The direction categorizes the network connectivity of an interconnection, service, or software component."), @AllowedValue(value = "uri", description = "A Uniform Resource Identifier (URI) is for an interconnection, service, or software component."), @AllowedValue(value = "fqdn", description = "The full-qualified domain name (FQDN) of the asset.")}), @AllowedValues(id = "oscal-component-interconnection-service-software-system-prop-name-values", level = IConstraint.Level.ERROR, target = "(.)[@type=('interconnection', 'service', 'software', 'system')]/prop[has-oscal-namespace('http://csrc.nist.gov/ns/oscal')]/@name", values = {@AllowedValue(value = "ipv4-address", description = "The Internet Protocol Version 4 address is for an interconnection, service, or software component."), @AllowedValue(value = "ipv6-address", description = "The Internet Protocol Version 6 address is for an interconnection, service, or software component."), @AllowedValue(value = "direction", description = "The direction categorizes the network connectivity of an interconnection, service, or software component."), @AllowedValue(value = "uri", description = "A Uniform Resource Identifier (URI) is for an interconnection, service, or software component."), @AllowedValue(value = "fqdn", description = "The full-qualified domain name (FQDN) of the asset.")}), @AllowedValues(id = "oscal-component-prop-ipaddress-class-values", level = IConstraint.Level.ERROR, target = "prop[has-oscal-namespace('http://csrc.nist.gov/ns/oscal') and @name=('ipv4-address','ipv6-address')]/@class", values = {@AllowedValue(value = "local", description = "The identified IP address is for this system."), @AllowedValue(value = "remote", description = "The identified IP address is for the remote system to which this system is connected.")}), @AllowedValues(id = "oscal-component-interconnection-link-rel-values", level = IConstraint.Level.ERROR, target = "(.)[@type='interconnection']/link/@rel", allowOthers = true, values = @AllowedValue(value = "isa-agreement", description = "A link to the system interconnection agreement.")), @AllowedValues(id = "oscal-component-interconnection-responsible-role-id-values", level = IConstraint.Level.ERROR, target = "(.)[@type='interconnection']/responsible-role/@role-id", allowOthers = true, values = {@AllowedValue(value = "isa-poc-local", description = "Interconnection Security Agreement (ISA) point of contact (POC) for this system."), @AllowedValue(value = "isa-poc-remote", description = "Interconnection Security Agreement (ISA) point of contact (POC) for the remote interconnected system."), @AllowedValue(value = "isa-authorizing-official-local", description = "Interconnection Security Agreement (ISA) authorizing official for this system."), @AllowedValue(value = "isa-authorizing-official-remote", description = "Interconnection Security Agreement (ISA) authorizing official for the remote interconnected system.")}), @AllowedValues(id = "oscal-component-prop-direction-values", level = IConstraint.Level.ERROR, target = "prop[has-oscal-namespace('http://csrc.nist.gov/ns/oscal') and @name='direction']/@value", values = {@AllowedValue(value = "incoming", description = "Data from the remote system flows into this system."), @AllowedValue(value = "outgoing", description = "Data from this system flows to the remote system.")})}, indexHasKey = @IndexHasKey(id = "oscal-component-prop-physical-location", level = IConstraint.Level.ERROR, target = "prop[@name='physical-location']", indexName = "index-metadata-location-uuid", keyFields = @KeyField(target = "@value")), matches = {@Matches(id = "oscal-component-inherited-uuid-value-datatype", level = IConstraint.Level.ERROR, target = "prop[has-oscal-namespace('http://csrc.nist.gov/ns/oscal') and @name='inherited-uuid']/@value", typeAdapter = UuidAdapter.class), @Matches(id = "oscal-component-release-date-value-datatype", level = IConstraint.Level.ERROR, target = "prop[has-oscal-namespace('http://csrc.nist.gov/ns/oscal') and @name='release-date']/@value", typeAdapter = DateAdapter.class), @Matches(id = "oscal-component-prop-isa-date-value-datatype", level = IConstraint.Level.ERROR, target = "prop[has-oscal-namespace('http://csrc.nist.gov/ns/oscal') and @name='isa-date']/@value", typeAdapter = DateTimeAdapter.class), @Matches(id = "oscal-component-prop-ipv4address-value-datatype", level = IConstraint.Level.ERROR, target = "prop[has-oscal-namespace('http://csrc.nist.gov/ns/oscal') and @name='ipv4-address']/@value", typeAdapter = IPv4AddressAdapter.class), @Matches(id = "oscal-component-prop-ipv6address-value-datatype", level = IConstraint.Level.ERROR, target = "prop[has-oscal-namespace('http://csrc.nist.gov/ns/oscal') and @name='ipv6-address']/@value", typeAdapter = IPv6AddressAdapter.class), @Matches(id = "oscal-component-prop-uri-value-datatype", level = IConstraint.Level.ERROR, target = "prop[has-oscal-namespace('http://csrc.nist.gov/ns/oscal') and @name='uri']/@value", typeAdapter = UriAdapter.class)}), 057 modelConstraints = @AssemblyConstraints(unique = @IsUnique(id = "oscal-unique-system-component-responsible-role", level = IConstraint.Level.ERROR, target = "responsible-role", keyFields = @KeyField(target = "@role-id"), remarks = "Since `responsible-role` associates multiple `party-uuid` entries with a single `role-id`, each role-id must be referenced only once.")) 058) 059public class SystemComponent implements IBoundObject { 060 private final IMetaschemaData __metaschemaData; 061 062 /** 063 * A <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented">machine-oriented</a>, <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#globally-unique">globally unique</a> identifier with <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#cross-instance">cross-instance</a> scope that can be used to reference this component elsewhere in <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#scope">this or other OSCAL instances</a>. The locally defined <em>UUID</em> of the <code>component</code> can be used to reference the data item locally or globally (e.g., in an imported OSCAL instance). This UUID should be assigned <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#consistency">per-subject</a>, which means it should be consistently used to identify the same subject across revisions of the document. 064 */ 065 @BoundFlag( 066 formalName = "Component Identifier", 067 description = "A [machine-oriented](https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented), [globally unique](https://pages.nist.gov/OSCAL/concepts/identifier-use/#globally-unique) identifier with [cross-instance](https://pages.nist.gov/OSCAL/concepts/identifier-use/#cross-instance) scope that can be used to reference this component elsewhere in [this or other OSCAL instances](https://pages.nist.gov/OSCAL/concepts/identifier-use/#scope). The locally defined *UUID* of the `component` can be used to reference the data item locally or globally (e.g., in an imported OSCAL instance). This UUID should be assigned [per-subject](https://pages.nist.gov/OSCAL/concepts/identifier-use/#consistency), which means it should be consistently used to identify the same subject across revisions of the document.", 068 name = "uuid", 069 required = true, 070 typeAdapter = UuidAdapter.class 071 ) 072 private UUID _uuid; 073 074 /** 075 * A category describing the purpose of the component. 076 */ 077 @BoundFlag( 078 formalName = "Component Type", 079 description = "A category describing the purpose of the component.", 080 name = "type", 081 required = true, 082 typeAdapter = StringAdapter.class, 083 valueConstraints = @ValueConstraints(allowedValues = @AllowedValues(id = "oscal-component-type-values", level = IConstraint.Level.ERROR, allowOthers = true, values = {@AllowedValue(value = "this-system", description = "The system as a whole."), @AllowedValue(value = "system", description = "An external system, which may be a leveraged system or the other side of an interconnection."), @AllowedValue(value = "interconnection", description = "A connection to something outside this system."), @AllowedValue(value = "software", description = "Any software, operating system, or firmware."), @AllowedValue(value = "hardware", description = "A physical device."), @AllowedValue(value = "service", description = "A service that may provide APIs."), @AllowedValue(value = "policy", description = "An enforceable policy."), @AllowedValue(value = "physical", description = "A tangible asset used to provide physical protections or countermeasures."), @AllowedValue(value = "process-procedure", description = "A list of steps or actions to take to achieve some end result."), @AllowedValue(value = "plan", description = "An applicable plan."), @AllowedValue(value = "guidance", description = "Any guideline or recommendation."), @AllowedValue(value = "standard", description = "Any organizational or industry standard."), @AllowedValue(value = "validation", description = "An external assessment performed on some other component, that has been validated by a third-party."), @AllowedValue(value = "network", description = "A physical or virtual network.")})) 084 ) 085 private String _type; 086 087 /** 088 * A human readable name for the system component. 089 */ 090 @BoundField( 091 formalName = "Component Title", 092 description = "A human readable name for the system component.", 093 useName = "title", 094 minOccurs = 1, 095 typeAdapter = MarkupLineAdapter.class 096 ) 097 private MarkupLine _title; 098 099 /** 100 * A description of the component, including information about its function. 101 */ 102 @BoundField( 103 formalName = "Component Description", 104 description = "A description of the component, including information about its function.", 105 useName = "description", 106 minOccurs = 1, 107 typeAdapter = MarkupMultilineAdapter.class 108 ) 109 private MarkupMultiline _description; 110 111 /** 112 * A summary of the technological or business purpose of the component. 113 */ 114 @BoundField( 115 formalName = "Purpose", 116 description = "A summary of the technological or business purpose of the component.", 117 useName = "purpose", 118 typeAdapter = MarkupLineAdapter.class 119 ) 120 private MarkupLine _purpose; 121 122 /** 123 * An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair. 124 */ 125 @BoundAssembly( 126 formalName = "Property", 127 description = "An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair.", 128 useName = "prop", 129 maxOccurs = -1, 130 groupAs = @GroupAs(name = "props", inJson = JsonGroupAsBehavior.LIST) 131 ) 132 private List<Property> _props; 133 134 /** 135 * A reference to a local or remote resource, that has a specific relation to the containing object. 136 */ 137 @BoundAssembly( 138 formalName = "Link", 139 description = "A reference to a local or remote resource, that has a specific relation to the containing object.", 140 useName = "link", 141 maxOccurs = -1, 142 groupAs = @GroupAs(name = "links", inJson = JsonGroupAsBehavior.LIST) 143 ) 144 private List<Link> _links; 145 146 /** 147 * Describes the operational status of the system component. 148 */ 149 @BoundAssembly( 150 formalName = "Status", 151 description = "Describes the operational status of the system component.", 152 useName = "status", 153 minOccurs = 1 154 ) 155 private Status _status; 156 157 /** 158 * A reference to a role with responsibility for performing a function relative to the containing object, optionally associated with a set of persons and/or organizations that perform that role. 159 */ 160 @BoundAssembly( 161 formalName = "Responsible Role", 162 description = "A reference to a role with responsibility for performing a function relative to the containing object, optionally associated with a set of persons and/or organizations that perform that role.", 163 useName = "responsible-role", 164 maxOccurs = -1, 165 groupAs = @GroupAs(name = "responsible-roles", inJson = JsonGroupAsBehavior.LIST) 166 ) 167 private List<ResponsibleRole> _responsibleRoles; 168 169 /** 170 * Information about the protocol used to provide a service. 171 */ 172 @BoundAssembly( 173 formalName = "Service Protocol Information", 174 description = "Information about the protocol used to provide a service.", 175 useName = "protocol", 176 remarks = "Used for `service` components to define the protocols supported by the service.", 177 maxOccurs = -1, 178 groupAs = @GroupAs(name = "protocols", inJson = JsonGroupAsBehavior.LIST) 179 ) 180 private List<Protocol> _protocols; 181 182 /** 183 * Additional commentary about the containing object. 184 */ 185 @BoundField( 186 formalName = "Remarks", 187 description = "Additional commentary about the containing object.", 188 useName = "remarks", 189 typeAdapter = MarkupMultilineAdapter.class 190 ) 191 private MarkupMultiline _remarks; 192 193 /** 194 * Constructs a new {@code dev.metaschema.oscal.lib.model.SystemComponent} instance with no metadata. 195 */ 196 public SystemComponent() { 197 this(null); 198 } 199 200 /** 201 * Constructs a new {@code dev.metaschema.oscal.lib.model.SystemComponent} instance with the specified metadata. 202 * 203 * @param data 204 * the metaschema data, or {@code null} if none 205 */ 206 public SystemComponent(IMetaschemaData data) { 207 this.__metaschemaData = data; 208 } 209 210 @Override 211 public IMetaschemaData getMetaschemaData() { 212 return __metaschemaData; 213 } 214 215 /** 216 * Get the "{@literal Component Identifier}". 217 * 218 * <p> 219 * A <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented">machine-oriented</a>, <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#globally-unique">globally unique</a> identifier with <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#cross-instance">cross-instance</a> scope that can be used to reference this component elsewhere in <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#scope">this or other OSCAL instances</a>. The locally defined <em>UUID</em> of the <code>component</code> can be used to reference the data item locally or globally (e.g., in an imported OSCAL instance). This UUID should be assigned <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#consistency">per-subject</a>, which means it should be consistently used to identify the same subject across revisions of the document. 220 * 221 * @return the uuid value 222 */ 223 @NonNull 224 public UUID getUuid() { 225 return _uuid; 226 } 227 228 /** 229 * Set the "{@literal Component Identifier}". 230 * 231 * <p> 232 * A <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented">machine-oriented</a>, <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#globally-unique">globally unique</a> identifier with <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#cross-instance">cross-instance</a> scope that can be used to reference this component elsewhere in <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#scope">this or other OSCAL instances</a>. The locally defined <em>UUID</em> of the <code>component</code> can be used to reference the data item locally or globally (e.g., in an imported OSCAL instance). This UUID should be assigned <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#consistency">per-subject</a>, which means it should be consistently used to identify the same subject across revisions of the document. 233 * 234 * @param value 235 * the uuid value to set 236 */ 237 public void setUuid(@NonNull UUID value) { 238 _uuid = value; 239 } 240 241 /** 242 * Get the "{@literal Component Type}". 243 * 244 * <p> 245 * A category describing the purpose of the component. 246 * 247 * @return the type value 248 */ 249 @NonNull 250 public String getType() { 251 return _type; 252 } 253 254 /** 255 * Set the "{@literal Component Type}". 256 * 257 * <p> 258 * A category describing the purpose of the component. 259 * 260 * @param value 261 * the type value to set 262 */ 263 public void setType(@NonNull String value) { 264 _type = value; 265 } 266 267 /** 268 * Get the "{@literal Component Title}". 269 * 270 * <p> 271 * A human readable name for the system component. 272 * 273 * @return the title value 274 */ 275 @NonNull 276 public MarkupLine getTitle() { 277 return _title; 278 } 279 280 /** 281 * Set the "{@literal Component Title}". 282 * 283 * <p> 284 * A human readable name for the system component. 285 * 286 * @param value 287 * the title value to set 288 */ 289 public void setTitle(@NonNull MarkupLine value) { 290 _title = value; 291 } 292 293 /** 294 * Get the "{@literal Component Description}". 295 * 296 * <p> 297 * A description of the component, including information about its function. 298 * 299 * @return the description value 300 */ 301 @NonNull 302 public MarkupMultiline getDescription() { 303 return _description; 304 } 305 306 /** 307 * Set the "{@literal Component Description}". 308 * 309 * <p> 310 * A description of the component, including information about its function. 311 * 312 * @param value 313 * the description value to set 314 */ 315 public void setDescription(@NonNull MarkupMultiline value) { 316 _description = value; 317 } 318 319 /** 320 * Get the "{@literal Purpose}". 321 * 322 * <p> 323 * A summary of the technological or business purpose of the component. 324 * 325 * @return the purpose value, or {@code null} if not set 326 */ 327 @Nullable 328 public MarkupLine getPurpose() { 329 return _purpose; 330 } 331 332 /** 333 * Set the "{@literal Purpose}". 334 * 335 * <p> 336 * A summary of the technological or business purpose of the component. 337 * 338 * @param value 339 * the purpose value to set, or {@code null} to clear 340 */ 341 public void setPurpose(@Nullable MarkupLine value) { 342 _purpose = value; 343 } 344 345 /** 346 * Get the "{@literal Property}". 347 * 348 * <p> 349 * An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair. 350 * 351 * @return the prop value 352 */ 353 @NonNull 354 public List<Property> getProps() { 355 if (_props == null) { 356 _props = new LinkedList<>(); 357 } 358 return ObjectUtils.notNull(_props); 359 } 360 361 /** 362 * Set the "{@literal Property}". 363 * 364 * <p> 365 * An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair. 366 * 367 * @param value 368 * the prop value to set 369 */ 370 public void setProps(@NonNull List<Property> value) { 371 _props = value; 372 } 373 374 /** 375 * Add a new {@link Property} item to the underlying collection. 376 * @param item the item to add 377 * @return {@code true} 378 */ 379 public boolean addProp(Property item) { 380 Property value = ObjectUtils.requireNonNull(item,"item cannot be null"); 381 if (_props == null) { 382 _props = new LinkedList<>(); 383 } 384 return _props.add(value); 385 } 386 387 /** 388 * Remove the first matching {@link Property} item from the underlying collection. 389 * @param item the item to remove 390 * @return {@code true} if the item was removed or {@code false} otherwise 391 */ 392 public boolean removeProp(Property item) { 393 Property value = ObjectUtils.requireNonNull(item,"item cannot be null"); 394 return _props != null && _props.remove(value); 395 } 396 397 /** 398 * Get the "{@literal Link}". 399 * 400 * <p> 401 * A reference to a local or remote resource, that has a specific relation to the containing object. 402 * 403 * @return the link value 404 */ 405 @NonNull 406 public List<Link> getLinks() { 407 if (_links == null) { 408 _links = new LinkedList<>(); 409 } 410 return ObjectUtils.notNull(_links); 411 } 412 413 /** 414 * Set the "{@literal Link}". 415 * 416 * <p> 417 * A reference to a local or remote resource, that has a specific relation to the containing object. 418 * 419 * @param value 420 * the link value to set 421 */ 422 public void setLinks(@NonNull List<Link> value) { 423 _links = value; 424 } 425 426 /** 427 * Add a new {@link Link} item to the underlying collection. 428 * @param item the item to add 429 * @return {@code true} 430 */ 431 public boolean addLink(Link item) { 432 Link value = ObjectUtils.requireNonNull(item,"item cannot be null"); 433 if (_links == null) { 434 _links = new LinkedList<>(); 435 } 436 return _links.add(value); 437 } 438 439 /** 440 * Remove the first matching {@link Link} item from the underlying collection. 441 * @param item the item to remove 442 * @return {@code true} if the item was removed or {@code false} otherwise 443 */ 444 public boolean removeLink(Link item) { 445 Link value = ObjectUtils.requireNonNull(item,"item cannot be null"); 446 return _links != null && _links.remove(value); 447 } 448 449 /** 450 * Get the "{@literal Status}". 451 * 452 * <p> 453 * Describes the operational status of the system component. 454 * 455 * @return the status value 456 */ 457 @NonNull 458 public Status getStatus() { 459 return _status; 460 } 461 462 /** 463 * Set the "{@literal Status}". 464 * 465 * <p> 466 * Describes the operational status of the system component. 467 * 468 * @param value 469 * the status value to set 470 */ 471 public void setStatus(@NonNull Status value) { 472 _status = value; 473 } 474 475 /** 476 * Get the "{@literal Responsible Role}". 477 * 478 * <p> 479 * A reference to a role with responsibility for performing a function relative to the containing object, optionally associated with a set of persons and/or organizations that perform that role. 480 * 481 * @return the responsible-role value 482 */ 483 @NonNull 484 public List<ResponsibleRole> getResponsibleRoles() { 485 if (_responsibleRoles == null) { 486 _responsibleRoles = new LinkedList<>(); 487 } 488 return ObjectUtils.notNull(_responsibleRoles); 489 } 490 491 /** 492 * Set the "{@literal Responsible Role}". 493 * 494 * <p> 495 * A reference to a role with responsibility for performing a function relative to the containing object, optionally associated with a set of persons and/or organizations that perform that role. 496 * 497 * @param value 498 * the responsible-role value to set 499 */ 500 public void setResponsibleRoles(@NonNull List<ResponsibleRole> value) { 501 _responsibleRoles = value; 502 } 503 504 /** 505 * Add a new {@link ResponsibleRole} item to the underlying collection. 506 * @param item the item to add 507 * @return {@code true} 508 */ 509 public boolean addResponsibleRole(ResponsibleRole item) { 510 ResponsibleRole value = ObjectUtils.requireNonNull(item,"item cannot be null"); 511 if (_responsibleRoles == null) { 512 _responsibleRoles = new LinkedList<>(); 513 } 514 return _responsibleRoles.add(value); 515 } 516 517 /** 518 * Remove the first matching {@link ResponsibleRole} item from the underlying collection. 519 * @param item the item to remove 520 * @return {@code true} if the item was removed or {@code false} otherwise 521 */ 522 public boolean removeResponsibleRole(ResponsibleRole item) { 523 ResponsibleRole value = ObjectUtils.requireNonNull(item,"item cannot be null"); 524 return _responsibleRoles != null && _responsibleRoles.remove(value); 525 } 526 527 /** 528 * Get the "{@literal Service Protocol Information}". 529 * 530 * <p> 531 * Information about the protocol used to provide a service. 532 * 533 * @return the protocol value 534 */ 535 @NonNull 536 public List<Protocol> getProtocols() { 537 if (_protocols == null) { 538 _protocols = new LinkedList<>(); 539 } 540 return ObjectUtils.notNull(_protocols); 541 } 542 543 /** 544 * Set the "{@literal Service Protocol Information}". 545 * 546 * <p> 547 * Information about the protocol used to provide a service. 548 * 549 * @param value 550 * the protocol value to set 551 */ 552 public void setProtocols(@NonNull List<Protocol> value) { 553 _protocols = value; 554 } 555 556 /** 557 * Add a new {@link Protocol} item to the underlying collection. 558 * @param item the item to add 559 * @return {@code true} 560 */ 561 public boolean addProtocol(Protocol item) { 562 Protocol value = ObjectUtils.requireNonNull(item,"item cannot be null"); 563 if (_protocols == null) { 564 _protocols = new LinkedList<>(); 565 } 566 return _protocols.add(value); 567 } 568 569 /** 570 * Remove the first matching {@link Protocol} item from the underlying collection. 571 * @param item the item to remove 572 * @return {@code true} if the item was removed or {@code false} otherwise 573 */ 574 public boolean removeProtocol(Protocol item) { 575 Protocol value = ObjectUtils.requireNonNull(item,"item cannot be null"); 576 return _protocols != null && _protocols.remove(value); 577 } 578 579 /** 580 * Get the "{@literal Remarks}". 581 * 582 * <p> 583 * Additional commentary about the containing object. 584 * 585 * @return the remarks value, or {@code null} if not set 586 */ 587 @Nullable 588 public MarkupMultiline getRemarks() { 589 return _remarks; 590 } 591 592 /** 593 * Set the "{@literal Remarks}". 594 * 595 * <p> 596 * Additional commentary about the containing object. 597 * 598 * @param value 599 * the remarks value to set, or {@code null} to clear 600 */ 601 public void setRemarks(@Nullable MarkupMultiline value) { 602 _remarks = value; 603 } 604 605 @Override 606 public String toString() { 607 return ObjectUtils.notNull(new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString()); 608 } 609 610 /** 611 * Describes the operational status of the system component. 612 */ 613 @MetaschemaAssembly( 614 formalName = "Status", 615 description = "Describes the operational status of the system component.", 616 name = "status", 617 moduleClass = OscalImplementationCommonModule.class 618 ) 619 public static class Status implements IBoundObject { 620 private final IMetaschemaData __metaschemaData; 621 622 /** 623 * The operational status. 624 */ 625 @BoundFlag( 626 formalName = "State", 627 description = "The operational status.", 628 name = "state", 629 required = true, 630 typeAdapter = TokenAdapter.class, 631 valueConstraints = @ValueConstraints(allowedValues = @AllowedValues(id = "oscal-component-status-state-values", level = IConstraint.Level.ERROR, values = {@AllowedValue(value = "under-development", description = "The component is being designed, developed, or implemented."), @AllowedValue(value = "operational", description = "The component is currently operational and is available for use in the system."), @AllowedValue(value = "disposition", description = "The component is no longer operational."), @AllowedValue(value = "other", description = "Some other state.")})) 632 ) 633 private String _state; 634 635 /** 636 * Additional commentary about the containing object. 637 */ 638 @BoundField( 639 formalName = "Remarks", 640 description = "Additional commentary about the containing object.", 641 useName = "remarks", 642 typeAdapter = MarkupMultilineAdapter.class 643 ) 644 private MarkupMultiline _remarks; 645 646 /** 647 * Constructs a new {@code dev.metaschema.oscal.lib.model.SystemComponent.Status} instance with no metadata. 648 */ 649 public Status() { 650 this(null); 651 } 652 653 /** 654 * Constructs a new {@code dev.metaschema.oscal.lib.model.SystemComponent.Status} instance with the specified metadata. 655 * 656 * @param data 657 * the metaschema data, or {@code null} if none 658 */ 659 public Status(IMetaschemaData data) { 660 this.__metaschemaData = data; 661 } 662 663 @Override 664 public IMetaschemaData getMetaschemaData() { 665 return __metaschemaData; 666 } 667 668 /** 669 * Get the "{@literal State}". 670 * 671 * <p> 672 * The operational status. 673 * 674 * @return the state value 675 */ 676 @NonNull 677 public String getState() { 678 return _state; 679 } 680 681 /** 682 * Set the "{@literal State}". 683 * 684 * <p> 685 * The operational status. 686 * 687 * @param value 688 * the state value to set 689 */ 690 public void setState(@NonNull String value) { 691 _state = value; 692 } 693 694 /** 695 * Get the "{@literal Remarks}". 696 * 697 * <p> 698 * Additional commentary about the containing object. 699 * 700 * @return the remarks value, or {@code null} if not set 701 */ 702 @Nullable 703 public MarkupMultiline getRemarks() { 704 return _remarks; 705 } 706 707 /** 708 * Set the "{@literal Remarks}". 709 * 710 * <p> 711 * Additional commentary about the containing object. 712 * 713 * @param value 714 * the remarks value to set, or {@code null} to clear 715 */ 716 public void setRemarks(@Nullable MarkupMultiline value) { 717 _remarks = value; 718 } 719 720 @Override 721 public String toString() { 722 return ObjectUtils.notNull(new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString()); 723 } 724 } 725}