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.markup.MarkupMultiline;
006import dev.metaschema.core.datatype.markup.MarkupMultilineAdapter;
007import dev.metaschema.core.model.IBoundObject;
008import dev.metaschema.core.model.IMetaschemaData;
009import dev.metaschema.core.model.JsonGroupAsBehavior;
010import dev.metaschema.core.util.ObjectUtils;
011import dev.metaschema.databind.model.annotations.BoundAssembly;
012import dev.metaschema.databind.model.annotations.BoundChoice;
013import dev.metaschema.databind.model.annotations.BoundField;
014import dev.metaschema.databind.model.annotations.GroupAs;
015import dev.metaschema.databind.model.annotations.MetaschemaAssembly;
016import edu.umd.cs.findbugs.annotations.NonNull;
017import edu.umd.cs.findbugs.annotations.Nullable;
018import java.util.LinkedList;
019import java.util.List;
020import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
021import org.apache.commons.lang3.builder.ToStringStyle;
022
023/**
024 * Identifies the controls being assessed and their control objectives.
025 */
026@MetaschemaAssembly(
027    formalName = "Reviewed Controls and Control Objectives",
028    description = "Identifies the controls being assessed and their control objectives.",
029    name = "reviewed-controls",
030    moduleClass = OscalAssessmentCommonModule.class,
031    remarks = "In the context of an assessment plan, this construct is used to identify the controls and control objectives that are to be assessed. In the context of an assessment result, this construct is used to identify the actual controls and objectives that were assessed, reflecting any changes from the plan.\n"
032            + "\n"
033            + "When resolving the selection of controls and control objectives, the following processing will occur:\n"
034            + "\n"
035            + "1. Controls will be resolved by creating a set of controls based on the control-selections by first handling the includes, and then removing any excluded controls.\n"
036            + "\n"
037            + "2. The set of control objectives will be resolved from the set of controls that was generated in the previous step. The set of control objectives is based on the control-objective-selection by first handling the includes, and then removing any excluded control objectives."
038)
039public class ReviewedControls implements IBoundObject {
040  private final IMetaschemaData __metaschemaData;
041
042  /**
043   * A human-readable description of control objectives.
044   */
045  @BoundField(
046      formalName = "Control Objective Description",
047      description = "A human-readable description of control objectives.",
048      useName = "description",
049      typeAdapter = MarkupMultilineAdapter.class
050  )
051  private MarkupMultiline _description;
052
053  /**
054   * An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair.
055   */
056  @BoundAssembly(
057      formalName = "Property",
058      description = "An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair.",
059      useName = "prop",
060      maxOccurs = -1,
061      groupAs = @GroupAs(name = "props", inJson = JsonGroupAsBehavior.LIST)
062  )
063  private List<Property> _props;
064
065  /**
066   * A reference to a local or remote resource, that has a specific relation to the containing object.
067   */
068  @BoundAssembly(
069      formalName = "Link",
070      description = "A reference to a local or remote resource, that has a specific relation to the containing object.",
071      useName = "link",
072      maxOccurs = -1,
073      groupAs = @GroupAs(name = "links", inJson = JsonGroupAsBehavior.LIST)
074  )
075  private List<Link> _links;
076
077  /**
078   * Identifies the controls being assessed. In the assessment plan, these are the planned controls. In the assessment results, these are the actual controls, and reflects any changes from the plan.
079   */
080  @BoundAssembly(
081      formalName = "Assessed Controls",
082      description = "Identifies the controls being assessed. In the assessment plan, these are the planned controls. In the assessment results, these are the actual controls, and reflects any changes from the plan.",
083      useName = "control-selection",
084      remarks = "The `include-all`, specifies all control identified in the **baseline** are included in the scope if this assessment, as specified by the `include-profile` statement within the linked SSP.\n"
085              + "\n"
086              + "Any control specified within `exclude-controls` must first be within a range of explicitly included controls, via `include-controls` or `include-all`.",
087      minOccurs = 1,
088      maxOccurs = -1,
089      groupAs = @GroupAs(name = "control-selections", inJson = JsonGroupAsBehavior.LIST)
090  )
091  private List<ControlSelection> _controlSelections;
092
093  /**
094   * Identifies the control objectives of the assessment. In the assessment plan, these are the planned objectives. In the assessment results, these are the assessed objectives, and reflects any changes from the plan.
095   */
096  @BoundAssembly(
097      formalName = "Referenced Control Objectives",
098      description = "Identifies the control objectives of the assessment. In the assessment plan, these are the planned objectives. In the assessment results, these are the assessed objectives, and reflects any changes from the plan.",
099      useName = "control-objective-selection",
100      remarks = "The `include-all` field, specifies all control objectives for any in-scope control. In-scope controls are defined in the `control-selection`.\n"
101              + "\n"
102              + "Any control objective specified within `exclude-controls` must first be within a range of explicitly included control objectives, via `include-objectives` or `include-all`.",
103      maxOccurs = -1,
104      groupAs = @GroupAs(name = "control-objective-selections", inJson = JsonGroupAsBehavior.LIST)
105  )
106  private List<ControlObjectiveSelection> _controlObjectiveSelections;
107
108  /**
109   * Additional commentary about the containing object.
110   */
111  @BoundField(
112      formalName = "Remarks",
113      description = "Additional commentary about the containing object.",
114      useName = "remarks",
115      typeAdapter = MarkupMultilineAdapter.class
116  )
117  private MarkupMultiline _remarks;
118
119  /**
120   * Constructs a new {@code dev.metaschema.oscal.lib.model.ReviewedControls} instance with no metadata.
121   */
122  public ReviewedControls() {
123    this(null);
124  }
125
126  /**
127   * Constructs a new {@code dev.metaschema.oscal.lib.model.ReviewedControls} instance with the specified metadata.
128   *
129   * @param data
130   *           the metaschema data, or {@code null} if none
131   */
132  public ReviewedControls(IMetaschemaData data) {
133    this.__metaschemaData = data;
134  }
135
136  @Override
137  public IMetaschemaData getMetaschemaData() {
138    return __metaschemaData;
139  }
140
141  /**
142   * Get the "{@literal Control Objective Description}".
143   *
144   * <p>
145   * A human-readable description of control objectives.
146   *
147   * @return the description value, or {@code null} if not set
148   */
149  @Nullable
150  public MarkupMultiline getDescription() {
151    return _description;
152  }
153
154  /**
155   * Set the "{@literal Control Objective Description}".
156   *
157   * <p>
158   * A human-readable description of control objectives.
159   *
160   * @param value
161   *           the description value to set, or {@code null} to clear
162   */
163  public void setDescription(@Nullable MarkupMultiline value) {
164    _description = value;
165  }
166
167  /**
168   * Get the "{@literal Property}".
169   *
170   * <p>
171   * An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair.
172   *
173   * @return the prop value
174   */
175  @NonNull
176  public List<Property> getProps() {
177    if (_props == null) {
178      _props = new LinkedList<>();
179    }
180    return ObjectUtils.notNull(_props);
181  }
182
183  /**
184   * Set the "{@literal Property}".
185   *
186   * <p>
187   * An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair.
188   *
189   * @param value
190   *           the prop value to set
191   */
192  public void setProps(@NonNull List<Property> value) {
193    _props = value;
194  }
195
196  /**
197   * Add a new {@link Property} item to the underlying collection.
198   * @param item the item to add
199   * @return {@code true}
200   */
201  public boolean addProp(Property item) {
202    Property value = ObjectUtils.requireNonNull(item,"item cannot be null");
203    if (_props == null) {
204      _props = new LinkedList<>();
205    }
206    return _props.add(value);
207  }
208
209  /**
210   * Remove the first matching {@link Property} item from the underlying collection.
211   * @param item the item to remove
212   * @return {@code true} if the item was removed or {@code false} otherwise
213   */
214  public boolean removeProp(Property item) {
215    Property value = ObjectUtils.requireNonNull(item,"item cannot be null");
216    return _props != null && _props.remove(value);
217  }
218
219  /**
220   * Get the "{@literal Link}".
221   *
222   * <p>
223   * A reference to a local or remote resource, that has a specific relation to the containing object.
224   *
225   * @return the link value
226   */
227  @NonNull
228  public List<Link> getLinks() {
229    if (_links == null) {
230      _links = new LinkedList<>();
231    }
232    return ObjectUtils.notNull(_links);
233  }
234
235  /**
236   * Set the "{@literal Link}".
237   *
238   * <p>
239   * A reference to a local or remote resource, that has a specific relation to the containing object.
240   *
241   * @param value
242   *           the link value to set
243   */
244  public void setLinks(@NonNull List<Link> value) {
245    _links = value;
246  }
247
248  /**
249   * Add a new {@link Link} item to the underlying collection.
250   * @param item the item to add
251   * @return {@code true}
252   */
253  public boolean addLink(Link item) {
254    Link value = ObjectUtils.requireNonNull(item,"item cannot be null");
255    if (_links == null) {
256      _links = new LinkedList<>();
257    }
258    return _links.add(value);
259  }
260
261  /**
262   * Remove the first matching {@link Link} item from the underlying collection.
263   * @param item the item to remove
264   * @return {@code true} if the item was removed or {@code false} otherwise
265   */
266  public boolean removeLink(Link item) {
267    Link value = ObjectUtils.requireNonNull(item,"item cannot be null");
268    return _links != null && _links.remove(value);
269  }
270
271  /**
272   * Get the "{@literal Assessed Controls}".
273   *
274   * <p>
275   * Identifies the controls being assessed. In the assessment plan, these are the planned controls. In the assessment results, these are the actual controls, and reflects any changes from the plan.
276   *
277   * @return the control-selection value
278   */
279  @NonNull
280  public List<ControlSelection> getControlSelections() {
281    if (_controlSelections == null) {
282      _controlSelections = new LinkedList<>();
283    }
284    return ObjectUtils.notNull(_controlSelections);
285  }
286
287  /**
288   * Set the "{@literal Assessed Controls}".
289   *
290   * <p>
291   * Identifies the controls being assessed. In the assessment plan, these are the planned controls. In the assessment results, these are the actual controls, and reflects any changes from the plan.
292   *
293   * @param value
294   *           the control-selection value to set
295   */
296  public void setControlSelections(@NonNull List<ControlSelection> value) {
297    _controlSelections = value;
298  }
299
300  /**
301   * Add a new {@link ControlSelection} item to the underlying collection.
302   * @param item the item to add
303   * @return {@code true}
304   */
305  public boolean addControlSelection(ControlSelection item) {
306    ControlSelection value = ObjectUtils.requireNonNull(item,"item cannot be null");
307    if (_controlSelections == null) {
308      _controlSelections = new LinkedList<>();
309    }
310    return _controlSelections.add(value);
311  }
312
313  /**
314   * Remove the first matching {@link ControlSelection} item from the underlying collection.
315   * @param item the item to remove
316   * @return {@code true} if the item was removed or {@code false} otherwise
317   */
318  public boolean removeControlSelection(ControlSelection item) {
319    ControlSelection value = ObjectUtils.requireNonNull(item,"item cannot be null");
320    return _controlSelections != null && _controlSelections.remove(value);
321  }
322
323  /**
324   * Get the "{@literal Referenced Control Objectives}".
325   *
326   * <p>
327   * Identifies the control objectives of the assessment. In the assessment plan, these are the planned objectives. In the assessment results, these are the assessed objectives, and reflects any changes from the plan.
328   *
329   * @return the control-objective-selection value
330   */
331  @NonNull
332  public List<ControlObjectiveSelection> getControlObjectiveSelections() {
333    if (_controlObjectiveSelections == null) {
334      _controlObjectiveSelections = new LinkedList<>();
335    }
336    return ObjectUtils.notNull(_controlObjectiveSelections);
337  }
338
339  /**
340   * Set the "{@literal Referenced Control Objectives}".
341   *
342   * <p>
343   * Identifies the control objectives of the assessment. In the assessment plan, these are the planned objectives. In the assessment results, these are the assessed objectives, and reflects any changes from the plan.
344   *
345   * @param value
346   *           the control-objective-selection value to set
347   */
348  public void setControlObjectiveSelections(@NonNull List<ControlObjectiveSelection> value) {
349    _controlObjectiveSelections = value;
350  }
351
352  /**
353   * Add a new {@link ControlObjectiveSelection} item to the underlying collection.
354   * @param item the item to add
355   * @return {@code true}
356   */
357  public boolean addControlObjectiveSelection(ControlObjectiveSelection item) {
358    ControlObjectiveSelection value = ObjectUtils.requireNonNull(item,"item cannot be null");
359    if (_controlObjectiveSelections == null) {
360      _controlObjectiveSelections = new LinkedList<>();
361    }
362    return _controlObjectiveSelections.add(value);
363  }
364
365  /**
366   * Remove the first matching {@link ControlObjectiveSelection} item from the underlying collection.
367   * @param item the item to remove
368   * @return {@code true} if the item was removed or {@code false} otherwise
369   */
370  public boolean removeControlObjectiveSelection(ControlObjectiveSelection item) {
371    ControlObjectiveSelection value = ObjectUtils.requireNonNull(item,"item cannot be null");
372    return _controlObjectiveSelections != null && _controlObjectiveSelections.remove(value);
373  }
374
375  /**
376   * Get the "{@literal Remarks}".
377   *
378   * <p>
379   * Additional commentary about the containing object.
380   *
381   * @return the remarks value, or {@code null} if not set
382   */
383  @Nullable
384  public MarkupMultiline getRemarks() {
385    return _remarks;
386  }
387
388  /**
389   * Set the "{@literal Remarks}".
390   *
391   * <p>
392   * Additional commentary about the containing object.
393   *
394   * @param value
395   *           the remarks value to set, or {@code null} to clear
396   */
397  public void setRemarks(@Nullable MarkupMultiline value) {
398    _remarks = value;
399  }
400
401  @Override
402  public String toString() {
403    return ObjectUtils.notNull(new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString());
404  }
405
406  /**
407   * Identifies the controls being assessed. In the assessment plan, these are the planned controls. In the assessment results, these are the actual controls, and reflects any changes from the plan.
408   */
409  @MetaschemaAssembly(
410      formalName = "Assessed Controls",
411      description = "Identifies the controls being assessed. In the assessment plan, these are the planned controls. In the assessment results, these are the actual controls, and reflects any changes from the plan.",
412      name = "control-selection",
413      moduleClass = OscalAssessmentCommonModule.class,
414      remarks = "The `include-all`, specifies all control identified in the **baseline** are included in the scope if this assessment, as specified by the `include-profile` statement within the linked SSP.\n"
415              + "\n"
416              + "Any control specified within `exclude-controls` must first be within a range of explicitly included controls, via `include-controls` or `include-all`."
417  )
418  public static class ControlSelection implements IBoundObject {
419    private final IMetaschemaData __metaschemaData;
420
421    /**
422     * A human-readable description of in-scope controls specified for assessment.
423     */
424    @BoundField(
425        formalName = "Assessed Controls Description",
426        description = "A human-readable description of in-scope controls specified for assessment.",
427        useName = "description",
428        typeAdapter = MarkupMultilineAdapter.class
429    )
430    private MarkupMultiline _description;
431
432    /**
433     * An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair.
434     */
435    @BoundAssembly(
436        formalName = "Property",
437        description = "An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair.",
438        useName = "prop",
439        maxOccurs = -1,
440        groupAs = @GroupAs(name = "props", inJson = JsonGroupAsBehavior.LIST)
441    )
442    private List<Property> _props;
443
444    /**
445     * A reference to a local or remote resource, that has a specific relation to the containing object.
446     */
447    @BoundAssembly(
448        formalName = "Link",
449        description = "A reference to a local or remote resource, that has a specific relation to the containing object.",
450        useName = "link",
451        maxOccurs = -1,
452        groupAs = @GroupAs(name = "links", inJson = JsonGroupAsBehavior.LIST)
453    )
454    private List<Link> _links;
455
456    /**
457     * Include all controls from the imported catalog or profile resources.
458     */
459    @BoundAssembly(
460        formalName = "Include All",
461        description = "Include all controls from the imported catalog or profile resources.",
462        useName = "include-all",
463        minOccurs = 1
464    )
465    @BoundChoice(
466        choiceId = "choice-1"
467    )
468    private IncludeAll _includeAll;
469
470    /**
471     * Used to select a control for inclusion/exclusion based on one or more control identifiers. A set of statement identifiers can be used to target the inclusion/exclusion to only specific control statements providing more granularity over the specific statements that are within the assessment scope.
472     */
473    @BoundAssembly(
474        formalName = "Select Control",
475        description = "Used to select a control for inclusion/exclusion based on one or more control identifiers. A set of statement identifiers can be used to target the inclusion/exclusion to only specific control statements providing more granularity over the specific statements that are within the assessment scope.",
476        useName = "include-control",
477        remarks = "Used to select a control for inclusion by the control's identifier. Specific control statements can be selected by their statement identifier.",
478        minOccurs = 1,
479        maxOccurs = -1,
480        groupAs = @GroupAs(name = "include-controls", inJson = JsonGroupAsBehavior.LIST)
481    )
482    @BoundChoice(
483        choiceId = "choice-1"
484    )
485    private List<SelectControlByIdOscalAssessmentCommon> _includeControls;
486
487    /**
488     * Used to select a control for inclusion/exclusion based on one or more control identifiers. A set of statement identifiers can be used to target the inclusion/exclusion to only specific control statements providing more granularity over the specific statements that are within the assessment scope.
489     */
490    @BoundAssembly(
491        formalName = "Select Control",
492        description = "Used to select a control for inclusion/exclusion based on one or more control identifiers. A set of statement identifiers can be used to target the inclusion/exclusion to only specific control statements providing more granularity over the specific statements that are within the assessment scope.",
493        useName = "exclude-control",
494        remarks = "Used to select a control for exclusion by the control's identifier. Specific control statements can be excluded by their statement identifier.",
495        maxOccurs = -1,
496        groupAs = @GroupAs(name = "exclude-controls", inJson = JsonGroupAsBehavior.LIST)
497    )
498    private List<SelectControlByIdOscalAssessmentCommon> _excludeControls;
499
500    /**
501     * Additional commentary about the containing object.
502     */
503    @BoundField(
504        formalName = "Remarks",
505        description = "Additional commentary about the containing object.",
506        useName = "remarks",
507        typeAdapter = MarkupMultilineAdapter.class
508    )
509    private MarkupMultiline _remarks;
510
511    /**
512     * Constructs a new {@code dev.metaschema.oscal.lib.model.ReviewedControls.ControlSelection} instance with no metadata.
513     */
514    public ControlSelection() {
515      this(null);
516    }
517
518    /**
519     * Constructs a new {@code dev.metaschema.oscal.lib.model.ReviewedControls.ControlSelection} instance with the specified metadata.
520     *
521     * @param data
522     *           the metaschema data, or {@code null} if none
523     */
524    public ControlSelection(IMetaschemaData data) {
525      this.__metaschemaData = data;
526    }
527
528    @Override
529    public IMetaschemaData getMetaschemaData() {
530      return __metaschemaData;
531    }
532
533    /**
534     * Get the "{@literal Assessed Controls Description}".
535     *
536     * <p>
537     * A human-readable description of in-scope controls specified for assessment.
538     *
539     * @return the description value, or {@code null} if not set
540     */
541    @Nullable
542    public MarkupMultiline getDescription() {
543      return _description;
544    }
545
546    /**
547     * Set the "{@literal Assessed Controls Description}".
548     *
549     * <p>
550     * A human-readable description of in-scope controls specified for assessment.
551     *
552     * @param value
553     *           the description value to set, or {@code null} to clear
554     */
555    public void setDescription(@Nullable MarkupMultiline value) {
556      _description = value;
557    }
558
559    /**
560     * Get the "{@literal Property}".
561     *
562     * <p>
563     * An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair.
564     *
565     * @return the prop value
566     */
567    @NonNull
568    public List<Property> getProps() {
569      if (_props == null) {
570        _props = new LinkedList<>();
571      }
572      return ObjectUtils.notNull(_props);
573    }
574
575    /**
576     * Set the "{@literal Property}".
577     *
578     * <p>
579     * An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair.
580     *
581     * @param value
582     *           the prop value to set
583     */
584    public void setProps(@NonNull List<Property> value) {
585      _props = value;
586    }
587
588    /**
589     * Add a new {@link Property} item to the underlying collection.
590     * @param item the item to add
591     * @return {@code true}
592     */
593    public boolean addProp(Property item) {
594      Property value = ObjectUtils.requireNonNull(item,"item cannot be null");
595      if (_props == null) {
596        _props = new LinkedList<>();
597      }
598      return _props.add(value);
599    }
600
601    /**
602     * Remove the first matching {@link Property} item from the underlying collection.
603     * @param item the item to remove
604     * @return {@code true} if the item was removed or {@code false} otherwise
605     */
606    public boolean removeProp(Property item) {
607      Property value = ObjectUtils.requireNonNull(item,"item cannot be null");
608      return _props != null && _props.remove(value);
609    }
610
611    /**
612     * Get the "{@literal Link}".
613     *
614     * <p>
615     * A reference to a local or remote resource, that has a specific relation to the containing object.
616     *
617     * @return the link value
618     */
619    @NonNull
620    public List<Link> getLinks() {
621      if (_links == null) {
622        _links = new LinkedList<>();
623      }
624      return ObjectUtils.notNull(_links);
625    }
626
627    /**
628     * Set the "{@literal Link}".
629     *
630     * <p>
631     * A reference to a local or remote resource, that has a specific relation to the containing object.
632     *
633     * @param value
634     *           the link value to set
635     */
636    public void setLinks(@NonNull List<Link> value) {
637      _links = value;
638    }
639
640    /**
641     * Add a new {@link Link} item to the underlying collection.
642     * @param item the item to add
643     * @return {@code true}
644     */
645    public boolean addLink(Link item) {
646      Link value = ObjectUtils.requireNonNull(item,"item cannot be null");
647      if (_links == null) {
648        _links = new LinkedList<>();
649      }
650      return _links.add(value);
651    }
652
653    /**
654     * Remove the first matching {@link Link} item from the underlying collection.
655     * @param item the item to remove
656     * @return {@code true} if the item was removed or {@code false} otherwise
657     */
658    public boolean removeLink(Link item) {
659      Link value = ObjectUtils.requireNonNull(item,"item cannot be null");
660      return _links != null && _links.remove(value);
661    }
662
663    /**
664     * Get the "{@literal Include All}".
665     *
666     * <p>
667     * Include all controls from the imported catalog or profile resources.
668     *
669     * @return the include-all value, or {@code null} if not set
670     */
671    @Nullable
672    public IncludeAll getIncludeAll() {
673      return _includeAll;
674    }
675
676    /**
677     * Set the "{@literal Include All}".
678     *
679     * <p>
680     * Include all controls from the imported catalog or profile resources.
681     *
682     * @param value
683     *           the include-all value to set, or {@code null} to clear
684     */
685    public void setIncludeAll(@Nullable IncludeAll value) {
686      _includeAll = value;
687    }
688
689    /**
690     * Get the "{@literal Select Control}".
691     *
692     * <p>
693     * Used to select a control for inclusion/exclusion based on one or more control identifiers. A set of statement identifiers can be used to target the inclusion/exclusion to only specific control statements providing more granularity over the specific statements that are within the assessment scope.
694     *
695     * @return the include-control value
696     */
697    @NonNull
698    public List<SelectControlByIdOscalAssessmentCommon> getIncludeControls() {
699      if (_includeControls == null) {
700        _includeControls = new LinkedList<>();
701      }
702      return ObjectUtils.notNull(_includeControls);
703    }
704
705    /**
706     * Set the "{@literal Select Control}".
707     *
708     * <p>
709     * Used to select a control for inclusion/exclusion based on one or more control identifiers. A set of statement identifiers can be used to target the inclusion/exclusion to only specific control statements providing more granularity over the specific statements that are within the assessment scope.
710     *
711     * @param value
712     *           the include-control value to set
713     */
714    public void setIncludeControls(@NonNull List<SelectControlByIdOscalAssessmentCommon> value) {
715      _includeControls = value;
716    }
717
718    /**
719     * Add a new {@link SelectControlByIdOscalAssessmentCommon} item to the underlying collection.
720     * @param item the item to add
721     * @return {@code true}
722     */
723    public boolean addIncludeControl(SelectControlByIdOscalAssessmentCommon item) {
724      SelectControlByIdOscalAssessmentCommon value = ObjectUtils.requireNonNull(item,"item cannot be null");
725      if (_includeControls == null) {
726        _includeControls = new LinkedList<>();
727      }
728      return _includeControls.add(value);
729    }
730
731    /**
732     * Remove the first matching {@link SelectControlByIdOscalAssessmentCommon} item from the underlying collection.
733     * @param item the item to remove
734     * @return {@code true} if the item was removed or {@code false} otherwise
735     */
736    public boolean removeIncludeControl(SelectControlByIdOscalAssessmentCommon item) {
737      SelectControlByIdOscalAssessmentCommon value = ObjectUtils.requireNonNull(item,"item cannot be null");
738      return _includeControls != null && _includeControls.remove(value);
739    }
740
741    /**
742     * Get the "{@literal Select Control}".
743     *
744     * <p>
745     * Used to select a control for inclusion/exclusion based on one or more control identifiers. A set of statement identifiers can be used to target the inclusion/exclusion to only specific control statements providing more granularity over the specific statements that are within the assessment scope.
746     *
747     * @return the exclude-control value
748     */
749    @NonNull
750    public List<SelectControlByIdOscalAssessmentCommon> getExcludeControls() {
751      if (_excludeControls == null) {
752        _excludeControls = new LinkedList<>();
753      }
754      return ObjectUtils.notNull(_excludeControls);
755    }
756
757    /**
758     * Set the "{@literal Select Control}".
759     *
760     * <p>
761     * Used to select a control for inclusion/exclusion based on one or more control identifiers. A set of statement identifiers can be used to target the inclusion/exclusion to only specific control statements providing more granularity over the specific statements that are within the assessment scope.
762     *
763     * @param value
764     *           the exclude-control value to set
765     */
766    public void setExcludeControls(@NonNull List<SelectControlByIdOscalAssessmentCommon> value) {
767      _excludeControls = value;
768    }
769
770    /**
771     * Add a new {@link SelectControlByIdOscalAssessmentCommon} item to the underlying collection.
772     * @param item the item to add
773     * @return {@code true}
774     */
775    public boolean addExcludeControl(SelectControlByIdOscalAssessmentCommon item) {
776      SelectControlByIdOscalAssessmentCommon value = ObjectUtils.requireNonNull(item,"item cannot be null");
777      if (_excludeControls == null) {
778        _excludeControls = new LinkedList<>();
779      }
780      return _excludeControls.add(value);
781    }
782
783    /**
784     * Remove the first matching {@link SelectControlByIdOscalAssessmentCommon} item from the underlying collection.
785     * @param item the item to remove
786     * @return {@code true} if the item was removed or {@code false} otherwise
787     */
788    public boolean removeExcludeControl(SelectControlByIdOscalAssessmentCommon item) {
789      SelectControlByIdOscalAssessmentCommon value = ObjectUtils.requireNonNull(item,"item cannot be null");
790      return _excludeControls != null && _excludeControls.remove(value);
791    }
792
793    /**
794     * Get the "{@literal Remarks}".
795     *
796     * <p>
797     * Additional commentary about the containing object.
798     *
799     * @return the remarks value, or {@code null} if not set
800     */
801    @Nullable
802    public MarkupMultiline getRemarks() {
803      return _remarks;
804    }
805
806    /**
807     * Set the "{@literal Remarks}".
808     *
809     * <p>
810     * Additional commentary about the containing object.
811     *
812     * @param value
813     *           the remarks value to set, or {@code null} to clear
814     */
815    public void setRemarks(@Nullable MarkupMultiline value) {
816      _remarks = value;
817    }
818
819    @Override
820    public String toString() {
821      return ObjectUtils.notNull(new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString());
822    }
823  }
824
825  /**
826   * Identifies the control objectives of the assessment. In the assessment plan, these are the planned objectives. In the assessment results, these are the assessed objectives, and reflects any changes from the plan.
827   */
828  @MetaschemaAssembly(
829      formalName = "Referenced Control Objectives",
830      description = "Identifies the control objectives of the assessment. In the assessment plan, these are the planned objectives. In the assessment results, these are the assessed objectives, and reflects any changes from the plan.",
831      name = "control-objective-selection",
832      moduleClass = OscalAssessmentCommonModule.class,
833      remarks = "The `include-all` field, specifies all control objectives for any in-scope control. In-scope controls are defined in the `control-selection`.\n"
834              + "\n"
835              + "Any control objective specified within `exclude-controls` must first be within a range of explicitly included control objectives, via `include-objectives` or `include-all`."
836  )
837  public static class ControlObjectiveSelection implements IBoundObject {
838    private final IMetaschemaData __metaschemaData;
839
840    /**
841     * A human-readable description of this collection of control objectives.
842     */
843    @BoundField(
844        formalName = "Control Objectives Description",
845        description = "A human-readable description of this collection of control objectives.",
846        useName = "description",
847        typeAdapter = MarkupMultilineAdapter.class
848    )
849    private MarkupMultiline _description;
850
851    /**
852     * An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair.
853     */
854    @BoundAssembly(
855        formalName = "Property",
856        description = "An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair.",
857        useName = "prop",
858        maxOccurs = -1,
859        groupAs = @GroupAs(name = "props", inJson = JsonGroupAsBehavior.LIST)
860    )
861    private List<Property> _props;
862
863    /**
864     * A reference to a local or remote resource, that has a specific relation to the containing object.
865     */
866    @BoundAssembly(
867        formalName = "Link",
868        description = "A reference to a local or remote resource, that has a specific relation to the containing object.",
869        useName = "link",
870        maxOccurs = -1,
871        groupAs = @GroupAs(name = "links", inJson = JsonGroupAsBehavior.LIST)
872    )
873    private List<Link> _links;
874
875    /**
876     * Include all controls from the imported catalog or profile resources.
877     */
878    @BoundAssembly(
879        formalName = "Include All",
880        description = "Include all controls from the imported catalog or profile resources.",
881        useName = "include-all",
882        minOccurs = 1
883    )
884    @BoundChoice(
885        choiceId = "choice-1"
886    )
887    private IncludeAll _includeAll;
888
889    /**
890     * Used to select a control objective for inclusion/exclusion based on the control objective's identifier.
891     */
892    @BoundAssembly(
893        formalName = "Select Objective",
894        description = "Used to select a control objective for inclusion/exclusion based on the control objective's identifier.",
895        useName = "include-objective",
896        remarks = "Used to select a control objective for inclusion by the control objective's identifier.",
897        minOccurs = 1,
898        maxOccurs = -1,
899        groupAs = @GroupAs(name = "include-objectives", inJson = JsonGroupAsBehavior.LIST)
900    )
901    @BoundChoice(
902        choiceId = "choice-1"
903    )
904    private List<SelectObjectiveById> _includeObjectives;
905
906    /**
907     * Used to select a control objective for inclusion/exclusion based on the control objective's identifier.
908     */
909    @BoundAssembly(
910        formalName = "Select Objective",
911        description = "Used to select a control objective for inclusion/exclusion based on the control objective's identifier.",
912        useName = "exclude-objective",
913        remarks = "Used to select a control objective for exclusion by the control objective's identifier.",
914        maxOccurs = -1,
915        groupAs = @GroupAs(name = "exclude-objectives", inJson = JsonGroupAsBehavior.LIST)
916    )
917    private List<SelectObjectiveById> _excludeObjectives;
918
919    /**
920     * Additional commentary about the containing object.
921     */
922    @BoundField(
923        formalName = "Remarks",
924        description = "Additional commentary about the containing object.",
925        useName = "remarks",
926        typeAdapter = MarkupMultilineAdapter.class
927    )
928    private MarkupMultiline _remarks;
929
930    /**
931     * Constructs a new {@code dev.metaschema.oscal.lib.model.ReviewedControls.ControlObjectiveSelection} instance with no metadata.
932     */
933    public ControlObjectiveSelection() {
934      this(null);
935    }
936
937    /**
938     * Constructs a new {@code dev.metaschema.oscal.lib.model.ReviewedControls.ControlObjectiveSelection} instance with the specified metadata.
939     *
940     * @param data
941     *           the metaschema data, or {@code null} if none
942     */
943    public ControlObjectiveSelection(IMetaschemaData data) {
944      this.__metaschemaData = data;
945    }
946
947    @Override
948    public IMetaschemaData getMetaschemaData() {
949      return __metaschemaData;
950    }
951
952    /**
953     * Get the "{@literal Control Objectives Description}".
954     *
955     * <p>
956     * A human-readable description of this collection of control objectives.
957     *
958     * @return the description value, or {@code null} if not set
959     */
960    @Nullable
961    public MarkupMultiline getDescription() {
962      return _description;
963    }
964
965    /**
966     * Set the "{@literal Control Objectives Description}".
967     *
968     * <p>
969     * A human-readable description of this collection of control objectives.
970     *
971     * @param value
972     *           the description value to set, or {@code null} to clear
973     */
974    public void setDescription(@Nullable MarkupMultiline value) {
975      _description = value;
976    }
977
978    /**
979     * Get the "{@literal Property}".
980     *
981     * <p>
982     * An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair.
983     *
984     * @return the prop value
985     */
986    @NonNull
987    public List<Property> getProps() {
988      if (_props == null) {
989        _props = new LinkedList<>();
990      }
991      return ObjectUtils.notNull(_props);
992    }
993
994    /**
995     * Set the "{@literal Property}".
996     *
997     * <p>
998     * An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair.
999     *
1000     * @param value
1001     *           the prop value to set
1002     */
1003    public void setProps(@NonNull List<Property> value) {
1004      _props = value;
1005    }
1006
1007    /**
1008     * Add a new {@link Property} item to the underlying collection.
1009     * @param item the item to add
1010     * @return {@code true}
1011     */
1012    public boolean addProp(Property item) {
1013      Property value = ObjectUtils.requireNonNull(item,"item cannot be null");
1014      if (_props == null) {
1015        _props = new LinkedList<>();
1016      }
1017      return _props.add(value);
1018    }
1019
1020    /**
1021     * Remove the first matching {@link Property} item from the underlying collection.
1022     * @param item the item to remove
1023     * @return {@code true} if the item was removed or {@code false} otherwise
1024     */
1025    public boolean removeProp(Property item) {
1026      Property value = ObjectUtils.requireNonNull(item,"item cannot be null");
1027      return _props != null && _props.remove(value);
1028    }
1029
1030    /**
1031     * Get the "{@literal Link}".
1032     *
1033     * <p>
1034     * A reference to a local or remote resource, that has a specific relation to the containing object.
1035     *
1036     * @return the link value
1037     */
1038    @NonNull
1039    public List<Link> getLinks() {
1040      if (_links == null) {
1041        _links = new LinkedList<>();
1042      }
1043      return ObjectUtils.notNull(_links);
1044    }
1045
1046    /**
1047     * Set the "{@literal Link}".
1048     *
1049     * <p>
1050     * A reference to a local or remote resource, that has a specific relation to the containing object.
1051     *
1052     * @param value
1053     *           the link value to set
1054     */
1055    public void setLinks(@NonNull List<Link> value) {
1056      _links = value;
1057    }
1058
1059    /**
1060     * Add a new {@link Link} item to the underlying collection.
1061     * @param item the item to add
1062     * @return {@code true}
1063     */
1064    public boolean addLink(Link item) {
1065      Link value = ObjectUtils.requireNonNull(item,"item cannot be null");
1066      if (_links == null) {
1067        _links = new LinkedList<>();
1068      }
1069      return _links.add(value);
1070    }
1071
1072    /**
1073     * Remove the first matching {@link Link} item from the underlying collection.
1074     * @param item the item to remove
1075     * @return {@code true} if the item was removed or {@code false} otherwise
1076     */
1077    public boolean removeLink(Link item) {
1078      Link value = ObjectUtils.requireNonNull(item,"item cannot be null");
1079      return _links != null && _links.remove(value);
1080    }
1081
1082    /**
1083     * Get the "{@literal Include All}".
1084     *
1085     * <p>
1086     * Include all controls from the imported catalog or profile resources.
1087     *
1088     * @return the include-all value, or {@code null} if not set
1089     */
1090    @Nullable
1091    public IncludeAll getIncludeAll() {
1092      return _includeAll;
1093    }
1094
1095    /**
1096     * Set the "{@literal Include All}".
1097     *
1098     * <p>
1099     * Include all controls from the imported catalog or profile resources.
1100     *
1101     * @param value
1102     *           the include-all value to set, or {@code null} to clear
1103     */
1104    public void setIncludeAll(@Nullable IncludeAll value) {
1105      _includeAll = value;
1106    }
1107
1108    /**
1109     * Get the "{@literal Select Objective}".
1110     *
1111     * <p>
1112     * Used to select a control objective for inclusion/exclusion based on the control objective's identifier.
1113     *
1114     * @return the include-objective value
1115     */
1116    @NonNull
1117    public List<SelectObjectiveById> getIncludeObjectives() {
1118      if (_includeObjectives == null) {
1119        _includeObjectives = new LinkedList<>();
1120      }
1121      return ObjectUtils.notNull(_includeObjectives);
1122    }
1123
1124    /**
1125     * Set the "{@literal Select Objective}".
1126     *
1127     * <p>
1128     * Used to select a control objective for inclusion/exclusion based on the control objective's identifier.
1129     *
1130     * @param value
1131     *           the include-objective value to set
1132     */
1133    public void setIncludeObjectives(@NonNull List<SelectObjectiveById> value) {
1134      _includeObjectives = value;
1135    }
1136
1137    /**
1138     * Add a new {@link SelectObjectiveById} item to the underlying collection.
1139     * @param item the item to add
1140     * @return {@code true}
1141     */
1142    public boolean addIncludeObjective(SelectObjectiveById item) {
1143      SelectObjectiveById value = ObjectUtils.requireNonNull(item,"item cannot be null");
1144      if (_includeObjectives == null) {
1145        _includeObjectives = new LinkedList<>();
1146      }
1147      return _includeObjectives.add(value);
1148    }
1149
1150    /**
1151     * Remove the first matching {@link SelectObjectiveById} item from the underlying collection.
1152     * @param item the item to remove
1153     * @return {@code true} if the item was removed or {@code false} otherwise
1154     */
1155    public boolean removeIncludeObjective(SelectObjectiveById item) {
1156      SelectObjectiveById value = ObjectUtils.requireNonNull(item,"item cannot be null");
1157      return _includeObjectives != null && _includeObjectives.remove(value);
1158    }
1159
1160    /**
1161     * Get the "{@literal Select Objective}".
1162     *
1163     * <p>
1164     * Used to select a control objective for inclusion/exclusion based on the control objective's identifier.
1165     *
1166     * @return the exclude-objective value
1167     */
1168    @NonNull
1169    public List<SelectObjectiveById> getExcludeObjectives() {
1170      if (_excludeObjectives == null) {
1171        _excludeObjectives = new LinkedList<>();
1172      }
1173      return ObjectUtils.notNull(_excludeObjectives);
1174    }
1175
1176    /**
1177     * Set the "{@literal Select Objective}".
1178     *
1179     * <p>
1180     * Used to select a control objective for inclusion/exclusion based on the control objective's identifier.
1181     *
1182     * @param value
1183     *           the exclude-objective value to set
1184     */
1185    public void setExcludeObjectives(@NonNull List<SelectObjectiveById> value) {
1186      _excludeObjectives = value;
1187    }
1188
1189    /**
1190     * Add a new {@link SelectObjectiveById} item to the underlying collection.
1191     * @param item the item to add
1192     * @return {@code true}
1193     */
1194    public boolean addExcludeObjective(SelectObjectiveById item) {
1195      SelectObjectiveById value = ObjectUtils.requireNonNull(item,"item cannot be null");
1196      if (_excludeObjectives == null) {
1197        _excludeObjectives = new LinkedList<>();
1198      }
1199      return _excludeObjectives.add(value);
1200    }
1201
1202    /**
1203     * Remove the first matching {@link SelectObjectiveById} item from the underlying collection.
1204     * @param item the item to remove
1205     * @return {@code true} if the item was removed or {@code false} otherwise
1206     */
1207    public boolean removeExcludeObjective(SelectObjectiveById item) {
1208      SelectObjectiveById value = ObjectUtils.requireNonNull(item,"item cannot be null");
1209      return _excludeObjectives != null && _excludeObjectives.remove(value);
1210    }
1211
1212    /**
1213     * Get the "{@literal Remarks}".
1214     *
1215     * <p>
1216     * Additional commentary about the containing object.
1217     *
1218     * @return the remarks value, or {@code null} if not set
1219     */
1220    @Nullable
1221    public MarkupMultiline getRemarks() {
1222      return _remarks;
1223    }
1224
1225    /**
1226     * Set the "{@literal Remarks}".
1227     *
1228     * <p>
1229     * Additional commentary about the containing object.
1230     *
1231     * @param value
1232     *           the remarks value to set, or {@code null} to clear
1233     */
1234    public void setRemarks(@Nullable MarkupMultiline value) {
1235      _remarks = value;
1236    }
1237
1238    @Override
1239    public String toString() {
1240      return ObjectUtils.notNull(new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString());
1241    }
1242  }
1243}