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