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.DateAdapter;
006import dev.metaschema.core.datatype.adapter.StringAdapter;
007import dev.metaschema.core.datatype.adapter.UuidAdapter;
008import dev.metaschema.core.datatype.markup.MarkupLine;
009import dev.metaschema.core.datatype.markup.MarkupLineAdapter;
010import dev.metaschema.core.datatype.markup.MarkupMultiline;
011import dev.metaschema.core.datatype.markup.MarkupMultilineAdapter;
012import dev.metaschema.core.model.IBoundObject;
013import dev.metaschema.core.model.IMetaschemaData;
014import dev.metaschema.core.model.JsonGroupAsBehavior;
015import dev.metaschema.core.model.constraint.IConstraint;
016import dev.metaschema.core.util.ObjectUtils;
017import dev.metaschema.databind.model.annotations.AllowedValue;
018import dev.metaschema.databind.model.annotations.AllowedValues;
019import dev.metaschema.databind.model.annotations.AssemblyConstraints;
020import dev.metaschema.databind.model.annotations.BoundAssembly;
021import dev.metaschema.databind.model.annotations.BoundField;
022import dev.metaschema.databind.model.annotations.BoundFlag;
023import dev.metaschema.databind.model.annotations.GroupAs;
024import dev.metaschema.databind.model.annotations.IndexHasKey;
025import dev.metaschema.databind.model.annotations.IsUnique;
026import dev.metaschema.databind.model.annotations.KeyField;
027import dev.metaschema.databind.model.annotations.Matches;
028import dev.metaschema.databind.model.annotations.MetaschemaAssembly;
029import dev.metaschema.databind.model.annotations.ValueConstraints;
030import edu.umd.cs.findbugs.annotations.NonNull;
031import edu.umd.cs.findbugs.annotations.Nullable;
032import java.util.LinkedList;
033import java.util.List;
034import java.util.UUID;
035import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
036import org.apache.commons.lang3.builder.ToStringStyle;
037
038/**
039 * A defined component that can be part of an implemented system.
040 */
041@MetaschemaAssembly(
042    formalName = "Component",
043    description = "A defined component that can be part of an implemented system.",
044    name = "defined-component",
045    moduleClass = OscalComponentDefinitionModule.class,
046    remarks = "Components may be products, services, APIs, policies, processes, plans, guidance, standards, or other tangible items that enable security and/or privacy.\n"
047            + "\n"
048            + "The `type` indicates which of these component types is represented.\n"
049            + "\n"
050            + "A group of components may be aggregated into a `capability`. For example, an account management capability that consists of an account management process, and a Lightweight Directory Access Protocol (LDAP) software implementation.\n"
051            + "\n"
052            + "Capabilities are expressed by combining one or more components.",
053    valueConstraints = @ValueConstraints(allowedValues = {@AllowedValues(id = "oscal-component-prop-name", level = IConstraint.Level.ERROR, target = "prop[has-oscal-namespace('http://csrc.nist.gov/ns/oscal')]/@name", values = {@AllowedValue(value = "version", description = "The version of the component."), @AllowedValue(value = "patch-level", description = "The specific patch level of the component."), @AllowedValue(value = "model", description = "The model of system used by the asset."), @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."), @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 = "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.")}), @AllowedValues(id = "oscal-component-link-rel-type", 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.")}), @AllowedValues(id = "oscal-component-role-id", level = IConstraint.Level.ERROR, target = "responsible-role/@role-id|control-implementation/implemented-requirement/responsible-role/@role-id|control-implementation/implemented-requirement/statement/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-asset-type-value", 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-allows-authenticated-scan-value", 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-virtual-value", 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-public-value", 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-implementation-point-value", 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-software-component-prop-name", 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-service-component-link-rel-type", 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.")})}, indexHasKey = @IndexHasKey(id = "oscal-index-metadata-location-uuid", 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)}),
054    modelConstraints = @AssemblyConstraints(unique = @IsUnique(id = "oscal-unique-defined-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."))
055)
056public class DefinedComponent implements IBoundObject {
057  private final IMetaschemaData __metaschemaData;
058
059  /**
060   * Provides a globally unique means to identify a given component.
061   */
062  @BoundFlag(
063      formalName = "Component Identifier",
064      description = "Provides a globally unique means to identify a given component.",
065      name = "uuid",
066      required = true,
067      typeAdapter = UuidAdapter.class
068  )
069  private UUID _uuid;
070
071  /**
072   * A category describing the purpose of the component.
073   */
074  @BoundFlag(
075      formalName = "Component Type",
076      description = "A category describing the purpose of the component.",
077      name = "type",
078      required = true,
079      typeAdapter = StringAdapter.class,
080      valueConstraints = @ValueConstraints(allowedValues = @AllowedValues(id = "oscal-component-type", level = IConstraint.Level.ERROR, allowOthers = true, values = {@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.")}))
081  )
082  private String _type;
083
084  /**
085   * A human readable name for the component.
086   */
087  @BoundField(
088      formalName = "Component Title",
089      description = "A human readable name for the component.",
090      useName = "title",
091      minOccurs = 1,
092      typeAdapter = MarkupLineAdapter.class
093  )
094  private MarkupLine _title;
095
096  /**
097   * A description of the component, including information about its function.
098   */
099  @BoundField(
100      formalName = "Component Description",
101      description = "A description of the component, including information about its function.",
102      useName = "description",
103      minOccurs = 1,
104      typeAdapter = MarkupMultilineAdapter.class
105  )
106  private MarkupMultiline _description;
107
108  /**
109   * A summary of the technological or business purpose of the component.
110   */
111  @BoundField(
112      formalName = "Purpose",
113      description = "A summary of the technological or business purpose of the component.",
114      useName = "purpose",
115      typeAdapter = MarkupLineAdapter.class
116  )
117  private MarkupLine _purpose;
118
119  /**
120   * An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair.
121   */
122  @BoundAssembly(
123      formalName = "Property",
124      description = "An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair.",
125      useName = "prop",
126      maxOccurs = -1,
127      groupAs = @GroupAs(name = "props", inJson = JsonGroupAsBehavior.LIST)
128  )
129  private List<Property> _props;
130
131  /**
132   * A reference to a local or remote resource, that has a specific relation to the containing object.
133   */
134  @BoundAssembly(
135      formalName = "Link",
136      description = "A reference to a local or remote resource, that has a specific relation to the containing object.",
137      useName = "link",
138      maxOccurs = -1,
139      groupAs = @GroupAs(name = "links", inJson = JsonGroupAsBehavior.LIST)
140  )
141  private List<Link> _links;
142
143  /**
144   * 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.
145   */
146  @BoundAssembly(
147      formalName = "Responsible Role",
148      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.",
149      useName = "responsible-role",
150      maxOccurs = -1,
151      groupAs = @GroupAs(name = "responsible-roles", inJson = JsonGroupAsBehavior.LIST)
152  )
153  private List<ResponsibleRole> _responsibleRoles;
154
155  /**
156   * Information about the protocol used to provide a service.
157   */
158  @BoundAssembly(
159      formalName = "Service Protocol Information",
160      description = "Information about the protocol used to provide a service.",
161      useName = "protocol",
162      remarks = "Used for `service` components to define the protocols supported by the service.",
163      maxOccurs = -1,
164      groupAs = @GroupAs(name = "protocols", inJson = JsonGroupAsBehavior.LIST)
165  )
166  private List<Protocol> _protocols;
167
168  /**
169   * Defines how the component or capability supports a set of controls.
170   */
171  @BoundAssembly(
172      formalName = "Control Implementation Set",
173      description = "Defines how the component or capability supports a set of controls.",
174      useName = "control-implementation",
175      maxOccurs = -1,
176      groupAs = @GroupAs(name = "control-implementations", inJson = JsonGroupAsBehavior.LIST)
177  )
178  private List<ComponentControlImplementation> _controlImplementations;
179
180  /**
181   * Additional commentary about the containing object.
182   */
183  @BoundField(
184      formalName = "Remarks",
185      description = "Additional commentary about the containing object.",
186      useName = "remarks",
187      typeAdapter = MarkupMultilineAdapter.class
188  )
189  private MarkupMultiline _remarks;
190
191  /**
192   * Constructs a new {@code dev.metaschema.oscal.lib.model.DefinedComponent} instance with no metadata.
193   */
194  public DefinedComponent() {
195    this(null);
196  }
197
198  /**
199   * Constructs a new {@code dev.metaschema.oscal.lib.model.DefinedComponent} instance with the specified metadata.
200   *
201   * @param data
202   *           the metaschema data, or {@code null} if none
203   */
204  public DefinedComponent(IMetaschemaData data) {
205    this.__metaschemaData = data;
206  }
207
208  @Override
209  public IMetaschemaData getMetaschemaData() {
210    return __metaschemaData;
211  }
212
213  /**
214   * Get the "{@literal Component Identifier}".
215   *
216   * <p>
217   * Provides a globally unique means to identify a given component.
218   *
219   * @return the uuid value
220   */
221  @NonNull
222  public UUID getUuid() {
223    return _uuid;
224  }
225
226  /**
227   * Set the "{@literal Component Identifier}".
228   *
229   * <p>
230   * Provides a globally unique means to identify a given component.
231   *
232   * @param value
233   *           the uuid value to set
234   */
235  public void setUuid(@NonNull UUID value) {
236    _uuid = value;
237  }
238
239  /**
240   * Get the "{@literal Component Type}".
241   *
242   * <p>
243   * A category describing the purpose of the component.
244   *
245   * @return the type value
246   */
247  @NonNull
248  public String getType() {
249    return _type;
250  }
251
252  /**
253   * Set the "{@literal Component Type}".
254   *
255   * <p>
256   * A category describing the purpose of the component.
257   *
258   * @param value
259   *           the type value to set
260   */
261  public void setType(@NonNull String value) {
262    _type = value;
263  }
264
265  /**
266   * Get the "{@literal Component Title}".
267   *
268   * <p>
269   * A human readable name for the component.
270   *
271   * @return the title value
272   */
273  @NonNull
274  public MarkupLine getTitle() {
275    return _title;
276  }
277
278  /**
279   * Set the "{@literal Component Title}".
280   *
281   * <p>
282   * A human readable name for the component.
283   *
284   * @param value
285   *           the title value to set
286   */
287  public void setTitle(@NonNull MarkupLine value) {
288    _title = value;
289  }
290
291  /**
292   * Get the "{@literal Component Description}".
293   *
294   * <p>
295   * A description of the component, including information about its function.
296   *
297   * @return the description value
298   */
299  @NonNull
300  public MarkupMultiline getDescription() {
301    return _description;
302  }
303
304  /**
305   * Set the "{@literal Component Description}".
306   *
307   * <p>
308   * A description of the component, including information about its function.
309   *
310   * @param value
311   *           the description value to set
312   */
313  public void setDescription(@NonNull MarkupMultiline value) {
314    _description = value;
315  }
316
317  /**
318   * Get the "{@literal Purpose}".
319   *
320   * <p>
321   * A summary of the technological or business purpose of the component.
322   *
323   * @return the purpose value, or {@code null} if not set
324   */
325  @Nullable
326  public MarkupLine getPurpose() {
327    return _purpose;
328  }
329
330  /**
331   * Set the "{@literal Purpose}".
332   *
333   * <p>
334   * A summary of the technological or business purpose of the component.
335   *
336   * @param value
337   *           the purpose value to set, or {@code null} to clear
338   */
339  public void setPurpose(@Nullable MarkupLine value) {
340    _purpose = value;
341  }
342
343  /**
344   * Get the "{@literal Property}".
345   *
346   * <p>
347   * An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair.
348   *
349   * @return the prop value
350   */
351  @NonNull
352  public List<Property> getProps() {
353    if (_props == null) {
354      _props = new LinkedList<>();
355    }
356    return ObjectUtils.notNull(_props);
357  }
358
359  /**
360   * Set the "{@literal Property}".
361   *
362   * <p>
363   * An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair.
364   *
365   * @param value
366   *           the prop value to set
367   */
368  public void setProps(@NonNull List<Property> value) {
369    _props = value;
370  }
371
372  /**
373   * Add a new {@link Property} item to the underlying collection.
374   * @param item the item to add
375   * @return {@code true}
376   */
377  public boolean addProp(Property item) {
378    Property value = ObjectUtils.requireNonNull(item,"item cannot be null");
379    if (_props == null) {
380      _props = new LinkedList<>();
381    }
382    return _props.add(value);
383  }
384
385  /**
386   * Remove the first matching {@link Property} item from the underlying collection.
387   * @param item the item to remove
388   * @return {@code true} if the item was removed or {@code false} otherwise
389   */
390  public boolean removeProp(Property item) {
391    Property value = ObjectUtils.requireNonNull(item,"item cannot be null");
392    return _props != null && _props.remove(value);
393  }
394
395  /**
396   * Get the "{@literal Link}".
397   *
398   * <p>
399   * A reference to a local or remote resource, that has a specific relation to the containing object.
400   *
401   * @return the link value
402   */
403  @NonNull
404  public List<Link> getLinks() {
405    if (_links == null) {
406      _links = new LinkedList<>();
407    }
408    return ObjectUtils.notNull(_links);
409  }
410
411  /**
412   * Set the "{@literal Link}".
413   *
414   * <p>
415   * A reference to a local or remote resource, that has a specific relation to the containing object.
416   *
417   * @param value
418   *           the link value to set
419   */
420  public void setLinks(@NonNull List<Link> value) {
421    _links = value;
422  }
423
424  /**
425   * Add a new {@link Link} item to the underlying collection.
426   * @param item the item to add
427   * @return {@code true}
428   */
429  public boolean addLink(Link item) {
430    Link value = ObjectUtils.requireNonNull(item,"item cannot be null");
431    if (_links == null) {
432      _links = new LinkedList<>();
433    }
434    return _links.add(value);
435  }
436
437  /**
438   * Remove the first matching {@link Link} item from the underlying collection.
439   * @param item the item to remove
440   * @return {@code true} if the item was removed or {@code false} otherwise
441   */
442  public boolean removeLink(Link item) {
443    Link value = ObjectUtils.requireNonNull(item,"item cannot be null");
444    return _links != null && _links.remove(value);
445  }
446
447  /**
448   * Get the "{@literal Responsible Role}".
449   *
450   * <p>
451   * 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.
452   *
453   * @return the responsible-role value
454   */
455  @NonNull
456  public List<ResponsibleRole> getResponsibleRoles() {
457    if (_responsibleRoles == null) {
458      _responsibleRoles = new LinkedList<>();
459    }
460    return ObjectUtils.notNull(_responsibleRoles);
461  }
462
463  /**
464   * Set the "{@literal Responsible Role}".
465   *
466   * <p>
467   * 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.
468   *
469   * @param value
470   *           the responsible-role value to set
471   */
472  public void setResponsibleRoles(@NonNull List<ResponsibleRole> value) {
473    _responsibleRoles = value;
474  }
475
476  /**
477   * Add a new {@link ResponsibleRole} item to the underlying collection.
478   * @param item the item to add
479   * @return {@code true}
480   */
481  public boolean addResponsibleRole(ResponsibleRole item) {
482    ResponsibleRole value = ObjectUtils.requireNonNull(item,"item cannot be null");
483    if (_responsibleRoles == null) {
484      _responsibleRoles = new LinkedList<>();
485    }
486    return _responsibleRoles.add(value);
487  }
488
489  /**
490   * Remove the first matching {@link ResponsibleRole} item from the underlying collection.
491   * @param item the item to remove
492   * @return {@code true} if the item was removed or {@code false} otherwise
493   */
494  public boolean removeResponsibleRole(ResponsibleRole item) {
495    ResponsibleRole value = ObjectUtils.requireNonNull(item,"item cannot be null");
496    return _responsibleRoles != null && _responsibleRoles.remove(value);
497  }
498
499  /**
500   * Get the "{@literal Service Protocol Information}".
501   *
502   * <p>
503   * Information about the protocol used to provide a service.
504   *
505   * @return the protocol value
506   */
507  @NonNull
508  public List<Protocol> getProtocols() {
509    if (_protocols == null) {
510      _protocols = new LinkedList<>();
511    }
512    return ObjectUtils.notNull(_protocols);
513  }
514
515  /**
516   * Set the "{@literal Service Protocol Information}".
517   *
518   * <p>
519   * Information about the protocol used to provide a service.
520   *
521   * @param value
522   *           the protocol value to set
523   */
524  public void setProtocols(@NonNull List<Protocol> value) {
525    _protocols = value;
526  }
527
528  /**
529   * Add a new {@link Protocol} item to the underlying collection.
530   * @param item the item to add
531   * @return {@code true}
532   */
533  public boolean addProtocol(Protocol item) {
534    Protocol value = ObjectUtils.requireNonNull(item,"item cannot be null");
535    if (_protocols == null) {
536      _protocols = new LinkedList<>();
537    }
538    return _protocols.add(value);
539  }
540
541  /**
542   * Remove the first matching {@link Protocol} item from the underlying collection.
543   * @param item the item to remove
544   * @return {@code true} if the item was removed or {@code false} otherwise
545   */
546  public boolean removeProtocol(Protocol item) {
547    Protocol value = ObjectUtils.requireNonNull(item,"item cannot be null");
548    return _protocols != null && _protocols.remove(value);
549  }
550
551  /**
552   * Get the "{@literal Control Implementation Set}".
553   *
554   * <p>
555   * Defines how the component or capability supports a set of controls.
556   *
557   * @return the control-implementation value
558   */
559  @NonNull
560  public List<ComponentControlImplementation> getControlImplementations() {
561    if (_controlImplementations == null) {
562      _controlImplementations = new LinkedList<>();
563    }
564    return ObjectUtils.notNull(_controlImplementations);
565  }
566
567  /**
568   * Set the "{@literal Control Implementation Set}".
569   *
570   * <p>
571   * Defines how the component or capability supports a set of controls.
572   *
573   * @param value
574   *           the control-implementation value to set
575   */
576  public void setControlImplementations(@NonNull List<ComponentControlImplementation> value) {
577    _controlImplementations = value;
578  }
579
580  /**
581   * Add a new {@link ComponentControlImplementation} item to the underlying collection.
582   * @param item the item to add
583   * @return {@code true}
584   */
585  public boolean addControlImplementation(ComponentControlImplementation item) {
586    ComponentControlImplementation value = ObjectUtils.requireNonNull(item,"item cannot be null");
587    if (_controlImplementations == null) {
588      _controlImplementations = new LinkedList<>();
589    }
590    return _controlImplementations.add(value);
591  }
592
593  /**
594   * Remove the first matching {@link ComponentControlImplementation} item from the underlying collection.
595   * @param item the item to remove
596   * @return {@code true} if the item was removed or {@code false} otherwise
597   */
598  public boolean removeControlImplementation(ComponentControlImplementation item) {
599    ComponentControlImplementation value = ObjectUtils.requireNonNull(item,"item cannot be null");
600    return _controlImplementations != null && _controlImplementations.remove(value);
601  }
602
603  /**
604   * Get the "{@literal Remarks}".
605   *
606   * <p>
607   * Additional commentary about the containing object.
608   *
609   * @return the remarks value, or {@code null} if not set
610   */
611  @Nullable
612  public MarkupMultiline getRemarks() {
613    return _remarks;
614  }
615
616  /**
617   * Set the "{@literal Remarks}".
618   *
619   * <p>
620   * Additional commentary about the containing object.
621   *
622   * @param value
623   *           the remarks value to set, or {@code null} to clear
624   */
625  public void setRemarks(@Nullable MarkupMultiline value) {
626    _remarks = value;
627  }
628
629  @Override
630  public String toString() {
631    return ObjectUtils.notNull(new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString());
632  }
633}