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.UuidAdapter;
006import dev.metaschema.core.datatype.markup.MarkupLine;
007import dev.metaschema.core.datatype.markup.MarkupLineAdapter;
008import dev.metaschema.core.datatype.markup.MarkupMultiline;
009import dev.metaschema.core.datatype.markup.MarkupMultilineAdapter;
010import dev.metaschema.core.model.IBoundObject;
011import dev.metaschema.core.model.IMetaschemaData;
012import dev.metaschema.core.model.JsonGroupAsBehavior;
013import dev.metaschema.core.util.ObjectUtils;
014import dev.metaschema.databind.model.annotations.BoundAssembly;
015import dev.metaschema.databind.model.annotations.BoundField;
016import dev.metaschema.databind.model.annotations.BoundFlag;
017import dev.metaschema.databind.model.annotations.GroupAs;
018import dev.metaschema.databind.model.annotations.MetaschemaAssembly;
019import edu.umd.cs.findbugs.annotations.NonNull;
020import edu.umd.cs.findbugs.annotations.Nullable;
021import java.util.LinkedList;
022import java.util.List;
023import java.util.UUID;
024import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
025import org.apache.commons.lang3.builder.ToStringStyle;
026
027/**
028 * Describes an individual finding.
029 */
030@MetaschemaAssembly(
031    formalName = "Finding",
032    description = "Describes an individual finding.",
033    name = "finding",
034    moduleClass = OscalAssessmentCommonModule.class
035)
036public class Finding implements IBoundObject {
037  private final IMetaschemaData __metaschemaData;
038
039  /**
040   * 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 finding in <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#ar-identifiers">this or other OSCAL instances</a>. The locally defined <em>UUID</em> of the <code>finding</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.
041   */
042  @BoundFlag(
043      formalName = "Finding Universally Unique Identifier",
044      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 finding in [this or other OSCAL instances](https://pages.nist.gov/OSCAL/concepts/identifier-use/#ar-identifiers). The locally defined *UUID* of the `finding` 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.",
045      name = "uuid",
046      required = true,
047      typeAdapter = UuidAdapter.class
048  )
049  private UUID _uuid;
050
051  /**
052   * The title for this finding.
053   */
054  @BoundField(
055      formalName = "Finding Title",
056      description = "The title for this finding.",
057      useName = "title",
058      minOccurs = 1,
059      typeAdapter = MarkupLineAdapter.class
060  )
061  private MarkupLine _title;
062
063  /**
064   * A human-readable description of this finding.
065   */
066  @BoundField(
067      formalName = "Finding Description",
068      description = "A human-readable description of this finding.",
069      useName = "description",
070      minOccurs = 1,
071      typeAdapter = MarkupMultilineAdapter.class
072  )
073  private MarkupMultiline _description;
074
075  /**
076   * An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair.
077   */
078  @BoundAssembly(
079      formalName = "Property",
080      description = "An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair.",
081      useName = "prop",
082      maxOccurs = -1,
083      groupAs = @GroupAs(name = "props", inJson = JsonGroupAsBehavior.LIST)
084  )
085  private List<Property> _props;
086
087  /**
088   * A reference to a local or remote resource, that has a specific relation to the containing object.
089   */
090  @BoundAssembly(
091      formalName = "Link",
092      description = "A reference to a local or remote resource, that has a specific relation to the containing object.",
093      useName = "link",
094      maxOccurs = -1,
095      groupAs = @GroupAs(name = "links", inJson = JsonGroupAsBehavior.LIST)
096  )
097  private List<Link> _links;
098
099  /**
100   * Identifies the source of the finding, such as a tool, interviewed person, or activity.
101   */
102  @BoundAssembly(
103      formalName = "Origin",
104      description = "Identifies the source of the finding, such as a tool, interviewed person, or activity.",
105      useName = "origin",
106      remarks = "Used to identify the individual and/or tool generated this finding.",
107      maxOccurs = -1,
108      groupAs = @GroupAs(name = "origins", inJson = JsonGroupAsBehavior.LIST)
109  )
110  private List<Origin> _origins;
111
112  /**
113   * Captures an assessor's conclusions regarding the degree to which an objective is satisfied.
114   */
115  @BoundAssembly(
116      formalName = "Objective Status",
117      description = "Captures an assessor's conclusions regarding the degree to which an objective is satisfied.",
118      useName = "target",
119      minOccurs = 1
120  )
121  private FindingTarget _target;
122
123  /**
124   * A <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented">machine-oriented</a> identifier reference to the implementation statement in the SSP to which this finding is related.
125   */
126  @BoundField(
127      formalName = "Implementation Statement UUID",
128      description = "A [machine-oriented](https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented) identifier reference to the implementation statement in the SSP to which this finding is related.",
129      useName = "implementation-statement-uuid",
130      typeAdapter = UuidAdapter.class
131  )
132  private UUID _implementationStatementUuid;
133
134  /**
135   * Relates the finding to a set of referenced observations that were used to determine the finding.
136   */
137  @BoundAssembly(
138      formalName = "Related Observation",
139      description = "Relates the finding to a set of referenced observations that were used to determine the finding.",
140      useName = "related-observation",
141      maxOccurs = -1,
142      groupAs = @GroupAs(name = "related-observations", inJson = JsonGroupAsBehavior.LIST)
143  )
144  private List<RelatedObservation> _relatedObservations;
145
146  /**
147   * Relates the finding to a set of referenced risks that were used to determine the finding.
148   */
149  @BoundAssembly(
150      formalName = "Associated Risk",
151      description = "Relates the finding to a set of referenced risks that were used to determine the finding.",
152      useName = "associated-risk",
153      maxOccurs = -1,
154      groupAs = @GroupAs(name = "related-risks", inJson = JsonGroupAsBehavior.LIST)
155  )
156  private List<AssociatedRisk> _relatedRisks;
157
158  /**
159   * Additional commentary about the containing object.
160   */
161  @BoundField(
162      formalName = "Remarks",
163      description = "Additional commentary about the containing object.",
164      useName = "remarks",
165      typeAdapter = MarkupMultilineAdapter.class
166  )
167  private MarkupMultiline _remarks;
168
169  /**
170   * Constructs a new {@code dev.metaschema.oscal.lib.model.Finding} instance with no metadata.
171   */
172  public Finding() {
173    this(null);
174  }
175
176  /**
177   * Constructs a new {@code dev.metaschema.oscal.lib.model.Finding} instance with the specified metadata.
178   *
179   * @param data
180   *           the metaschema data, or {@code null} if none
181   */
182  public Finding(IMetaschemaData data) {
183    this.__metaschemaData = data;
184  }
185
186  @Override
187  public IMetaschemaData getMetaschemaData() {
188    return __metaschemaData;
189  }
190
191  /**
192   * Get the "{@literal Finding Universally Unique Identifier}".
193   *
194   * <p>
195   * 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 finding in <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#ar-identifiers">this or other OSCAL instances</a>. The locally defined <em>UUID</em> of the <code>finding</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.
196   *
197   * @return the uuid value
198   */
199  @NonNull
200  public UUID getUuid() {
201    return _uuid;
202  }
203
204  /**
205   * Set the "{@literal Finding Universally Unique Identifier}".
206   *
207   * <p>
208   * 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 finding in <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#ar-identifiers">this or other OSCAL instances</a>. The locally defined <em>UUID</em> of the <code>finding</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.
209   *
210   * @param value
211   *           the uuid value to set
212   */
213  public void setUuid(@NonNull UUID value) {
214    _uuid = value;
215  }
216
217  /**
218   * Get the "{@literal Finding Title}".
219   *
220   * <p>
221   * The title for this finding.
222   *
223   * @return the title value
224   */
225  @NonNull
226  public MarkupLine getTitle() {
227    return _title;
228  }
229
230  /**
231   * Set the "{@literal Finding Title}".
232   *
233   * <p>
234   * The title for this finding.
235   *
236   * @param value
237   *           the title value to set
238   */
239  public void setTitle(@NonNull MarkupLine value) {
240    _title = value;
241  }
242
243  /**
244   * Get the "{@literal Finding Description}".
245   *
246   * <p>
247   * A human-readable description of this finding.
248   *
249   * @return the description value
250   */
251  @NonNull
252  public MarkupMultiline getDescription() {
253    return _description;
254  }
255
256  /**
257   * Set the "{@literal Finding Description}".
258   *
259   * <p>
260   * A human-readable description of this finding.
261   *
262   * @param value
263   *           the description value to set
264   */
265  public void setDescription(@NonNull MarkupMultiline value) {
266    _description = value;
267  }
268
269  /**
270   * Get the "{@literal Property}".
271   *
272   * <p>
273   * An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair.
274   *
275   * @return the prop value
276   */
277  @NonNull
278  public List<Property> getProps() {
279    if (_props == null) {
280      _props = new LinkedList<>();
281    }
282    return ObjectUtils.notNull(_props);
283  }
284
285  /**
286   * Set the "{@literal Property}".
287   *
288   * <p>
289   * An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair.
290   *
291   * @param value
292   *           the prop value to set
293   */
294  public void setProps(@NonNull List<Property> value) {
295    _props = value;
296  }
297
298  /**
299   * Add a new {@link Property} item to the underlying collection.
300   * @param item the item to add
301   * @return {@code true}
302   */
303  public boolean addProp(Property item) {
304    Property value = ObjectUtils.requireNonNull(item,"item cannot be null");
305    if (_props == null) {
306      _props = new LinkedList<>();
307    }
308    return _props.add(value);
309  }
310
311  /**
312   * Remove the first matching {@link Property} item from the underlying collection.
313   * @param item the item to remove
314   * @return {@code true} if the item was removed or {@code false} otherwise
315   */
316  public boolean removeProp(Property item) {
317    Property value = ObjectUtils.requireNonNull(item,"item cannot be null");
318    return _props != null && _props.remove(value);
319  }
320
321  /**
322   * Get the "{@literal Link}".
323   *
324   * <p>
325   * A reference to a local or remote resource, that has a specific relation to the containing object.
326   *
327   * @return the link value
328   */
329  @NonNull
330  public List<Link> getLinks() {
331    if (_links == null) {
332      _links = new LinkedList<>();
333    }
334    return ObjectUtils.notNull(_links);
335  }
336
337  /**
338   * Set the "{@literal Link}".
339   *
340   * <p>
341   * A reference to a local or remote resource, that has a specific relation to the containing object.
342   *
343   * @param value
344   *           the link value to set
345   */
346  public void setLinks(@NonNull List<Link> value) {
347    _links = value;
348  }
349
350  /**
351   * Add a new {@link Link} item to the underlying collection.
352   * @param item the item to add
353   * @return {@code true}
354   */
355  public boolean addLink(Link item) {
356    Link value = ObjectUtils.requireNonNull(item,"item cannot be null");
357    if (_links == null) {
358      _links = new LinkedList<>();
359    }
360    return _links.add(value);
361  }
362
363  /**
364   * Remove the first matching {@link Link} item from the underlying collection.
365   * @param item the item to remove
366   * @return {@code true} if the item was removed or {@code false} otherwise
367   */
368  public boolean removeLink(Link item) {
369    Link value = ObjectUtils.requireNonNull(item,"item cannot be null");
370    return _links != null && _links.remove(value);
371  }
372
373  /**
374   * Get the "{@literal Origin}".
375   *
376   * <p>
377   * Identifies the source of the finding, such as a tool, interviewed person, or activity.
378   *
379   * @return the origin value
380   */
381  @NonNull
382  public List<Origin> getOrigins() {
383    if (_origins == null) {
384      _origins = new LinkedList<>();
385    }
386    return ObjectUtils.notNull(_origins);
387  }
388
389  /**
390   * Set the "{@literal Origin}".
391   *
392   * <p>
393   * Identifies the source of the finding, such as a tool, interviewed person, or activity.
394   *
395   * @param value
396   *           the origin value to set
397   */
398  public void setOrigins(@NonNull List<Origin> value) {
399    _origins = value;
400  }
401
402  /**
403   * Add a new {@link Origin} item to the underlying collection.
404   * @param item the item to add
405   * @return {@code true}
406   */
407  public boolean addOrigin(Origin item) {
408    Origin value = ObjectUtils.requireNonNull(item,"item cannot be null");
409    if (_origins == null) {
410      _origins = new LinkedList<>();
411    }
412    return _origins.add(value);
413  }
414
415  /**
416   * Remove the first matching {@link Origin} item from the underlying collection.
417   * @param item the item to remove
418   * @return {@code true} if the item was removed or {@code false} otherwise
419   */
420  public boolean removeOrigin(Origin item) {
421    Origin value = ObjectUtils.requireNonNull(item,"item cannot be null");
422    return _origins != null && _origins.remove(value);
423  }
424
425  /**
426   * Get the "{@literal Objective Status}".
427   *
428   * <p>
429   * Captures an assessor's conclusions regarding the degree to which an objective is satisfied.
430   *
431   * @return the target value
432   */
433  @NonNull
434  public FindingTarget getTarget() {
435    return _target;
436  }
437
438  /**
439   * Set the "{@literal Objective Status}".
440   *
441   * <p>
442   * Captures an assessor's conclusions regarding the degree to which an objective is satisfied.
443   *
444   * @param value
445   *           the target value to set
446   */
447  public void setTarget(@NonNull FindingTarget value) {
448    _target = value;
449  }
450
451  /**
452   * Get the "{@literal Implementation Statement UUID}".
453   *
454   * <p>
455   * A <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented">machine-oriented</a> identifier reference to the implementation statement in the SSP to which this finding is related.
456   *
457   * @return the implementation-statement-uuid value, or {@code null} if not set
458   */
459  @Nullable
460  public UUID getImplementationStatementUuid() {
461    return _implementationStatementUuid;
462  }
463
464  /**
465   * Set the "{@literal Implementation Statement UUID}".
466   *
467   * <p>
468   * A <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented">machine-oriented</a> identifier reference to the implementation statement in the SSP to which this finding is related.
469   *
470   * @param value
471   *           the implementation-statement-uuid value to set, or {@code null} to clear
472   */
473  public void setImplementationStatementUuid(@Nullable UUID value) {
474    _implementationStatementUuid = value;
475  }
476
477  /**
478   * Get the "{@literal Related Observation}".
479   *
480   * <p>
481   * Relates the finding to a set of referenced observations that were used to determine the finding.
482   *
483   * @return the related-observation value
484   */
485  @NonNull
486  public List<RelatedObservation> getRelatedObservations() {
487    if (_relatedObservations == null) {
488      _relatedObservations = new LinkedList<>();
489    }
490    return ObjectUtils.notNull(_relatedObservations);
491  }
492
493  /**
494   * Set the "{@literal Related Observation}".
495   *
496   * <p>
497   * Relates the finding to a set of referenced observations that were used to determine the finding.
498   *
499   * @param value
500   *           the related-observation value to set
501   */
502  public void setRelatedObservations(@NonNull List<RelatedObservation> value) {
503    _relatedObservations = value;
504  }
505
506  /**
507   * Add a new {@link RelatedObservation} item to the underlying collection.
508   * @param item the item to add
509   * @return {@code true}
510   */
511  public boolean addRelatedObservation(RelatedObservation item) {
512    RelatedObservation value = ObjectUtils.requireNonNull(item,"item cannot be null");
513    if (_relatedObservations == null) {
514      _relatedObservations = new LinkedList<>();
515    }
516    return _relatedObservations.add(value);
517  }
518
519  /**
520   * Remove the first matching {@link RelatedObservation} item from the underlying collection.
521   * @param item the item to remove
522   * @return {@code true} if the item was removed or {@code false} otherwise
523   */
524  public boolean removeRelatedObservation(RelatedObservation item) {
525    RelatedObservation value = ObjectUtils.requireNonNull(item,"item cannot be null");
526    return _relatedObservations != null && _relatedObservations.remove(value);
527  }
528
529  /**
530   * Get the "{@literal Associated Risk}".
531   *
532   * <p>
533   * Relates the finding to a set of referenced risks that were used to determine the finding.
534   *
535   * @return the associated-risk value
536   */
537  @NonNull
538  public List<AssociatedRisk> getRelatedRisks() {
539    if (_relatedRisks == null) {
540      _relatedRisks = new LinkedList<>();
541    }
542    return ObjectUtils.notNull(_relatedRisks);
543  }
544
545  /**
546   * Set the "{@literal Associated Risk}".
547   *
548   * <p>
549   * Relates the finding to a set of referenced risks that were used to determine the finding.
550   *
551   * @param value
552   *           the associated-risk value to set
553   */
554  public void setRelatedRisks(@NonNull List<AssociatedRisk> value) {
555    _relatedRisks = value;
556  }
557
558  /**
559   * Add a new {@link AssociatedRisk} item to the underlying collection.
560   * @param item the item to add
561   * @return {@code true}
562   */
563  public boolean addAssociatedRisk(AssociatedRisk item) {
564    AssociatedRisk value = ObjectUtils.requireNonNull(item,"item cannot be null");
565    if (_relatedRisks == null) {
566      _relatedRisks = new LinkedList<>();
567    }
568    return _relatedRisks.add(value);
569  }
570
571  /**
572   * Remove the first matching {@link AssociatedRisk} item from the underlying collection.
573   * @param item the item to remove
574   * @return {@code true} if the item was removed or {@code false} otherwise
575   */
576  public boolean removeAssociatedRisk(AssociatedRisk item) {
577    AssociatedRisk value = ObjectUtils.requireNonNull(item,"item cannot be null");
578    return _relatedRisks != null && _relatedRisks.remove(value);
579  }
580
581  /**
582   * Get the "{@literal Remarks}".
583   *
584   * <p>
585   * Additional commentary about the containing object.
586   *
587   * @return the remarks value, or {@code null} if not set
588   */
589  @Nullable
590  public MarkupMultiline getRemarks() {
591    return _remarks;
592  }
593
594  /**
595   * Set the "{@literal Remarks}".
596   *
597   * <p>
598   * Additional commentary about the containing object.
599   *
600   * @param value
601   *           the remarks value to set, or {@code null} to clear
602   */
603  public void setRemarks(@Nullable MarkupMultiline value) {
604    _remarks = value;
605  }
606
607  @Override
608  public String toString() {
609    return ObjectUtils.notNull(new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString());
610  }
611
612  /**
613   * Relates the finding to a set of referenced observations that were used to determine the finding.
614   */
615  @MetaschemaAssembly(
616      formalName = "Related Observation",
617      description = "Relates the finding to a set of referenced observations that were used to determine the finding.",
618      name = "related-observation",
619      moduleClass = OscalAssessmentCommonModule.class
620  )
621  public static class RelatedObservation implements IBoundObject {
622    private final IMetaschemaData __metaschemaData;
623
624    /**
625     * 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.
626     */
627    @BoundFlag(
628        formalName = "Observation Universally Unique Identifier Reference",
629        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.",
630        name = "observation-uuid",
631        required = true,
632        typeAdapter = UuidAdapter.class
633    )
634    private UUID _observationUuid;
635
636    /**
637     * Constructs a new {@code dev.metaschema.oscal.lib.model.Finding.RelatedObservation} instance with no metadata.
638     */
639    public RelatedObservation() {
640      this(null);
641    }
642
643    /**
644     * Constructs a new {@code dev.metaschema.oscal.lib.model.Finding.RelatedObservation} instance with the specified metadata.
645     *
646     * @param data
647     *           the metaschema data, or {@code null} if none
648     */
649    public RelatedObservation(IMetaschemaData data) {
650      this.__metaschemaData = data;
651    }
652
653    @Override
654    public IMetaschemaData getMetaschemaData() {
655      return __metaschemaData;
656    }
657
658    /**
659     * Get the "{@literal Observation Universally Unique Identifier Reference}".
660     *
661     * <p>
662     * 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.
663     *
664     * @return the observation-uuid value
665     */
666    @NonNull
667    public UUID getObservationUuid() {
668      return _observationUuid;
669    }
670
671    /**
672     * Set the "{@literal Observation Universally Unique Identifier Reference}".
673     *
674     * <p>
675     * 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.
676     *
677     * @param value
678     *           the observation-uuid value to set
679     */
680    public void setObservationUuid(@NonNull UUID value) {
681      _observationUuid = value;
682    }
683
684    @Override
685    public String toString() {
686      return ObjectUtils.notNull(new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString());
687    }
688  }
689
690  /**
691   * Relates the finding to a set of referenced risks that were used to determine the finding.
692   */
693  @MetaschemaAssembly(
694      formalName = "Associated Risk",
695      description = "Relates the finding to a set of referenced risks that were used to determine the finding.",
696      name = "associated-risk",
697      moduleClass = OscalAssessmentCommonModule.class
698  )
699  public static class AssociatedRisk implements IBoundObject {
700    private final IMetaschemaData __metaschemaData;
701
702    /**
703     * A <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented">machine-oriented</a> identifier reference to a risk defined in the list of risks.
704     */
705    @BoundFlag(
706        formalName = "Risk Universally Unique Identifier Reference",
707        description = "A [machine-oriented](https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented) identifier reference to a risk defined in the list of risks.",
708        name = "risk-uuid",
709        required = true,
710        typeAdapter = UuidAdapter.class
711    )
712    private UUID _riskUuid;
713
714    /**
715     * Constructs a new {@code dev.metaschema.oscal.lib.model.Finding.AssociatedRisk} instance with no metadata.
716     */
717    public AssociatedRisk() {
718      this(null);
719    }
720
721    /**
722     * Constructs a new {@code dev.metaschema.oscal.lib.model.Finding.AssociatedRisk} instance with the specified metadata.
723     *
724     * @param data
725     *           the metaschema data, or {@code null} if none
726     */
727    public AssociatedRisk(IMetaschemaData data) {
728      this.__metaschemaData = data;
729    }
730
731    @Override
732    public IMetaschemaData getMetaschemaData() {
733      return __metaschemaData;
734    }
735
736    /**
737     * Get the "{@literal Risk Universally Unique Identifier Reference}".
738     *
739     * <p>
740     * A <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented">machine-oriented</a> identifier reference to a risk defined in the list of risks.
741     *
742     * @return the risk-uuid value
743     */
744    @NonNull
745    public UUID getRiskUuid() {
746      return _riskUuid;
747    }
748
749    /**
750     * Set the "{@literal Risk Universally Unique Identifier Reference}".
751     *
752     * <p>
753     * A <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented">machine-oriented</a> identifier reference to a risk defined in the list of risks.
754     *
755     * @param value
756     *           the risk-uuid value to set
757     */
758    public void setRiskUuid(@NonNull UUID value) {
759      _riskUuid = value;
760    }
761
762    @Override
763    public String toString() {
764      return ObjectUtils.notNull(new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString());
765    }
766  }
767}