View Javadoc
1   package gov.nist.secauto.oscal.lib.model;
2   
3   import gov.nist.secauto.metaschema.binding.model.annotations.AssemblyConstraints;
4   import gov.nist.secauto.metaschema.binding.model.annotations.BoundAssembly;
5   import gov.nist.secauto.metaschema.binding.model.annotations.BoundField;
6   import gov.nist.secauto.metaschema.binding.model.annotations.BoundFieldValue;
7   import gov.nist.secauto.metaschema.binding.model.annotations.BoundFlag;
8   import gov.nist.secauto.metaschema.binding.model.annotations.GroupAs;
9   import gov.nist.secauto.metaschema.binding.model.annotations.IsUnique;
10  import gov.nist.secauto.metaschema.binding.model.annotations.KeyField;
11  import gov.nist.secauto.metaschema.binding.model.annotations.MetaschemaAssembly;
12  import gov.nist.secauto.metaschema.model.common.JsonGroupAsBehavior;
13  import gov.nist.secauto.metaschema.model.common.constraint.IConstraint;
14  import gov.nist.secauto.metaschema.model.common.datatype.adapter.DateTimeWithTZAdapter;
15  import gov.nist.secauto.metaschema.model.common.datatype.adapter.UuidAdapter;
16  import gov.nist.secauto.metaschema.model.common.datatype.markup.MarkupLine;
17  import gov.nist.secauto.metaschema.model.common.datatype.markup.MarkupLineAdapter;
18  import gov.nist.secauto.metaschema.model.common.datatype.markup.MarkupMultiline;
19  import gov.nist.secauto.metaschema.model.common.datatype.markup.MarkupMultilineAdapter;
20  import gov.nist.secauto.metaschema.model.common.util.ObjectUtils;
21  import java.lang.Override;
22  import java.lang.String;
23  import java.time.ZonedDateTime;
24  import java.util.LinkedList;
25  import java.util.List;
26  import java.util.UUID;
27  import org.apache.commons.lang3.builder.MultilineRecursiveToStringStyle;
28  import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
29  
30  /**
31   * 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.
32   */
33  @MetaschemaAssembly(
34      formalName = "Assessment Result",
35      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.",
36      name = "result",
37      metaschema = OscalArMetaschema.class
38  )
39  public class Result {
40    @BoundFlag(
41        formalName = "Results Universally Unique Identifier",
42        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.",
43        useName = "uuid",
44        required = true,
45        typeAdapter = UuidAdapter.class
46    )
47    private UUID _uuid;
48  
49    /**
50     * "The title for this set of results."
51     */
52    @BoundField(
53        formalName = "Results Title",
54        description = "The title for this set of results.",
55        useName = "title",
56        minOccurs = 1
57    )
58    @BoundFieldValue(
59        typeAdapter = MarkupLineAdapter.class
60    )
61    private MarkupLine _title;
62  
63    /**
64     * "A human-readable description of this set of test results."
65     */
66    @BoundField(
67        formalName = "Results Description",
68        description = "A human-readable description of this set of test results.",
69        useName = "description",
70        minOccurs = 1
71    )
72    @BoundFieldValue(
73        typeAdapter = MarkupMultilineAdapter.class
74    )
75    private MarkupMultiline _description;
76  
77    /**
78     * "Date/time stamp identifying the start of the evidence collection reflected in these results."
79     */
80    @BoundField(
81        formalName = "start field",
82        description = "Date/time stamp identifying the start of the evidence collection reflected in these results.",
83        useName = "start",
84        minOccurs = 1
85    )
86    @BoundFieldValue(
87        typeAdapter = DateTimeWithTZAdapter.class
88    )
89    private ZonedDateTime _start;
90  
91    /**
92     * "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."
93     */
94    @BoundField(
95        formalName = "end field",
96        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.",
97        useName = "end"
98    )
99    @BoundFieldValue(
100       typeAdapter = DateTimeWithTZAdapter.class
101   )
102   private ZonedDateTime _end;
103 
104   @BoundAssembly(
105       formalName = "Property",
106       description = "An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair.",
107       useName = "prop",
108       maxOccurs = -1
109   )
110   @GroupAs(
111       name = "props",
112       inJson = JsonGroupAsBehavior.LIST
113   )
114   private List<Property> _props;
115 
116   @BoundAssembly(
117       formalName = "Link",
118       description = "A reference to a local or remote resource, that has a specific relation to the containing object.",
119       useName = "link",
120       maxOccurs = -1
121   )
122   @GroupAs(
123       name = "links",
124       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   @BoundAssembly(
139       formalName = "Reviewed Controls and Control Objectives",
140       description = "Identifies the controls being assessed and their control objectives.",
141       useName = "reviewed-controls",
142       minOccurs = 1,
143       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"
144               + "\n"
145               + "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"
146               + "\n"
147               + "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`."
148   )
149   private ReviewedControls _reviewedControls;
150 
151   /**
152    * "A set of textual statements, typically written by the assessor."
153    */
154   @BoundAssembly(
155       formalName = "Attestation Statements",
156       description = "A set of textual statements, typically written by the assessor.",
157       useName = "attestation",
158       maxOccurs = -1
159   )
160   @GroupAs(
161       name = "attestations",
162       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   @BoundAssembly(
177       formalName = "Observation",
178       description = "Describes an individual observation.",
179       useName = "observation",
180       maxOccurs = -1
181   )
182   @GroupAs(
183       name = "observations",
184       inJson = JsonGroupAsBehavior.LIST
185   )
186   private List<Observation> _observations;
187 
188   @BoundAssembly(
189       formalName = "Identified Risk",
190       description = "An identified risk.",
191       useName = "risk",
192       maxOccurs = -1
193   )
194   @GroupAs(
195       name = "risks",
196       inJson = JsonGroupAsBehavior.LIST
197   )
198   private List<Risk> _risks;
199 
200   @BoundAssembly(
201       formalName = "Finding",
202       description = "Describes an individual finding.",
203       useName = "finding",
204       maxOccurs = -1
205   )
206   @GroupAs(
207       name = "findings",
208       inJson = JsonGroupAsBehavior.LIST
209   )
210   private List<Finding> _findings;
211 
212   @BoundField(
213       formalName = "Remarks",
214       description = "Additional commentary about the containing object.",
215       useName = "remarks"
216   )
217   @BoundFieldValue(
218       typeAdapter = MarkupMultilineAdapter.class
219   )
220   private MarkupMultiline _remarks;
221 
222   public Result() {
223   }
224 
225   public UUID getUuid() {
226     return _uuid;
227   }
228 
229   public void setUuid(UUID value) {
230     _uuid = value;
231   }
232 
233   public MarkupLine getTitle() {
234     return _title;
235   }
236 
237   public void setTitle(MarkupLine value) {
238     _title = value;
239   }
240 
241   public MarkupMultiline getDescription() {
242     return _description;
243   }
244 
245   public void setDescription(MarkupMultiline value) {
246     _description = value;
247   }
248 
249   public ZonedDateTime getStart() {
250     return _start;
251   }
252 
253   public void setStart(ZonedDateTime value) {
254     _start = value;
255   }
256 
257   public ZonedDateTime getEnd() {
258     return _end;
259   }
260 
261   public void setEnd(ZonedDateTime value) {
262     _end = value;
263   }
264 
265   public List<Property> getProps() {
266     return _props;
267   }
268 
269   public void setProps(List<Property> value) {
270     _props = value;
271   }
272 
273   /**
274    * Add a new {@link Property} item to the underlying collection.
275    * @param item the item to add
276    * @return {@code true}
277    */
278   public boolean addProp(Property item) {
279     Property value = ObjectUtils.requireNonNull(item,"item cannot be null");
280     if (_props == null) {
281       _props = new LinkedList<>();
282     }
283     return _props.add(value);
284   }
285 
286   /**
287    * Remove the first matching {@link Property} item from the underlying collection.
288    * @param item the item to remove
289    * @return {@code true} if the item was removed or {@code false} otherwise
290    */
291   public boolean removeProp(Property item) {
292     Property value = ObjectUtils.requireNonNull(item,"item cannot be null");
293     return _props == null ? false : _props.remove(value);
294   }
295 
296   public List<Link> getLinks() {
297     return _links;
298   }
299 
300   public void setLinks(List<Link> value) {
301     _links = value;
302   }
303 
304   /**
305    * Add a new {@link Link} item to the underlying collection.
306    * @param item the item to add
307    * @return {@code true}
308    */
309   public boolean addLink(Link item) {
310     Link value = ObjectUtils.requireNonNull(item,"item cannot be null");
311     if (_links == null) {
312       _links = new LinkedList<>();
313     }
314     return _links.add(value);
315   }
316 
317   /**
318    * Remove the first matching {@link Link} item from the underlying collection.
319    * @param item the item to remove
320    * @return {@code true} if the item was removed or {@code false} otherwise
321    */
322   public boolean removeLink(Link item) {
323     Link value = ObjectUtils.requireNonNull(item,"item cannot be null");
324     return _links == null ? false : _links.remove(value);
325   }
326 
327   public LocalDefinitions getLocalDefinitions() {
328     return _localDefinitions;
329   }
330 
331   public void setLocalDefinitions(LocalDefinitions value) {
332     _localDefinitions = value;
333   }
334 
335   public ReviewedControls getReviewedControls() {
336     return _reviewedControls;
337   }
338 
339   public void setReviewedControls(ReviewedControls value) {
340     _reviewedControls = value;
341   }
342 
343   public List<Attestation> getAttestations() {
344     return _attestations;
345   }
346 
347   public void setAttestations(List<Attestation> value) {
348     _attestations = value;
349   }
350 
351   /**
352    * Add a new {@link Attestation} item to the underlying collection.
353    * @param item the item to add
354    * @return {@code true}
355    */
356   public boolean addAttestation(Attestation item) {
357     Attestation value = ObjectUtils.requireNonNull(item,"item cannot be null");
358     if (_attestations == null) {
359       _attestations = new LinkedList<>();
360     }
361     return _attestations.add(value);
362   }
363 
364   /**
365    * Remove the first matching {@link Attestation} item from the underlying collection.
366    * @param item the item to remove
367    * @return {@code true} if the item was removed or {@code false} otherwise
368    */
369   public boolean removeAttestation(Attestation item) {
370     Attestation value = ObjectUtils.requireNonNull(item,"item cannot be null");
371     return _attestations == null ? false : _attestations.remove(value);
372   }
373 
374   public AssessmentLog getAssessmentLog() {
375     return _assessmentLog;
376   }
377 
378   public void setAssessmentLog(AssessmentLog value) {
379     _assessmentLog = value;
380   }
381 
382   public List<Observation> getObservations() {
383     return _observations;
384   }
385 
386   public void setObservations(List<Observation> value) {
387     _observations = value;
388   }
389 
390   /**
391    * Add a new {@link Observation} item to the underlying collection.
392    * @param item the item to add
393    * @return {@code true}
394    */
395   public boolean addObservation(Observation item) {
396     Observation value = ObjectUtils.requireNonNull(item,"item cannot be null");
397     if (_observations == null) {
398       _observations = new LinkedList<>();
399     }
400     return _observations.add(value);
401   }
402 
403   /**
404    * Remove the first matching {@link Observation} item from the underlying collection.
405    * @param item the item to remove
406    * @return {@code true} if the item was removed or {@code false} otherwise
407    */
408   public boolean removeObservation(Observation item) {
409     Observation value = ObjectUtils.requireNonNull(item,"item cannot be null");
410     return _observations == null ? false : _observations.remove(value);
411   }
412 
413   public List<Risk> getRisks() {
414     return _risks;
415   }
416 
417   public void setRisks(List<Risk> value) {
418     _risks = value;
419   }
420 
421   /**
422    * Add a new {@link Risk} item to the underlying collection.
423    * @param item the item to add
424    * @return {@code true}
425    */
426   public boolean addRisk(Risk item) {
427     Risk value = ObjectUtils.requireNonNull(item,"item cannot be null");
428     if (_risks == null) {
429       _risks = new LinkedList<>();
430     }
431     return _risks.add(value);
432   }
433 
434   /**
435    * Remove the first matching {@link Risk} item from the underlying collection.
436    * @param item the item to remove
437    * @return {@code true} if the item was removed or {@code false} otherwise
438    */
439   public boolean removeRisk(Risk item) {
440     Risk value = ObjectUtils.requireNonNull(item,"item cannot be null");
441     return _risks == null ? false : _risks.remove(value);
442   }
443 
444   public List<Finding> getFindings() {
445     return _findings;
446   }
447 
448   public void setFindings(List<Finding> value) {
449     _findings = value;
450   }
451 
452   /**
453    * Add a new {@link Finding} item to the underlying collection.
454    * @param item the item to add
455    * @return {@code true}
456    */
457   public boolean addFinding(Finding item) {
458     Finding value = ObjectUtils.requireNonNull(item,"item cannot be null");
459     if (_findings == null) {
460       _findings = new LinkedList<>();
461     }
462     return _findings.add(value);
463   }
464 
465   /**
466    * Remove the first matching {@link Finding} item from the underlying collection.
467    * @param item the item to remove
468    * @return {@code true} if the item was removed or {@code false} otherwise
469    */
470   public boolean removeFinding(Finding item) {
471     Finding value = ObjectUtils.requireNonNull(item,"item cannot be null");
472     return _findings == null ? false : _findings.remove(value);
473   }
474 
475   public MarkupMultiline getRemarks() {
476     return _remarks;
477   }
478 
479   public void setRemarks(MarkupMultiline value) {
480     _remarks = value;
481   }
482 
483   @Override
484   public String toString() {
485     return new ReflectionToStringBuilder(this, MultilineRecursiveToStringStyle.MULTI_LINE_STYLE).toString();
486   }
487 
488   /**
489    * A log of all assessment-related actions taken.
490    */
491   @MetaschemaAssembly(
492       formalName = "Assessment Log",
493       description = "A log of all assessment-related actions taken.",
494       name = "assessment-log",
495       metaschema = OscalArMetaschema.class
496   )
497   public static class AssessmentLog {
498     /**
499      * "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."
500      */
501     @BoundAssembly(
502         formalName = "Assessment Log Entry",
503         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.",
504         useName = "entry",
505         minOccurs = 1,
506         maxOccurs = -1
507     )
508     @GroupAs(
509         name = "entries",
510         inJson = JsonGroupAsBehavior.LIST
511     )
512     private List<Entry> _entries;
513 
514     public AssessmentLog() {
515     }
516 
517     public List<Entry> getEntries() {
518       return _entries;
519     }
520 
521     public void setEntries(List<Entry> value) {
522       _entries = value;
523     }
524 
525     /**
526      * Add a new {@link Entry} item to the underlying collection.
527      * @param item the item to add
528      * @return {@code true}
529      */
530     public boolean addEntry(Entry item) {
531       Entry value = ObjectUtils.requireNonNull(item,"item cannot be null");
532       if (_entries == null) {
533         _entries = new LinkedList<>();
534       }
535       return _entries.add(value);
536     }
537 
538     /**
539      * Remove the first matching {@link Entry} item from the underlying collection.
540      * @param item the item to remove
541      * @return {@code true} if the item was removed or {@code false} otherwise
542      */
543     public boolean removeEntry(Entry item) {
544       Entry value = ObjectUtils.requireNonNull(item,"item cannot be null");
545       return _entries == null ? false : _entries.remove(value);
546     }
547 
548     @Override
549     public String toString() {
550       return new ReflectionToStringBuilder(this, MultilineRecursiveToStringStyle.MULTI_LINE_STYLE).toString();
551     }
552 
553     /**
554      * 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.
555      */
556     @MetaschemaAssembly(
557         formalName = "Assessment Log Entry",
558         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.",
559         name = "entry",
560         metaschema = OscalArMetaschema.class
561     )
562     public static class Entry {
563       @BoundFlag(
564           formalName = "Assessment Log Entry Universally Unique Identifier",
565           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.",
566           useName = "uuid",
567           required = true,
568           typeAdapter = UuidAdapter.class
569       )
570       private UUID _uuid;
571 
572       /**
573        * "The title for this event."
574        */
575       @BoundField(
576           formalName = "Action Title",
577           description = "The title for this event.",
578           useName = "title"
579       )
580       @BoundFieldValue(
581           typeAdapter = MarkupLineAdapter.class
582       )
583       private MarkupLine _title;
584 
585       /**
586        * "A human-readable description of this event."
587        */
588       @BoundField(
589           formalName = "Action Description",
590           description = "A human-readable description of this event.",
591           useName = "description"
592       )
593       @BoundFieldValue(
594           typeAdapter = MarkupMultilineAdapter.class
595       )
596       private MarkupMultiline _description;
597 
598       /**
599        * "Identifies the start date and time of an event."
600        */
601       @BoundField(
602           formalName = "Start",
603           description = "Identifies the start date and time of an event.",
604           useName = "start",
605           minOccurs = 1
606       )
607       @BoundFieldValue(
608           typeAdapter = DateTimeWithTZAdapter.class
609       )
610       private ZonedDateTime _start;
611 
612       /**
613        * "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."
614        */
615       @BoundField(
616           formalName = "End",
617           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.",
618           useName = "end"
619       )
620       @BoundFieldValue(
621           typeAdapter = DateTimeWithTZAdapter.class
622       )
623       private ZonedDateTime _end;
624 
625       @BoundAssembly(
626           formalName = "Property",
627           description = "An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair.",
628           useName = "prop",
629           maxOccurs = -1
630       )
631       @GroupAs(
632           name = "props",
633           inJson = JsonGroupAsBehavior.LIST
634       )
635       private List<Property> _props;
636 
637       @BoundAssembly(
638           formalName = "Link",
639           description = "A reference to a local or remote resource, that has a specific relation to the containing object.",
640           useName = "link",
641           maxOccurs = -1
642       )
643       @GroupAs(
644           name = "links",
645           inJson = JsonGroupAsBehavior.LIST
646       )
647       private List<Link> _links;
648 
649       @BoundAssembly(
650           formalName = "Logged By",
651           description = "Used to indicate who created a log entry in what role.",
652           useName = "logged-by",
653           maxOccurs = -1
654       )
655       @GroupAs(
656           name = "logged-by",
657           inJson = JsonGroupAsBehavior.LIST
658       )
659       private List<LoggedBy> _loggedBy;
660 
661       @BoundAssembly(
662           formalName = "Task Reference",
663           description = "Identifies an individual task for which the containing object is a consequence of.",
664           useName = "related-task",
665           maxOccurs = -1
666       )
667       @GroupAs(
668           name = "related-tasks",
669           inJson = JsonGroupAsBehavior.LIST
670       )
671       private List<RelatedTask> _relatedTasks;
672 
673       @BoundField(
674           formalName = "Remarks",
675           description = "Additional commentary about the containing object.",
676           useName = "remarks"
677       )
678       @BoundFieldValue(
679           typeAdapter = MarkupMultilineAdapter.class
680       )
681       private MarkupMultiline _remarks;
682 
683       public Entry() {
684       }
685 
686       public UUID getUuid() {
687         return _uuid;
688       }
689 
690       public void setUuid(UUID value) {
691         _uuid = value;
692       }
693 
694       public MarkupLine getTitle() {
695         return _title;
696       }
697 
698       public void setTitle(MarkupLine value) {
699         _title = value;
700       }
701 
702       public MarkupMultiline getDescription() {
703         return _description;
704       }
705 
706       public void setDescription(MarkupMultiline value) {
707         _description = value;
708       }
709 
710       public ZonedDateTime getStart() {
711         return _start;
712       }
713 
714       public void setStart(ZonedDateTime value) {
715         _start = value;
716       }
717 
718       public ZonedDateTime getEnd() {
719         return _end;
720       }
721 
722       public void setEnd(ZonedDateTime value) {
723         _end = value;
724       }
725 
726       public List<Property> getProps() {
727         return _props;
728       }
729 
730       public void setProps(List<Property> value) {
731         _props = value;
732       }
733 
734       /**
735        * Add a new {@link Property} item to the underlying collection.
736        * @param item the item to add
737        * @return {@code true}
738        */
739       public boolean addProp(Property item) {
740         Property value = ObjectUtils.requireNonNull(item,"item cannot be null");
741         if (_props == null) {
742           _props = new LinkedList<>();
743         }
744         return _props.add(value);
745       }
746 
747       /**
748        * Remove the first matching {@link Property} item from the underlying collection.
749        * @param item the item to remove
750        * @return {@code true} if the item was removed or {@code false} otherwise
751        */
752       public boolean removeProp(Property item) {
753         Property value = ObjectUtils.requireNonNull(item,"item cannot be null");
754         return _props == null ? false : _props.remove(value);
755       }
756 
757       public List<Link> getLinks() {
758         return _links;
759       }
760 
761       public void setLinks(List<Link> value) {
762         _links = value;
763       }
764 
765       /**
766        * Add a new {@link Link} item to the underlying collection.
767        * @param item the item to add
768        * @return {@code true}
769        */
770       public boolean addLink(Link item) {
771         Link value = ObjectUtils.requireNonNull(item,"item cannot be null");
772         if (_links == null) {
773           _links = new LinkedList<>();
774         }
775         return _links.add(value);
776       }
777 
778       /**
779        * Remove the first matching {@link Link} item from the underlying collection.
780        * @param item the item to remove
781        * @return {@code true} if the item was removed or {@code false} otherwise
782        */
783       public boolean removeLink(Link item) {
784         Link value = ObjectUtils.requireNonNull(item,"item cannot be null");
785         return _links == null ? false : _links.remove(value);
786       }
787 
788       public List<LoggedBy> getLoggedBy() {
789         return _loggedBy;
790       }
791 
792       public void setLoggedBy(List<LoggedBy> value) {
793         _loggedBy = value;
794       }
795 
796       /**
797        * Add a new {@link LoggedBy} item to the underlying collection.
798        * @param item the item to add
799        * @return {@code true}
800        */
801       public boolean addLoggedBy(LoggedBy item) {
802         LoggedBy value = ObjectUtils.requireNonNull(item,"item cannot be null");
803         if (_loggedBy == null) {
804           _loggedBy = new LinkedList<>();
805         }
806         return _loggedBy.add(value);
807       }
808 
809       /**
810        * Remove the first matching {@link LoggedBy} item from the underlying collection.
811        * @param item the item to remove
812        * @return {@code true} if the item was removed or {@code false} otherwise
813        */
814       public boolean removeLoggedBy(LoggedBy item) {
815         LoggedBy value = ObjectUtils.requireNonNull(item,"item cannot be null");
816         return _loggedBy == null ? false : _loggedBy.remove(value);
817       }
818 
819       public List<RelatedTask> getRelatedTasks() {
820         return _relatedTasks;
821       }
822 
823       public void setRelatedTasks(List<RelatedTask> value) {
824         _relatedTasks = value;
825       }
826 
827       /**
828        * Add a new {@link RelatedTask} item to the underlying collection.
829        * @param item the item to add
830        * @return {@code true}
831        */
832       public boolean addRelatedTask(RelatedTask item) {
833         RelatedTask value = ObjectUtils.requireNonNull(item,"item cannot be null");
834         if (_relatedTasks == null) {
835           _relatedTasks = new LinkedList<>();
836         }
837         return _relatedTasks.add(value);
838       }
839 
840       /**
841        * Remove the first matching {@link RelatedTask} item from the underlying collection.
842        * @param item the item to remove
843        * @return {@code true} if the item was removed or {@code false} otherwise
844        */
845       public boolean removeRelatedTask(RelatedTask item) {
846         RelatedTask value = ObjectUtils.requireNonNull(item,"item cannot be null");
847         return _relatedTasks == null ? false : _relatedTasks.remove(value);
848       }
849 
850       public MarkupMultiline getRemarks() {
851         return _remarks;
852       }
853 
854       public void setRemarks(MarkupMultiline value) {
855         _remarks = value;
856       }
857 
858       @Override
859       public String toString() {
860         return new ReflectionToStringBuilder(this, MultilineRecursiveToStringStyle.MULTI_LINE_STYLE).toString();
861       }
862     }
863   }
864 
865   /**
866    * Used to define data objects that are used in the assessment plan, that do not appear in the referenced SSP.
867    */
868   @MetaschemaAssembly(
869       formalName = "Local Definitions",
870       description = "Used to define data objects that are used in the assessment plan, that do not appear in the referenced SSP.",
871       name = "local-definitions",
872       metaschema = OscalArMetaschema.class
873   )
874   @AssemblyConstraints(
875       isUnique = {
876           @IsUnique(id = "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`."),
877           @IsUnique(id = "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.")
878       }
879   )
880   public static class LocalDefinitions {
881     @BoundAssembly(
882         formalName = "Component",
883         description = "A defined component that can be part of an implemented system.",
884         useName = "component",
885         maxOccurs = -1,
886         remarks = "Used to add any components, not defined via the System Security Plan (AR-\\>AP-\\>SSP)"
887     )
888     @GroupAs(
889         name = "components",
890         inJson = JsonGroupAsBehavior.LIST
891     )
892     private List<SystemComponent> _components;
893 
894     @BoundAssembly(
895         formalName = "Inventory Item",
896         description = "A single managed inventory item within the system.",
897         useName = "inventory-item",
898         maxOccurs = -1,
899         remarks = "Used to add any inventory-items, not defined via the System Security Plan (AR-\\>AP-\\>SSP)"
900     )
901     @GroupAs(
902         name = "inventory-items",
903         inJson = JsonGroupAsBehavior.LIST
904     )
905     private List<InventoryItem> _inventoryItems;
906 
907     @BoundAssembly(
908         formalName = "System User",
909         description = "A type of user that interacts with the system based on an associated role.",
910         useName = "user",
911         maxOccurs = -1,
912         remarks = "Used to add any users, not defined via the System Security Plan (AR-\\>AP-\\>SSP)"
913     )
914     @GroupAs(
915         name = "users",
916         inJson = JsonGroupAsBehavior.LIST
917     )
918     private List<SystemUser> _users;
919 
920     @BoundAssembly(
921         formalName = "Assessment Assets",
922         description = "Identifies the assets used to perform this assessment, such as the assessment team, scanning tools, and assumptions.",
923         useName = "assessment-assets",
924         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."
925     )
926     private AssessmentAssets _assessmentAssets;
927 
928     @BoundAssembly(
929         formalName = "Task",
930         description = "Represents a scheduled event or milestone, which may be associated with a series of assessment actions.",
931         useName = "assessment-task",
932         maxOccurs = -1
933     )
934     @GroupAs(
935         name = "tasks",
936         inJson = JsonGroupAsBehavior.LIST
937     )
938     private List<Task> _tasks;
939 
940     public LocalDefinitions() {
941     }
942 
943     public List<SystemComponent> getComponents() {
944       return _components;
945     }
946 
947     public void setComponents(List<SystemComponent> value) {
948       _components = value;
949     }
950 
951     /**
952      * Add a new {@link SystemComponent} item to the underlying collection.
953      * @param item the item to add
954      * @return {@code true}
955      */
956     public boolean addComponent(SystemComponent item) {
957       SystemComponent value = ObjectUtils.requireNonNull(item,"item cannot be null");
958       if (_components == null) {
959         _components = new LinkedList<>();
960       }
961       return _components.add(value);
962     }
963 
964     /**
965      * Remove the first matching {@link SystemComponent} item from the underlying collection.
966      * @param item the item to remove
967      * @return {@code true} if the item was removed or {@code false} otherwise
968      */
969     public boolean removeComponent(SystemComponent item) {
970       SystemComponent value = ObjectUtils.requireNonNull(item,"item cannot be null");
971       return _components == null ? false : _components.remove(value);
972     }
973 
974     public List<InventoryItem> getInventoryItems() {
975       return _inventoryItems;
976     }
977 
978     public void setInventoryItems(List<InventoryItem> value) {
979       _inventoryItems = value;
980     }
981 
982     /**
983      * Add a new {@link InventoryItem} item to the underlying collection.
984      * @param item the item to add
985      * @return {@code true}
986      */
987     public boolean addInventoryItem(InventoryItem item) {
988       InventoryItem value = ObjectUtils.requireNonNull(item,"item cannot be null");
989       if (_inventoryItems == null) {
990         _inventoryItems = new LinkedList<>();
991       }
992       return _inventoryItems.add(value);
993     }
994 
995     /**
996      * Remove the first matching {@link InventoryItem} item from the underlying collection.
997      * @param item the item to remove
998      * @return {@code true} if the item was removed or {@code false} otherwise
999      */
1000     public boolean removeInventoryItem(InventoryItem item) {
1001       InventoryItem value = ObjectUtils.requireNonNull(item,"item cannot be null");
1002       return _inventoryItems == null ? false : _inventoryItems.remove(value);
1003     }
1004 
1005     public List<SystemUser> getUsers() {
1006       return _users;
1007     }
1008 
1009     public void setUsers(List<SystemUser> value) {
1010       _users = value;
1011     }
1012 
1013     /**
1014      * Add a new {@link SystemUser} item to the underlying collection.
1015      * @param item the item to add
1016      * @return {@code true}
1017      */
1018     public boolean addUser(SystemUser item) {
1019       SystemUser value = ObjectUtils.requireNonNull(item,"item cannot be null");
1020       if (_users == null) {
1021         _users = new LinkedList<>();
1022       }
1023       return _users.add(value);
1024     }
1025 
1026     /**
1027      * Remove the first matching {@link SystemUser} item from the underlying collection.
1028      * @param item the item to remove
1029      * @return {@code true} if the item was removed or {@code false} otherwise
1030      */
1031     public boolean removeUser(SystemUser item) {
1032       SystemUser value = ObjectUtils.requireNonNull(item,"item cannot be null");
1033       return _users == null ? false : _users.remove(value);
1034     }
1035 
1036     public AssessmentAssets getAssessmentAssets() {
1037       return _assessmentAssets;
1038     }
1039 
1040     public void setAssessmentAssets(AssessmentAssets value) {
1041       _assessmentAssets = value;
1042     }
1043 
1044     public List<Task> getTasks() {
1045       return _tasks;
1046     }
1047 
1048     public void setTasks(List<Task> value) {
1049       _tasks = value;
1050     }
1051 
1052     /**
1053      * Add a new {@link Task} item to the underlying collection.
1054      * @param item the item to add
1055      * @return {@code true}
1056      */
1057     public boolean addAssessmentTask(Task item) {
1058       Task value = ObjectUtils.requireNonNull(item,"item cannot be null");
1059       if (_tasks == null) {
1060         _tasks = new LinkedList<>();
1061       }
1062       return _tasks.add(value);
1063     }
1064 
1065     /**
1066      * Remove the first matching {@link Task} item from the underlying collection.
1067      * @param item the item to remove
1068      * @return {@code true} if the item was removed or {@code false} otherwise
1069      */
1070     public boolean removeAssessmentTask(Task item) {
1071       Task value = ObjectUtils.requireNonNull(item,"item cannot be null");
1072       return _tasks == null ? false : _tasks.remove(value);
1073     }
1074 
1075     @Override
1076     public String toString() {
1077       return new ReflectionToStringBuilder(this, MultilineRecursiveToStringStyle.MULTI_LINE_STYLE).toString();
1078     }
1079   }
1080 
1081   /**
1082    * A set of textual statements, typically written by the assessor.
1083    */
1084   @MetaschemaAssembly(
1085       formalName = "Attestation Statements",
1086       description = "A set of textual statements, typically written by the assessor.",
1087       name = "attestation",
1088       metaschema = OscalArMetaschema.class
1089   )
1090   @AssemblyConstraints(
1091       isUnique = @IsUnique(id = "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.")
1092   )
1093   public static class Attestation {
1094     @BoundAssembly(
1095         formalName = "Responsible Party",
1096         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.",
1097         useName = "responsible-party",
1098         maxOccurs = -1
1099     )
1100     @GroupAs(
1101         name = "responsible-parties",
1102         inJson = JsonGroupAsBehavior.LIST
1103     )
1104     private List<ResponsibleParty> _responsibleParties;
1105 
1106     @BoundAssembly(
1107         formalName = "Assessment Part",
1108         description = "A partition of an assessment plan or results or a child of another part.",
1109         useName = "part",
1110         minOccurs = 1,
1111         maxOccurs = -1
1112     )
1113     @GroupAs(
1114         name = "parts",
1115         inJson = JsonGroupAsBehavior.LIST
1116     )
1117     private List<AssessmentPart> _parts;
1118 
1119     public Attestation() {
1120     }
1121 
1122     public List<ResponsibleParty> getResponsibleParties() {
1123       return _responsibleParties;
1124     }
1125 
1126     public void setResponsibleParties(List<ResponsibleParty> value) {
1127       _responsibleParties = value;
1128     }
1129 
1130     /**
1131      * Add a new {@link ResponsibleParty} item to the underlying collection.
1132      * @param item the item to add
1133      * @return {@code true}
1134      */
1135     public boolean addResponsibleParty(ResponsibleParty item) {
1136       ResponsibleParty value = ObjectUtils.requireNonNull(item,"item cannot be null");
1137       if (_responsibleParties == null) {
1138         _responsibleParties = new LinkedList<>();
1139       }
1140       return _responsibleParties.add(value);
1141     }
1142 
1143     /**
1144      * Remove the first matching {@link ResponsibleParty} item from the underlying collection.
1145      * @param item the item to remove
1146      * @return {@code true} if the item was removed or {@code false} otherwise
1147      */
1148     public boolean removeResponsibleParty(ResponsibleParty item) {
1149       ResponsibleParty value = ObjectUtils.requireNonNull(item,"item cannot be null");
1150       return _responsibleParties == null ? false : _responsibleParties.remove(value);
1151     }
1152 
1153     public List<AssessmentPart> getParts() {
1154       return _parts;
1155     }
1156 
1157     public void setParts(List<AssessmentPart> value) {
1158       _parts = value;
1159     }
1160 
1161     /**
1162      * Add a new {@link AssessmentPart} item to the underlying collection.
1163      * @param item the item to add
1164      * @return {@code true}
1165      */
1166     public boolean addPart(AssessmentPart item) {
1167       AssessmentPart value = ObjectUtils.requireNonNull(item,"item cannot be null");
1168       if (_parts == null) {
1169         _parts = new LinkedList<>();
1170       }
1171       return _parts.add(value);
1172     }
1173 
1174     /**
1175      * Remove the first matching {@link AssessmentPart} item from the underlying collection.
1176      * @param item the item to remove
1177      * @return {@code true} if the item was removed or {@code false} otherwise
1178      */
1179     public boolean removePart(AssessmentPart item) {
1180       AssessmentPart value = ObjectUtils.requireNonNull(item,"item cannot be null");
1181       return _parts == null ? false : _parts.remove(value);
1182     }
1183 
1184     @Override
1185     public String toString() {
1186       return new ReflectionToStringBuilder(this, MultilineRecursiveToStringStyle.MULTI_LINE_STYLE).toString();
1187     }
1188   }
1189 }