001// Generated from: ../../../../../../../../oscal/src/metaschema/oscal_ssp_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.DateAdapter;
006import dev.metaschema.core.datatype.adapter.UriAdapter;
007import dev.metaschema.core.datatype.adapter.UriReferenceAdapter;
008import dev.metaschema.core.datatype.adapter.UuidAdapter;
009import dev.metaschema.core.datatype.markup.MarkupLine;
010import dev.metaschema.core.datatype.markup.MarkupLineAdapter;
011import dev.metaschema.core.datatype.markup.MarkupMultiline;
012import dev.metaschema.core.datatype.markup.MarkupMultilineAdapter;
013import dev.metaschema.core.datatype.object.AmbiguousDate;
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.BoundField;
024import dev.metaschema.databind.model.annotations.BoundFlag;
025import dev.metaschema.databind.model.annotations.GroupAs;
026import dev.metaschema.databind.model.annotations.Index;
027import dev.metaschema.databind.model.annotations.IndexHasKey;
028import dev.metaschema.databind.model.annotations.IsUnique;
029import dev.metaschema.databind.model.annotations.KeyField;
030import dev.metaschema.databind.model.annotations.Matches;
031import dev.metaschema.databind.model.annotations.MetaschemaAssembly;
032import dev.metaschema.databind.model.annotations.ValueConstraints;
033import edu.umd.cs.findbugs.annotations.NonNull;
034import edu.umd.cs.findbugs.annotations.Nullable;
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 * Provides information as to how the system is implemented.
043 */
044@MetaschemaAssembly(
045    formalName = "System Implementation",
046    description = "Provides information as to how the system is implemented.",
047    name = "system-implementation",
048    moduleClass = OscalSspModule.class,
049    valueConstraints = @ValueConstraints(allowedValues = @AllowedValues(id = "oscal-component-inventory-item-allows-authenticated-scan-values", level = IConstraint.Level.ERROR, target = "(component | inventory-item)/prop[has-oscal-namespace('http://csrc.nist.gov/ns/oscal') and @name='allows-authenticated-scan']/@value", values = {@AllowedValue(value = "yes", description = "The component allows an authenticated scan."), @AllowedValue(value = "no", description = "The component does not allow an authenticated scan.")}), indexHasKey = {@IndexHasKey(id = "oscal-system-implementation-component-prop-leveraged-authorization-uuid-index", level = IConstraint.Level.ERROR, target = "component/prop[@name='leveraged-authorization-uuid']", indexName = "index-system-implementation-leveraged-authorization-uuid", keyFields = @KeyField(target = "@value")), @IndexHasKey(id = "oscal-system-implementation-component-depends-on-link-index", level = IConstraint.Level.ERROR, target = "component/link[@rel='depends-on']", indexName = "index-system-implementation-component-uuid", keyFields = @KeyField(target = "@href")), @IndexHasKey(id = "oscal-system-implementation-validated-by-index", level = IConstraint.Level.ERROR, target = "component/link[@rel='validated-by']", indexName = "index-system-implementation-component-uuid-validation", keyFields = @KeyField(target = "@href")), @IndexHasKey(id = "oscal-system-implementation-proof-of-compliance-index", level = IConstraint.Level.ERROR, target = "component/link[@rel='proof-of-compliance']", indexName = "index-system-implementation-component-uuid-validation", keyFields = @KeyField(target = "@href")), @IndexHasKey(id = "oscal-index-system-implementation-component-uuid-service", level = IConstraint.Level.ERROR, target = "component/link[@rel='uses-service']", indexName = "index-system-implementation-component-uuid-service", keyFields = @KeyField(target = "@href"))}),
050    modelConstraints = @AssemblyConstraints(index = {@Index(id = "oscal-system-implementation-component-leveraged-authorization-uuid-index", level = IConstraint.Level.ERROR, target = "leveraged-authorization", name = "index-system-implementation-leveraged-authorization-uuid", keyFields = @KeyField(target = "@uuid")), @Index(id = "oscal-system-implementation-component-uuid-index", level = IConstraint.Level.ERROR, target = "component", name = "index-system-implementation-component-uuid", keyFields = @KeyField(target = "@uuid")), @Index(id = "oscal-system-implementation-component-validation-uuid-index", level = IConstraint.Level.ERROR, target = "component[@type='validation']", name = "index-system-implementation-component-uuid-validation", keyFields = @KeyField(target = "@uuid")), @Index(id = "oscal-index-system-implementation-component-uuid-service", level = IConstraint.Level.ERROR, target = "component[@type='service']", name = "index-system-implementation-component-uuid-service", keyFields = @KeyField(target = "@uuid"))}, unique = @IsUnique(id = "oscal-unique-ssp-system-implementation-user", level = IConstraint.Level.ERROR, target = "user", keyFields = @KeyField(target = "@uuid"), remarks = "A given `uuid` must be assigned only once to a user."))
051)
052public class SystemImplementation implements IBoundObject {
053  private final IMetaschemaData __metaschemaData;
054
055  /**
056   * An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair.
057   */
058  @BoundAssembly(
059      formalName = "Property",
060      description = "An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair.",
061      useName = "prop",
062      maxOccurs = -1,
063      groupAs = @GroupAs(name = "props", inJson = JsonGroupAsBehavior.LIST)
064  )
065  private List<Property> _props;
066
067  /**
068   * A reference to a local or remote resource, that has a specific relation to the containing object.
069   */
070  @BoundAssembly(
071      formalName = "Link",
072      description = "A reference to a local or remote resource, that has a specific relation to the containing object.",
073      useName = "link",
074      maxOccurs = -1,
075      groupAs = @GroupAs(name = "links", inJson = JsonGroupAsBehavior.LIST)
076  )
077  private List<Link> _links;
078
079  /**
080   * A description of another authorized system from which this system inherits capabilities that satisfy security requirements. Another term for this concept is a <em>common control provider</em>.
081   */
082  @BoundAssembly(
083      formalName = "Leveraged Authorization",
084      description = "A description of another authorized system from which this system inherits capabilities that satisfy security requirements. Another term for this concept is a *common control provider*.",
085      useName = "leveraged-authorization",
086      maxOccurs = -1,
087      groupAs = @GroupAs(name = "leveraged-authorizations", inJson = JsonGroupAsBehavior.LIST)
088  )
089  private List<LeveragedAuthorization> _leveragedAuthorizations;
090
091  /**
092   * A type of user that interacts with the system based on an associated role.
093   */
094  @BoundAssembly(
095      formalName = "System User",
096      description = "A type of user that interacts with the system based on an associated role.",
097      useName = "user",
098      maxOccurs = -1,
099      groupAs = @GroupAs(name = "users", inJson = JsonGroupAsBehavior.LIST)
100  )
101  private List<SystemUser> _users;
102
103  /**
104   * A defined component that can be part of an implemented system.
105   */
106  @BoundAssembly(
107      formalName = "Component",
108      description = "A defined component that can be part of an implemented system.",
109      useName = "component",
110      minOccurs = 1,
111      maxOccurs = -1,
112      groupAs = @GroupAs(name = "components", inJson = JsonGroupAsBehavior.LIST)
113  )
114  private List<SystemComponent> _components;
115
116  /**
117   * A single managed inventory item within the system.
118   */
119  @BoundAssembly(
120      formalName = "Inventory Item",
121      description = "A single managed inventory item within the system.",
122      useName = "inventory-item",
123      remarks = "A set of `inventory-item` entries that represent the managed inventory instances of the system.",
124      maxOccurs = -1,
125      groupAs = @GroupAs(name = "inventory-items", inJson = JsonGroupAsBehavior.LIST)
126  )
127  private List<InventoryItem> _inventoryItems;
128
129  /**
130   * Additional commentary about the containing object.
131   */
132  @BoundField(
133      formalName = "Remarks",
134      description = "Additional commentary about the containing object.",
135      useName = "remarks",
136      typeAdapter = MarkupMultilineAdapter.class
137  )
138  private MarkupMultiline _remarks;
139
140  /**
141   * Constructs a new {@code dev.metaschema.oscal.lib.model.SystemImplementation} instance with no metadata.
142   */
143  public SystemImplementation() {
144    this(null);
145  }
146
147  /**
148   * Constructs a new {@code dev.metaschema.oscal.lib.model.SystemImplementation} instance with the specified metadata.
149   *
150   * @param data
151   *           the metaschema data, or {@code null} if none
152   */
153  public SystemImplementation(IMetaschemaData data) {
154    this.__metaschemaData = data;
155  }
156
157  @Override
158  public IMetaschemaData getMetaschemaData() {
159    return __metaschemaData;
160  }
161
162  /**
163   * Get the "{@literal Property}".
164   *
165   * <p>
166   * An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair.
167   *
168   * @return the prop value
169   */
170  @NonNull
171  public List<Property> getProps() {
172    if (_props == null) {
173      _props = new LinkedList<>();
174    }
175    return ObjectUtils.notNull(_props);
176  }
177
178  /**
179   * Set the "{@literal Property}".
180   *
181   * <p>
182   * An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair.
183   *
184   * @param value
185   *           the prop value to set
186   */
187  public void setProps(@NonNull List<Property> value) {
188    _props = value;
189  }
190
191  /**
192   * Add a new {@link Property} item to the underlying collection.
193   * @param item the item to add
194   * @return {@code true}
195   */
196  public boolean addProp(Property item) {
197    Property value = ObjectUtils.requireNonNull(item,"item cannot be null");
198    if (_props == null) {
199      _props = new LinkedList<>();
200    }
201    return _props.add(value);
202  }
203
204  /**
205   * Remove the first matching {@link Property} item from the underlying collection.
206   * @param item the item to remove
207   * @return {@code true} if the item was removed or {@code false} otherwise
208   */
209  public boolean removeProp(Property item) {
210    Property value = ObjectUtils.requireNonNull(item,"item cannot be null");
211    return _props != null && _props.remove(value);
212  }
213
214  /**
215   * Get the "{@literal Link}".
216   *
217   * <p>
218   * A reference to a local or remote resource, that has a specific relation to the containing object.
219   *
220   * @return the link value
221   */
222  @NonNull
223  public List<Link> getLinks() {
224    if (_links == null) {
225      _links = new LinkedList<>();
226    }
227    return ObjectUtils.notNull(_links);
228  }
229
230  /**
231   * Set the "{@literal Link}".
232   *
233   * <p>
234   * A reference to a local or remote resource, that has a specific relation to the containing object.
235   *
236   * @param value
237   *           the link value to set
238   */
239  public void setLinks(@NonNull List<Link> value) {
240    _links = value;
241  }
242
243  /**
244   * Add a new {@link Link} item to the underlying collection.
245   * @param item the item to add
246   * @return {@code true}
247   */
248  public boolean addLink(Link item) {
249    Link value = ObjectUtils.requireNonNull(item,"item cannot be null");
250    if (_links == null) {
251      _links = new LinkedList<>();
252    }
253    return _links.add(value);
254  }
255
256  /**
257   * Remove the first matching {@link Link} item from the underlying collection.
258   * @param item the item to remove
259   * @return {@code true} if the item was removed or {@code false} otherwise
260   */
261  public boolean removeLink(Link item) {
262    Link value = ObjectUtils.requireNonNull(item,"item cannot be null");
263    return _links != null && _links.remove(value);
264  }
265
266  /**
267   * Get the "{@literal Leveraged Authorization}".
268   *
269   * <p>
270   * A description of another authorized system from which this system inherits capabilities that satisfy security requirements. Another term for this concept is a <em>common control provider</em>.
271   *
272   * @return the leveraged-authorization value
273   */
274  @NonNull
275  public List<LeveragedAuthorization> getLeveragedAuthorizations() {
276    if (_leveragedAuthorizations == null) {
277      _leveragedAuthorizations = new LinkedList<>();
278    }
279    return ObjectUtils.notNull(_leveragedAuthorizations);
280  }
281
282  /**
283   * Set the "{@literal Leveraged Authorization}".
284   *
285   * <p>
286   * A description of another authorized system from which this system inherits capabilities that satisfy security requirements. Another term for this concept is a <em>common control provider</em>.
287   *
288   * @param value
289   *           the leveraged-authorization value to set
290   */
291  public void setLeveragedAuthorizations(@NonNull List<LeveragedAuthorization> value) {
292    _leveragedAuthorizations = value;
293  }
294
295  /**
296   * Add a new {@link LeveragedAuthorization} item to the underlying collection.
297   * @param item the item to add
298   * @return {@code true}
299   */
300  public boolean addLeveragedAuthorization(LeveragedAuthorization item) {
301    LeveragedAuthorization value = ObjectUtils.requireNonNull(item,"item cannot be null");
302    if (_leveragedAuthorizations == null) {
303      _leveragedAuthorizations = new LinkedList<>();
304    }
305    return _leveragedAuthorizations.add(value);
306  }
307
308  /**
309   * Remove the first matching {@link LeveragedAuthorization} item from the underlying collection.
310   * @param item the item to remove
311   * @return {@code true} if the item was removed or {@code false} otherwise
312   */
313  public boolean removeLeveragedAuthorization(LeveragedAuthorization item) {
314    LeveragedAuthorization value = ObjectUtils.requireNonNull(item,"item cannot be null");
315    return _leveragedAuthorizations != null && _leveragedAuthorizations.remove(value);
316  }
317
318  /**
319   * Get the "{@literal System User}".
320   *
321   * <p>
322   * A type of user that interacts with the system based on an associated role.
323   *
324   * @return the user value
325   */
326  @NonNull
327  public List<SystemUser> getUsers() {
328    if (_users == null) {
329      _users = new LinkedList<>();
330    }
331    return ObjectUtils.notNull(_users);
332  }
333
334  /**
335   * Set the "{@literal System User}".
336   *
337   * <p>
338   * A type of user that interacts with the system based on an associated role.
339   *
340   * @param value
341   *           the user value to set
342   */
343  public void setUsers(@NonNull List<SystemUser> value) {
344    _users = value;
345  }
346
347  /**
348   * Add a new {@link SystemUser} item to the underlying collection.
349   * @param item the item to add
350   * @return {@code true}
351   */
352  public boolean addUser(SystemUser item) {
353    SystemUser value = ObjectUtils.requireNonNull(item,"item cannot be null");
354    if (_users == null) {
355      _users = new LinkedList<>();
356    }
357    return _users.add(value);
358  }
359
360  /**
361   * Remove the first matching {@link SystemUser} item from the underlying collection.
362   * @param item the item to remove
363   * @return {@code true} if the item was removed or {@code false} otherwise
364   */
365  public boolean removeUser(SystemUser item) {
366    SystemUser value = ObjectUtils.requireNonNull(item,"item cannot be null");
367    return _users != null && _users.remove(value);
368  }
369
370  /**
371   * Get the "{@literal Component}".
372   *
373   * <p>
374   * A defined component that can be part of an implemented system.
375   *
376   * @return the component value
377   */
378  @NonNull
379  public List<SystemComponent> getComponents() {
380    if (_components == null) {
381      _components = new LinkedList<>();
382    }
383    return ObjectUtils.notNull(_components);
384  }
385
386  /**
387   * Set the "{@literal Component}".
388   *
389   * <p>
390   * A defined component that can be part of an implemented system.
391   *
392   * @param value
393   *           the component value to set
394   */
395  public void setComponents(@NonNull List<SystemComponent> value) {
396    _components = value;
397  }
398
399  /**
400   * Add a new {@link SystemComponent} item to the underlying collection.
401   * @param item the item to add
402   * @return {@code true}
403   */
404  public boolean addComponent(SystemComponent item) {
405    SystemComponent value = ObjectUtils.requireNonNull(item,"item cannot be null");
406    if (_components == null) {
407      _components = new LinkedList<>();
408    }
409    return _components.add(value);
410  }
411
412  /**
413   * Remove the first matching {@link SystemComponent} item from the underlying collection.
414   * @param item the item to remove
415   * @return {@code true} if the item was removed or {@code false} otherwise
416   */
417  public boolean removeComponent(SystemComponent item) {
418    SystemComponent value = ObjectUtils.requireNonNull(item,"item cannot be null");
419    return _components != null && _components.remove(value);
420  }
421
422  /**
423   * Get the "{@literal Inventory Item}".
424   *
425   * <p>
426   * A single managed inventory item within the system.
427   *
428   * @return the inventory-item value
429   */
430  @NonNull
431  public List<InventoryItem> getInventoryItems() {
432    if (_inventoryItems == null) {
433      _inventoryItems = new LinkedList<>();
434    }
435    return ObjectUtils.notNull(_inventoryItems);
436  }
437
438  /**
439   * Set the "{@literal Inventory Item}".
440   *
441   * <p>
442   * A single managed inventory item within the system.
443   *
444   * @param value
445   *           the inventory-item value to set
446   */
447  public void setInventoryItems(@NonNull List<InventoryItem> value) {
448    _inventoryItems = value;
449  }
450
451  /**
452   * Add a new {@link InventoryItem} item to the underlying collection.
453   * @param item the item to add
454   * @return {@code true}
455   */
456  public boolean addInventoryItem(InventoryItem item) {
457    InventoryItem value = ObjectUtils.requireNonNull(item,"item cannot be null");
458    if (_inventoryItems == null) {
459      _inventoryItems = new LinkedList<>();
460    }
461    return _inventoryItems.add(value);
462  }
463
464  /**
465   * Remove the first matching {@link InventoryItem} item from the underlying collection.
466   * @param item the item to remove
467   * @return {@code true} if the item was removed or {@code false} otherwise
468   */
469  public boolean removeInventoryItem(InventoryItem item) {
470    InventoryItem value = ObjectUtils.requireNonNull(item,"item cannot be null");
471    return _inventoryItems != null && _inventoryItems.remove(value);
472  }
473
474  /**
475   * Get the "{@literal Remarks}".
476   *
477   * <p>
478   * Additional commentary about the containing object.
479   *
480   * @return the remarks value, or {@code null} if not set
481   */
482  @Nullable
483  public MarkupMultiline getRemarks() {
484    return _remarks;
485  }
486
487  /**
488   * Set the "{@literal Remarks}".
489   *
490   * <p>
491   * Additional commentary about the containing object.
492   *
493   * @param value
494   *           the remarks value to set, or {@code null} to clear
495   */
496  public void setRemarks(@Nullable MarkupMultiline value) {
497    _remarks = value;
498  }
499
500  @Override
501  public String toString() {
502    return ObjectUtils.notNull(new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString());
503  }
504
505  /**
506   * A description of another authorized system from which this system inherits capabilities that satisfy security requirements. Another term for this concept is a <em>common control provider</em>.
507   */
508  @MetaschemaAssembly(
509      formalName = "Leveraged Authorization",
510      description = "A description of another authorized system from which this system inherits capabilities that satisfy security requirements. Another term for this concept is a *common control provider*.",
511      name = "leveraged-authorization",
512      moduleClass = OscalSspModule.class,
513      valueConstraints = @ValueConstraints(allowedValues = @AllowedValues(id = "oscal-leveraged-authorization-link-rel-values", level = IConstraint.Level.ERROR, target = "link/@rel", allowOthers = true, values = @AllowedValue(value = "system-security-plan", description = "A reference to the system security plan for the leveraged authorization.")), indexHasKey = @IndexHasKey(id = "oscal-leveraged-authorization-index-back-matter-resource-ssp", level = IConstraint.Level.ERROR, target = "link[@rel='system-security-plan' and starts-with(@href,'#')]", indexName = "index-back-matter-resource", keyFields = @KeyField(target = "@href", pattern = "#(.*)")), matches = {@Matches(id = "oscal-leveraged-authorization-link-rel-ssp-datatype-uri-reference", level = IConstraint.Level.ERROR, target = "link[@rel='system-security-plan']/@href[starts-with(.,'#')]", typeAdapter = UriReferenceAdapter.class), @Matches(id = "oscal-leveraged-authorization-link-rel-ssp-datatype-uri", level = IConstraint.Level.ERROR, target = "link[@rel='system-security-plan']/@href[not(starts-with(.,'#'))]", typeAdapter = UriAdapter.class)})
514  )
515  public static class LeveragedAuthorization implements IBoundObject {
516    private final IMetaschemaData __metaschemaData;
517
518    /**
519     * 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 and can be used to reference this leveraged authorization elsewhere in <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#ssp-identifiers">this or other OSCAL instances</a>. The locally defined <em>UUID</em> of the <code>leveraged authorization</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.
520     */
521    @BoundFlag(
522        formalName = "Leveraged Authorization Universally Unique Identifier",
523        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 and can be used to reference this leveraged authorization elsewhere in [this or other OSCAL instances](https://pages.nist.gov/OSCAL/concepts/identifier-use/#ssp-identifiers). The locally defined *UUID* of the `leveraged authorization` 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.",
524        name = "uuid",
525        required = true,
526        typeAdapter = UuidAdapter.class
527    )
528    private UUID _uuid;
529
530    /**
531     * A human readable name for the leveraged authorization in the context of the system.
532     */
533    @BoundField(
534        formalName = "title field",
535        description = "A human readable name for the leveraged authorization in the context of the system.",
536        useName = "title",
537        minOccurs = 1,
538        typeAdapter = MarkupLineAdapter.class
539    )
540    private MarkupLine _title;
541
542    /**
543     * An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair.
544     */
545    @BoundAssembly(
546        formalName = "Property",
547        description = "An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair.",
548        useName = "prop",
549        maxOccurs = -1,
550        groupAs = @GroupAs(name = "props", inJson = JsonGroupAsBehavior.LIST)
551    )
552    private List<Property> _props;
553
554    /**
555     * A reference to a local or remote resource, that has a specific relation to the containing object.
556     */
557    @BoundAssembly(
558        formalName = "Link",
559        description = "A reference to a local or remote resource, that has a specific relation to the containing object.",
560        useName = "link",
561        maxOccurs = -1,
562        groupAs = @GroupAs(name = "links", inJson = JsonGroupAsBehavior.LIST)
563    )
564    private List<Link> _links;
565
566    /**
567     * A <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented">machine-oriented</a> identifier reference to the <code>party</code> that manages the leveraged system.
568     */
569    @BoundField(
570        formalName = "party-uuid field",
571        description = "A [machine-oriented](https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented) identifier reference to the `party` that manages the leveraged system.",
572        useName = "party-uuid",
573        minOccurs = 1,
574        typeAdapter = UuidAdapter.class
575    )
576    private UUID _partyUuid;
577
578    /**
579     * The date the system received its authorization.
580     */
581    @BoundField(
582        formalName = "System Authorization Date",
583        description = "The date the system received its authorization.",
584        useName = "date-authorized",
585        minOccurs = 1,
586        typeAdapter = DateAdapter.class
587    )
588    private AmbiguousDate _dateAuthorized;
589
590    /**
591     * Additional commentary about the containing object.
592     */
593    @BoundField(
594        formalName = "Remarks",
595        description = "Additional commentary about the containing object.",
596        useName = "remarks",
597        typeAdapter = MarkupMultilineAdapter.class
598    )
599    private MarkupMultiline _remarks;
600
601    /**
602     * Constructs a new {@code dev.metaschema.oscal.lib.model.SystemImplementation.LeveragedAuthorization} instance with no metadata.
603     */
604    public LeveragedAuthorization() {
605      this(null);
606    }
607
608    /**
609     * Constructs a new {@code dev.metaschema.oscal.lib.model.SystemImplementation.LeveragedAuthorization} instance with the specified metadata.
610     *
611     * @param data
612     *           the metaschema data, or {@code null} if none
613     */
614    public LeveragedAuthorization(IMetaschemaData data) {
615      this.__metaschemaData = data;
616    }
617
618    @Override
619    public IMetaschemaData getMetaschemaData() {
620      return __metaschemaData;
621    }
622
623    /**
624     * Get the "{@literal Leveraged Authorization Universally Unique Identifier}".
625     *
626     * <p>
627     * 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 and can be used to reference this leveraged authorization elsewhere in <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#ssp-identifiers">this or other OSCAL instances</a>. The locally defined <em>UUID</em> of the <code>leveraged authorization</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.
628     *
629     * @return the uuid value
630     */
631    @NonNull
632    public UUID getUuid() {
633      return _uuid;
634    }
635
636    /**
637     * Set the "{@literal Leveraged Authorization Universally Unique Identifier}".
638     *
639     * <p>
640     * 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 and can be used to reference this leveraged authorization elsewhere in <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#ssp-identifiers">this or other OSCAL instances</a>. The locally defined <em>UUID</em> of the <code>leveraged authorization</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.
641     *
642     * @param value
643     *           the uuid value to set
644     */
645    public void setUuid(@NonNull UUID value) {
646      _uuid = value;
647    }
648
649    /**
650     * Get the "{@literal title field}".
651     *
652     * <p>
653     * A human readable name for the leveraged authorization in the context of the system.
654     *
655     * @return the title value
656     */
657    @NonNull
658    public MarkupLine getTitle() {
659      return _title;
660    }
661
662    /**
663     * Set the "{@literal title field}".
664     *
665     * <p>
666     * A human readable name for the leveraged authorization in the context of the system.
667     *
668     * @param value
669     *           the title value to set
670     */
671    public void setTitle(@NonNull MarkupLine value) {
672      _title = value;
673    }
674
675    /**
676     * Get the "{@literal Property}".
677     *
678     * <p>
679     * An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair.
680     *
681     * @return the prop value
682     */
683    @NonNull
684    public List<Property> getProps() {
685      if (_props == null) {
686        _props = new LinkedList<>();
687      }
688      return ObjectUtils.notNull(_props);
689    }
690
691    /**
692     * Set the "{@literal Property}".
693     *
694     * <p>
695     * An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair.
696     *
697     * @param value
698     *           the prop value to set
699     */
700    public void setProps(@NonNull List<Property> value) {
701      _props = value;
702    }
703
704    /**
705     * Add a new {@link Property} item to the underlying collection.
706     * @param item the item to add
707     * @return {@code true}
708     */
709    public boolean addProp(Property item) {
710      Property value = ObjectUtils.requireNonNull(item,"item cannot be null");
711      if (_props == null) {
712        _props = new LinkedList<>();
713      }
714      return _props.add(value);
715    }
716
717    /**
718     * Remove the first matching {@link Property} item from the underlying collection.
719     * @param item the item to remove
720     * @return {@code true} if the item was removed or {@code false} otherwise
721     */
722    public boolean removeProp(Property item) {
723      Property value = ObjectUtils.requireNonNull(item,"item cannot be null");
724      return _props != null && _props.remove(value);
725    }
726
727    /**
728     * Get the "{@literal Link}".
729     *
730     * <p>
731     * A reference to a local or remote resource, that has a specific relation to the containing object.
732     *
733     * @return the link value
734     */
735    @NonNull
736    public List<Link> getLinks() {
737      if (_links == null) {
738        _links = new LinkedList<>();
739      }
740      return ObjectUtils.notNull(_links);
741    }
742
743    /**
744     * Set the "{@literal Link}".
745     *
746     * <p>
747     * A reference to a local or remote resource, that has a specific relation to the containing object.
748     *
749     * @param value
750     *           the link value to set
751     */
752    public void setLinks(@NonNull List<Link> value) {
753      _links = value;
754    }
755
756    /**
757     * Add a new {@link Link} item to the underlying collection.
758     * @param item the item to add
759     * @return {@code true}
760     */
761    public boolean addLink(Link item) {
762      Link value = ObjectUtils.requireNonNull(item,"item cannot be null");
763      if (_links == null) {
764        _links = new LinkedList<>();
765      }
766      return _links.add(value);
767    }
768
769    /**
770     * Remove the first matching {@link Link} item from the underlying collection.
771     * @param item the item to remove
772     * @return {@code true} if the item was removed or {@code false} otherwise
773     */
774    public boolean removeLink(Link item) {
775      Link value = ObjectUtils.requireNonNull(item,"item cannot be null");
776      return _links != null && _links.remove(value);
777    }
778
779    /**
780     * Get the "{@literal party-uuid field}".
781     *
782     * <p>
783     * A <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented">machine-oriented</a> identifier reference to the <code>party</code> that manages the leveraged system.
784     *
785     * @return the party-uuid value
786     */
787    @NonNull
788    public UUID getPartyUuid() {
789      return _partyUuid;
790    }
791
792    /**
793     * Set the "{@literal party-uuid field}".
794     *
795     * <p>
796     * A <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented">machine-oriented</a> identifier reference to the <code>party</code> that manages the leveraged system.
797     *
798     * @param value
799     *           the party-uuid value to set
800     */
801    public void setPartyUuid(@NonNull UUID value) {
802      _partyUuid = value;
803    }
804
805    /**
806     * Get the "{@literal System Authorization Date}".
807     *
808     * <p>
809     * The date the system received its authorization.
810     *
811     * @return the date-authorized value
812     */
813    @NonNull
814    public AmbiguousDate getDateAuthorized() {
815      return _dateAuthorized;
816    }
817
818    /**
819     * Set the "{@literal System Authorization Date}".
820     *
821     * <p>
822     * The date the system received its authorization.
823     *
824     * @param value
825     *           the date-authorized value to set
826     */
827    public void setDateAuthorized(@NonNull AmbiguousDate value) {
828      _dateAuthorized = value;
829    }
830
831    /**
832     * Get the "{@literal Remarks}".
833     *
834     * <p>
835     * Additional commentary about the containing object.
836     *
837     * @return the remarks value, or {@code null} if not set
838     */
839    @Nullable
840    public MarkupMultiline getRemarks() {
841      return _remarks;
842    }
843
844    /**
845     * Set the "{@literal Remarks}".
846     *
847     * <p>
848     * Additional commentary about the containing object.
849     *
850     * @param value
851     *           the remarks value to set, or {@code null} to clear
852     */
853    public void setRemarks(@Nullable MarkupMultiline value) {
854      _remarks = value;
855    }
856
857    @Override
858    public String toString() {
859      return ObjectUtils.notNull(new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString());
860    }
861  }
862}