001package gov.nist.secauto.oscal.lib.model;
002
003import gov.nist.secauto.metaschema.core.datatype.adapter.UuidAdapter;
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.core.model.JsonGroupAsBehavior;
009import gov.nist.secauto.metaschema.core.model.constraint.IConstraint;
010import gov.nist.secauto.metaschema.core.util.ObjectUtils;
011import gov.nist.secauto.metaschema.databind.model.annotations.AllowedValue;
012import gov.nist.secauto.metaschema.databind.model.annotations.AllowedValues;
013import gov.nist.secauto.metaschema.databind.model.annotations.AssemblyConstraints;
014import gov.nist.secauto.metaschema.databind.model.annotations.BoundAssembly;
015import gov.nist.secauto.metaschema.databind.model.annotations.BoundField;
016import gov.nist.secauto.metaschema.databind.model.annotations.BoundFlag;
017import gov.nist.secauto.metaschema.databind.model.annotations.GroupAs;
018import gov.nist.secauto.metaschema.databind.model.annotations.HasCardinality;
019import gov.nist.secauto.metaschema.databind.model.annotations.IndexHasKey;
020import gov.nist.secauto.metaschema.databind.model.annotations.IsUnique;
021import gov.nist.secauto.metaschema.databind.model.annotations.KeyField;
022import gov.nist.secauto.metaschema.databind.model.annotations.MetaschemaAssembly;
023import gov.nist.secauto.metaschema.databind.model.annotations.ValueConstraints;
024import java.lang.Override;
025import java.lang.String;
026import java.util.LinkedList;
027import java.util.List;
028import java.util.UUID;
029import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
030import org.apache.commons.lang3.builder.ToStringStyle;
031
032/**
033 * Defines how the referenced component implements a set of controls.
034 */
035@MetaschemaAssembly(
036    formalName = "Component Control Implementation",
037    description = "Defines how the referenced component implements a set of controls.",
038    name = "by-component",
039    moduleClass = OscalSspModule.class,
040    remarks = "Use of `set-parameter` in this context, sets the parameter for the control referenced in the containing `implemented-requirement` applied to the referenced component. If the `by-component` is used as a child of a `statement`, then the parameter value also applies only in the context of the referenced statement. If the same parameter is also set in the `control-implementation` or a specific `implemented-requirement`, then this `by-component/set-parameter` value will override the other value(s) in the context of the referenced component, control, and statement (if parent).",
041    valueConstraints = @ValueConstraints(allowedValues = {@AllowedValues(level = IConstraint.Level.ERROR, target = "link/@rel", allowOthers = true, values = @AllowedValue(value = "imported-from", description = "The hyperlink identifies a URI pointing to the `component` in a `component-definition` that originally described the `component` this component was based on.")), @AllowedValues(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(level = IConstraint.Level.ERROR, target = "link/@rel", allowOthers = true, values = @AllowedValue(value = "provided-by", description = "A reference to the UUID of a control or statement `by-component` object that is used as evidence of implementation."))}, indexHasKey = @IndexHasKey(level = IConstraint.Level.ERROR, target = "link[@rel='provided-by']", indexName = "by-component-uuid", keyFields = @KeyField(target = "@href", pattern = "#(.*)"))),
042    modelConstraints = @AssemblyConstraints(unique = @IsUnique(id = "unique-ssp-by-component-set-parameter", level = IConstraint.Level.ERROR, target = "set-parameter", keyFields = @KeyField(target = "@param-id"), remarks = "Since multiple `set-parameter` entries can be provided, each parameter must be set only once."))
043)
044public class ByComponent implements IBoundObject {
045  private final IMetaschemaData __metaschemaData;
046
047  /**
048   * "A <a href=\"https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented\">machine-oriented</a> identifier reference to the <code>component</code> that is implemeting a given control."
049   */
050  @BoundFlag(
051      formalName = "Component Universally Unique Identifier Reference",
052      description = "A [machine-oriented](https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented) identifier reference to the `component` that is implemeting a given control.",
053      name = "component-uuid",
054      required = true,
055      typeAdapter = UuidAdapter.class
056  )
057  private UUID _componentUuid;
058
059  /**
060   * "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 by-component entry elsewhere in <a href=\"https://pages.nist.gov/OSCAL/concepts/identifier-use/#ssp-identifiers\">this or other OSCAL instances</a>. The locally defined <em>UUID</em> of the <code>by-component</code> entry 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."
061   */
062  @BoundFlag(
063      formalName = "By-Component Universally Unique Identifier",
064      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 by-component entry elsewhere in [this or other OSCAL instances](https://pages.nist.gov/OSCAL/concepts/identifier-use/#ssp-identifiers). The locally defined *UUID* of the `by-component` entry 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.",
065      name = "uuid",
066      required = true,
067      typeAdapter = UuidAdapter.class
068  )
069  private UUID _uuid;
070
071  @BoundField(
072      formalName = "Control Implementation Description",
073      description = "An implementation statement that describes how a control or a control statement is implemented within the referenced system component.",
074      useName = "description",
075      minOccurs = 1,
076      typeAdapter = MarkupMultilineAdapter.class
077  )
078  private MarkupMultiline _description;
079
080  @BoundAssembly(
081      formalName = "Property",
082      description = "An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair.",
083      useName = "prop",
084      maxOccurs = -1,
085      groupAs = @GroupAs(name = "props", inJson = JsonGroupAsBehavior.LIST)
086  )
087  private List<Property> _props;
088
089  @BoundAssembly(
090      formalName = "Link",
091      description = "A reference to a local or remote resource, that has a specific relation to the containing object.",
092      useName = "link",
093      maxOccurs = -1,
094      groupAs = @GroupAs(name = "links", inJson = JsonGroupAsBehavior.LIST)
095  )
096  private List<Link> _links;
097
098  @BoundAssembly(
099      formalName = "Set Parameter Value",
100      description = "Identifies the parameter that will be set by the enclosed value.",
101      useName = "set-parameter",
102      maxOccurs = -1,
103      groupAs = @GroupAs(name = "set-parameters", inJson = JsonGroupAsBehavior.LIST)
104  )
105  private List<SetParameter> _setParameters;
106
107  @BoundAssembly(
108      formalName = "Implementation Status",
109      description = "Indicates the degree to which the a given control is implemented.",
110      useName = "implementation-status",
111      remarks = "The `implementation-status` is used to qualify the `status` value to indicate the degree to which the control is implemented."
112  )
113  private ImplementationStatus _implementationStatus;
114
115  @BoundAssembly(
116      formalName = "Export",
117      description = "Identifies content intended for external consumption, such as with leveraged organizations.",
118      useName = "export"
119  )
120  private Export _export;
121
122  @BoundAssembly(
123      formalName = "Inherited Control Implementation",
124      description = "Describes a control implementation inherited by a leveraging system.",
125      useName = "inherited",
126      maxOccurs = -1,
127      groupAs = @GroupAs(name = "inherited", inJson = JsonGroupAsBehavior.LIST)
128  )
129  private List<Inherited> _inherited;
130
131  @BoundAssembly(
132      formalName = "Satisfied Control Implementation Responsibility",
133      description = "Describes how this system satisfies a responsibility imposed by a leveraged system.",
134      useName = "satisfied",
135      maxOccurs = -1,
136      groupAs = @GroupAs(name = "satisfied", inJson = JsonGroupAsBehavior.LIST)
137  )
138  private List<Satisfied> _satisfied;
139
140  @BoundAssembly(
141      formalName = "Responsible Role",
142      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.",
143      useName = "responsible-role",
144      maxOccurs = -1,
145      groupAs = @GroupAs(name = "responsible-roles", inJson = JsonGroupAsBehavior.LIST)
146  )
147  private List<ResponsibleRole> _responsibleRoles;
148
149  @BoundField(
150      formalName = "Remarks",
151      description = "Additional commentary about the containing object.",
152      useName = "remarks",
153      typeAdapter = MarkupMultilineAdapter.class
154  )
155  private MarkupMultiline _remarks;
156
157  public ByComponent() {
158    this(null);
159  }
160
161  public ByComponent(IMetaschemaData data) {
162    this.__metaschemaData = data;
163  }
164
165  @Override
166  public IMetaschemaData getMetaschemaData() {
167    return __metaschemaData;
168  }
169
170  public UUID getComponentUuid() {
171    return _componentUuid;
172  }
173
174  public void setComponentUuid(UUID value) {
175    _componentUuid = value;
176  }
177
178  public UUID getUuid() {
179    return _uuid;
180  }
181
182  public void setUuid(UUID value) {
183    _uuid = value;
184  }
185
186  public MarkupMultiline getDescription() {
187    return _description;
188  }
189
190  public void setDescription(MarkupMultiline value) {
191    _description = value;
192  }
193
194  public List<Property> getProps() {
195    return _props;
196  }
197
198  public void setProps(List<Property> value) {
199    _props = value;
200  }
201
202  /**
203   * Add a new {@link Property} item to the underlying collection.
204   * @param item the item to add
205   * @return {@code true}
206   */
207  public boolean addProp(Property item) {
208    Property value = ObjectUtils.requireNonNull(item,"item cannot be null");
209    if (_props == null) {
210      _props = new LinkedList<>();
211    }
212    return _props.add(value);
213  }
214
215  /**
216   * Remove the first matching {@link Property} item from the underlying collection.
217   * @param item the item to remove
218   * @return {@code true} if the item was removed or {@code false} otherwise
219   */
220  public boolean removeProp(Property item) {
221    Property value = ObjectUtils.requireNonNull(item,"item cannot be null");
222    return _props != null && _props.remove(value);
223  }
224
225  public List<Link> getLinks() {
226    return _links;
227  }
228
229  public void setLinks(List<Link> value) {
230    _links = value;
231  }
232
233  /**
234   * Add a new {@link Link} item to the underlying collection.
235   * @param item the item to add
236   * @return {@code true}
237   */
238  public boolean addLink(Link item) {
239    Link value = ObjectUtils.requireNonNull(item,"item cannot be null");
240    if (_links == null) {
241      _links = new LinkedList<>();
242    }
243    return _links.add(value);
244  }
245
246  /**
247   * Remove the first matching {@link Link} item from the underlying collection.
248   * @param item the item to remove
249   * @return {@code true} if the item was removed or {@code false} otherwise
250   */
251  public boolean removeLink(Link item) {
252    Link value = ObjectUtils.requireNonNull(item,"item cannot be null");
253    return _links != null && _links.remove(value);
254  }
255
256  public List<SetParameter> getSetParameters() {
257    return _setParameters;
258  }
259
260  public void setSetParameters(List<SetParameter> value) {
261    _setParameters = value;
262  }
263
264  /**
265   * Add a new {@link SetParameter} item to the underlying collection.
266   * @param item the item to add
267   * @return {@code true}
268   */
269  public boolean addSetParameter(SetParameter item) {
270    SetParameter value = ObjectUtils.requireNonNull(item,"item cannot be null");
271    if (_setParameters == null) {
272      _setParameters = new LinkedList<>();
273    }
274    return _setParameters.add(value);
275  }
276
277  /**
278   * Remove the first matching {@link SetParameter} item from the underlying collection.
279   * @param item the item to remove
280   * @return {@code true} if the item was removed or {@code false} otherwise
281   */
282  public boolean removeSetParameter(SetParameter item) {
283    SetParameter value = ObjectUtils.requireNonNull(item,"item cannot be null");
284    return _setParameters != null && _setParameters.remove(value);
285  }
286
287  public ImplementationStatus getImplementationStatus() {
288    return _implementationStatus;
289  }
290
291  public void setImplementationStatus(ImplementationStatus value) {
292    _implementationStatus = value;
293  }
294
295  public Export getExport() {
296    return _export;
297  }
298
299  public void setExport(Export value) {
300    _export = value;
301  }
302
303  public List<Inherited> getInherited() {
304    return _inherited;
305  }
306
307  public void setInherited(List<Inherited> value) {
308    _inherited = value;
309  }
310
311  /**
312   * Add a new {@link Inherited} item to the underlying collection.
313   * @param item the item to add
314   * @return {@code true}
315   */
316  public boolean addInherited(Inherited item) {
317    Inherited value = ObjectUtils.requireNonNull(item,"item cannot be null");
318    if (_inherited == null) {
319      _inherited = new LinkedList<>();
320    }
321    return _inherited.add(value);
322  }
323
324  /**
325   * Remove the first matching {@link Inherited} item from the underlying collection.
326   * @param item the item to remove
327   * @return {@code true} if the item was removed or {@code false} otherwise
328   */
329  public boolean removeInherited(Inherited item) {
330    Inherited value = ObjectUtils.requireNonNull(item,"item cannot be null");
331    return _inherited != null && _inherited.remove(value);
332  }
333
334  public List<Satisfied> getSatisfied() {
335    return _satisfied;
336  }
337
338  public void setSatisfied(List<Satisfied> value) {
339    _satisfied = value;
340  }
341
342  /**
343   * Add a new {@link Satisfied} item to the underlying collection.
344   * @param item the item to add
345   * @return {@code true}
346   */
347  public boolean addSatisfied(Satisfied item) {
348    Satisfied value = ObjectUtils.requireNonNull(item,"item cannot be null");
349    if (_satisfied == null) {
350      _satisfied = new LinkedList<>();
351    }
352    return _satisfied.add(value);
353  }
354
355  /**
356   * Remove the first matching {@link Satisfied} item from the underlying collection.
357   * @param item the item to remove
358   * @return {@code true} if the item was removed or {@code false} otherwise
359   */
360  public boolean removeSatisfied(Satisfied item) {
361    Satisfied value = ObjectUtils.requireNonNull(item,"item cannot be null");
362    return _satisfied != null && _satisfied.remove(value);
363  }
364
365  public List<ResponsibleRole> getResponsibleRoles() {
366    return _responsibleRoles;
367  }
368
369  public void setResponsibleRoles(List<ResponsibleRole> value) {
370    _responsibleRoles = value;
371  }
372
373  /**
374   * Add a new {@link ResponsibleRole} item to the underlying collection.
375   * @param item the item to add
376   * @return {@code true}
377   */
378  public boolean addResponsibleRole(ResponsibleRole item) {
379    ResponsibleRole value = ObjectUtils.requireNonNull(item,"item cannot be null");
380    if (_responsibleRoles == null) {
381      _responsibleRoles = new LinkedList<>();
382    }
383    return _responsibleRoles.add(value);
384  }
385
386  /**
387   * Remove the first matching {@link ResponsibleRole} item from the underlying collection.
388   * @param item the item to remove
389   * @return {@code true} if the item was removed or {@code false} otherwise
390   */
391  public boolean removeResponsibleRole(ResponsibleRole item) {
392    ResponsibleRole value = ObjectUtils.requireNonNull(item,"item cannot be null");
393    return _responsibleRoles != null && _responsibleRoles.remove(value);
394  }
395
396  public MarkupMultiline getRemarks() {
397    return _remarks;
398  }
399
400  public void setRemarks(MarkupMultiline value) {
401    _remarks = value;
402  }
403
404  @Override
405  public String toString() {
406    return new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString();
407  }
408
409  /**
410   * Identifies content intended for external consumption, such as with leveraged organizations.
411   */
412  @MetaschemaAssembly(
413      formalName = "Export",
414      description = "Identifies content intended for external consumption, such as with leveraged organizations.",
415      name = "export",
416      moduleClass = OscalSspModule.class,
417      valueConstraints = @ValueConstraints(indexHasKey = @IndexHasKey(level = IConstraint.Level.ERROR, target = "responsibility", indexName = "by-component-export-provided-uuid", keyFields = @KeyField(target = "@provided-uuid"))),
418      modelConstraints = @AssemblyConstraints(cardinality = @HasCardinality(level = IConstraint.Level.ERROR, target = "provided|responsibility", minOccurs = 1))
419  )
420  public static class Export implements IBoundObject {
421    private final IMetaschemaData __metaschemaData;
422
423    @BoundField(
424        formalName = "Control Implementation Export Description",
425        description = "An implementation statement that describes the aspects of the control or control statement implementation that can be available to another system leveraging this system.",
426        useName = "description",
427        typeAdapter = MarkupMultilineAdapter.class
428    )
429    private MarkupMultiline _description;
430
431    @BoundAssembly(
432        formalName = "Property",
433        description = "An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair.",
434        useName = "prop",
435        maxOccurs = -1,
436        groupAs = @GroupAs(name = "props", inJson = JsonGroupAsBehavior.LIST)
437    )
438    private List<Property> _props;
439
440    @BoundAssembly(
441        formalName = "Link",
442        description = "A reference to a local or remote resource, that has a specific relation to the containing object.",
443        useName = "link",
444        maxOccurs = -1,
445        groupAs = @GroupAs(name = "links", inJson = JsonGroupAsBehavior.LIST)
446    )
447    private List<Link> _links;
448
449    @BoundAssembly(
450        formalName = "Provided Control Implementation",
451        description = "Describes a capability which may be inherited by a leveraging system.",
452        useName = "provided",
453        maxOccurs = -1,
454        groupAs = @GroupAs(name = "provided", inJson = JsonGroupAsBehavior.LIST)
455    )
456    private List<Provided> _provided;
457
458    @BoundAssembly(
459        formalName = "Control Implementation Responsibility",
460        description = "Describes a control implementation responsibility imposed on a leveraging system.",
461        useName = "responsibility",
462        maxOccurs = -1,
463        groupAs = @GroupAs(name = "responsibilities", inJson = JsonGroupAsBehavior.LIST)
464    )
465    private List<Responsibility> _responsibilities;
466
467    @BoundField(
468        formalName = "Remarks",
469        description = "Additional commentary about the containing object.",
470        useName = "remarks",
471        typeAdapter = MarkupMultilineAdapter.class
472    )
473    private MarkupMultiline _remarks;
474
475    public Export() {
476      this(null);
477    }
478
479    public Export(IMetaschemaData data) {
480      this.__metaschemaData = data;
481    }
482
483    @Override
484    public IMetaschemaData getMetaschemaData() {
485      return __metaschemaData;
486    }
487
488    public MarkupMultiline getDescription() {
489      return _description;
490    }
491
492    public void setDescription(MarkupMultiline value) {
493      _description = value;
494    }
495
496    public List<Property> getProps() {
497      return _props;
498    }
499
500    public void setProps(List<Property> value) {
501      _props = value;
502    }
503
504    /**
505     * Add a new {@link Property} item to the underlying collection.
506     * @param item the item to add
507     * @return {@code true}
508     */
509    public boolean addProp(Property item) {
510      Property value = ObjectUtils.requireNonNull(item,"item cannot be null");
511      if (_props == null) {
512        _props = new LinkedList<>();
513      }
514      return _props.add(value);
515    }
516
517    /**
518     * Remove the first matching {@link Property} 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 removeProp(Property item) {
523      Property value = ObjectUtils.requireNonNull(item,"item cannot be null");
524      return _props != null && _props.remove(value);
525    }
526
527    public List<Link> getLinks() {
528      return _links;
529    }
530
531    public void setLinks(List<Link> value) {
532      _links = value;
533    }
534
535    /**
536     * Add a new {@link Link} item to the underlying collection.
537     * @param item the item to add
538     * @return {@code true}
539     */
540    public boolean addLink(Link item) {
541      Link value = ObjectUtils.requireNonNull(item,"item cannot be null");
542      if (_links == null) {
543        _links = new LinkedList<>();
544      }
545      return _links.add(value);
546    }
547
548    /**
549     * Remove the first matching {@link Link} item from the underlying collection.
550     * @param item the item to remove
551     * @return {@code true} if the item was removed or {@code false} otherwise
552     */
553    public boolean removeLink(Link item) {
554      Link value = ObjectUtils.requireNonNull(item,"item cannot be null");
555      return _links != null && _links.remove(value);
556    }
557
558    public List<Provided> getProvided() {
559      return _provided;
560    }
561
562    public void setProvided(List<Provided> value) {
563      _provided = value;
564    }
565
566    /**
567     * Add a new {@link Provided} item to the underlying collection.
568     * @param item the item to add
569     * @return {@code true}
570     */
571    public boolean addProvided(Provided item) {
572      Provided value = ObjectUtils.requireNonNull(item,"item cannot be null");
573      if (_provided == null) {
574        _provided = new LinkedList<>();
575      }
576      return _provided.add(value);
577    }
578
579    /**
580     * Remove the first matching {@link Provided} item from the underlying collection.
581     * @param item the item to remove
582     * @return {@code true} if the item was removed or {@code false} otherwise
583     */
584    public boolean removeProvided(Provided item) {
585      Provided value = ObjectUtils.requireNonNull(item,"item cannot be null");
586      return _provided != null && _provided.remove(value);
587    }
588
589    public List<Responsibility> getResponsibilities() {
590      return _responsibilities;
591    }
592
593    public void setResponsibilities(List<Responsibility> value) {
594      _responsibilities = value;
595    }
596
597    /**
598     * Add a new {@link Responsibility} item to the underlying collection.
599     * @param item the item to add
600     * @return {@code true}
601     */
602    public boolean addResponsibility(Responsibility item) {
603      Responsibility value = ObjectUtils.requireNonNull(item,"item cannot be null");
604      if (_responsibilities == null) {
605        _responsibilities = new LinkedList<>();
606      }
607      return _responsibilities.add(value);
608    }
609
610    /**
611     * Remove the first matching {@link Responsibility} item from the underlying collection.
612     * @param item the item to remove
613     * @return {@code true} if the item was removed or {@code false} otherwise
614     */
615    public boolean removeResponsibility(Responsibility item) {
616      Responsibility value = ObjectUtils.requireNonNull(item,"item cannot be null");
617      return _responsibilities != null && _responsibilities.remove(value);
618    }
619
620    public MarkupMultiline getRemarks() {
621      return _remarks;
622    }
623
624    public void setRemarks(MarkupMultiline value) {
625      _remarks = value;
626    }
627
628    @Override
629    public String toString() {
630      return new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString();
631    }
632
633    /**
634     * Describes a capability which may be inherited by a leveraging system.
635     */
636    @MetaschemaAssembly(
637        formalName = "Provided Control Implementation",
638        description = "Describes a capability which may be inherited by a leveraging system.",
639        name = "provided",
640        moduleClass = OscalSspModule.class,
641        modelConstraints = @AssemblyConstraints(unique = @IsUnique(id = "unique-provided-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."))
642    )
643    public static class Provided implements IBoundObject {
644      private final IMetaschemaData __metaschemaData;
645
646      /**
647       * "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 provided entry elsewhere in <a href=\"https://pages.nist.gov/OSCAL/concepts/identifier-use/#ssp-identifiers\">this or other OSCAL instances</a>. The locally defined <em>UUID</em> of the <code>provided</code> entry 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."
648       */
649      @BoundFlag(
650          formalName = "Provided Universally Unique Identifier",
651          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 provided entry elsewhere in [this or other OSCAL instances](https://pages.nist.gov/OSCAL/concepts/identifier-use/#ssp-identifiers). The locally defined *UUID* of the `provided` entry 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.",
652          name = "uuid",
653          required = true,
654          typeAdapter = UuidAdapter.class
655      )
656      private UUID _uuid;
657
658      @BoundField(
659          formalName = "Provided Control Implementation Description",
660          description = "An implementation statement that describes the aspects of the control or control statement implementation that can be provided to another system leveraging this system.",
661          useName = "description",
662          minOccurs = 1,
663          typeAdapter = MarkupMultilineAdapter.class
664      )
665      private MarkupMultiline _description;
666
667      @BoundAssembly(
668          formalName = "Property",
669          description = "An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair.",
670          useName = "prop",
671          maxOccurs = -1,
672          groupAs = @GroupAs(name = "props", inJson = JsonGroupAsBehavior.LIST)
673      )
674      private List<Property> _props;
675
676      @BoundAssembly(
677          formalName = "Link",
678          description = "A reference to a local or remote resource, that has a specific relation to the containing object.",
679          useName = "link",
680          maxOccurs = -1,
681          groupAs = @GroupAs(name = "links", inJson = JsonGroupAsBehavior.LIST)
682      )
683      private List<Link> _links;
684
685      @BoundAssembly(
686          formalName = "Responsible Role",
687          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.",
688          useName = "responsible-role",
689          maxOccurs = -1,
690          groupAs = @GroupAs(name = "responsible-roles", inJson = JsonGroupAsBehavior.LIST)
691      )
692      private List<ResponsibleRole> _responsibleRoles;
693
694      @BoundField(
695          formalName = "Remarks",
696          description = "Additional commentary about the containing object.",
697          useName = "remarks",
698          typeAdapter = MarkupMultilineAdapter.class
699      )
700      private MarkupMultiline _remarks;
701
702      public Provided() {
703        this(null);
704      }
705
706      public Provided(IMetaschemaData data) {
707        this.__metaschemaData = data;
708      }
709
710      @Override
711      public IMetaschemaData getMetaschemaData() {
712        return __metaschemaData;
713      }
714
715      public UUID getUuid() {
716        return _uuid;
717      }
718
719      public void setUuid(UUID value) {
720        _uuid = value;
721      }
722
723      public MarkupMultiline getDescription() {
724        return _description;
725      }
726
727      public void setDescription(MarkupMultiline value) {
728        _description = value;
729      }
730
731      public List<Property> getProps() {
732        return _props;
733      }
734
735      public void setProps(List<Property> value) {
736        _props = value;
737      }
738
739      /**
740       * Add a new {@link Property} item to the underlying collection.
741       * @param item the item to add
742       * @return {@code true}
743       */
744      public boolean addProp(Property item) {
745        Property value = ObjectUtils.requireNonNull(item,"item cannot be null");
746        if (_props == null) {
747          _props = new LinkedList<>();
748        }
749        return _props.add(value);
750      }
751
752      /**
753       * Remove the first matching {@link Property} item from the underlying collection.
754       * @param item the item to remove
755       * @return {@code true} if the item was removed or {@code false} otherwise
756       */
757      public boolean removeProp(Property item) {
758        Property value = ObjectUtils.requireNonNull(item,"item cannot be null");
759        return _props != null && _props.remove(value);
760      }
761
762      public List<Link> getLinks() {
763        return _links;
764      }
765
766      public void setLinks(List<Link> value) {
767        _links = value;
768      }
769
770      /**
771       * Add a new {@link Link} item to the underlying collection.
772       * @param item the item to add
773       * @return {@code true}
774       */
775      public boolean addLink(Link item) {
776        Link value = ObjectUtils.requireNonNull(item,"item cannot be null");
777        if (_links == null) {
778          _links = new LinkedList<>();
779        }
780        return _links.add(value);
781      }
782
783      /**
784       * Remove the first matching {@link Link} item from the underlying collection.
785       * @param item the item to remove
786       * @return {@code true} if the item was removed or {@code false} otherwise
787       */
788      public boolean removeLink(Link item) {
789        Link value = ObjectUtils.requireNonNull(item,"item cannot be null");
790        return _links != null && _links.remove(value);
791      }
792
793      public List<ResponsibleRole> getResponsibleRoles() {
794        return _responsibleRoles;
795      }
796
797      public void setResponsibleRoles(List<ResponsibleRole> value) {
798        _responsibleRoles = value;
799      }
800
801      /**
802       * Add a new {@link ResponsibleRole} item to the underlying collection.
803       * @param item the item to add
804       * @return {@code true}
805       */
806      public boolean addResponsibleRole(ResponsibleRole item) {
807        ResponsibleRole value = ObjectUtils.requireNonNull(item,"item cannot be null");
808        if (_responsibleRoles == null) {
809          _responsibleRoles = new LinkedList<>();
810        }
811        return _responsibleRoles.add(value);
812      }
813
814      /**
815       * Remove the first matching {@link ResponsibleRole} item from the underlying collection.
816       * @param item the item to remove
817       * @return {@code true} if the item was removed or {@code false} otherwise
818       */
819      public boolean removeResponsibleRole(ResponsibleRole item) {
820        ResponsibleRole value = ObjectUtils.requireNonNull(item,"item cannot be null");
821        return _responsibleRoles != null && _responsibleRoles.remove(value);
822      }
823
824      public MarkupMultiline getRemarks() {
825        return _remarks;
826      }
827
828      public void setRemarks(MarkupMultiline value) {
829        _remarks = value;
830      }
831
832      @Override
833      public String toString() {
834        return new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString();
835      }
836    }
837
838    /**
839     * Describes a control implementation responsibility imposed on a leveraging system.
840     */
841    @MetaschemaAssembly(
842        formalName = "Control Implementation Responsibility",
843        description = "Describes a control implementation responsibility imposed on a leveraging system.",
844        name = "responsibility",
845        moduleClass = OscalSspModule.class,
846        modelConstraints = @AssemblyConstraints(unique = @IsUnique(id = "unique-responsibility-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."))
847    )
848    public static class Responsibility implements IBoundObject {
849      private final IMetaschemaData __metaschemaData;
850
851      /**
852       * "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 responsibility elsewhere in <a href=\"https://pages.nist.gov/OSCAL/concepts/identifier-use/#ssp-identifiers\">this or other OSCAL instances</a>. The locally defined <em>UUID</em> of the <code>responsibility</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."
853       */
854      @BoundFlag(
855          formalName = "Responsibility Universally Unique Identifier",
856          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 responsibility elsewhere in [this or other OSCAL instances](https://pages.nist.gov/OSCAL/concepts/identifier-use/#ssp-identifiers). The locally defined *UUID* of the `responsibility` 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.",
857          name = "uuid",
858          required = true,
859          typeAdapter = UuidAdapter.class
860      )
861      private UUID _uuid;
862
863      /**
864       * "A <a href=\"https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented\">machine-oriented</a> identifier reference to an inherited control implementation that a leveraging system is inheriting from a leveraged system."
865       */
866      @BoundFlag(
867          formalName = "Provided UUID",
868          description = "A [machine-oriented](https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented) identifier reference to an inherited control implementation that a leveraging system is inheriting from a leveraged system.",
869          name = "provided-uuid",
870          typeAdapter = UuidAdapter.class
871      )
872      private UUID _providedUuid;
873
874      @BoundField(
875          formalName = "Control Implementation Responsibility Description",
876          description = "An implementation statement that describes the aspects of the control or control statement implementation that a leveraging system must implement to satisfy the control provided by a leveraged system.",
877          useName = "description",
878          minOccurs = 1,
879          typeAdapter = MarkupMultilineAdapter.class
880      )
881      private MarkupMultiline _description;
882
883      @BoundAssembly(
884          formalName = "Property",
885          description = "An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair.",
886          useName = "prop",
887          maxOccurs = -1,
888          groupAs = @GroupAs(name = "props", inJson = JsonGroupAsBehavior.LIST)
889      )
890      private List<Property> _props;
891
892      @BoundAssembly(
893          formalName = "Link",
894          description = "A reference to a local or remote resource, that has a specific relation to the containing object.",
895          useName = "link",
896          maxOccurs = -1,
897          groupAs = @GroupAs(name = "links", inJson = JsonGroupAsBehavior.LIST)
898      )
899      private List<Link> _links;
900
901      @BoundAssembly(
902          formalName = "Responsible Role",
903          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.",
904          useName = "responsible-role",
905          remarks = "A role defined at the by-component level takes precedence over the same role defined on the parent implemented-requirement or on the referenced component.",
906          maxOccurs = -1,
907          groupAs = @GroupAs(name = "responsible-roles", inJson = JsonGroupAsBehavior.LIST)
908      )
909      private List<ResponsibleRole> _responsibleRoles;
910
911      @BoundField(
912          formalName = "Remarks",
913          description = "Additional commentary about the containing object.",
914          useName = "remarks",
915          typeAdapter = MarkupMultilineAdapter.class
916      )
917      private MarkupMultiline _remarks;
918
919      public Responsibility() {
920        this(null);
921      }
922
923      public Responsibility(IMetaschemaData data) {
924        this.__metaschemaData = data;
925      }
926
927      @Override
928      public IMetaschemaData getMetaschemaData() {
929        return __metaschemaData;
930      }
931
932      public UUID getUuid() {
933        return _uuid;
934      }
935
936      public void setUuid(UUID value) {
937        _uuid = value;
938      }
939
940      public UUID getProvidedUuid() {
941        return _providedUuid;
942      }
943
944      public void setProvidedUuid(UUID value) {
945        _providedUuid = value;
946      }
947
948      public MarkupMultiline getDescription() {
949        return _description;
950      }
951
952      public void setDescription(MarkupMultiline value) {
953        _description = value;
954      }
955
956      public List<Property> getProps() {
957        return _props;
958      }
959
960      public void setProps(List<Property> value) {
961        _props = value;
962      }
963
964      /**
965       * Add a new {@link Property} item to the underlying collection.
966       * @param item the item to add
967       * @return {@code true}
968       */
969      public boolean addProp(Property item) {
970        Property value = ObjectUtils.requireNonNull(item,"item cannot be null");
971        if (_props == null) {
972          _props = new LinkedList<>();
973        }
974        return _props.add(value);
975      }
976
977      /**
978       * Remove the first matching {@link Property} item from the underlying collection.
979       * @param item the item to remove
980       * @return {@code true} if the item was removed or {@code false} otherwise
981       */
982      public boolean removeProp(Property item) {
983        Property value = ObjectUtils.requireNonNull(item,"item cannot be null");
984        return _props != null && _props.remove(value);
985      }
986
987      public List<Link> getLinks() {
988        return _links;
989      }
990
991      public void setLinks(List<Link> value) {
992        _links = value;
993      }
994
995      /**
996       * Add a new {@link Link} item to the underlying collection.
997       * @param item the item to add
998       * @return {@code true}
999       */
1000      public boolean addLink(Link item) {
1001        Link value = ObjectUtils.requireNonNull(item,"item cannot be null");
1002        if (_links == null) {
1003          _links = new LinkedList<>();
1004        }
1005        return _links.add(value);
1006      }
1007
1008      /**
1009       * Remove the first matching {@link Link} item from the underlying collection.
1010       * @param item the item to remove
1011       * @return {@code true} if the item was removed or {@code false} otherwise
1012       */
1013      public boolean removeLink(Link item) {
1014        Link value = ObjectUtils.requireNonNull(item,"item cannot be null");
1015        return _links != null && _links.remove(value);
1016      }
1017
1018      public List<ResponsibleRole> getResponsibleRoles() {
1019        return _responsibleRoles;
1020      }
1021
1022      public void setResponsibleRoles(List<ResponsibleRole> value) {
1023        _responsibleRoles = value;
1024      }
1025
1026      /**
1027       * Add a new {@link ResponsibleRole} item to the underlying collection.
1028       * @param item the item to add
1029       * @return {@code true}
1030       */
1031      public boolean addResponsibleRole(ResponsibleRole item) {
1032        ResponsibleRole value = ObjectUtils.requireNonNull(item,"item cannot be null");
1033        if (_responsibleRoles == null) {
1034          _responsibleRoles = new LinkedList<>();
1035        }
1036        return _responsibleRoles.add(value);
1037      }
1038
1039      /**
1040       * Remove the first matching {@link ResponsibleRole} item from the underlying collection.
1041       * @param item the item to remove
1042       * @return {@code true} if the item was removed or {@code false} otherwise
1043       */
1044      public boolean removeResponsibleRole(ResponsibleRole item) {
1045        ResponsibleRole value = ObjectUtils.requireNonNull(item,"item cannot be null");
1046        return _responsibleRoles != null && _responsibleRoles.remove(value);
1047      }
1048
1049      public MarkupMultiline getRemarks() {
1050        return _remarks;
1051      }
1052
1053      public void setRemarks(MarkupMultiline value) {
1054        _remarks = value;
1055      }
1056
1057      @Override
1058      public String toString() {
1059        return new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString();
1060      }
1061    }
1062  }
1063
1064  /**
1065   * Describes a control implementation inherited by a leveraging system.
1066   */
1067  @MetaschemaAssembly(
1068      formalName = "Inherited Control Implementation",
1069      description = "Describes a control implementation inherited by a leveraging system.",
1070      name = "inherited",
1071      moduleClass = OscalSspModule.class,
1072      modelConstraints = @AssemblyConstraints(unique = @IsUnique(id = "unique-inherited-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."))
1073  )
1074  public static class Inherited implements IBoundObject {
1075    private final IMetaschemaData __metaschemaData;
1076
1077    /**
1078     * "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 inherited entry elsewhere in <a href=\"https://pages.nist.gov/OSCAL/concepts/identifier-use/#ssp-identifiers\">this or other OSCAL instances</a>. The locally defined <em>UUID</em> of the <code>inherited control implementation</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."
1079     */
1080    @BoundFlag(
1081        formalName = "Inherited Universally Unique Identifier",
1082        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 inherited entry elsewhere in [this or other OSCAL instances](https://pages.nist.gov/OSCAL/concepts/identifier-use/#ssp-identifiers). The locally defined *UUID* of the `inherited control implementation` 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.",
1083        name = "uuid",
1084        required = true,
1085        typeAdapter = UuidAdapter.class
1086    )
1087    private UUID _uuid;
1088
1089    /**
1090     * "A <a href=\"https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented\">machine-oriented</a> identifier reference to an inherited control implementation that a leveraging system is inheriting from a leveraged system."
1091     */
1092    @BoundFlag(
1093        formalName = "Provided UUID",
1094        description = "A [machine-oriented](https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented) identifier reference to an inherited control implementation that a leveraging system is inheriting from a leveraged system.",
1095        name = "provided-uuid",
1096        typeAdapter = UuidAdapter.class
1097    )
1098    private UUID _providedUuid;
1099
1100    @BoundField(
1101        formalName = "Inherited Control Implementation Description",
1102        description = "An implementation statement that describes the aspects of a control or control statement implementation that a leveraging system is inheriting from a leveraged system.",
1103        useName = "description",
1104        minOccurs = 1,
1105        typeAdapter = MarkupMultilineAdapter.class
1106    )
1107    private MarkupMultiline _description;
1108
1109    @BoundAssembly(
1110        formalName = "Property",
1111        description = "An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair.",
1112        useName = "prop",
1113        maxOccurs = -1,
1114        groupAs = @GroupAs(name = "props", inJson = JsonGroupAsBehavior.LIST)
1115    )
1116    private List<Property> _props;
1117
1118    @BoundAssembly(
1119        formalName = "Link",
1120        description = "A reference to a local or remote resource, that has a specific relation to the containing object.",
1121        useName = "link",
1122        maxOccurs = -1,
1123        groupAs = @GroupAs(name = "links", inJson = JsonGroupAsBehavior.LIST)
1124    )
1125    private List<Link> _links;
1126
1127    @BoundAssembly(
1128        formalName = "Responsible Role",
1129        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.",
1130        useName = "responsible-role",
1131        maxOccurs = -1,
1132        groupAs = @GroupAs(name = "responsible-roles", inJson = JsonGroupAsBehavior.LIST)
1133    )
1134    private List<ResponsibleRole> _responsibleRoles;
1135
1136    public Inherited() {
1137      this(null);
1138    }
1139
1140    public Inherited(IMetaschemaData data) {
1141      this.__metaschemaData = data;
1142    }
1143
1144    @Override
1145    public IMetaschemaData getMetaschemaData() {
1146      return __metaschemaData;
1147    }
1148
1149    public UUID getUuid() {
1150      return _uuid;
1151    }
1152
1153    public void setUuid(UUID value) {
1154      _uuid = value;
1155    }
1156
1157    public UUID getProvidedUuid() {
1158      return _providedUuid;
1159    }
1160
1161    public void setProvidedUuid(UUID value) {
1162      _providedUuid = value;
1163    }
1164
1165    public MarkupMultiline getDescription() {
1166      return _description;
1167    }
1168
1169    public void setDescription(MarkupMultiline value) {
1170      _description = value;
1171    }
1172
1173    public List<Property> getProps() {
1174      return _props;
1175    }
1176
1177    public void setProps(List<Property> value) {
1178      _props = value;
1179    }
1180
1181    /**
1182     * Add a new {@link Property} item to the underlying collection.
1183     * @param item the item to add
1184     * @return {@code true}
1185     */
1186    public boolean addProp(Property item) {
1187      Property value = ObjectUtils.requireNonNull(item,"item cannot be null");
1188      if (_props == null) {
1189        _props = new LinkedList<>();
1190      }
1191      return _props.add(value);
1192    }
1193
1194    /**
1195     * Remove the first matching {@link Property} item from the underlying collection.
1196     * @param item the item to remove
1197     * @return {@code true} if the item was removed or {@code false} otherwise
1198     */
1199    public boolean removeProp(Property item) {
1200      Property value = ObjectUtils.requireNonNull(item,"item cannot be null");
1201      return _props != null && _props.remove(value);
1202    }
1203
1204    public List<Link> getLinks() {
1205      return _links;
1206    }
1207
1208    public void setLinks(List<Link> value) {
1209      _links = value;
1210    }
1211
1212    /**
1213     * Add a new {@link Link} item to the underlying collection.
1214     * @param item the item to add
1215     * @return {@code true}
1216     */
1217    public boolean addLink(Link item) {
1218      Link value = ObjectUtils.requireNonNull(item,"item cannot be null");
1219      if (_links == null) {
1220        _links = new LinkedList<>();
1221      }
1222      return _links.add(value);
1223    }
1224
1225    /**
1226     * Remove the first matching {@link Link} item from the underlying collection.
1227     * @param item the item to remove
1228     * @return {@code true} if the item was removed or {@code false} otherwise
1229     */
1230    public boolean removeLink(Link item) {
1231      Link value = ObjectUtils.requireNonNull(item,"item cannot be null");
1232      return _links != null && _links.remove(value);
1233    }
1234
1235    public List<ResponsibleRole> getResponsibleRoles() {
1236      return _responsibleRoles;
1237    }
1238
1239    public void setResponsibleRoles(List<ResponsibleRole> value) {
1240      _responsibleRoles = value;
1241    }
1242
1243    /**
1244     * Add a new {@link ResponsibleRole} item to the underlying collection.
1245     * @param item the item to add
1246     * @return {@code true}
1247     */
1248    public boolean addResponsibleRole(ResponsibleRole item) {
1249      ResponsibleRole value = ObjectUtils.requireNonNull(item,"item cannot be null");
1250      if (_responsibleRoles == null) {
1251        _responsibleRoles = new LinkedList<>();
1252      }
1253      return _responsibleRoles.add(value);
1254    }
1255
1256    /**
1257     * Remove the first matching {@link ResponsibleRole} item from the underlying collection.
1258     * @param item the item to remove
1259     * @return {@code true} if the item was removed or {@code false} otherwise
1260     */
1261    public boolean removeResponsibleRole(ResponsibleRole item) {
1262      ResponsibleRole value = ObjectUtils.requireNonNull(item,"item cannot be null");
1263      return _responsibleRoles != null && _responsibleRoles.remove(value);
1264    }
1265
1266    @Override
1267    public String toString() {
1268      return new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString();
1269    }
1270  }
1271
1272  /**
1273   * Describes how this system satisfies a responsibility imposed by a leveraged system.
1274   */
1275  @MetaschemaAssembly(
1276      formalName = "Satisfied Control Implementation Responsibility",
1277      description = "Describes how this system satisfies a responsibility imposed by a leveraged system.",
1278      name = "satisfied",
1279      moduleClass = OscalSspModule.class,
1280      modelConstraints = @AssemblyConstraints(unique = @IsUnique(id = "unique-satisfied-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."))
1281  )
1282  public static class Satisfied implements IBoundObject {
1283    private final IMetaschemaData __metaschemaData;
1284
1285    /**
1286     * "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 satisfied control implementation entry elsewhere in <a href=\"https://pages.nist.gov/OSCAL/concepts/identifier-use/#ssp-identifiers\">this or other OSCAL instances</a>. The locally defined <em>UUID</em> of the <code>control implementation</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."
1287     */
1288    @BoundFlag(
1289        formalName = "Satisfied Universally Unique Identifier",
1290        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 satisfied control implementation entry elsewhere in [this or other OSCAL instances](https://pages.nist.gov/OSCAL/concepts/identifier-use/#ssp-identifiers). The locally defined *UUID* of the `control implementation` 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.",
1291        name = "uuid",
1292        required = true,
1293        typeAdapter = UuidAdapter.class
1294    )
1295    private UUID _uuid;
1296
1297    /**
1298     * "A <a href=\"https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented\">machine-oriented</a> identifier reference to a control implementation that satisfies a responsibility imposed by a leveraged system."
1299     */
1300    @BoundFlag(
1301        formalName = "Responsibility UUID",
1302        description = "A [machine-oriented](https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented) identifier reference to a control implementation that satisfies a responsibility imposed by a leveraged system.",
1303        name = "responsibility-uuid",
1304        typeAdapter = UuidAdapter.class
1305    )
1306    private UUID _responsibilityUuid;
1307
1308    @BoundField(
1309        formalName = "Satisfied Control Implementation Responsibility Description",
1310        description = "An implementation statement that describes the aspects of a control or control statement implementation that a leveraging system is implementing based on a requirement from a leveraged system.",
1311        useName = "description",
1312        minOccurs = 1,
1313        typeAdapter = MarkupMultilineAdapter.class
1314    )
1315    private MarkupMultiline _description;
1316
1317    @BoundAssembly(
1318        formalName = "Property",
1319        description = "An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair.",
1320        useName = "prop",
1321        maxOccurs = -1,
1322        groupAs = @GroupAs(name = "props", inJson = JsonGroupAsBehavior.LIST)
1323    )
1324    private List<Property> _props;
1325
1326    @BoundAssembly(
1327        formalName = "Link",
1328        description = "A reference to a local or remote resource, that has a specific relation to the containing object.",
1329        useName = "link",
1330        maxOccurs = -1,
1331        groupAs = @GroupAs(name = "links", inJson = JsonGroupAsBehavior.LIST)
1332    )
1333    private List<Link> _links;
1334
1335    @BoundAssembly(
1336        formalName = "Responsible Role",
1337        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.",
1338        useName = "responsible-role",
1339        maxOccurs = -1,
1340        groupAs = @GroupAs(name = "responsible-roles", inJson = JsonGroupAsBehavior.LIST)
1341    )
1342    private List<ResponsibleRole> _responsibleRoles;
1343
1344    @BoundField(
1345        formalName = "Remarks",
1346        description = "Additional commentary about the containing object.",
1347        useName = "remarks",
1348        typeAdapter = MarkupMultilineAdapter.class
1349    )
1350    private MarkupMultiline _remarks;
1351
1352    public Satisfied() {
1353      this(null);
1354    }
1355
1356    public Satisfied(IMetaschemaData data) {
1357      this.__metaschemaData = data;
1358    }
1359
1360    @Override
1361    public IMetaschemaData getMetaschemaData() {
1362      return __metaschemaData;
1363    }
1364
1365    public UUID getUuid() {
1366      return _uuid;
1367    }
1368
1369    public void setUuid(UUID value) {
1370      _uuid = value;
1371    }
1372
1373    public UUID getResponsibilityUuid() {
1374      return _responsibilityUuid;
1375    }
1376
1377    public void setResponsibilityUuid(UUID value) {
1378      _responsibilityUuid = value;
1379    }
1380
1381    public MarkupMultiline getDescription() {
1382      return _description;
1383    }
1384
1385    public void setDescription(MarkupMultiline value) {
1386      _description = value;
1387    }
1388
1389    public List<Property> getProps() {
1390      return _props;
1391    }
1392
1393    public void setProps(List<Property> value) {
1394      _props = value;
1395    }
1396
1397    /**
1398     * Add a new {@link Property} item to the underlying collection.
1399     * @param item the item to add
1400     * @return {@code true}
1401     */
1402    public boolean addProp(Property item) {
1403      Property value = ObjectUtils.requireNonNull(item,"item cannot be null");
1404      if (_props == null) {
1405        _props = new LinkedList<>();
1406      }
1407      return _props.add(value);
1408    }
1409
1410    /**
1411     * Remove the first matching {@link Property} item from the underlying collection.
1412     * @param item the item to remove
1413     * @return {@code true} if the item was removed or {@code false} otherwise
1414     */
1415    public boolean removeProp(Property item) {
1416      Property value = ObjectUtils.requireNonNull(item,"item cannot be null");
1417      return _props != null && _props.remove(value);
1418    }
1419
1420    public List<Link> getLinks() {
1421      return _links;
1422    }
1423
1424    public void setLinks(List<Link> value) {
1425      _links = value;
1426    }
1427
1428    /**
1429     * Add a new {@link Link} item to the underlying collection.
1430     * @param item the item to add
1431     * @return {@code true}
1432     */
1433    public boolean addLink(Link item) {
1434      Link value = ObjectUtils.requireNonNull(item,"item cannot be null");
1435      if (_links == null) {
1436        _links = new LinkedList<>();
1437      }
1438      return _links.add(value);
1439    }
1440
1441    /**
1442     * Remove the first matching {@link Link} item from the underlying collection.
1443     * @param item the item to remove
1444     * @return {@code true} if the item was removed or {@code false} otherwise
1445     */
1446    public boolean removeLink(Link item) {
1447      Link value = ObjectUtils.requireNonNull(item,"item cannot be null");
1448      return _links != null && _links.remove(value);
1449    }
1450
1451    public List<ResponsibleRole> getResponsibleRoles() {
1452      return _responsibleRoles;
1453    }
1454
1455    public void setResponsibleRoles(List<ResponsibleRole> value) {
1456      _responsibleRoles = value;
1457    }
1458
1459    /**
1460     * Add a new {@link ResponsibleRole} item to the underlying collection.
1461     * @param item the item to add
1462     * @return {@code true}
1463     */
1464    public boolean addResponsibleRole(ResponsibleRole item) {
1465      ResponsibleRole value = ObjectUtils.requireNonNull(item,"item cannot be null");
1466      if (_responsibleRoles == null) {
1467        _responsibleRoles = new LinkedList<>();
1468      }
1469      return _responsibleRoles.add(value);
1470    }
1471
1472    /**
1473     * Remove the first matching {@link ResponsibleRole} item from the underlying collection.
1474     * @param item the item to remove
1475     * @return {@code true} if the item was removed or {@code false} otherwise
1476     */
1477    public boolean removeResponsibleRole(ResponsibleRole item) {
1478      ResponsibleRole value = ObjectUtils.requireNonNull(item,"item cannot be null");
1479      return _responsibleRoles != null && _responsibleRoles.remove(value);
1480    }
1481
1482    public MarkupMultiline getRemarks() {
1483      return _remarks;
1484    }
1485
1486    public void setRemarks(MarkupMultiline value) {
1487      _remarks = value;
1488    }
1489
1490    @Override
1491    public String toString() {
1492      return new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString();
1493    }
1494  }
1495}