001// Generated from: ../../../../../../../../oscal/src/metaschema/oscal_assessment-results_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.UuidAdapter;
007import dev.metaschema.core.datatype.markup.MarkupLine;
008import dev.metaschema.core.datatype.markup.MarkupLineAdapter;
009import dev.metaschema.core.datatype.markup.MarkupMultiline;
010import dev.metaschema.core.datatype.markup.MarkupMultilineAdapter;
011import dev.metaschema.core.model.IBoundObject;
012import dev.metaschema.core.model.IMetaschemaData;
013import dev.metaschema.core.model.JsonGroupAsBehavior;
014import dev.metaschema.core.model.constraint.IConstraint;
015import dev.metaschema.core.util.ObjectUtils;
016import dev.metaschema.databind.model.annotations.AssemblyConstraints;
017import dev.metaschema.databind.model.annotations.BoundAssembly;
018import dev.metaschema.databind.model.annotations.BoundField;
019import dev.metaschema.databind.model.annotations.BoundFlag;
020import dev.metaschema.databind.model.annotations.GroupAs;
021import dev.metaschema.databind.model.annotations.IsUnique;
022import dev.metaschema.databind.model.annotations.KeyField;
023import dev.metaschema.databind.model.annotations.MetaschemaAssembly;
024import edu.umd.cs.findbugs.annotations.NonNull;
025import edu.umd.cs.findbugs.annotations.Nullable;
026import java.time.ZonedDateTime;
027import java.util.LinkedList;
028import java.util.List;
029import java.util.UUID;
030import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
031import org.apache.commons.lang3.builder.ToStringStyle;
032
033/**
034 * Used by the assessment results and POA&M. In the assessment results, this identifies all of the assessment observations and findings, initial and residual risks, deviations, and disposition. In the POA&M, this identifies initial and residual risks, deviations, and disposition.
035 */
036@MetaschemaAssembly(
037    formalName = "Assessment Result",
038    description = "Used by the assessment results and POA\\&M. In the assessment results, this identifies all of the assessment observations and findings, initial and residual risks, deviations, and disposition. In the POA\\&M, this identifies initial and residual risks, deviations, and disposition.",
039    name = "result",
040    moduleClass = OscalArModule.class
041)
042public class Result implements IBoundObject {
043  private final IMetaschemaData __metaschemaData;
044
045  /**
046   * 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 set of results 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>assessment result</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.
047   */
048  @BoundFlag(
049      formalName = "Results Universally Unique Identifier",
050      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 set of results in [this or other OSCAL instances](https://pages.nist.gov/OSCAL/concepts/identifier-use/#ar-identifiers). The locally defined *UUID* of the `assessment result` 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.",
051      name = "uuid",
052      required = true,
053      typeAdapter = UuidAdapter.class
054  )
055  private UUID _uuid;
056
057  /**
058   * The title for this set of results.
059   */
060  @BoundField(
061      formalName = "Results Title",
062      description = "The title for this set of results.",
063      useName = "title",
064      minOccurs = 1,
065      typeAdapter = MarkupLineAdapter.class
066  )
067  private MarkupLine _title;
068
069  /**
070   * A human-readable description of this set of test results.
071   */
072  @BoundField(
073      formalName = "Results Description",
074      description = "A human-readable description of this set of test results.",
075      useName = "description",
076      minOccurs = 1,
077      typeAdapter = MarkupMultilineAdapter.class
078  )
079  private MarkupMultiline _description;
080
081  /**
082   * Date/time stamp identifying the start of the evidence collection reflected in these results.
083   */
084  @BoundField(
085      formalName = "start field",
086      description = "Date/time stamp identifying the start of the evidence collection reflected in these results.",
087      useName = "start",
088      minOccurs = 1,
089      typeAdapter = DateTimeWithTZAdapter.class
090  )
091  private ZonedDateTime _start;
092
093  /**
094   * Date/time stamp identifying the end of the evidence collection reflected in these results. In a continuous motoring scenario, this may contain the same value as start if appropriate.
095   */
096  @BoundField(
097      formalName = "end field",
098      description = "Date/time stamp identifying the end of the evidence collection reflected in these results. In a continuous motoring scenario, this may contain the same value as start if appropriate.",
099      useName = "end",
100      typeAdapter = DateTimeWithTZAdapter.class
101  )
102  private ZonedDateTime _end;
103
104  /**
105   * An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair.
106   */
107  @BoundAssembly(
108      formalName = "Property",
109      description = "An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair.",
110      useName = "prop",
111      maxOccurs = -1,
112      groupAs = @GroupAs(name = "props", inJson = JsonGroupAsBehavior.LIST)
113  )
114  private List<Property> _props;
115
116  /**
117   * A reference to a local or remote resource, that has a specific relation to the containing object.
118   */
119  @BoundAssembly(
120      formalName = "Link",
121      description = "A reference to a local or remote resource, that has a specific relation to the containing object.",
122      useName = "link",
123      maxOccurs = -1,
124      groupAs = @GroupAs(name = "links", inJson = JsonGroupAsBehavior.LIST)
125  )
126  private List<Link> _links;
127
128  /**
129   * Used to define data objects that are used in the assessment plan, that do not appear in the referenced SSP.
130   */
131  @BoundAssembly(
132      formalName = "Local Definitions",
133      description = "Used to define data objects that are used in the assessment plan, that do not appear in the referenced SSP.",
134      useName = "local-definitions"
135  )
136  private LocalDefinitions _localDefinitions;
137
138  /**
139   * Identifies the controls being assessed and their control objectives.
140   */
141  @BoundAssembly(
142      formalName = "Reviewed Controls and Control Objectives",
143      description = "Identifies the controls being assessed and their control objectives.",
144      useName = "reviewed-controls",
145      remarks = "The Assessment Results `control-selection` ignores any control selection in the Assessment Plan and re-selects controls from the baseline identified by the SSP.\n"
146              + "\n"
147              + "The Assessment Results `control-objective-selection` ignores any control objective selection in the Assessment Plan and re-selects control objectives from the baseline identified by the SSP.\n"
148              + "\n"
149              + "Any additional control objectives defined in the Assessment Plan `local-definitions` do not need to be re-defined in the Assessment Results `local-definitions`; however, if they were explicitly referenced with an Assessment Plan `control-objective-selection`, they need to be selected again in the Assessment Results `control-objective-selection`.",
150      minOccurs = 1
151  )
152  private ReviewedControls _reviewedControls;
153
154  /**
155   * A set of textual statements, typically written by the assessor.
156   */
157  @BoundAssembly(
158      formalName = "Attestation Statements",
159      description = "A set of textual statements, typically written by the assessor.",
160      useName = "attestation",
161      maxOccurs = -1,
162      groupAs = @GroupAs(name = "attestations", inJson = JsonGroupAsBehavior.LIST)
163  )
164  private List<Attestation> _attestations;
165
166  /**
167   * A log of all assessment-related actions taken.
168   */
169  @BoundAssembly(
170      formalName = "Assessment Log",
171      description = "A log of all assessment-related actions taken.",
172      useName = "assessment-log"
173  )
174  private AssessmentLog _assessmentLog;
175
176  /**
177   * Describes an individual observation.
178   */
179  @BoundAssembly(
180      formalName = "Observation",
181      description = "Describes an individual observation.",
182      useName = "observation",
183      maxOccurs = -1,
184      groupAs = @GroupAs(name = "observations", inJson = JsonGroupAsBehavior.LIST)
185  )
186  private List<Observation> _observations;
187
188  /**
189   * An identified risk.
190   */
191  @BoundAssembly(
192      formalName = "Identified Risk",
193      description = "An identified risk.",
194      useName = "risk",
195      maxOccurs = -1,
196      groupAs = @GroupAs(name = "risks", inJson = JsonGroupAsBehavior.LIST)
197  )
198  private List<Risk> _risks;
199
200  /**
201   * Describes an individual finding.
202   */
203  @BoundAssembly(
204      formalName = "Finding",
205      description = "Describes an individual finding.",
206      useName = "finding",
207      maxOccurs = -1,
208      groupAs = @GroupAs(name = "findings", inJson = JsonGroupAsBehavior.LIST)
209  )
210  private List<Finding> _findings;
211
212  /**
213   * Additional commentary about the containing object.
214   */
215  @BoundField(
216      formalName = "Remarks",
217      description = "Additional commentary about the containing object.",
218      useName = "remarks",
219      typeAdapter = MarkupMultilineAdapter.class
220  )
221  private MarkupMultiline _remarks;
222
223  /**
224   * Constructs a new {@code dev.metaschema.oscal.lib.model.Result} instance with no metadata.
225   */
226  public Result() {
227    this(null);
228  }
229
230  /**
231   * Constructs a new {@code dev.metaschema.oscal.lib.model.Result} instance with the specified metadata.
232   *
233   * @param data
234   *           the metaschema data, or {@code null} if none
235   */
236  public Result(IMetaschemaData data) {
237    this.__metaschemaData = data;
238  }
239
240  @Override
241  public IMetaschemaData getMetaschemaData() {
242    return __metaschemaData;
243  }
244
245  /**
246   * Get the "{@literal Results Universally Unique Identifier}".
247   *
248   * <p>
249   * 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 set of results 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>assessment result</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.
250   *
251   * @return the uuid value
252   */
253  @NonNull
254  public UUID getUuid() {
255    return _uuid;
256  }
257
258  /**
259   * Set the "{@literal Results Universally Unique Identifier}".
260   *
261   * <p>
262   * 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 set of results 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>assessment result</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.
263   *
264   * @param value
265   *           the uuid value to set
266   */
267  public void setUuid(@NonNull UUID value) {
268    _uuid = value;
269  }
270
271  /**
272   * Get the "{@literal Results Title}".
273   *
274   * <p>
275   * The title for this set of results.
276   *
277   * @return the title value
278   */
279  @NonNull
280  public MarkupLine getTitle() {
281    return _title;
282  }
283
284  /**
285   * Set the "{@literal Results Title}".
286   *
287   * <p>
288   * The title for this set of results.
289   *
290   * @param value
291   *           the title value to set
292   */
293  public void setTitle(@NonNull MarkupLine value) {
294    _title = value;
295  }
296
297  /**
298   * Get the "{@literal Results Description}".
299   *
300   * <p>
301   * A human-readable description of this set of test results.
302   *
303   * @return the description value
304   */
305  @NonNull
306  public MarkupMultiline getDescription() {
307    return _description;
308  }
309
310  /**
311   * Set the "{@literal Results Description}".
312   *
313   * <p>
314   * A human-readable description of this set of test results.
315   *
316   * @param value
317   *           the description value to set
318   */
319  public void setDescription(@NonNull MarkupMultiline value) {
320    _description = value;
321  }
322
323  /**
324   * Get the "{@literal start field}".
325   *
326   * <p>
327   * Date/time stamp identifying the start of the evidence collection reflected in these results.
328   *
329   * @return the start value
330   */
331  @NonNull
332  public ZonedDateTime getStart() {
333    return _start;
334  }
335
336  /**
337   * Set the "{@literal start field}".
338   *
339   * <p>
340   * Date/time stamp identifying the start of the evidence collection reflected in these results.
341   *
342   * @param value
343   *           the start value to set
344   */
345  public void setStart(@NonNull ZonedDateTime value) {
346    _start = value;
347  }
348
349  /**
350   * Get the "{@literal end field}".
351   *
352   * <p>
353   * Date/time stamp identifying the end of the evidence collection reflected in these results. In a continuous motoring scenario, this may contain the same value as start if appropriate.
354   *
355   * @return the end value, or {@code null} if not set
356   */
357  @Nullable
358  public ZonedDateTime getEnd() {
359    return _end;
360  }
361
362  /**
363   * Set the "{@literal end field}".
364   *
365   * <p>
366   * Date/time stamp identifying the end of the evidence collection reflected in these results. In a continuous motoring scenario, this may contain the same value as start if appropriate.
367   *
368   * @param value
369   *           the end value to set, or {@code null} to clear
370   */
371  public void setEnd(@Nullable ZonedDateTime value) {
372    _end = value;
373  }
374
375  /**
376   * Get the "{@literal Property}".
377   *
378   * <p>
379   * An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair.
380   *
381   * @return the prop value
382   */
383  @NonNull
384  public List<Property> getProps() {
385    if (_props == null) {
386      _props = new LinkedList<>();
387    }
388    return ObjectUtils.notNull(_props);
389  }
390
391  /**
392   * Set the "{@literal Property}".
393   *
394   * <p>
395   * An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair.
396   *
397   * @param value
398   *           the prop value to set
399   */
400  public void setProps(@NonNull List<Property> value) {
401    _props = value;
402  }
403
404  /**
405   * Add a new {@link Property} item to the underlying collection.
406   * @param item the item to add
407   * @return {@code true}
408   */
409  public boolean addProp(Property item) {
410    Property value = ObjectUtils.requireNonNull(item,"item cannot be null");
411    if (_props == null) {
412      _props = new LinkedList<>();
413    }
414    return _props.add(value);
415  }
416
417  /**
418   * Remove the first matching {@link Property} item from the underlying collection.
419   * @param item the item to remove
420   * @return {@code true} if the item was removed or {@code false} otherwise
421   */
422  public boolean removeProp(Property item) {
423    Property value = ObjectUtils.requireNonNull(item,"item cannot be null");
424    return _props != null && _props.remove(value);
425  }
426
427  /**
428   * Get the "{@literal Link}".
429   *
430   * <p>
431   * A reference to a local or remote resource, that has a specific relation to the containing object.
432   *
433   * @return the link value
434   */
435  @NonNull
436  public List<Link> getLinks() {
437    if (_links == null) {
438      _links = new LinkedList<>();
439    }
440    return ObjectUtils.notNull(_links);
441  }
442
443  /**
444   * Set the "{@literal Link}".
445   *
446   * <p>
447   * A reference to a local or remote resource, that has a specific relation to the containing object.
448   *
449   * @param value
450   *           the link value to set
451   */
452  public void setLinks(@NonNull List<Link> value) {
453    _links = value;
454  }
455
456  /**
457   * Add a new {@link Link} item to the underlying collection.
458   * @param item the item to add
459   * @return {@code true}
460   */
461  public boolean addLink(Link item) {
462    Link value = ObjectUtils.requireNonNull(item,"item cannot be null");
463    if (_links == null) {
464      _links = new LinkedList<>();
465    }
466    return _links.add(value);
467  }
468
469  /**
470   * Remove the first matching {@link Link} item from the underlying collection.
471   * @param item the item to remove
472   * @return {@code true} if the item was removed or {@code false} otherwise
473   */
474  public boolean removeLink(Link item) {
475    Link value = ObjectUtils.requireNonNull(item,"item cannot be null");
476    return _links != null && _links.remove(value);
477  }
478
479  /**
480   * Get the "{@literal Local Definitions}".
481   *
482   * <p>
483   * Used to define data objects that are used in the assessment plan, that do not appear in the referenced SSP.
484   *
485   * @return the local-definitions value, or {@code null} if not set
486   */
487  @Nullable
488  public LocalDefinitions getLocalDefinitions() {
489    return _localDefinitions;
490  }
491
492  /**
493   * Set the "{@literal Local Definitions}".
494   *
495   * <p>
496   * Used to define data objects that are used in the assessment plan, that do not appear in the referenced SSP.
497   *
498   * @param value
499   *           the local-definitions value to set, or {@code null} to clear
500   */
501  public void setLocalDefinitions(@Nullable LocalDefinitions value) {
502    _localDefinitions = value;
503  }
504
505  /**
506   * Get the "{@literal Reviewed Controls and Control Objectives}".
507   *
508   * <p>
509   * Identifies the controls being assessed and their control objectives.
510   *
511   * @return the reviewed-controls value
512   */
513  @NonNull
514  public ReviewedControls getReviewedControls() {
515    return _reviewedControls;
516  }
517
518  /**
519   * Set the "{@literal Reviewed Controls and Control Objectives}".
520   *
521   * <p>
522   * Identifies the controls being assessed and their control objectives.
523   *
524   * @param value
525   *           the reviewed-controls value to set
526   */
527  public void setReviewedControls(@NonNull ReviewedControls value) {
528    _reviewedControls = value;
529  }
530
531  /**
532   * Get the "{@literal Attestation Statements}".
533   *
534   * <p>
535   * A set of textual statements, typically written by the assessor.
536   *
537   * @return the attestation value
538   */
539  @NonNull
540  public List<Attestation> getAttestations() {
541    if (_attestations == null) {
542      _attestations = new LinkedList<>();
543    }
544    return ObjectUtils.notNull(_attestations);
545  }
546
547  /**
548   * Set the "{@literal Attestation Statements}".
549   *
550   * <p>
551   * A set of textual statements, typically written by the assessor.
552   *
553   * @param value
554   *           the attestation value to set
555   */
556  public void setAttestations(@NonNull List<Attestation> value) {
557    _attestations = value;
558  }
559
560  /**
561   * Add a new {@link Attestation} item to the underlying collection.
562   * @param item the item to add
563   * @return {@code true}
564   */
565  public boolean addAttestation(Attestation item) {
566    Attestation value = ObjectUtils.requireNonNull(item,"item cannot be null");
567    if (_attestations == null) {
568      _attestations = new LinkedList<>();
569    }
570    return _attestations.add(value);
571  }
572
573  /**
574   * Remove the first matching {@link Attestation} item from the underlying collection.
575   * @param item the item to remove
576   * @return {@code true} if the item was removed or {@code false} otherwise
577   */
578  public boolean removeAttestation(Attestation item) {
579    Attestation value = ObjectUtils.requireNonNull(item,"item cannot be null");
580    return _attestations != null && _attestations.remove(value);
581  }
582
583  /**
584   * Get the "{@literal Assessment Log}".
585   *
586   * <p>
587   * A log of all assessment-related actions taken.
588   *
589   * @return the assessment-log value, or {@code null} if not set
590   */
591  @Nullable
592  public AssessmentLog getAssessmentLog() {
593    return _assessmentLog;
594  }
595
596  /**
597   * Set the "{@literal Assessment Log}".
598   *
599   * <p>
600   * A log of all assessment-related actions taken.
601   *
602   * @param value
603   *           the assessment-log value to set, or {@code null} to clear
604   */
605  public void setAssessmentLog(@Nullable AssessmentLog value) {
606    _assessmentLog = value;
607  }
608
609  /**
610   * Get the "{@literal Observation}".
611   *
612   * <p>
613   * Describes an individual observation.
614   *
615   * @return the observation value
616   */
617  @NonNull
618  public List<Observation> getObservations() {
619    if (_observations == null) {
620      _observations = new LinkedList<>();
621    }
622    return ObjectUtils.notNull(_observations);
623  }
624
625  /**
626   * Set the "{@literal Observation}".
627   *
628   * <p>
629   * Describes an individual observation.
630   *
631   * @param value
632   *           the observation value to set
633   */
634  public void setObservations(@NonNull List<Observation> value) {
635    _observations = value;
636  }
637
638  /**
639   * Add a new {@link Observation} item to the underlying collection.
640   * @param item the item to add
641   * @return {@code true}
642   */
643  public boolean addObservation(Observation item) {
644    Observation value = ObjectUtils.requireNonNull(item,"item cannot be null");
645    if (_observations == null) {
646      _observations = new LinkedList<>();
647    }
648    return _observations.add(value);
649  }
650
651  /**
652   * Remove the first matching {@link Observation} item from the underlying collection.
653   * @param item the item to remove
654   * @return {@code true} if the item was removed or {@code false} otherwise
655   */
656  public boolean removeObservation(Observation item) {
657    Observation value = ObjectUtils.requireNonNull(item,"item cannot be null");
658    return _observations != null && _observations.remove(value);
659  }
660
661  /**
662   * Get the "{@literal Identified Risk}".
663   *
664   * <p>
665   * An identified risk.
666   *
667   * @return the risk value
668   */
669  @NonNull
670  public List<Risk> getRisks() {
671    if (_risks == null) {
672      _risks = new LinkedList<>();
673    }
674    return ObjectUtils.notNull(_risks);
675  }
676
677  /**
678   * Set the "{@literal Identified Risk}".
679   *
680   * <p>
681   * An identified risk.
682   *
683   * @param value
684   *           the risk value to set
685   */
686  public void setRisks(@NonNull List<Risk> value) {
687    _risks = value;
688  }
689
690  /**
691   * Add a new {@link Risk} item to the underlying collection.
692   * @param item the item to add
693   * @return {@code true}
694   */
695  public boolean addRisk(Risk item) {
696    Risk value = ObjectUtils.requireNonNull(item,"item cannot be null");
697    if (_risks == null) {
698      _risks = new LinkedList<>();
699    }
700    return _risks.add(value);
701  }
702
703  /**
704   * Remove the first matching {@link Risk} item from the underlying collection.
705   * @param item the item to remove
706   * @return {@code true} if the item was removed or {@code false} otherwise
707   */
708  public boolean removeRisk(Risk item) {
709    Risk value = ObjectUtils.requireNonNull(item,"item cannot be null");
710    return _risks != null && _risks.remove(value);
711  }
712
713  /**
714   * Get the "{@literal Finding}".
715   *
716   * <p>
717   * Describes an individual finding.
718   *
719   * @return the finding value
720   */
721  @NonNull
722  public List<Finding> getFindings() {
723    if (_findings == null) {
724      _findings = new LinkedList<>();
725    }
726    return ObjectUtils.notNull(_findings);
727  }
728
729  /**
730   * Set the "{@literal Finding}".
731   *
732   * <p>
733   * Describes an individual finding.
734   *
735   * @param value
736   *           the finding value to set
737   */
738  public void setFindings(@NonNull List<Finding> value) {
739    _findings = value;
740  }
741
742  /**
743   * Add a new {@link Finding} item to the underlying collection.
744   * @param item the item to add
745   * @return {@code true}
746   */
747  public boolean addFinding(Finding item) {
748    Finding value = ObjectUtils.requireNonNull(item,"item cannot be null");
749    if (_findings == null) {
750      _findings = new LinkedList<>();
751    }
752    return _findings.add(value);
753  }
754
755  /**
756   * Remove the first matching {@link Finding} item from the underlying collection.
757   * @param item the item to remove
758   * @return {@code true} if the item was removed or {@code false} otherwise
759   */
760  public boolean removeFinding(Finding item) {
761    Finding value = ObjectUtils.requireNonNull(item,"item cannot be null");
762    return _findings != null && _findings.remove(value);
763  }
764
765  /**
766   * Get the "{@literal Remarks}".
767   *
768   * <p>
769   * Additional commentary about the containing object.
770   *
771   * @return the remarks value, or {@code null} if not set
772   */
773  @Nullable
774  public MarkupMultiline getRemarks() {
775    return _remarks;
776  }
777
778  /**
779   * Set the "{@literal Remarks}".
780   *
781   * <p>
782   * Additional commentary about the containing object.
783   *
784   * @param value
785   *           the remarks value to set, or {@code null} to clear
786   */
787  public void setRemarks(@Nullable MarkupMultiline value) {
788    _remarks = value;
789  }
790
791  @Override
792  public String toString() {
793    return ObjectUtils.notNull(new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString());
794  }
795
796  /**
797   * Used to define data objects that are used in the assessment plan, that do not appear in the referenced SSP.
798   */
799  @MetaschemaAssembly(
800      formalName = "Local Definitions",
801      description = "Used to define data objects that are used in the assessment plan, that do not appear in the referenced SSP.",
802      name = "local-definitions",
803      moduleClass = OscalArModule.class,
804      modelConstraints = @AssemblyConstraints(unique = {@IsUnique(id = "oscal-unique-ar-local-definitions-component", level = IConstraint.Level.ERROR, target = "component", keyFields = @KeyField(target = "@uuid"), remarks = "Since multiple `component` entries can be provided, each component must have a unique `uuid`."), @IsUnique(id = "oscal-unique-ar-local-definitions-user", level = IConstraint.Level.ERROR, target = "user", keyFields = @KeyField(target = "@uuid"), remarks = "A given `uuid` must be assigned only once to a user.")})
805  )
806  public static class LocalDefinitions implements IBoundObject {
807    private final IMetaschemaData __metaschemaData;
808
809    /**
810     * A defined component that can be part of an implemented system.
811     */
812    @BoundAssembly(
813        formalName = "Component",
814        description = "A defined component that can be part of an implemented system.",
815        useName = "component",
816        remarks = "Used to add any components, not defined via the System Security Plan (AR-\\>AP-\\>SSP)",
817        maxOccurs = -1,
818        groupAs = @GroupAs(name = "components", inJson = JsonGroupAsBehavior.LIST)
819    )
820    private List<SystemComponent> _components;
821
822    /**
823     * A single managed inventory item within the system.
824     */
825    @BoundAssembly(
826        formalName = "Inventory Item",
827        description = "A single managed inventory item within the system.",
828        useName = "inventory-item",
829        remarks = "Used to add any inventory-items, not defined via the System Security Plan (AR-\\>AP-\\>SSP)",
830        maxOccurs = -1,
831        groupAs = @GroupAs(name = "inventory-items", inJson = JsonGroupAsBehavior.LIST)
832    )
833    private List<InventoryItem> _inventoryItems;
834
835    /**
836     * A type of user that interacts with the system based on an associated role.
837     */
838    @BoundAssembly(
839        formalName = "System User",
840        description = "A type of user that interacts with the system based on an associated role.",
841        useName = "user",
842        remarks = "Used to add any users, not defined via the System Security Plan (AR-\\>AP-\\>SSP)",
843        maxOccurs = -1,
844        groupAs = @GroupAs(name = "users", inJson = JsonGroupAsBehavior.LIST)
845    )
846    private List<SystemUser> _users;
847
848    /**
849     * Identifies the assets used to perform this assessment, such as the assessment team, scanning tools, and assumptions.
850     */
851    @BoundAssembly(
852        formalName = "Assessment Assets",
853        description = "Identifies the assets used to perform this assessment, such as the assessment team, scanning tools, and assumptions.",
854        useName = "assessment-assets",
855        remarks = "This needs to be defined in the results if an assessment platform used is different from the one described in the assessment plan. Else the platform(s) defined in the plan may be referenced within the results."
856    )
857    private AssessmentAssets _assessmentAssets;
858
859    /**
860     * Represents a scheduled event or milestone, which may be associated with a series of assessment actions.
861     */
862    @BoundAssembly(
863        formalName = "Task",
864        description = "Represents a scheduled event or milestone, which may be associated with a series of assessment actions.",
865        useName = "assessment-task",
866        maxOccurs = -1,
867        groupAs = @GroupAs(name = "tasks", inJson = JsonGroupAsBehavior.LIST)
868    )
869    private List<Task> _tasks;
870
871    /**
872     * Constructs a new {@code dev.metaschema.oscal.lib.model.Result.LocalDefinitions} instance with no metadata.
873     */
874    public LocalDefinitions() {
875      this(null);
876    }
877
878    /**
879     * Constructs a new {@code dev.metaschema.oscal.lib.model.Result.LocalDefinitions} instance with the specified metadata.
880     *
881     * @param data
882     *           the metaschema data, or {@code null} if none
883     */
884    public LocalDefinitions(IMetaschemaData data) {
885      this.__metaschemaData = data;
886    }
887
888    @Override
889    public IMetaschemaData getMetaschemaData() {
890      return __metaschemaData;
891    }
892
893    /**
894     * Get the "{@literal Component}".
895     *
896     * <p>
897     * A defined component that can be part of an implemented system.
898     *
899     * @return the component value
900     */
901    @NonNull
902    public List<SystemComponent> getComponents() {
903      if (_components == null) {
904        _components = new LinkedList<>();
905      }
906      return ObjectUtils.notNull(_components);
907    }
908
909    /**
910     * Set the "{@literal Component}".
911     *
912     * <p>
913     * A defined component that can be part of an implemented system.
914     *
915     * @param value
916     *           the component value to set
917     */
918    public void setComponents(@NonNull List<SystemComponent> value) {
919      _components = value;
920    }
921
922    /**
923     * Add a new {@link SystemComponent} item to the underlying collection.
924     * @param item the item to add
925     * @return {@code true}
926     */
927    public boolean addComponent(SystemComponent item) {
928      SystemComponent value = ObjectUtils.requireNonNull(item,"item cannot be null");
929      if (_components == null) {
930        _components = new LinkedList<>();
931      }
932      return _components.add(value);
933    }
934
935    /**
936     * Remove the first matching {@link SystemComponent} item from the underlying collection.
937     * @param item the item to remove
938     * @return {@code true} if the item was removed or {@code false} otherwise
939     */
940    public boolean removeComponent(SystemComponent item) {
941      SystemComponent value = ObjectUtils.requireNonNull(item,"item cannot be null");
942      return _components != null && _components.remove(value);
943    }
944
945    /**
946     * Get the "{@literal Inventory Item}".
947     *
948     * <p>
949     * A single managed inventory item within the system.
950     *
951     * @return the inventory-item value
952     */
953    @NonNull
954    public List<InventoryItem> getInventoryItems() {
955      if (_inventoryItems == null) {
956        _inventoryItems = new LinkedList<>();
957      }
958      return ObjectUtils.notNull(_inventoryItems);
959    }
960
961    /**
962     * Set the "{@literal Inventory Item}".
963     *
964     * <p>
965     * A single managed inventory item within the system.
966     *
967     * @param value
968     *           the inventory-item value to set
969     */
970    public void setInventoryItems(@NonNull List<InventoryItem> value) {
971      _inventoryItems = value;
972    }
973
974    /**
975     * Add a new {@link InventoryItem} item to the underlying collection.
976     * @param item the item to add
977     * @return {@code true}
978     */
979    public boolean addInventoryItem(InventoryItem item) {
980      InventoryItem value = ObjectUtils.requireNonNull(item,"item cannot be null");
981      if (_inventoryItems == null) {
982        _inventoryItems = new LinkedList<>();
983      }
984      return _inventoryItems.add(value);
985    }
986
987    /**
988     * Remove the first matching {@link InventoryItem} item from the underlying collection.
989     * @param item the item to remove
990     * @return {@code true} if the item was removed or {@code false} otherwise
991     */
992    public boolean removeInventoryItem(InventoryItem item) {
993      InventoryItem value = ObjectUtils.requireNonNull(item,"item cannot be null");
994      return _inventoryItems != null && _inventoryItems.remove(value);
995    }
996
997    /**
998     * Get the "{@literal System User}".
999     *
1000     * <p>
1001     * A type of user that interacts with the system based on an associated role.
1002     *
1003     * @return the user value
1004     */
1005    @NonNull
1006    public List<SystemUser> getUsers() {
1007      if (_users == null) {
1008        _users = new LinkedList<>();
1009      }
1010      return ObjectUtils.notNull(_users);
1011    }
1012
1013    /**
1014     * Set the "{@literal System User}".
1015     *
1016     * <p>
1017     * A type of user that interacts with the system based on an associated role.
1018     *
1019     * @param value
1020     *           the user value to set
1021     */
1022    public void setUsers(@NonNull List<SystemUser> value) {
1023      _users = value;
1024    }
1025
1026    /**
1027     * Add a new {@link SystemUser} item to the underlying collection.
1028     * @param item the item to add
1029     * @return {@code true}
1030     */
1031    public boolean addUser(SystemUser item) {
1032      SystemUser value = ObjectUtils.requireNonNull(item,"item cannot be null");
1033      if (_users == null) {
1034        _users = new LinkedList<>();
1035      }
1036      return _users.add(value);
1037    }
1038
1039    /**
1040     * Remove the first matching {@link SystemUser} item from the underlying collection.
1041     * @param item the item to remove
1042     * @return {@code true} if the item was removed or {@code false} otherwise
1043     */
1044    public boolean removeUser(SystemUser item) {
1045      SystemUser value = ObjectUtils.requireNonNull(item,"item cannot be null");
1046      return _users != null && _users.remove(value);
1047    }
1048
1049    /**
1050     * Get the "{@literal Assessment Assets}".
1051     *
1052     * <p>
1053     * Identifies the assets used to perform this assessment, such as the assessment team, scanning tools, and assumptions.
1054     *
1055     * @return the assessment-assets value, or {@code null} if not set
1056     */
1057    @Nullable
1058    public AssessmentAssets getAssessmentAssets() {
1059      return _assessmentAssets;
1060    }
1061
1062    /**
1063     * Set the "{@literal Assessment Assets}".
1064     *
1065     * <p>
1066     * Identifies the assets used to perform this assessment, such as the assessment team, scanning tools, and assumptions.
1067     *
1068     * @param value
1069     *           the assessment-assets value to set, or {@code null} to clear
1070     */
1071    public void setAssessmentAssets(@Nullable AssessmentAssets value) {
1072      _assessmentAssets = value;
1073    }
1074
1075    /**
1076     * Get the "{@literal Task}".
1077     *
1078     * <p>
1079     * Represents a scheduled event or milestone, which may be associated with a series of assessment actions.
1080     *
1081     * @return the assessment-task value
1082     */
1083    @NonNull
1084    public List<Task> getTasks() {
1085      if (_tasks == null) {
1086        _tasks = new LinkedList<>();
1087      }
1088      return ObjectUtils.notNull(_tasks);
1089    }
1090
1091    /**
1092     * Set the "{@literal Task}".
1093     *
1094     * <p>
1095     * Represents a scheduled event or milestone, which may be associated with a series of assessment actions.
1096     *
1097     * @param value
1098     *           the assessment-task value to set
1099     */
1100    public void setTasks(@NonNull List<Task> value) {
1101      _tasks = value;
1102    }
1103
1104    /**
1105     * Add a new {@link Task} item to the underlying collection.
1106     * @param item the item to add
1107     * @return {@code true}
1108     */
1109    public boolean addAssessmentTask(Task item) {
1110      Task value = ObjectUtils.requireNonNull(item,"item cannot be null");
1111      if (_tasks == null) {
1112        _tasks = new LinkedList<>();
1113      }
1114      return _tasks.add(value);
1115    }
1116
1117    /**
1118     * Remove the first matching {@link Task} item from the underlying collection.
1119     * @param item the item to remove
1120     * @return {@code true} if the item was removed or {@code false} otherwise
1121     */
1122    public boolean removeAssessmentTask(Task item) {
1123      Task value = ObjectUtils.requireNonNull(item,"item cannot be null");
1124      return _tasks != null && _tasks.remove(value);
1125    }
1126
1127    @Override
1128    public String toString() {
1129      return ObjectUtils.notNull(new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString());
1130    }
1131  }
1132
1133  /**
1134   * A set of textual statements, typically written by the assessor.
1135   */
1136  @MetaschemaAssembly(
1137      formalName = "Attestation Statements",
1138      description = "A set of textual statements, typically written by the assessor.",
1139      name = "attestation",
1140      moduleClass = OscalArModule.class,
1141      modelConstraints = @AssemblyConstraints(unique = @IsUnique(id = "oscal-unique-ar-attestation-responsible-party", level = IConstraint.Level.ERROR, target = "responsible-party", keyFields = @KeyField(target = "@role-id"), remarks = "Since `responsible-party` associates multiple `party-uuid` entries with a single `role-id`, each role-id must be referenced only once."))
1142  )
1143  public static class Attestation implements IBoundObject {
1144    private final IMetaschemaData __metaschemaData;
1145
1146    /**
1147     * A reference to a set of persons and/or organizations that have responsibility for performing the referenced role in the context of the containing object.
1148     */
1149    @BoundAssembly(
1150        formalName = "Responsible Party",
1151        description = "A reference to a set of persons and/or organizations that have responsibility for performing the referenced role in the context of the containing object.",
1152        useName = "responsible-party",
1153        maxOccurs = -1,
1154        groupAs = @GroupAs(name = "responsible-parties", inJson = JsonGroupAsBehavior.LIST)
1155    )
1156    private List<ResponsibleParty> _responsibleParties;
1157
1158    /**
1159     * A partition of an assessment plan or results or a child of another part.
1160     */
1161    @BoundAssembly(
1162        formalName = "Assessment Part",
1163        description = "A partition of an assessment plan or results or a child of another part.",
1164        useName = "part",
1165        minOccurs = 1,
1166        maxOccurs = -1,
1167        groupAs = @GroupAs(name = "parts", inJson = JsonGroupAsBehavior.LIST)
1168    )
1169    private List<AssessmentPart> _parts;
1170
1171    /**
1172     * Constructs a new {@code dev.metaschema.oscal.lib.model.Result.Attestation} instance with no metadata.
1173     */
1174    public Attestation() {
1175      this(null);
1176    }
1177
1178    /**
1179     * Constructs a new {@code dev.metaschema.oscal.lib.model.Result.Attestation} instance with the specified metadata.
1180     *
1181     * @param data
1182     *           the metaschema data, or {@code null} if none
1183     */
1184    public Attestation(IMetaschemaData data) {
1185      this.__metaschemaData = data;
1186    }
1187
1188    @Override
1189    public IMetaschemaData getMetaschemaData() {
1190      return __metaschemaData;
1191    }
1192
1193    /**
1194     * Get the "{@literal Responsible Party}".
1195     *
1196     * <p>
1197     * A reference to a set of persons and/or organizations that have responsibility for performing the referenced role in the context of the containing object.
1198     *
1199     * @return the responsible-party value
1200     */
1201    @NonNull
1202    public List<ResponsibleParty> getResponsibleParties() {
1203      if (_responsibleParties == null) {
1204        _responsibleParties = new LinkedList<>();
1205      }
1206      return ObjectUtils.notNull(_responsibleParties);
1207    }
1208
1209    /**
1210     * Set the "{@literal Responsible Party}".
1211     *
1212     * <p>
1213     * A reference to a set of persons and/or organizations that have responsibility for performing the referenced role in the context of the containing object.
1214     *
1215     * @param value
1216     *           the responsible-party value to set
1217     */
1218    public void setResponsibleParties(@NonNull List<ResponsibleParty> value) {
1219      _responsibleParties = value;
1220    }
1221
1222    /**
1223     * Add a new {@link ResponsibleParty} item to the underlying collection.
1224     * @param item the item to add
1225     * @return {@code true}
1226     */
1227    public boolean addResponsibleParty(ResponsibleParty item) {
1228      ResponsibleParty value = ObjectUtils.requireNonNull(item,"item cannot be null");
1229      if (_responsibleParties == null) {
1230        _responsibleParties = new LinkedList<>();
1231      }
1232      return _responsibleParties.add(value);
1233    }
1234
1235    /**
1236     * Remove the first matching {@link ResponsibleParty} item from the underlying collection.
1237     * @param item the item to remove
1238     * @return {@code true} if the item was removed or {@code false} otherwise
1239     */
1240    public boolean removeResponsibleParty(ResponsibleParty item) {
1241      ResponsibleParty value = ObjectUtils.requireNonNull(item,"item cannot be null");
1242      return _responsibleParties != null && _responsibleParties.remove(value);
1243    }
1244
1245    /**
1246     * Get the "{@literal Assessment Part}".
1247     *
1248     * <p>
1249     * A partition of an assessment plan or results or a child of another part.
1250     *
1251     * @return the part value
1252     */
1253    @NonNull
1254    public List<AssessmentPart> getParts() {
1255      if (_parts == null) {
1256        _parts = new LinkedList<>();
1257      }
1258      return ObjectUtils.notNull(_parts);
1259    }
1260
1261    /**
1262     * Set the "{@literal Assessment Part}".
1263     *
1264     * <p>
1265     * A partition of an assessment plan or results or a child of another part.
1266     *
1267     * @param value
1268     *           the part value to set
1269     */
1270    public void setParts(@NonNull List<AssessmentPart> value) {
1271      _parts = value;
1272    }
1273
1274    /**
1275     * Add a new {@link AssessmentPart} item to the underlying collection.
1276     * @param item the item to add
1277     * @return {@code true}
1278     */
1279    public boolean addPart(AssessmentPart item) {
1280      AssessmentPart value = ObjectUtils.requireNonNull(item,"item cannot be null");
1281      if (_parts == null) {
1282        _parts = new LinkedList<>();
1283      }
1284      return _parts.add(value);
1285    }
1286
1287    /**
1288     * Remove the first matching {@link AssessmentPart} item from the underlying collection.
1289     * @param item the item to remove
1290     * @return {@code true} if the item was removed or {@code false} otherwise
1291     */
1292    public boolean removePart(AssessmentPart item) {
1293      AssessmentPart value = ObjectUtils.requireNonNull(item,"item cannot be null");
1294      return _parts != null && _parts.remove(value);
1295    }
1296
1297    @Override
1298    public String toString() {
1299      return ObjectUtils.notNull(new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString());
1300    }
1301  }
1302
1303  /**
1304   * A log of all assessment-related actions taken.
1305   */
1306  @MetaschemaAssembly(
1307      formalName = "Assessment Log",
1308      description = "A log of all assessment-related actions taken.",
1309      name = "assessment-log",
1310      moduleClass = OscalArModule.class
1311  )
1312  public static class AssessmentLog implements IBoundObject {
1313    private final IMetaschemaData __metaschemaData;
1314
1315    /**
1316     * Identifies the result of an action and/or task that occurred as part of executing an assessment plan or an assessment event that occurred in producing the assessment results.
1317     */
1318    @BoundAssembly(
1319        formalName = "Assessment Log Entry",
1320        description = "Identifies the result of an action and/or task that occurred as part of executing an assessment plan or an assessment event that occurred in producing the assessment results.",
1321        useName = "entry",
1322        minOccurs = 1,
1323        maxOccurs = -1,
1324        groupAs = @GroupAs(name = "entries", inJson = JsonGroupAsBehavior.LIST)
1325    )
1326    private List<Entry> _entries;
1327
1328    /**
1329     * Constructs a new {@code dev.metaschema.oscal.lib.model.Result.AssessmentLog} instance with no metadata.
1330     */
1331    public AssessmentLog() {
1332      this(null);
1333    }
1334
1335    /**
1336     * Constructs a new {@code dev.metaschema.oscal.lib.model.Result.AssessmentLog} instance with the specified metadata.
1337     *
1338     * @param data
1339     *           the metaschema data, or {@code null} if none
1340     */
1341    public AssessmentLog(IMetaschemaData data) {
1342      this.__metaschemaData = data;
1343    }
1344
1345    @Override
1346    public IMetaschemaData getMetaschemaData() {
1347      return __metaschemaData;
1348    }
1349
1350    /**
1351     * Get the "{@literal Assessment Log Entry}".
1352     *
1353     * <p>
1354     * Identifies the result of an action and/or task that occurred as part of executing an assessment plan or an assessment event that occurred in producing the assessment results.
1355     *
1356     * @return the entry value
1357     */
1358    @NonNull
1359    public List<Entry> getEntries() {
1360      if (_entries == null) {
1361        _entries = new LinkedList<>();
1362      }
1363      return ObjectUtils.notNull(_entries);
1364    }
1365
1366    /**
1367     * Set the "{@literal Assessment Log Entry}".
1368     *
1369     * <p>
1370     * Identifies the result of an action and/or task that occurred as part of executing an assessment plan or an assessment event that occurred in producing the assessment results.
1371     *
1372     * @param value
1373     *           the entry value to set
1374     */
1375    public void setEntries(@NonNull List<Entry> value) {
1376      _entries = value;
1377    }
1378
1379    /**
1380     * Add a new {@link Entry} item to the underlying collection.
1381     * @param item the item to add
1382     * @return {@code true}
1383     */
1384    public boolean addEntry(Entry item) {
1385      Entry value = ObjectUtils.requireNonNull(item,"item cannot be null");
1386      if (_entries == null) {
1387        _entries = new LinkedList<>();
1388      }
1389      return _entries.add(value);
1390    }
1391
1392    /**
1393     * Remove the first matching {@link Entry} item from the underlying collection.
1394     * @param item the item to remove
1395     * @return {@code true} if the item was removed or {@code false} otherwise
1396     */
1397    public boolean removeEntry(Entry item) {
1398      Entry value = ObjectUtils.requireNonNull(item,"item cannot be null");
1399      return _entries != null && _entries.remove(value);
1400    }
1401
1402    @Override
1403    public String toString() {
1404      return ObjectUtils.notNull(new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString());
1405    }
1406
1407    /**
1408     * Identifies the result of an action and/or task that occurred as part of executing an assessment plan or an assessment event that occurred in producing the assessment results.
1409     */
1410    @MetaschemaAssembly(
1411        formalName = "Assessment Log Entry",
1412        description = "Identifies the result of an action and/or task that occurred as part of executing an assessment plan or an assessment event that occurred in producing the assessment results.",
1413        name = "entry",
1414        moduleClass = OscalArModule.class
1415    )
1416    public static class Entry implements IBoundObject {
1417      private final IMetaschemaData __metaschemaData;
1418
1419      /**
1420       * 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 an assessment event 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>assessment 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.
1421       */
1422      @BoundFlag(
1423          formalName = "Assessment Log Entry Universally Unique Identifier",
1424          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 an assessment event in [this or other OSCAL instances](https://pages.nist.gov/OSCAL/concepts/identifier-use/#ar-identifiers). The locally defined *UUID* of the `assessment 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.",
1425          name = "uuid",
1426          required = true,
1427          typeAdapter = UuidAdapter.class
1428      )
1429      private UUID _uuid;
1430
1431      /**
1432       * The title for this event.
1433       */
1434      @BoundField(
1435          formalName = "Action Title",
1436          description = "The title for this event.",
1437          useName = "title",
1438          typeAdapter = MarkupLineAdapter.class
1439      )
1440      private MarkupLine _title;
1441
1442      /**
1443       * A human-readable description of this event.
1444       */
1445      @BoundField(
1446          formalName = "Action Description",
1447          description = "A human-readable description of this event.",
1448          useName = "description",
1449          typeAdapter = MarkupMultilineAdapter.class
1450      )
1451      private MarkupMultiline _description;
1452
1453      /**
1454       * Identifies the start date and time of an event.
1455       */
1456      @BoundField(
1457          formalName = "Start",
1458          description = "Identifies the start date and time of an event.",
1459          useName = "start",
1460          minOccurs = 1,
1461          typeAdapter = DateTimeWithTZAdapter.class
1462      )
1463      private ZonedDateTime _start;
1464
1465      /**
1466       * Identifies the end date and time of an event. If the event is a point in time, the start and end will be the same date and time.
1467       */
1468      @BoundField(
1469          formalName = "End",
1470          description = "Identifies the end date and time of an event. If the event is a point in time, the start and end will be the same date and time.",
1471          useName = "end",
1472          typeAdapter = DateTimeWithTZAdapter.class
1473      )
1474      private ZonedDateTime _end;
1475
1476      /**
1477       * An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair.
1478       */
1479      @BoundAssembly(
1480          formalName = "Property",
1481          description = "An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair.",
1482          useName = "prop",
1483          maxOccurs = -1,
1484          groupAs = @GroupAs(name = "props", inJson = JsonGroupAsBehavior.LIST)
1485      )
1486      private List<Property> _props;
1487
1488      /**
1489       * A reference to a local or remote resource, that has a specific relation to the containing object.
1490       */
1491      @BoundAssembly(
1492          formalName = "Link",
1493          description = "A reference to a local or remote resource, that has a specific relation to the containing object.",
1494          useName = "link",
1495          maxOccurs = -1,
1496          groupAs = @GroupAs(name = "links", inJson = JsonGroupAsBehavior.LIST)
1497      )
1498      private List<Link> _links;
1499
1500      /**
1501       * Used to indicate who created a log entry in what role.
1502       */
1503      @BoundAssembly(
1504          formalName = "Logged By",
1505          description = "Used to indicate who created a log entry in what role.",
1506          useName = "logged-by",
1507          maxOccurs = -1,
1508          groupAs = @GroupAs(name = "logged-by", inJson = JsonGroupAsBehavior.LIST)
1509      )
1510      private List<LoggedBy> _loggedBy;
1511
1512      /**
1513       * Identifies an individual task for which the containing object is a consequence of.
1514       */
1515      @BoundAssembly(
1516          formalName = "Task Reference",
1517          description = "Identifies an individual task for which the containing object is a consequence of.",
1518          useName = "related-task",
1519          maxOccurs = -1,
1520          groupAs = @GroupAs(name = "related-tasks", inJson = JsonGroupAsBehavior.LIST)
1521      )
1522      private List<RelatedTask> _relatedTasks;
1523
1524      /**
1525       * Additional commentary about the containing object.
1526       */
1527      @BoundField(
1528          formalName = "Remarks",
1529          description = "Additional commentary about the containing object.",
1530          useName = "remarks",
1531          typeAdapter = MarkupMultilineAdapter.class
1532      )
1533      private MarkupMultiline _remarks;
1534
1535      /**
1536       * Constructs a new {@code dev.metaschema.oscal.lib.model.Result.AssessmentLog.Entry} instance with no metadata.
1537       */
1538      public Entry() {
1539        this(null);
1540      }
1541
1542      /**
1543       * Constructs a new {@code dev.metaschema.oscal.lib.model.Result.AssessmentLog.Entry} instance with the specified metadata.
1544       *
1545       * @param data
1546       *           the metaschema data, or {@code null} if none
1547       */
1548      public Entry(IMetaschemaData data) {
1549        this.__metaschemaData = data;
1550      }
1551
1552      @Override
1553      public IMetaschemaData getMetaschemaData() {
1554        return __metaschemaData;
1555      }
1556
1557      /**
1558       * Get the "{@literal Assessment Log Entry Universally Unique Identifier}".
1559       *
1560       * <p>
1561       * 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 an assessment event 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>assessment 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.
1562       *
1563       * @return the uuid value
1564       */
1565      @NonNull
1566      public UUID getUuid() {
1567        return _uuid;
1568      }
1569
1570      /**
1571       * Set the "{@literal Assessment Log Entry Universally Unique Identifier}".
1572       *
1573       * <p>
1574       * 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 an assessment event 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>assessment 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.
1575       *
1576       * @param value
1577       *           the uuid value to set
1578       */
1579      public void setUuid(@NonNull UUID value) {
1580        _uuid = value;
1581      }
1582
1583      /**
1584       * Get the "{@literal Action Title}".
1585       *
1586       * <p>
1587       * The title for this event.
1588       *
1589       * @return the title value, or {@code null} if not set
1590       */
1591      @Nullable
1592      public MarkupLine getTitle() {
1593        return _title;
1594      }
1595
1596      /**
1597       * Set the "{@literal Action Title}".
1598       *
1599       * <p>
1600       * The title for this event.
1601       *
1602       * @param value
1603       *           the title value to set, or {@code null} to clear
1604       */
1605      public void setTitle(@Nullable MarkupLine value) {
1606        _title = value;
1607      }
1608
1609      /**
1610       * Get the "{@literal Action Description}".
1611       *
1612       * <p>
1613       * A human-readable description of this event.
1614       *
1615       * @return the description value, or {@code null} if not set
1616       */
1617      @Nullable
1618      public MarkupMultiline getDescription() {
1619        return _description;
1620      }
1621
1622      /**
1623       * Set the "{@literal Action Description}".
1624       *
1625       * <p>
1626       * A human-readable description of this event.
1627       *
1628       * @param value
1629       *           the description value to set, or {@code null} to clear
1630       */
1631      public void setDescription(@Nullable MarkupMultiline value) {
1632        _description = value;
1633      }
1634
1635      /**
1636       * Get the "{@literal Start}".
1637       *
1638       * <p>
1639       * Identifies the start date and time of an event.
1640       *
1641       * @return the start value
1642       */
1643      @NonNull
1644      public ZonedDateTime getStart() {
1645        return _start;
1646      }
1647
1648      /**
1649       * Set the "{@literal Start}".
1650       *
1651       * <p>
1652       * Identifies the start date and time of an event.
1653       *
1654       * @param value
1655       *           the start value to set
1656       */
1657      public void setStart(@NonNull ZonedDateTime value) {
1658        _start = value;
1659      }
1660
1661      /**
1662       * Get the "{@literal End}".
1663       *
1664       * <p>
1665       * Identifies the end date and time of an event. If the event is a point in time, the start and end will be the same date and time.
1666       *
1667       * @return the end value, or {@code null} if not set
1668       */
1669      @Nullable
1670      public ZonedDateTime getEnd() {
1671        return _end;
1672      }
1673
1674      /**
1675       * Set the "{@literal End}".
1676       *
1677       * <p>
1678       * Identifies the end date and time of an event. If the event is a point in time, the start and end will be the same date and time.
1679       *
1680       * @param value
1681       *           the end value to set, or {@code null} to clear
1682       */
1683      public void setEnd(@Nullable ZonedDateTime value) {
1684        _end = value;
1685      }
1686
1687      /**
1688       * Get the "{@literal Property}".
1689       *
1690       * <p>
1691       * An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair.
1692       *
1693       * @return the prop value
1694       */
1695      @NonNull
1696      public List<Property> getProps() {
1697        if (_props == null) {
1698          _props = new LinkedList<>();
1699        }
1700        return ObjectUtils.notNull(_props);
1701      }
1702
1703      /**
1704       * Set the "{@literal Property}".
1705       *
1706       * <p>
1707       * An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair.
1708       *
1709       * @param value
1710       *           the prop value to set
1711       */
1712      public void setProps(@NonNull List<Property> value) {
1713        _props = value;
1714      }
1715
1716      /**
1717       * Add a new {@link Property} item to the underlying collection.
1718       * @param item the item to add
1719       * @return {@code true}
1720       */
1721      public boolean addProp(Property item) {
1722        Property value = ObjectUtils.requireNonNull(item,"item cannot be null");
1723        if (_props == null) {
1724          _props = new LinkedList<>();
1725        }
1726        return _props.add(value);
1727      }
1728
1729      /**
1730       * Remove the first matching {@link Property} item from the underlying collection.
1731       * @param item the item to remove
1732       * @return {@code true} if the item was removed or {@code false} otherwise
1733       */
1734      public boolean removeProp(Property item) {
1735        Property value = ObjectUtils.requireNonNull(item,"item cannot be null");
1736        return _props != null && _props.remove(value);
1737      }
1738
1739      /**
1740       * Get the "{@literal Link}".
1741       *
1742       * <p>
1743       * A reference to a local or remote resource, that has a specific relation to the containing object.
1744       *
1745       * @return the link value
1746       */
1747      @NonNull
1748      public List<Link> getLinks() {
1749        if (_links == null) {
1750          _links = new LinkedList<>();
1751        }
1752        return ObjectUtils.notNull(_links);
1753      }
1754
1755      /**
1756       * Set the "{@literal Link}".
1757       *
1758       * <p>
1759       * A reference to a local or remote resource, that has a specific relation to the containing object.
1760       *
1761       * @param value
1762       *           the link value to set
1763       */
1764      public void setLinks(@NonNull List<Link> value) {
1765        _links = value;
1766      }
1767
1768      /**
1769       * Add a new {@link Link} item to the underlying collection.
1770       * @param item the item to add
1771       * @return {@code true}
1772       */
1773      public boolean addLink(Link item) {
1774        Link value = ObjectUtils.requireNonNull(item,"item cannot be null");
1775        if (_links == null) {
1776          _links = new LinkedList<>();
1777        }
1778        return _links.add(value);
1779      }
1780
1781      /**
1782       * Remove the first matching {@link Link} item from the underlying collection.
1783       * @param item the item to remove
1784       * @return {@code true} if the item was removed or {@code false} otherwise
1785       */
1786      public boolean removeLink(Link item) {
1787        Link value = ObjectUtils.requireNonNull(item,"item cannot be null");
1788        return _links != null && _links.remove(value);
1789      }
1790
1791      /**
1792       * Get the "{@literal Logged By}".
1793       *
1794       * <p>
1795       * Used to indicate who created a log entry in what role.
1796       *
1797       * @return the logged-by value
1798       */
1799      @NonNull
1800      public List<LoggedBy> getLoggedBy() {
1801        if (_loggedBy == null) {
1802          _loggedBy = new LinkedList<>();
1803        }
1804        return ObjectUtils.notNull(_loggedBy);
1805      }
1806
1807      /**
1808       * Set the "{@literal Logged By}".
1809       *
1810       * <p>
1811       * Used to indicate who created a log entry in what role.
1812       *
1813       * @param value
1814       *           the logged-by value to set
1815       */
1816      public void setLoggedBy(@NonNull List<LoggedBy> value) {
1817        _loggedBy = value;
1818      }
1819
1820      /**
1821       * Add a new {@link LoggedBy} item to the underlying collection.
1822       * @param item the item to add
1823       * @return {@code true}
1824       */
1825      public boolean addLoggedBy(LoggedBy item) {
1826        LoggedBy value = ObjectUtils.requireNonNull(item,"item cannot be null");
1827        if (_loggedBy == null) {
1828          _loggedBy = new LinkedList<>();
1829        }
1830        return _loggedBy.add(value);
1831      }
1832
1833      /**
1834       * Remove the first matching {@link LoggedBy} item from the underlying collection.
1835       * @param item the item to remove
1836       * @return {@code true} if the item was removed or {@code false} otherwise
1837       */
1838      public boolean removeLoggedBy(LoggedBy item) {
1839        LoggedBy value = ObjectUtils.requireNonNull(item,"item cannot be null");
1840        return _loggedBy != null && _loggedBy.remove(value);
1841      }
1842
1843      /**
1844       * Get the "{@literal Task Reference}".
1845       *
1846       * <p>
1847       * Identifies an individual task for which the containing object is a consequence of.
1848       *
1849       * @return the related-task value
1850       */
1851      @NonNull
1852      public List<RelatedTask> getRelatedTasks() {
1853        if (_relatedTasks == null) {
1854          _relatedTasks = new LinkedList<>();
1855        }
1856        return ObjectUtils.notNull(_relatedTasks);
1857      }
1858
1859      /**
1860       * Set the "{@literal Task Reference}".
1861       *
1862       * <p>
1863       * Identifies an individual task for which the containing object is a consequence of.
1864       *
1865       * @param value
1866       *           the related-task value to set
1867       */
1868      public void setRelatedTasks(@NonNull List<RelatedTask> value) {
1869        _relatedTasks = value;
1870      }
1871
1872      /**
1873       * Add a new {@link RelatedTask} item to the underlying collection.
1874       * @param item the item to add
1875       * @return {@code true}
1876       */
1877      public boolean addRelatedTask(RelatedTask item) {
1878        RelatedTask value = ObjectUtils.requireNonNull(item,"item cannot be null");
1879        if (_relatedTasks == null) {
1880          _relatedTasks = new LinkedList<>();
1881        }
1882        return _relatedTasks.add(value);
1883      }
1884
1885      /**
1886       * Remove the first matching {@link RelatedTask} item from the underlying collection.
1887       * @param item the item to remove
1888       * @return {@code true} if the item was removed or {@code false} otherwise
1889       */
1890      public boolean removeRelatedTask(RelatedTask item) {
1891        RelatedTask value = ObjectUtils.requireNonNull(item,"item cannot be null");
1892        return _relatedTasks != null && _relatedTasks.remove(value);
1893      }
1894
1895      /**
1896       * Get the "{@literal Remarks}".
1897       *
1898       * <p>
1899       * Additional commentary about the containing object.
1900       *
1901       * @return the remarks value, or {@code null} if not set
1902       */
1903      @Nullable
1904      public MarkupMultiline getRemarks() {
1905        return _remarks;
1906      }
1907
1908      /**
1909       * Set the "{@literal Remarks}".
1910       *
1911       * <p>
1912       * Additional commentary about the containing object.
1913       *
1914       * @param value
1915       *           the remarks value to set, or {@code null} to clear
1916       */
1917      public void setRemarks(@Nullable MarkupMultiline value) {
1918        _remarks = value;
1919      }
1920
1921      @Override
1922      public String toString() {
1923        return ObjectUtils.notNull(new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString());
1924      }
1925    }
1926  }
1927}