001// Generated from: ../../../../../../../../oscal/src/metaschema/oscal_assessment-common_metaschema.xml
002// Do not edit - changes will be lost when regenerated.
003package dev.metaschema.oscal.lib.model;
004
005import dev.metaschema.core.datatype.adapter.DateTimeWithTZAdapter;
006import dev.metaschema.core.datatype.adapter.IntegerAdapter;
007import dev.metaschema.core.datatype.adapter.TokenAdapter;
008import dev.metaschema.core.datatype.adapter.UuidAdapter;
009import dev.metaschema.core.datatype.markup.MarkupLine;
010import dev.metaschema.core.datatype.markup.MarkupLineAdapter;
011import dev.metaschema.core.datatype.markup.MarkupMultiline;
012import dev.metaschema.core.datatype.markup.MarkupMultilineAdapter;
013import dev.metaschema.core.model.IBoundObject;
014import dev.metaschema.core.model.IMetaschemaData;
015import dev.metaschema.core.model.JsonGroupAsBehavior;
016import dev.metaschema.core.model.constraint.IConstraint;
017import dev.metaschema.core.util.ObjectUtils;
018import dev.metaschema.databind.model.annotations.AllowedValue;
019import dev.metaschema.databind.model.annotations.AllowedValues;
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.Matches;
025import dev.metaschema.databind.model.annotations.MetaschemaAssembly;
026import dev.metaschema.databind.model.annotations.ValueConstraints;
027import edu.umd.cs.findbugs.annotations.NonNull;
028import edu.umd.cs.findbugs.annotations.Nullable;
029import java.time.ZonedDateTime;
030import java.util.LinkedList;
031import java.util.List;
032import java.util.UUID;
033import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
034import org.apache.commons.lang3.builder.ToStringStyle;
035
036/**
037 * An identified risk.
038 */
039@MetaschemaAssembly(
040    formalName = "Identified Risk",
041    description = "An identified risk.",
042    name = "risk",
043    moduleClass = OscalAssessmentCommonModule.class,
044    valueConstraints = @ValueConstraints(allowedValues = @AllowedValues(id = "oscal-risk-prop-name-values", level = IConstraint.Level.ERROR, target = "prop[has-oscal-namespace('http://csrc.nist.gov/ns/oscal')]/@name", values = {@AllowedValue(value = "false-positive", description = "The risk has been confirmed to be a false positive."), @AllowedValue(value = "accepted", description = "The risk has been accepted. No further action will be taken."), @AllowedValue(value = "risk-adjusted", description = "The risk has been adjusted."), @AllowedValue(value = "priority", description = "A numeric value indicating the sequence in which risks should be addressed. (Lower numbers are higher priority)")}), matches = @Matches(id = "oscal-risk-priority-datatype", level = IConstraint.Level.ERROR, target = "prop[has-oscal-namespace('http://csrc.nist.gov/ns/oscal') and @name='priority']/@value", typeAdapter = IntegerAdapter.class))
045)
046public class Risk implements IBoundObject {
047  private final IMetaschemaData __metaschemaData;
048
049  /**
050   * 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 risk elsewhere in <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#scope">this or other OSCAL instances</a>. The locally defined <em>UUID</em> of the <code>risk</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.
051   */
052  @BoundFlag(
053      formalName = "Risk Universally Unique Identifier",
054      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 risk elsewhere in [this or other OSCAL instances](https://pages.nist.gov/OSCAL/concepts/identifier-use/#scope). The locally defined *UUID* of the `risk` 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.",
055      name = "uuid",
056      required = true,
057      typeAdapter = UuidAdapter.class
058  )
059  private UUID _uuid;
060
061  /**
062   * The title for this risk.
063   */
064  @BoundField(
065      formalName = "Risk Title",
066      description = "The title for this risk.",
067      useName = "title",
068      minOccurs = 1,
069      typeAdapter = MarkupLineAdapter.class
070  )
071  private MarkupLine _title;
072
073  /**
074   * A human-readable summary of the identified risk, to include a statement of how the risk impacts the system.
075   */
076  @BoundField(
077      formalName = "Risk Description",
078      description = "A human-readable summary of the identified risk, to include a statement of how the risk impacts the system.",
079      useName = "description",
080      minOccurs = 1,
081      typeAdapter = MarkupMultilineAdapter.class
082  )
083  private MarkupMultiline _description;
084
085  /**
086   * An summary of impact for how the risk affects the system.
087   */
088  @BoundField(
089      formalName = "Risk Statement",
090      description = "An summary of impact for how the risk affects the system.",
091      useName = "statement",
092      minOccurs = 1,
093      typeAdapter = MarkupMultilineAdapter.class
094  )
095  private MarkupMultiline _statement;
096
097  /**
098   * An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair.
099   */
100  @BoundAssembly(
101      formalName = "Property",
102      description = "An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair.",
103      useName = "prop",
104      maxOccurs = -1,
105      groupAs = @GroupAs(name = "props", inJson = JsonGroupAsBehavior.LIST)
106  )
107  private List<Property> _props;
108
109  /**
110   * A reference to a local or remote resource, that has a specific relation to the containing object.
111   */
112  @BoundAssembly(
113      formalName = "Link",
114      description = "A reference to a local or remote resource, that has a specific relation to the containing object.",
115      useName = "link",
116      maxOccurs = -1,
117      groupAs = @GroupAs(name = "links", inJson = JsonGroupAsBehavior.LIST)
118  )
119  private List<Link> _links;
120
121  /**
122   * Describes the status of the associated risk.
123   */
124  @BoundField(
125      formalName = "Risk Status",
126      description = "Describes the status of the associated risk.",
127      useName = "status",
128      minOccurs = 1,
129      typeAdapter = TokenAdapter.class,
130      valueConstraints = @ValueConstraints(allowedValues = @AllowedValues(id = "oscal-risk-status-values", level = IConstraint.Level.ERROR, allowOthers = true, values = {@AllowedValue(value = "open", description = "The risk has been identified."), @AllowedValue(value = "investigating", description = "The identified risk is being investigated. (Open risk)"), @AllowedValue(value = "remediating", description = "Remediation activities are underway, but are not yet complete. (Open risk)"), @AllowedValue(value = "deviation-requested", description = "A risk deviation, such as false positive, risk reduction, or operational requirement has been submitted for approval. (Open risk)"), @AllowedValue(value = "deviation-approved", description = "A risk deviation, such as false positive, risk reduction, or operational requirement has been approved. (Open risk)"), @AllowedValue(value = "closed", description = "The risk has been resolved.")}))
131  )
132  private String _status;
133
134  /**
135   * Identifies the source of the finding, such as a tool, interviewed person, or activity.
136   */
137  @BoundAssembly(
138      formalName = "Origin",
139      description = "Identifies the source of the finding, such as a tool, interviewed person, or activity.",
140      useName = "origin",
141      remarks = "Used to identify the individual and/or tool that identified this risk.",
142      maxOccurs = -1,
143      groupAs = @GroupAs(name = "origins", inJson = JsonGroupAsBehavior.LIST)
144  )
145  private List<Origin> _origins;
146
147  /**
148   * A pointer, by ID, to an externally-defined threat.
149   */
150  @BoundField(
151      formalName = "Threat ID",
152      description = "A pointer, by ID, to an externally-defined threat.",
153      useName = "threat-id",
154      maxOccurs = -1,
155      groupAs = @GroupAs(name = "threat-ids", inJson = JsonGroupAsBehavior.LIST)
156  )
157  private List<ThreatId> _threatIds;
158
159  /**
160   * A collection of descriptive data about the containing object from a specific origin.
161   */
162  @BoundAssembly(
163      formalName = "Characterization",
164      description = "A collection of descriptive data about the containing object from a specific origin.",
165      useName = "characterization",
166      maxOccurs = -1,
167      groupAs = @GroupAs(name = "characterizations", inJson = JsonGroupAsBehavior.LIST)
168  )
169  private List<Characterization> _characterizations;
170
171  /**
172   * Describes an existing mitigating factor that may affect the overall determination of the risk, with an optional link to an implementation statement in the SSP.
173   */
174  @BoundAssembly(
175      formalName = "Mitigating Factor",
176      description = "Describes an existing mitigating factor that may affect the overall determination of the risk, with an optional link to an implementation statement in the SSP.",
177      useName = "mitigating-factor",
178      maxOccurs = -1,
179      groupAs = @GroupAs(name = "mitigating-factors", inJson = JsonGroupAsBehavior.LIST)
180  )
181  private List<MitigatingFactor> _mitigatingFactors;
182
183  /**
184   * The date/time by which the risk must be resolved.
185   */
186  @BoundField(
187      formalName = "Risk Resolution Deadline",
188      description = "The date/time by which the risk must be resolved.",
189      useName = "deadline",
190      typeAdapter = DateTimeWithTZAdapter.class
191  )
192  private ZonedDateTime _deadline;
193
194  /**
195   * Describes either recommended or an actual plan for addressing the risk.
196   */
197  @BoundAssembly(
198      formalName = "Risk Response",
199      description = "Describes either recommended or an actual plan for addressing the risk.",
200      useName = "response",
201      maxOccurs = -1,
202      groupAs = @GroupAs(name = "remediations", inJson = JsonGroupAsBehavior.LIST)
203  )
204  private List<Response> _remediations;
205
206  /**
207   * A log of all risk-related tasks taken.
208   */
209  @BoundAssembly(
210      formalName = "Risk Log",
211      description = "A log of all risk-related tasks taken.",
212      useName = "risk-log"
213  )
214  private RiskLog _riskLog;
215
216  /**
217   * Relates the finding to a set of referenced observations that were used to determine the finding.
218   */
219  @BoundAssembly(
220      formalName = "Related Observation",
221      description = "Relates the finding to a set of referenced observations that were used to determine the finding.",
222      useName = "related-observation",
223      maxOccurs = -1,
224      groupAs = @GroupAs(name = "related-observations", inJson = JsonGroupAsBehavior.LIST)
225  )
226  private List<RelatedObservation> _relatedObservations;
227
228  /**
229   * Constructs a new {@code dev.metaschema.oscal.lib.model.Risk} instance with no metadata.
230   */
231  public Risk() {
232    this(null);
233  }
234
235  /**
236   * Constructs a new {@code dev.metaschema.oscal.lib.model.Risk} instance with the specified metadata.
237   *
238   * @param data
239   *           the metaschema data, or {@code null} if none
240   */
241  public Risk(IMetaschemaData data) {
242    this.__metaschemaData = data;
243  }
244
245  @Override
246  public IMetaschemaData getMetaschemaData() {
247    return __metaschemaData;
248  }
249
250  /**
251   * Get the "{@literal Risk Universally Unique Identifier}".
252   *
253   * <p>
254   * 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 risk elsewhere in <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#scope">this or other OSCAL instances</a>. The locally defined <em>UUID</em> of the <code>risk</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.
255   *
256   * @return the uuid value
257   */
258  @NonNull
259  public UUID getUuid() {
260    return _uuid;
261  }
262
263  /**
264   * Set the "{@literal Risk Universally Unique Identifier}".
265   *
266   * <p>
267   * 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 risk elsewhere in <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#scope">this or other OSCAL instances</a>. The locally defined <em>UUID</em> of the <code>risk</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.
268   *
269   * @param value
270   *           the uuid value to set
271   */
272  public void setUuid(@NonNull UUID value) {
273    _uuid = value;
274  }
275
276  /**
277   * Get the "{@literal Risk Title}".
278   *
279   * <p>
280   * The title for this risk.
281   *
282   * @return the title value
283   */
284  @NonNull
285  public MarkupLine getTitle() {
286    return _title;
287  }
288
289  /**
290   * Set the "{@literal Risk Title}".
291   *
292   * <p>
293   * The title for this risk.
294   *
295   * @param value
296   *           the title value to set
297   */
298  public void setTitle(@NonNull MarkupLine value) {
299    _title = value;
300  }
301
302  /**
303   * Get the "{@literal Risk Description}".
304   *
305   * <p>
306   * A human-readable summary of the identified risk, to include a statement of how the risk impacts the system.
307   *
308   * @return the description value
309   */
310  @NonNull
311  public MarkupMultiline getDescription() {
312    return _description;
313  }
314
315  /**
316   * Set the "{@literal Risk Description}".
317   *
318   * <p>
319   * A human-readable summary of the identified risk, to include a statement of how the risk impacts the system.
320   *
321   * @param value
322   *           the description value to set
323   */
324  public void setDescription(@NonNull MarkupMultiline value) {
325    _description = value;
326  }
327
328  /**
329   * Get the "{@literal Risk Statement}".
330   *
331   * <p>
332   * An summary of impact for how the risk affects the system.
333   *
334   * @return the statement value
335   */
336  @NonNull
337  public MarkupMultiline getStatement() {
338    return _statement;
339  }
340
341  /**
342   * Set the "{@literal Risk Statement}".
343   *
344   * <p>
345   * An summary of impact for how the risk affects the system.
346   *
347   * @param value
348   *           the statement value to set
349   */
350  public void setStatement(@NonNull MarkupMultiline value) {
351    _statement = value;
352  }
353
354  /**
355   * Get the "{@literal Property}".
356   *
357   * <p>
358   * An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair.
359   *
360   * @return the prop value
361   */
362  @NonNull
363  public List<Property> getProps() {
364    if (_props == null) {
365      _props = new LinkedList<>();
366    }
367    return ObjectUtils.notNull(_props);
368  }
369
370  /**
371   * Set the "{@literal Property}".
372   *
373   * <p>
374   * An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair.
375   *
376   * @param value
377   *           the prop value to set
378   */
379  public void setProps(@NonNull List<Property> value) {
380    _props = value;
381  }
382
383  /**
384   * Add a new {@link Property} item to the underlying collection.
385   * @param item the item to add
386   * @return {@code true}
387   */
388  public boolean addProp(Property item) {
389    Property value = ObjectUtils.requireNonNull(item,"item cannot be null");
390    if (_props == null) {
391      _props = new LinkedList<>();
392    }
393    return _props.add(value);
394  }
395
396  /**
397   * Remove the first matching {@link Property} item from the underlying collection.
398   * @param item the item to remove
399   * @return {@code true} if the item was removed or {@code false} otherwise
400   */
401  public boolean removeProp(Property item) {
402    Property value = ObjectUtils.requireNonNull(item,"item cannot be null");
403    return _props != null && _props.remove(value);
404  }
405
406  /**
407   * Get the "{@literal Link}".
408   *
409   * <p>
410   * A reference to a local or remote resource, that has a specific relation to the containing object.
411   *
412   * @return the link value
413   */
414  @NonNull
415  public List<Link> getLinks() {
416    if (_links == null) {
417      _links = new LinkedList<>();
418    }
419    return ObjectUtils.notNull(_links);
420  }
421
422  /**
423   * Set the "{@literal Link}".
424   *
425   * <p>
426   * A reference to a local or remote resource, that has a specific relation to the containing object.
427   *
428   * @param value
429   *           the link value to set
430   */
431  public void setLinks(@NonNull List<Link> value) {
432    _links = value;
433  }
434
435  /**
436   * Add a new {@link Link} item to the underlying collection.
437   * @param item the item to add
438   * @return {@code true}
439   */
440  public boolean addLink(Link item) {
441    Link value = ObjectUtils.requireNonNull(item,"item cannot be null");
442    if (_links == null) {
443      _links = new LinkedList<>();
444    }
445    return _links.add(value);
446  }
447
448  /**
449   * Remove the first matching {@link Link} item from the underlying collection.
450   * @param item the item to remove
451   * @return {@code true} if the item was removed or {@code false} otherwise
452   */
453  public boolean removeLink(Link item) {
454    Link value = ObjectUtils.requireNonNull(item,"item cannot be null");
455    return _links != null && _links.remove(value);
456  }
457
458  /**
459   * Get the "{@literal Risk Status}".
460   *
461   * <p>
462   * Describes the status of the associated risk.
463   *
464   * @return the status value
465   */
466  @NonNull
467  public String getStatus() {
468    return _status;
469  }
470
471  /**
472   * Set the "{@literal Risk Status}".
473   *
474   * <p>
475   * Describes the status of the associated risk.
476   *
477   * @param value
478   *           the status value to set
479   */
480  public void setStatus(@NonNull String value) {
481    _status = value;
482  }
483
484  /**
485   * Get the "{@literal Origin}".
486   *
487   * <p>
488   * Identifies the source of the finding, such as a tool, interviewed person, or activity.
489   *
490   * @return the origin value
491   */
492  @NonNull
493  public List<Origin> getOrigins() {
494    if (_origins == null) {
495      _origins = new LinkedList<>();
496    }
497    return ObjectUtils.notNull(_origins);
498  }
499
500  /**
501   * Set the "{@literal Origin}".
502   *
503   * <p>
504   * Identifies the source of the finding, such as a tool, interviewed person, or activity.
505   *
506   * @param value
507   *           the origin value to set
508   */
509  public void setOrigins(@NonNull List<Origin> value) {
510    _origins = value;
511  }
512
513  /**
514   * Add a new {@link Origin} item to the underlying collection.
515   * @param item the item to add
516   * @return {@code true}
517   */
518  public boolean addOrigin(Origin item) {
519    Origin value = ObjectUtils.requireNonNull(item,"item cannot be null");
520    if (_origins == null) {
521      _origins = new LinkedList<>();
522    }
523    return _origins.add(value);
524  }
525
526  /**
527   * Remove the first matching {@link Origin} item from the underlying collection.
528   * @param item the item to remove
529   * @return {@code true} if the item was removed or {@code false} otherwise
530   */
531  public boolean removeOrigin(Origin item) {
532    Origin value = ObjectUtils.requireNonNull(item,"item cannot be null");
533    return _origins != null && _origins.remove(value);
534  }
535
536  /**
537   * Get the "{@literal Threat ID}".
538   *
539   * <p>
540   * A pointer, by ID, to an externally-defined threat.
541   *
542   * @return the threat-id value
543   */
544  @NonNull
545  public List<ThreatId> getThreatIds() {
546    if (_threatIds == null) {
547      _threatIds = new LinkedList<>();
548    }
549    return ObjectUtils.notNull(_threatIds);
550  }
551
552  /**
553   * Set the "{@literal Threat ID}".
554   *
555   * <p>
556   * A pointer, by ID, to an externally-defined threat.
557   *
558   * @param value
559   *           the threat-id value to set
560   */
561  public void setThreatIds(@NonNull List<ThreatId> value) {
562    _threatIds = value;
563  }
564
565  /**
566   * Add a new {@link ThreatId} item to the underlying collection.
567   * @param item the item to add
568   * @return {@code true}
569   */
570  public boolean addThreatId(ThreatId item) {
571    ThreatId value = ObjectUtils.requireNonNull(item,"item cannot be null");
572    if (_threatIds == null) {
573      _threatIds = new LinkedList<>();
574    }
575    return _threatIds.add(value);
576  }
577
578  /**
579   * Remove the first matching {@link ThreatId} item from the underlying collection.
580   * @param item the item to remove
581   * @return {@code true} if the item was removed or {@code false} otherwise
582   */
583  public boolean removeThreatId(ThreatId item) {
584    ThreatId value = ObjectUtils.requireNonNull(item,"item cannot be null");
585    return _threatIds != null && _threatIds.remove(value);
586  }
587
588  /**
589   * Get the "{@literal Characterization}".
590   *
591   * <p>
592   * A collection of descriptive data about the containing object from a specific origin.
593   *
594   * @return the characterization value
595   */
596  @NonNull
597  public List<Characterization> getCharacterizations() {
598    if (_characterizations == null) {
599      _characterizations = new LinkedList<>();
600    }
601    return ObjectUtils.notNull(_characterizations);
602  }
603
604  /**
605   * Set the "{@literal Characterization}".
606   *
607   * <p>
608   * A collection of descriptive data about the containing object from a specific origin.
609   *
610   * @param value
611   *           the characterization value to set
612   */
613  public void setCharacterizations(@NonNull List<Characterization> value) {
614    _characterizations = value;
615  }
616
617  /**
618   * Add a new {@link Characterization} item to the underlying collection.
619   * @param item the item to add
620   * @return {@code true}
621   */
622  public boolean addCharacterization(Characterization item) {
623    Characterization value = ObjectUtils.requireNonNull(item,"item cannot be null");
624    if (_characterizations == null) {
625      _characterizations = new LinkedList<>();
626    }
627    return _characterizations.add(value);
628  }
629
630  /**
631   * Remove the first matching {@link Characterization} item from the underlying collection.
632   * @param item the item to remove
633   * @return {@code true} if the item was removed or {@code false} otherwise
634   */
635  public boolean removeCharacterization(Characterization item) {
636    Characterization value = ObjectUtils.requireNonNull(item,"item cannot be null");
637    return _characterizations != null && _characterizations.remove(value);
638  }
639
640  /**
641   * Get the "{@literal Mitigating Factor}".
642   *
643   * <p>
644   * Describes an existing mitigating factor that may affect the overall determination of the risk, with an optional link to an implementation statement in the SSP.
645   *
646   * @return the mitigating-factor value
647   */
648  @NonNull
649  public List<MitigatingFactor> getMitigatingFactors() {
650    if (_mitigatingFactors == null) {
651      _mitigatingFactors = new LinkedList<>();
652    }
653    return ObjectUtils.notNull(_mitigatingFactors);
654  }
655
656  /**
657   * Set the "{@literal Mitigating Factor}".
658   *
659   * <p>
660   * Describes an existing mitigating factor that may affect the overall determination of the risk, with an optional link to an implementation statement in the SSP.
661   *
662   * @param value
663   *           the mitigating-factor value to set
664   */
665  public void setMitigatingFactors(@NonNull List<MitigatingFactor> value) {
666    _mitigatingFactors = value;
667  }
668
669  /**
670   * Add a new {@link MitigatingFactor} item to the underlying collection.
671   * @param item the item to add
672   * @return {@code true}
673   */
674  public boolean addMitigatingFactor(MitigatingFactor item) {
675    MitigatingFactor value = ObjectUtils.requireNonNull(item,"item cannot be null");
676    if (_mitigatingFactors == null) {
677      _mitigatingFactors = new LinkedList<>();
678    }
679    return _mitigatingFactors.add(value);
680  }
681
682  /**
683   * Remove the first matching {@link MitigatingFactor} item from the underlying collection.
684   * @param item the item to remove
685   * @return {@code true} if the item was removed or {@code false} otherwise
686   */
687  public boolean removeMitigatingFactor(MitigatingFactor item) {
688    MitigatingFactor value = ObjectUtils.requireNonNull(item,"item cannot be null");
689    return _mitigatingFactors != null && _mitigatingFactors.remove(value);
690  }
691
692  /**
693   * Get the "{@literal Risk Resolution Deadline}".
694   *
695   * <p>
696   * The date/time by which the risk must be resolved.
697   *
698   * @return the deadline value, or {@code null} if not set
699   */
700  @Nullable
701  public ZonedDateTime getDeadline() {
702    return _deadline;
703  }
704
705  /**
706   * Set the "{@literal Risk Resolution Deadline}".
707   *
708   * <p>
709   * The date/time by which the risk must be resolved.
710   *
711   * @param value
712   *           the deadline value to set, or {@code null} to clear
713   */
714  public void setDeadline(@Nullable ZonedDateTime value) {
715    _deadline = value;
716  }
717
718  /**
719   * Get the "{@literal Risk Response}".
720   *
721   * <p>
722   * Describes either recommended or an actual plan for addressing the risk.
723   *
724   * @return the response value
725   */
726  @NonNull
727  public List<Response> getRemediations() {
728    if (_remediations == null) {
729      _remediations = new LinkedList<>();
730    }
731    return ObjectUtils.notNull(_remediations);
732  }
733
734  /**
735   * Set the "{@literal Risk Response}".
736   *
737   * <p>
738   * Describes either recommended or an actual plan for addressing the risk.
739   *
740   * @param value
741   *           the response value to set
742   */
743  public void setRemediations(@NonNull List<Response> value) {
744    _remediations = value;
745  }
746
747  /**
748   * Add a new {@link Response} item to the underlying collection.
749   * @param item the item to add
750   * @return {@code true}
751   */
752  public boolean addResponse(Response item) {
753    Response value = ObjectUtils.requireNonNull(item,"item cannot be null");
754    if (_remediations == null) {
755      _remediations = new LinkedList<>();
756    }
757    return _remediations.add(value);
758  }
759
760  /**
761   * Remove the first matching {@link Response} item from the underlying collection.
762   * @param item the item to remove
763   * @return {@code true} if the item was removed or {@code false} otherwise
764   */
765  public boolean removeResponse(Response item) {
766    Response value = ObjectUtils.requireNonNull(item,"item cannot be null");
767    return _remediations != null && _remediations.remove(value);
768  }
769
770  /**
771   * Get the "{@literal Risk Log}".
772   *
773   * <p>
774   * A log of all risk-related tasks taken.
775   *
776   * @return the risk-log value, or {@code null} if not set
777   */
778  @Nullable
779  public RiskLog getRiskLog() {
780    return _riskLog;
781  }
782
783  /**
784   * Set the "{@literal Risk Log}".
785   *
786   * <p>
787   * A log of all risk-related tasks taken.
788   *
789   * @param value
790   *           the risk-log value to set, or {@code null} to clear
791   */
792  public void setRiskLog(@Nullable RiskLog value) {
793    _riskLog = value;
794  }
795
796  /**
797   * Get the "{@literal Related Observation}".
798   *
799   * <p>
800   * Relates the finding to a set of referenced observations that were used to determine the finding.
801   *
802   * @return the related-observation value
803   */
804  @NonNull
805  public List<RelatedObservation> getRelatedObservations() {
806    if (_relatedObservations == null) {
807      _relatedObservations = new LinkedList<>();
808    }
809    return ObjectUtils.notNull(_relatedObservations);
810  }
811
812  /**
813   * Set the "{@literal Related Observation}".
814   *
815   * <p>
816   * Relates the finding to a set of referenced observations that were used to determine the finding.
817   *
818   * @param value
819   *           the related-observation value to set
820   */
821  public void setRelatedObservations(@NonNull List<RelatedObservation> value) {
822    _relatedObservations = value;
823  }
824
825  /**
826   * Add a new {@link RelatedObservation} item to the underlying collection.
827   * @param item the item to add
828   * @return {@code true}
829   */
830  public boolean addRelatedObservation(RelatedObservation item) {
831    RelatedObservation value = ObjectUtils.requireNonNull(item,"item cannot be null");
832    if (_relatedObservations == null) {
833      _relatedObservations = new LinkedList<>();
834    }
835    return _relatedObservations.add(value);
836  }
837
838  /**
839   * Remove the first matching {@link RelatedObservation} item from the underlying collection.
840   * @param item the item to remove
841   * @return {@code true} if the item was removed or {@code false} otherwise
842   */
843  public boolean removeRelatedObservation(RelatedObservation item) {
844    RelatedObservation value = ObjectUtils.requireNonNull(item,"item cannot be null");
845    return _relatedObservations != null && _relatedObservations.remove(value);
846  }
847
848  @Override
849  public String toString() {
850    return ObjectUtils.notNull(new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString());
851  }
852
853  /**
854   * Describes an existing mitigating factor that may affect the overall determination of the risk, with an optional link to an implementation statement in the SSP.
855   */
856  @MetaschemaAssembly(
857      formalName = "Mitigating Factor",
858      description = "Describes an existing mitigating factor that may affect the overall determination of the risk, with an optional link to an implementation statement in the SSP.",
859      name = "mitigating-factor",
860      moduleClass = OscalAssessmentCommonModule.class
861  )
862  public static class MitigatingFactor implements IBoundObject {
863    private final IMetaschemaData __metaschemaData;
864
865    /**
866     * 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 mitigating factor elsewhere in <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#scope">this or other OSCAL instances</a>. The locally defined <em>UUID</em> of the <code>mitigating factor</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.
867     */
868    @BoundFlag(
869        formalName = "Mitigating Factor Universally Unique Identifier",
870        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 mitigating factor elsewhere in [this or other OSCAL instances](https://pages.nist.gov/OSCAL/concepts/identifier-use/#scope). The locally defined *UUID* of the `mitigating factor` 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.",
871        name = "uuid",
872        required = true,
873        typeAdapter = UuidAdapter.class
874    )
875    private UUID _uuid;
876
877    /**
878     * 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 implementation statement elsewhere in <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#scope">this or other OSCAL instances</a>s. The locally defined <em>UUID</em> of the <code>implementation statement</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.
879     */
880    @BoundFlag(
881        formalName = "Implementation UUID",
882        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 implementation statement elsewhere in [this or other OSCAL instances](https://pages.nist.gov/OSCAL/concepts/identifier-use/#scope)s. The locally defined *UUID* of the `implementation statement` 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.",
883        name = "implementation-uuid",
884        typeAdapter = UuidAdapter.class
885    )
886    private UUID _implementationUuid;
887
888    /**
889     * A human-readable description of this mitigating factor.
890     */
891    @BoundField(
892        formalName = "Mitigating Factor Description",
893        description = "A human-readable description of this mitigating factor.",
894        useName = "description",
895        minOccurs = 1,
896        typeAdapter = MarkupMultilineAdapter.class
897    )
898    private MarkupMultiline _description;
899
900    /**
901     * An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair.
902     */
903    @BoundAssembly(
904        formalName = "Property",
905        description = "An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair.",
906        useName = "prop",
907        maxOccurs = -1,
908        groupAs = @GroupAs(name = "props", inJson = JsonGroupAsBehavior.LIST)
909    )
910    private List<Property> _props;
911
912    /**
913     * A reference to a local or remote resource, that has a specific relation to the containing object.
914     */
915    @BoundAssembly(
916        formalName = "Link",
917        description = "A reference to a local or remote resource, that has a specific relation to the containing object.",
918        useName = "link",
919        maxOccurs = -1,
920        groupAs = @GroupAs(name = "links", inJson = JsonGroupAsBehavior.LIST)
921    )
922    private List<Link> _links;
923
924    /**
925     * A <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#human-oriented">human-oriented</a> identifier reference to a resource. Use type to indicate whether the identified resource is a component, inventory item, location, user, or something else.
926     */
927    @BoundAssembly(
928        formalName = "Identifies the Subject",
929        description = "A [human-oriented](https://pages.nist.gov/OSCAL/concepts/identifier-use/#human-oriented) identifier reference to a resource. Use type to indicate whether the identified resource is a component, inventory item, location, user, or something else.",
930        useName = "subject",
931        remarks = "Links identifiable elements of the system to this mitigating factor, such as an inventory-item or component.",
932        maxOccurs = -1,
933        groupAs = @GroupAs(name = "subjects", inJson = JsonGroupAsBehavior.LIST)
934    )
935    private List<SubjectReference> _subjects;
936
937    /**
938     * Constructs a new {@code dev.metaschema.oscal.lib.model.Risk.MitigatingFactor} instance with no metadata.
939     */
940    public MitigatingFactor() {
941      this(null);
942    }
943
944    /**
945     * Constructs a new {@code dev.metaschema.oscal.lib.model.Risk.MitigatingFactor} instance with the specified metadata.
946     *
947     * @param data
948     *           the metaschema data, or {@code null} if none
949     */
950    public MitigatingFactor(IMetaschemaData data) {
951      this.__metaschemaData = data;
952    }
953
954    @Override
955    public IMetaschemaData getMetaschemaData() {
956      return __metaschemaData;
957    }
958
959    /**
960     * Get the "{@literal Mitigating Factor Universally Unique Identifier}".
961     *
962     * <p>
963     * 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 mitigating factor elsewhere in <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#scope">this or other OSCAL instances</a>. The locally defined <em>UUID</em> of the <code>mitigating factor</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.
964     *
965     * @return the uuid value
966     */
967    @NonNull
968    public UUID getUuid() {
969      return _uuid;
970    }
971
972    /**
973     * Set the "{@literal Mitigating Factor Universally Unique Identifier}".
974     *
975     * <p>
976     * 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 mitigating factor elsewhere in <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#scope">this or other OSCAL instances</a>. The locally defined <em>UUID</em> of the <code>mitigating factor</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.
977     *
978     * @param value
979     *           the uuid value to set
980     */
981    public void setUuid(@NonNull UUID value) {
982      _uuid = value;
983    }
984
985    /**
986     * Get the "{@literal Implementation UUID}".
987     *
988     * <p>
989     * 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 implementation statement elsewhere in <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#scope">this or other OSCAL instances</a>s. The locally defined <em>UUID</em> of the <code>implementation statement</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.
990     *
991     * @return the implementation-uuid value, or {@code null} if not set
992     */
993    @Nullable
994    public UUID getImplementationUuid() {
995      return _implementationUuid;
996    }
997
998    /**
999     * Set the "{@literal Implementation UUID}".
1000     *
1001     * <p>
1002     * 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 implementation statement elsewhere in <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#scope">this or other OSCAL instances</a>s. The locally defined <em>UUID</em> of the <code>implementation statement</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.
1003     *
1004     * @param value
1005     *           the implementation-uuid value to set, or {@code null} to clear
1006     */
1007    public void setImplementationUuid(@Nullable UUID value) {
1008      _implementationUuid = value;
1009    }
1010
1011    /**
1012     * Get the "{@literal Mitigating Factor Description}".
1013     *
1014     * <p>
1015     * A human-readable description of this mitigating factor.
1016     *
1017     * @return the description value
1018     */
1019    @NonNull
1020    public MarkupMultiline getDescription() {
1021      return _description;
1022    }
1023
1024    /**
1025     * Set the "{@literal Mitigating Factor Description}".
1026     *
1027     * <p>
1028     * A human-readable description of this mitigating factor.
1029     *
1030     * @param value
1031     *           the description value to set
1032     */
1033    public void setDescription(@NonNull MarkupMultiline value) {
1034      _description = value;
1035    }
1036
1037    /**
1038     * Get the "{@literal Property}".
1039     *
1040     * <p>
1041     * An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair.
1042     *
1043     * @return the prop value
1044     */
1045    @NonNull
1046    public List<Property> getProps() {
1047      if (_props == null) {
1048        _props = new LinkedList<>();
1049      }
1050      return ObjectUtils.notNull(_props);
1051    }
1052
1053    /**
1054     * Set the "{@literal Property}".
1055     *
1056     * <p>
1057     * An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair.
1058     *
1059     * @param value
1060     *           the prop value to set
1061     */
1062    public void setProps(@NonNull List<Property> value) {
1063      _props = value;
1064    }
1065
1066    /**
1067     * Add a new {@link Property} item to the underlying collection.
1068     * @param item the item to add
1069     * @return {@code true}
1070     */
1071    public boolean addProp(Property item) {
1072      Property value = ObjectUtils.requireNonNull(item,"item cannot be null");
1073      if (_props == null) {
1074        _props = new LinkedList<>();
1075      }
1076      return _props.add(value);
1077    }
1078
1079    /**
1080     * Remove the first matching {@link Property} item from the underlying collection.
1081     * @param item the item to remove
1082     * @return {@code true} if the item was removed or {@code false} otherwise
1083     */
1084    public boolean removeProp(Property item) {
1085      Property value = ObjectUtils.requireNonNull(item,"item cannot be null");
1086      return _props != null && _props.remove(value);
1087    }
1088
1089    /**
1090     * Get the "{@literal Link}".
1091     *
1092     * <p>
1093     * A reference to a local or remote resource, that has a specific relation to the containing object.
1094     *
1095     * @return the link value
1096     */
1097    @NonNull
1098    public List<Link> getLinks() {
1099      if (_links == null) {
1100        _links = new LinkedList<>();
1101      }
1102      return ObjectUtils.notNull(_links);
1103    }
1104
1105    /**
1106     * Set the "{@literal Link}".
1107     *
1108     * <p>
1109     * A reference to a local or remote resource, that has a specific relation to the containing object.
1110     *
1111     * @param value
1112     *           the link value to set
1113     */
1114    public void setLinks(@NonNull List<Link> value) {
1115      _links = value;
1116    }
1117
1118    /**
1119     * Add a new {@link Link} item to the underlying collection.
1120     * @param item the item to add
1121     * @return {@code true}
1122     */
1123    public boolean addLink(Link item) {
1124      Link value = ObjectUtils.requireNonNull(item,"item cannot be null");
1125      if (_links == null) {
1126        _links = new LinkedList<>();
1127      }
1128      return _links.add(value);
1129    }
1130
1131    /**
1132     * Remove the first matching {@link Link} item from the underlying collection.
1133     * @param item the item to remove
1134     * @return {@code true} if the item was removed or {@code false} otherwise
1135     */
1136    public boolean removeLink(Link item) {
1137      Link value = ObjectUtils.requireNonNull(item,"item cannot be null");
1138      return _links != null && _links.remove(value);
1139    }
1140
1141    /**
1142     * Get the "{@literal Identifies the Subject}".
1143     *
1144     * <p>
1145     * A <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#human-oriented">human-oriented</a> identifier reference to a resource. Use type to indicate whether the identified resource is a component, inventory item, location, user, or something else.
1146     *
1147     * @return the subject value
1148     */
1149    @NonNull
1150    public List<SubjectReference> getSubjects() {
1151      if (_subjects == null) {
1152        _subjects = new LinkedList<>();
1153      }
1154      return ObjectUtils.notNull(_subjects);
1155    }
1156
1157    /**
1158     * Set the "{@literal Identifies the Subject}".
1159     *
1160     * <p>
1161     * A <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#human-oriented">human-oriented</a> identifier reference to a resource. Use type to indicate whether the identified resource is a component, inventory item, location, user, or something else.
1162     *
1163     * @param value
1164     *           the subject value to set
1165     */
1166    public void setSubjects(@NonNull List<SubjectReference> value) {
1167      _subjects = value;
1168    }
1169
1170    /**
1171     * Add a new {@link SubjectReference} item to the underlying collection.
1172     * @param item the item to add
1173     * @return {@code true}
1174     */
1175    public boolean addSubject(SubjectReference item) {
1176      SubjectReference value = ObjectUtils.requireNonNull(item,"item cannot be null");
1177      if (_subjects == null) {
1178        _subjects = new LinkedList<>();
1179      }
1180      return _subjects.add(value);
1181    }
1182
1183    /**
1184     * Remove the first matching {@link SubjectReference} item from the underlying collection.
1185     * @param item the item to remove
1186     * @return {@code true} if the item was removed or {@code false} otherwise
1187     */
1188    public boolean removeSubject(SubjectReference item) {
1189      SubjectReference value = ObjectUtils.requireNonNull(item,"item cannot be null");
1190      return _subjects != null && _subjects.remove(value);
1191    }
1192
1193    @Override
1194    public String toString() {
1195      return ObjectUtils.notNull(new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString());
1196    }
1197  }
1198
1199  /**
1200   * A log of all risk-related tasks taken.
1201   */
1202  @MetaschemaAssembly(
1203      formalName = "Risk Log",
1204      description = "A log of all risk-related tasks taken.",
1205      name = "risk-log",
1206      moduleClass = OscalAssessmentCommonModule.class
1207  )
1208  public static class RiskLog implements IBoundObject {
1209    private final IMetaschemaData __metaschemaData;
1210
1211    /**
1212     * Identifies an individual risk response that occurred as part of managing an identified risk.
1213     */
1214    @BoundAssembly(
1215        formalName = "Risk Log Entry",
1216        description = "Identifies an individual risk response that occurred as part of managing an identified risk.",
1217        useName = "entry",
1218        minOccurs = 1,
1219        maxOccurs = -1,
1220        groupAs = @GroupAs(name = "entries", inJson = JsonGroupAsBehavior.LIST)
1221    )
1222    private List<Entry> _entries;
1223
1224    /**
1225     * Constructs a new {@code dev.metaschema.oscal.lib.model.Risk.RiskLog} instance with no metadata.
1226     */
1227    public RiskLog() {
1228      this(null);
1229    }
1230
1231    /**
1232     * Constructs a new {@code dev.metaschema.oscal.lib.model.Risk.RiskLog} instance with the specified metadata.
1233     *
1234     * @param data
1235     *           the metaschema data, or {@code null} if none
1236     */
1237    public RiskLog(IMetaschemaData data) {
1238      this.__metaschemaData = data;
1239    }
1240
1241    @Override
1242    public IMetaschemaData getMetaschemaData() {
1243      return __metaschemaData;
1244    }
1245
1246    /**
1247     * Get the "{@literal Risk Log Entry}".
1248     *
1249     * <p>
1250     * Identifies an individual risk response that occurred as part of managing an identified risk.
1251     *
1252     * @return the entry value
1253     */
1254    @NonNull
1255    public List<Entry> getEntries() {
1256      if (_entries == null) {
1257        _entries = new LinkedList<>();
1258      }
1259      return ObjectUtils.notNull(_entries);
1260    }
1261
1262    /**
1263     * Set the "{@literal Risk Log Entry}".
1264     *
1265     * <p>
1266     * Identifies an individual risk response that occurred as part of managing an identified risk.
1267     *
1268     * @param value
1269     *           the entry value to set
1270     */
1271    public void setEntries(@NonNull List<Entry> value) {
1272      _entries = value;
1273    }
1274
1275    /**
1276     * Add a new {@link Entry} item to the underlying collection.
1277     * @param item the item to add
1278     * @return {@code true}
1279     */
1280    public boolean addEntry(Entry item) {
1281      Entry value = ObjectUtils.requireNonNull(item,"item cannot be null");
1282      if (_entries == null) {
1283        _entries = new LinkedList<>();
1284      }
1285      return _entries.add(value);
1286    }
1287
1288    /**
1289     * Remove the first matching {@link Entry} item from the underlying collection.
1290     * @param item the item to remove
1291     * @return {@code true} if the item was removed or {@code false} otherwise
1292     */
1293    public boolean removeEntry(Entry item) {
1294      Entry value = ObjectUtils.requireNonNull(item,"item cannot be null");
1295      return _entries != null && _entries.remove(value);
1296    }
1297
1298    @Override
1299    public String toString() {
1300      return ObjectUtils.notNull(new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString());
1301    }
1302
1303    /**
1304     * Identifies an individual risk response that occurred as part of managing an identified risk.
1305     */
1306    @MetaschemaAssembly(
1307        formalName = "Risk Log Entry",
1308        description = "Identifies an individual risk response that occurred as part of managing an identified risk.",
1309        name = "entry",
1310        moduleClass = OscalAssessmentCommonModule.class,
1311        valueConstraints = @ValueConstraints(allowedValues = {@AllowedValues(id = "oscal-risk-prop-name-values", level = IConstraint.Level.ERROR, target = "prop[has-oscal-namespace('http://csrc.nist.gov/ns/oscal')]/@name", values = @AllowedValue(value = "type", description = "The type of remediation tracking entry. Can be multi-valued.")), @AllowedValues(id = "oscal-risk-prop-type-values", level = IConstraint.Level.ERROR, target = "prop[has-oscal-namespace('http://csrc.nist.gov/ns/oscal') and @name='type']/@value", allowOthers = true, values = {@AllowedValue(value = "vendor-check-in", description = "Contacted vendor to determine the status of a pending fix to a known vulnerability."), @AllowedValue(value = "status-update", description = "Information related to the current state of response to this risk."), @AllowedValue(value = "milestone-complete", description = "A significant step in the response plan has been achieved."), @AllowedValue(value = "mitigation", description = "An activity was completed that reduces the likelihood or impact of this risk."), @AllowedValue(value = "remediated", description = "An activity was completed that eliminates the likelihood or impact of this risk."), @AllowedValue(value = "closed", description = "The risk is no longer applicable to the system."), @AllowedValue(value = "dr-submission", description = "A deviation request was made to the authorizing official."), @AllowedValue(value = "dr-updated", description = "A previously submitted deviation request has been modified."), @AllowedValue(value = "dr-approved", description = "The authorizing official approved the deviation."), @AllowedValue(value = "dr-rejected", description = "The authorizing official rejected the deviation.")})})
1312    )
1313    public static class Entry implements IBoundObject {
1314      private final IMetaschemaData __metaschemaData;
1315
1316      /**
1317       * 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 risk log entry elsewhere in <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#scope">this or other OSCAL instances</a>. The locally defined <em>UUID</em> of the <code>risk log entry</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.
1318       */
1319      @BoundFlag(
1320          formalName = "Risk Log Entry Universally Unique Identifier",
1321          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 risk log entry elsewhere in [this or other OSCAL instances](https://pages.nist.gov/OSCAL/concepts/identifier-use/#scope). The locally defined *UUID* of the `risk log 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.",
1322          name = "uuid",
1323          required = true,
1324          typeAdapter = UuidAdapter.class
1325      )
1326      private UUID _uuid;
1327
1328      /**
1329       * The title for this risk log entry.
1330       */
1331      @BoundField(
1332          formalName = "Title",
1333          description = "The title for this risk log entry.",
1334          useName = "title",
1335          typeAdapter = MarkupLineAdapter.class
1336      )
1337      private MarkupLine _title;
1338
1339      /**
1340       * A human-readable description of what was done regarding the risk.
1341       */
1342      @BoundField(
1343          formalName = "Risk Task Description",
1344          description = "A human-readable description of what was done regarding the risk.",
1345          useName = "description",
1346          typeAdapter = MarkupMultilineAdapter.class
1347      )
1348      private MarkupMultiline _description;
1349
1350      /**
1351       * Identifies the start date and time of the event.
1352       */
1353      @BoundField(
1354          formalName = "Start",
1355          description = "Identifies the start date and time of the event.",
1356          useName = "start",
1357          minOccurs = 1,
1358          typeAdapter = DateTimeWithTZAdapter.class
1359      )
1360      private ZonedDateTime _start;
1361
1362      /**
1363       * Identifies the end date and time of the event. If the event is a point in time, the start and end will be the same date and time.
1364       */
1365      @BoundField(
1366          formalName = "End",
1367          description = "Identifies the end date and time of the event. If the event is a point in time, the start and end will be the same date and time.",
1368          useName = "end",
1369          typeAdapter = DateTimeWithTZAdapter.class
1370      )
1371      private ZonedDateTime _end;
1372
1373      /**
1374       * An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair.
1375       */
1376      @BoundAssembly(
1377          formalName = "Property",
1378          description = "An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair.",
1379          useName = "prop",
1380          maxOccurs = -1,
1381          groupAs = @GroupAs(name = "props", inJson = JsonGroupAsBehavior.LIST)
1382      )
1383      private List<Property> _props;
1384
1385      /**
1386       * A reference to a local or remote resource, that has a specific relation to the containing object.
1387       */
1388      @BoundAssembly(
1389          formalName = "Link",
1390          description = "A reference to a local or remote resource, that has a specific relation to the containing object.",
1391          useName = "link",
1392          maxOccurs = -1,
1393          groupAs = @GroupAs(name = "links", inJson = JsonGroupAsBehavior.LIST)
1394      )
1395      private List<Link> _links;
1396
1397      /**
1398       * Used to indicate who created a log entry in what role.
1399       */
1400      @BoundAssembly(
1401          formalName = "Logged By",
1402          description = "Used to indicate who created a log entry in what role.",
1403          useName = "logged-by",
1404          maxOccurs = -1,
1405          groupAs = @GroupAs(name = "logged-by", inJson = JsonGroupAsBehavior.LIST)
1406      )
1407      private List<LoggedBy> _loggedBy;
1408
1409      /**
1410       * Describes the status of the associated risk.
1411       */
1412      @BoundField(
1413          formalName = "Risk Status",
1414          description = "Describes the status of the associated risk.",
1415          useName = "status-change",
1416          remarks = "Identifies a change in risk status made resulting from the task described by this risk log entry. This allows the risk's status history to be captured as a sequence of risk log entries.",
1417          typeAdapter = TokenAdapter.class,
1418          valueConstraints = @ValueConstraints(allowedValues = @AllowedValues(id = "oscal-risk-status-values", level = IConstraint.Level.ERROR, allowOthers = true, values = {@AllowedValue(value = "open", description = "The risk has been identified."), @AllowedValue(value = "investigating", description = "The identified risk is being investigated. (Open risk)"), @AllowedValue(value = "remediating", description = "Remediation activities are underway, but are not yet complete. (Open risk)"), @AllowedValue(value = "deviation-requested", description = "A risk deviation, such as false positive, risk reduction, or operational requirement has been submitted for approval. (Open risk)"), @AllowedValue(value = "deviation-approved", description = "A risk deviation, such as false positive, risk reduction, or operational requirement has been approved. (Open risk)"), @AllowedValue(value = "closed", description = "The risk has been resolved.")}))
1419      )
1420      private String _statusChange;
1421
1422      /**
1423       * Identifies an individual risk response that this log entry is for.
1424       */
1425      @BoundAssembly(
1426          formalName = "Risk Response Reference",
1427          description = "Identifies an individual risk response that this log entry is for.",
1428          useName = "related-response",
1429          maxOccurs = -1,
1430          groupAs = @GroupAs(name = "related-responses", inJson = JsonGroupAsBehavior.LIST)
1431      )
1432      private List<RelatedResponse> _relatedResponses;
1433
1434      /**
1435       * Additional commentary about the containing object.
1436       */
1437      @BoundField(
1438          formalName = "Remarks",
1439          description = "Additional commentary about the containing object.",
1440          useName = "remarks",
1441          typeAdapter = MarkupMultilineAdapter.class
1442      )
1443      private MarkupMultiline _remarks;
1444
1445      /**
1446       * Constructs a new {@code dev.metaschema.oscal.lib.model.Risk.RiskLog.Entry} instance with no metadata.
1447       */
1448      public Entry() {
1449        this(null);
1450      }
1451
1452      /**
1453       * Constructs a new {@code dev.metaschema.oscal.lib.model.Risk.RiskLog.Entry} instance with the specified metadata.
1454       *
1455       * @param data
1456       *           the metaschema data, or {@code null} if none
1457       */
1458      public Entry(IMetaschemaData data) {
1459        this.__metaschemaData = data;
1460      }
1461
1462      @Override
1463      public IMetaschemaData getMetaschemaData() {
1464        return __metaschemaData;
1465      }
1466
1467      /**
1468       * Get the "{@literal Risk Log Entry Universally Unique Identifier}".
1469       *
1470       * <p>
1471       * 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 risk log entry elsewhere in <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#scope">this or other OSCAL instances</a>. The locally defined <em>UUID</em> of the <code>risk log entry</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.
1472       *
1473       * @return the uuid value
1474       */
1475      @NonNull
1476      public UUID getUuid() {
1477        return _uuid;
1478      }
1479
1480      /**
1481       * Set the "{@literal Risk Log Entry Universally Unique Identifier}".
1482       *
1483       * <p>
1484       * 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 risk log entry elsewhere in <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#scope">this or other OSCAL instances</a>. The locally defined <em>UUID</em> of the <code>risk log entry</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.
1485       *
1486       * @param value
1487       *           the uuid value to set
1488       */
1489      public void setUuid(@NonNull UUID value) {
1490        _uuid = value;
1491      }
1492
1493      /**
1494       * Get the "{@literal Title}".
1495       *
1496       * <p>
1497       * The title for this risk log entry.
1498       *
1499       * @return the title value, or {@code null} if not set
1500       */
1501      @Nullable
1502      public MarkupLine getTitle() {
1503        return _title;
1504      }
1505
1506      /**
1507       * Set the "{@literal Title}".
1508       *
1509       * <p>
1510       * The title for this risk log entry.
1511       *
1512       * @param value
1513       *           the title value to set, or {@code null} to clear
1514       */
1515      public void setTitle(@Nullable MarkupLine value) {
1516        _title = value;
1517      }
1518
1519      /**
1520       * Get the "{@literal Risk Task Description}".
1521       *
1522       * <p>
1523       * A human-readable description of what was done regarding the risk.
1524       *
1525       * @return the description value, or {@code null} if not set
1526       */
1527      @Nullable
1528      public MarkupMultiline getDescription() {
1529        return _description;
1530      }
1531
1532      /**
1533       * Set the "{@literal Risk Task Description}".
1534       *
1535       * <p>
1536       * A human-readable description of what was done regarding the risk.
1537       *
1538       * @param value
1539       *           the description value to set, or {@code null} to clear
1540       */
1541      public void setDescription(@Nullable MarkupMultiline value) {
1542        _description = value;
1543      }
1544
1545      /**
1546       * Get the "{@literal Start}".
1547       *
1548       * <p>
1549       * Identifies the start date and time of the event.
1550       *
1551       * @return the start value
1552       */
1553      @NonNull
1554      public ZonedDateTime getStart() {
1555        return _start;
1556      }
1557
1558      /**
1559       * Set the "{@literal Start}".
1560       *
1561       * <p>
1562       * Identifies the start date and time of the event.
1563       *
1564       * @param value
1565       *           the start value to set
1566       */
1567      public void setStart(@NonNull ZonedDateTime value) {
1568        _start = value;
1569      }
1570
1571      /**
1572       * Get the "{@literal End}".
1573       *
1574       * <p>
1575       * Identifies the end date and time of the event. If the event is a point in time, the start and end will be the same date and time.
1576       *
1577       * @return the end value, or {@code null} if not set
1578       */
1579      @Nullable
1580      public ZonedDateTime getEnd() {
1581        return _end;
1582      }
1583
1584      /**
1585       * Set the "{@literal End}".
1586       *
1587       * <p>
1588       * Identifies the end date and time of the event. If the event is a point in time, the start and end will be the same date and time.
1589       *
1590       * @param value
1591       *           the end value to set, or {@code null} to clear
1592       */
1593      public void setEnd(@Nullable ZonedDateTime value) {
1594        _end = value;
1595      }
1596
1597      /**
1598       * Get the "{@literal Property}".
1599       *
1600       * <p>
1601       * An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair.
1602       *
1603       * @return the prop value
1604       */
1605      @NonNull
1606      public List<Property> getProps() {
1607        if (_props == null) {
1608          _props = new LinkedList<>();
1609        }
1610        return ObjectUtils.notNull(_props);
1611      }
1612
1613      /**
1614       * Set the "{@literal Property}".
1615       *
1616       * <p>
1617       * An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair.
1618       *
1619       * @param value
1620       *           the prop value to set
1621       */
1622      public void setProps(@NonNull List<Property> value) {
1623        _props = value;
1624      }
1625
1626      /**
1627       * Add a new {@link Property} item to the underlying collection.
1628       * @param item the item to add
1629       * @return {@code true}
1630       */
1631      public boolean addProp(Property item) {
1632        Property value = ObjectUtils.requireNonNull(item,"item cannot be null");
1633        if (_props == null) {
1634          _props = new LinkedList<>();
1635        }
1636        return _props.add(value);
1637      }
1638
1639      /**
1640       * Remove the first matching {@link Property} item from the underlying collection.
1641       * @param item the item to remove
1642       * @return {@code true} if the item was removed or {@code false} otherwise
1643       */
1644      public boolean removeProp(Property item) {
1645        Property value = ObjectUtils.requireNonNull(item,"item cannot be null");
1646        return _props != null && _props.remove(value);
1647      }
1648
1649      /**
1650       * Get the "{@literal Link}".
1651       *
1652       * <p>
1653       * A reference to a local or remote resource, that has a specific relation to the containing object.
1654       *
1655       * @return the link value
1656       */
1657      @NonNull
1658      public List<Link> getLinks() {
1659        if (_links == null) {
1660          _links = new LinkedList<>();
1661        }
1662        return ObjectUtils.notNull(_links);
1663      }
1664
1665      /**
1666       * Set the "{@literal Link}".
1667       *
1668       * <p>
1669       * A reference to a local or remote resource, that has a specific relation to the containing object.
1670       *
1671       * @param value
1672       *           the link value to set
1673       */
1674      public void setLinks(@NonNull List<Link> value) {
1675        _links = value;
1676      }
1677
1678      /**
1679       * Add a new {@link Link} item to the underlying collection.
1680       * @param item the item to add
1681       * @return {@code true}
1682       */
1683      public boolean addLink(Link item) {
1684        Link value = ObjectUtils.requireNonNull(item,"item cannot be null");
1685        if (_links == null) {
1686          _links = new LinkedList<>();
1687        }
1688        return _links.add(value);
1689      }
1690
1691      /**
1692       * Remove the first matching {@link Link} item from the underlying collection.
1693       * @param item the item to remove
1694       * @return {@code true} if the item was removed or {@code false} otherwise
1695       */
1696      public boolean removeLink(Link item) {
1697        Link value = ObjectUtils.requireNonNull(item,"item cannot be null");
1698        return _links != null && _links.remove(value);
1699      }
1700
1701      /**
1702       * Get the "{@literal Logged By}".
1703       *
1704       * <p>
1705       * Used to indicate who created a log entry in what role.
1706       *
1707       * @return the logged-by value
1708       */
1709      @NonNull
1710      public List<LoggedBy> getLoggedBy() {
1711        if (_loggedBy == null) {
1712          _loggedBy = new LinkedList<>();
1713        }
1714        return ObjectUtils.notNull(_loggedBy);
1715      }
1716
1717      /**
1718       * Set the "{@literal Logged By}".
1719       *
1720       * <p>
1721       * Used to indicate who created a log entry in what role.
1722       *
1723       * @param value
1724       *           the logged-by value to set
1725       */
1726      public void setLoggedBy(@NonNull List<LoggedBy> value) {
1727        _loggedBy = value;
1728      }
1729
1730      /**
1731       * Add a new {@link LoggedBy} item to the underlying collection.
1732       * @param item the item to add
1733       * @return {@code true}
1734       */
1735      public boolean addLoggedBy(LoggedBy item) {
1736        LoggedBy value = ObjectUtils.requireNonNull(item,"item cannot be null");
1737        if (_loggedBy == null) {
1738          _loggedBy = new LinkedList<>();
1739        }
1740        return _loggedBy.add(value);
1741      }
1742
1743      /**
1744       * Remove the first matching {@link LoggedBy} item from the underlying collection.
1745       * @param item the item to remove
1746       * @return {@code true} if the item was removed or {@code false} otherwise
1747       */
1748      public boolean removeLoggedBy(LoggedBy item) {
1749        LoggedBy value = ObjectUtils.requireNonNull(item,"item cannot be null");
1750        return _loggedBy != null && _loggedBy.remove(value);
1751      }
1752
1753      /**
1754       * Get the "{@literal Risk Status}".
1755       *
1756       * <p>
1757       * Describes the status of the associated risk.
1758       *
1759       * @return the status-change value, or {@code null} if not set
1760       */
1761      @Nullable
1762      public String getStatusChange() {
1763        return _statusChange;
1764      }
1765
1766      /**
1767       * Set the "{@literal Risk Status}".
1768       *
1769       * <p>
1770       * Describes the status of the associated risk.
1771       *
1772       * @param value
1773       *           the status-change value to set, or {@code null} to clear
1774       */
1775      public void setStatusChange(@Nullable String value) {
1776        _statusChange = value;
1777      }
1778
1779      /**
1780       * Get the "{@literal Risk Response Reference}".
1781       *
1782       * <p>
1783       * Identifies an individual risk response that this log entry is for.
1784       *
1785       * @return the related-response value
1786       */
1787      @NonNull
1788      public List<RelatedResponse> getRelatedResponses() {
1789        if (_relatedResponses == null) {
1790          _relatedResponses = new LinkedList<>();
1791        }
1792        return ObjectUtils.notNull(_relatedResponses);
1793      }
1794
1795      /**
1796       * Set the "{@literal Risk Response Reference}".
1797       *
1798       * <p>
1799       * Identifies an individual risk response that this log entry is for.
1800       *
1801       * @param value
1802       *           the related-response value to set
1803       */
1804      public void setRelatedResponses(@NonNull List<RelatedResponse> value) {
1805        _relatedResponses = value;
1806      }
1807
1808      /**
1809       * Add a new {@link RelatedResponse} item to the underlying collection.
1810       * @param item the item to add
1811       * @return {@code true}
1812       */
1813      public boolean addRelatedResponse(RelatedResponse item) {
1814        RelatedResponse value = ObjectUtils.requireNonNull(item,"item cannot be null");
1815        if (_relatedResponses == null) {
1816          _relatedResponses = new LinkedList<>();
1817        }
1818        return _relatedResponses.add(value);
1819      }
1820
1821      /**
1822       * Remove the first matching {@link RelatedResponse} item from the underlying collection.
1823       * @param item the item to remove
1824       * @return {@code true} if the item was removed or {@code false} otherwise
1825       */
1826      public boolean removeRelatedResponse(RelatedResponse item) {
1827        RelatedResponse value = ObjectUtils.requireNonNull(item,"item cannot be null");
1828        return _relatedResponses != null && _relatedResponses.remove(value);
1829      }
1830
1831      /**
1832       * Get the "{@literal Remarks}".
1833       *
1834       * <p>
1835       * Additional commentary about the containing object.
1836       *
1837       * @return the remarks value, or {@code null} if not set
1838       */
1839      @Nullable
1840      public MarkupMultiline getRemarks() {
1841        return _remarks;
1842      }
1843
1844      /**
1845       * Set the "{@literal Remarks}".
1846       *
1847       * <p>
1848       * Additional commentary about the containing object.
1849       *
1850       * @param value
1851       *           the remarks value to set, or {@code null} to clear
1852       */
1853      public void setRemarks(@Nullable MarkupMultiline value) {
1854        _remarks = value;
1855      }
1856
1857      @Override
1858      public String toString() {
1859        return ObjectUtils.notNull(new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString());
1860      }
1861
1862      /**
1863       * Identifies an individual risk response that this log entry is for.
1864       */
1865      @MetaschemaAssembly(
1866          formalName = "Risk Response Reference",
1867          description = "Identifies an individual risk response that this log entry is for.",
1868          name = "related-response",
1869          moduleClass = OscalAssessmentCommonModule.class
1870      )
1871      public static class RelatedResponse implements IBoundObject {
1872        private final IMetaschemaData __metaschemaData;
1873
1874        /**
1875         * A <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented">machine-oriented</a> identifier reference to a unique risk response.
1876         */
1877        @BoundFlag(
1878            formalName = "Response Universally Unique Identifier Reference",
1879            description = "A [machine-oriented](https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented) identifier reference to a unique risk response.",
1880            name = "response-uuid",
1881            required = true,
1882            typeAdapter = UuidAdapter.class
1883        )
1884        private UUID _responseUuid;
1885
1886        /**
1887         * An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair.
1888         */
1889        @BoundAssembly(
1890            formalName = "Property",
1891            description = "An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair.",
1892            useName = "prop",
1893            maxOccurs = -1,
1894            groupAs = @GroupAs(name = "props", inJson = JsonGroupAsBehavior.LIST)
1895        )
1896        private List<Property> _props;
1897
1898        /**
1899         * A reference to a local or remote resource, that has a specific relation to the containing object.
1900         */
1901        @BoundAssembly(
1902            formalName = "Link",
1903            description = "A reference to a local or remote resource, that has a specific relation to the containing object.",
1904            useName = "link",
1905            maxOccurs = -1,
1906            groupAs = @GroupAs(name = "links", inJson = JsonGroupAsBehavior.LIST)
1907        )
1908        private List<Link> _links;
1909
1910        /**
1911         * Identifies an individual task for which the containing object is a consequence of.
1912         */
1913        @BoundAssembly(
1914            formalName = "Task Reference",
1915            description = "Identifies an individual task for which the containing object is a consequence of.",
1916            useName = "related-task",
1917            remarks = "This is used to identify the task(s) that this log entry was generated for.",
1918            maxOccurs = -1,
1919            groupAs = @GroupAs(name = "related-tasks", inJson = JsonGroupAsBehavior.LIST)
1920        )
1921        private List<RelatedTask> _relatedTasks;
1922
1923        /**
1924         * Additional commentary about the containing object.
1925         */
1926        @BoundField(
1927            formalName = "Remarks",
1928            description = "Additional commentary about the containing object.",
1929            useName = "remarks",
1930            typeAdapter = MarkupMultilineAdapter.class
1931        )
1932        private MarkupMultiline _remarks;
1933
1934        /**
1935         * Constructs a new {@code dev.metaschema.oscal.lib.model.Risk.RiskLog.Entry.RelatedResponse} instance with no metadata.
1936         */
1937        public RelatedResponse() {
1938          this(null);
1939        }
1940
1941        /**
1942         * Constructs a new {@code dev.metaschema.oscal.lib.model.Risk.RiskLog.Entry.RelatedResponse} instance with the specified metadata.
1943         *
1944         * @param data
1945         *           the metaschema data, or {@code null} if none
1946         */
1947        public RelatedResponse(IMetaschemaData data) {
1948          this.__metaschemaData = data;
1949        }
1950
1951        @Override
1952        public IMetaschemaData getMetaschemaData() {
1953          return __metaschemaData;
1954        }
1955
1956        /**
1957         * Get the "{@literal Response Universally Unique Identifier Reference}".
1958         *
1959         * <p>
1960         * A <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented">machine-oriented</a> identifier reference to a unique risk response.
1961         *
1962         * @return the response-uuid value
1963         */
1964        @NonNull
1965        public UUID getResponseUuid() {
1966          return _responseUuid;
1967        }
1968
1969        /**
1970         * Set the "{@literal Response Universally Unique Identifier Reference}".
1971         *
1972         * <p>
1973         * A <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented">machine-oriented</a> identifier reference to a unique risk response.
1974         *
1975         * @param value
1976         *           the response-uuid value to set
1977         */
1978        public void setResponseUuid(@NonNull UUID value) {
1979          _responseUuid = value;
1980        }
1981
1982        /**
1983         * Get the "{@literal Property}".
1984         *
1985         * <p>
1986         * An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair.
1987         *
1988         * @return the prop value
1989         */
1990        @NonNull
1991        public List<Property> getProps() {
1992          if (_props == null) {
1993            _props = new LinkedList<>();
1994          }
1995          return ObjectUtils.notNull(_props);
1996        }
1997
1998        /**
1999         * Set the "{@literal Property}".
2000         *
2001         * <p>
2002         * An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair.
2003         *
2004         * @param value
2005         *           the prop value to set
2006         */
2007        public void setProps(@NonNull List<Property> value) {
2008          _props = value;
2009        }
2010
2011        /**
2012         * Add a new {@link Property} item to the underlying collection.
2013         * @param item the item to add
2014         * @return {@code true}
2015         */
2016        public boolean addProp(Property item) {
2017          Property value = ObjectUtils.requireNonNull(item,"item cannot be null");
2018          if (_props == null) {
2019            _props = new LinkedList<>();
2020          }
2021          return _props.add(value);
2022        }
2023
2024        /**
2025         * Remove the first matching {@link Property} item from the underlying collection.
2026         * @param item the item to remove
2027         * @return {@code true} if the item was removed or {@code false} otherwise
2028         */
2029        public boolean removeProp(Property item) {
2030          Property value = ObjectUtils.requireNonNull(item,"item cannot be null");
2031          return _props != null && _props.remove(value);
2032        }
2033
2034        /**
2035         * Get the "{@literal Link}".
2036         *
2037         * <p>
2038         * A reference to a local or remote resource, that has a specific relation to the containing object.
2039         *
2040         * @return the link value
2041         */
2042        @NonNull
2043        public List<Link> getLinks() {
2044          if (_links == null) {
2045            _links = new LinkedList<>();
2046          }
2047          return ObjectUtils.notNull(_links);
2048        }
2049
2050        /**
2051         * Set the "{@literal Link}".
2052         *
2053         * <p>
2054         * A reference to a local or remote resource, that has a specific relation to the containing object.
2055         *
2056         * @param value
2057         *           the link value to set
2058         */
2059        public void setLinks(@NonNull List<Link> value) {
2060          _links = value;
2061        }
2062
2063        /**
2064         * Add a new {@link Link} item to the underlying collection.
2065         * @param item the item to add
2066         * @return {@code true}
2067         */
2068        public boolean addLink(Link item) {
2069          Link value = ObjectUtils.requireNonNull(item,"item cannot be null");
2070          if (_links == null) {
2071            _links = new LinkedList<>();
2072          }
2073          return _links.add(value);
2074        }
2075
2076        /**
2077         * Remove the first matching {@link Link} item from the underlying collection.
2078         * @param item the item to remove
2079         * @return {@code true} if the item was removed or {@code false} otherwise
2080         */
2081        public boolean removeLink(Link item) {
2082          Link value = ObjectUtils.requireNonNull(item,"item cannot be null");
2083          return _links != null && _links.remove(value);
2084        }
2085
2086        /**
2087         * Get the "{@literal Task Reference}".
2088         *
2089         * <p>
2090         * Identifies an individual task for which the containing object is a consequence of.
2091         *
2092         * @return the related-task value
2093         */
2094        @NonNull
2095        public List<RelatedTask> getRelatedTasks() {
2096          if (_relatedTasks == null) {
2097            _relatedTasks = new LinkedList<>();
2098          }
2099          return ObjectUtils.notNull(_relatedTasks);
2100        }
2101
2102        /**
2103         * Set the "{@literal Task Reference}".
2104         *
2105         * <p>
2106         * Identifies an individual task for which the containing object is a consequence of.
2107         *
2108         * @param value
2109         *           the related-task value to set
2110         */
2111        public void setRelatedTasks(@NonNull List<RelatedTask> value) {
2112          _relatedTasks = value;
2113        }
2114
2115        /**
2116         * Add a new {@link RelatedTask} item to the underlying collection.
2117         * @param item the item to add
2118         * @return {@code true}
2119         */
2120        public boolean addRelatedTask(RelatedTask item) {
2121          RelatedTask value = ObjectUtils.requireNonNull(item,"item cannot be null");
2122          if (_relatedTasks == null) {
2123            _relatedTasks = new LinkedList<>();
2124          }
2125          return _relatedTasks.add(value);
2126        }
2127
2128        /**
2129         * Remove the first matching {@link RelatedTask} item from the underlying collection.
2130         * @param item the item to remove
2131         * @return {@code true} if the item was removed or {@code false} otherwise
2132         */
2133        public boolean removeRelatedTask(RelatedTask item) {
2134          RelatedTask value = ObjectUtils.requireNonNull(item,"item cannot be null");
2135          return _relatedTasks != null && _relatedTasks.remove(value);
2136        }
2137
2138        /**
2139         * Get the "{@literal Remarks}".
2140         *
2141         * <p>
2142         * Additional commentary about the containing object.
2143         *
2144         * @return the remarks value, or {@code null} if not set
2145         */
2146        @Nullable
2147        public MarkupMultiline getRemarks() {
2148          return _remarks;
2149        }
2150
2151        /**
2152         * Set the "{@literal Remarks}".
2153         *
2154         * <p>
2155         * Additional commentary about the containing object.
2156         *
2157         * @param value
2158         *           the remarks value to set, or {@code null} to clear
2159         */
2160        public void setRemarks(@Nullable MarkupMultiline value) {
2161          _remarks = value;
2162        }
2163
2164        @Override
2165        public String toString() {
2166          return ObjectUtils.notNull(new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString());
2167        }
2168      }
2169    }
2170  }
2171
2172  /**
2173   * Relates the finding to a set of referenced observations that were used to determine the finding.
2174   */
2175  @MetaschemaAssembly(
2176      formalName = "Related Observation",
2177      description = "Relates the finding to a set of referenced observations that were used to determine the finding.",
2178      name = "related-observation",
2179      moduleClass = OscalAssessmentCommonModule.class
2180  )
2181  public static class RelatedObservation implements IBoundObject {
2182    private final IMetaschemaData __metaschemaData;
2183
2184    /**
2185     * A <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented">machine-oriented</a> identifier reference to an observation defined in the list of observations.
2186     */
2187    @BoundFlag(
2188        formalName = "Observation Universally Unique Identifier Reference",
2189        description = "A [machine-oriented](https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented) identifier reference to an observation defined in the list of observations.",
2190        name = "observation-uuid",
2191        required = true,
2192        typeAdapter = UuidAdapter.class
2193    )
2194    private UUID _observationUuid;
2195
2196    /**
2197     * Constructs a new {@code dev.metaschema.oscal.lib.model.Risk.RelatedObservation} instance with no metadata.
2198     */
2199    public RelatedObservation() {
2200      this(null);
2201    }
2202
2203    /**
2204     * Constructs a new {@code dev.metaschema.oscal.lib.model.Risk.RelatedObservation} instance with the specified metadata.
2205     *
2206     * @param data
2207     *           the metaschema data, or {@code null} if none
2208     */
2209    public RelatedObservation(IMetaschemaData data) {
2210      this.__metaschemaData = data;
2211    }
2212
2213    @Override
2214    public IMetaschemaData getMetaschemaData() {
2215      return __metaschemaData;
2216    }
2217
2218    /**
2219     * Get the "{@literal Observation Universally Unique Identifier Reference}".
2220     *
2221     * <p>
2222     * A <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented">machine-oriented</a> identifier reference to an observation defined in the list of observations.
2223     *
2224     * @return the observation-uuid value
2225     */
2226    @NonNull
2227    public UUID getObservationUuid() {
2228      return _observationUuid;
2229    }
2230
2231    /**
2232     * Set the "{@literal Observation Universally Unique Identifier Reference}".
2233     *
2234     * <p>
2235     * A <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented">machine-oriented</a> identifier reference to an observation defined in the list of observations.
2236     *
2237     * @param value
2238     *           the observation-uuid value to set
2239     */
2240    public void setObservationUuid(@NonNull UUID value) {
2241      _observationUuid = value;
2242    }
2243
2244    @Override
2245    public String toString() {
2246      return ObjectUtils.notNull(new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString());
2247    }
2248  }
2249}