001// Generated from: ../../../../../../../../oscal/src/metaschema/oscal_poam_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.UuidAdapter; 006import dev.metaschema.core.datatype.markup.MarkupLine; 007import dev.metaschema.core.datatype.markup.MarkupLineAdapter; 008import dev.metaschema.core.datatype.markup.MarkupMultiline; 009import dev.metaschema.core.datatype.markup.MarkupMultilineAdapter; 010import dev.metaschema.core.model.IBoundObject; 011import dev.metaschema.core.model.IMetaschemaData; 012import dev.metaschema.core.model.JsonGroupAsBehavior; 013import dev.metaschema.core.model.constraint.IConstraint; 014import dev.metaschema.core.util.ObjectUtils; 015import dev.metaschema.databind.model.annotations.BoundAssembly; 016import dev.metaschema.databind.model.annotations.BoundField; 017import dev.metaschema.databind.model.annotations.BoundFlag; 018import dev.metaschema.databind.model.annotations.Expect; 019import dev.metaschema.databind.model.annotations.GroupAs; 020import dev.metaschema.databind.model.annotations.MetaschemaAssembly; 021import dev.metaschema.databind.model.annotations.ValueConstraints; 022import edu.umd.cs.findbugs.annotations.NonNull; 023import edu.umd.cs.findbugs.annotations.Nullable; 024import java.util.LinkedList; 025import java.util.List; 026import java.util.UUID; 027import org.apache.commons.lang3.builder.ReflectionToStringBuilder; 028import org.apache.commons.lang3.builder.ToStringStyle; 029 030/** 031 * Describes an individual POA&M item. 032 */ 033@MetaschemaAssembly( 034 formalName = "POA&M Item", 035 description = "Describes an individual POA\\&M item.", 036 name = "poam-item", 037 moduleClass = OscalPoamModule.class, 038 valueConstraints = @ValueConstraints(expect = @Expect(id = "oscal-poam-item-uuid", level = IConstraint.Level.WARNING, test = "@uuid", message = "It is a best practice to provide a UUID.")) 039) 040public class PoamItem implements IBoundObject { 041 private final IMetaschemaData __metaschemaData; 042 043 /** 044 * 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/#instance">instance</a> scope that can be used to reference this POA&M item entry in <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#poam-identifiers">this OSCAL instance</a>. 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. 045 */ 046 @BoundFlag( 047 formalName = "POA&M Item Universally Unique Identifier", 048 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 [instance](https://pages.nist.gov/OSCAL/concepts/identifier-use/#instance) scope that can be used to reference this POA\\&M item entry in [this OSCAL instance](https://pages.nist.gov/OSCAL/concepts/identifier-use/#poam-identifiers). 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.", 049 name = "uuid", 050 typeAdapter = UuidAdapter.class 051 ) 052 private UUID _uuid; 053 054 /** 055 * The title or name for this POA&M item . 056 */ 057 @BoundField( 058 formalName = "POA&M Item Title", 059 description = "The title or name for this POA\\&M item .", 060 useName = "title", 061 minOccurs = 1, 062 typeAdapter = MarkupLineAdapter.class 063 ) 064 private MarkupLine _title; 065 066 /** 067 * A human-readable description of POA&M item. 068 */ 069 @BoundField( 070 formalName = "POA&M Item Description", 071 description = "A human-readable description of POA\\&M item.", 072 useName = "description", 073 minOccurs = 1, 074 typeAdapter = MarkupMultilineAdapter.class 075 ) 076 private MarkupMultiline _description; 077 078 /** 079 * An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair. 080 */ 081 @BoundAssembly( 082 formalName = "Property", 083 description = "An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair.", 084 useName = "prop", 085 maxOccurs = -1, 086 groupAs = @GroupAs(name = "props", inJson = JsonGroupAsBehavior.LIST) 087 ) 088 private List<Property> _props; 089 090 /** 091 * A reference to a local or remote resource, that has a specific relation to the containing object. 092 */ 093 @BoundAssembly( 094 formalName = "Link", 095 description = "A reference to a local or remote resource, that has a specific relation to the containing object.", 096 useName = "link", 097 maxOccurs = -1, 098 groupAs = @GroupAs(name = "links", inJson = JsonGroupAsBehavior.LIST) 099 ) 100 private List<Link> _links; 101 102 /** 103 * Identifies the source of the finding, such as a tool or person. 104 */ 105 @BoundAssembly( 106 formalName = "Origin", 107 description = "Identifies the source of the finding, such as a tool or person.", 108 useName = "origin", 109 remarks = "Used to identify the individual and/or tool generated this poam-item.", 110 maxOccurs = -1, 111 groupAs = @GroupAs(name = "origins", inJson = JsonGroupAsBehavior.LIST) 112 ) 113 private List<Origin> _origins; 114 115 /** 116 * Relates the poam-item to referenced finding(s). 117 */ 118 @BoundAssembly( 119 formalName = "Related Finding", 120 description = "Relates the poam-item to referenced finding(s).", 121 useName = "related-finding", 122 maxOccurs = -1, 123 groupAs = @GroupAs(name = "related-findings", inJson = JsonGroupAsBehavior.LIST) 124 ) 125 private List<RelatedFinding> _relatedFindings; 126 127 /** 128 * Relates the poam-item to a set of referenced observations that were used to determine the finding. 129 */ 130 @BoundAssembly( 131 formalName = "Related Observation", 132 description = "Relates the poam-item to a set of referenced observations that were used to determine the finding.", 133 useName = "related-observation", 134 maxOccurs = -1, 135 groupAs = @GroupAs(name = "related-observations", inJson = JsonGroupAsBehavior.LIST) 136 ) 137 private List<RelatedObservation> _relatedObservations; 138 139 /** 140 * Relates the finding to a set of referenced risks that were used to determine the finding. 141 */ 142 @BoundAssembly( 143 formalName = "Associated Risk", 144 description = "Relates the finding to a set of referenced risks that were used to determine the finding.", 145 useName = "associated-risk", 146 maxOccurs = -1, 147 groupAs = @GroupAs(name = "related-risks", inJson = JsonGroupAsBehavior.LIST) 148 ) 149 private List<AssociatedRisk> _relatedRisks; 150 151 /** 152 * Additional commentary about the containing object. 153 */ 154 @BoundField( 155 formalName = "Remarks", 156 description = "Additional commentary about the containing object.", 157 useName = "remarks", 158 typeAdapter = MarkupMultilineAdapter.class 159 ) 160 private MarkupMultiline _remarks; 161 162 /** 163 * Constructs a new {@code dev.metaschema.oscal.lib.model.PoamItem} instance with no metadata. 164 */ 165 public PoamItem() { 166 this(null); 167 } 168 169 /** 170 * Constructs a new {@code dev.metaschema.oscal.lib.model.PoamItem} instance with the specified metadata. 171 * 172 * @param data 173 * the metaschema data, or {@code null} if none 174 */ 175 public PoamItem(IMetaschemaData data) { 176 this.__metaschemaData = data; 177 } 178 179 @Override 180 public IMetaschemaData getMetaschemaData() { 181 return __metaschemaData; 182 } 183 184 /** 185 * Get the "{@literal POA&M Item Universally Unique Identifier}". 186 * 187 * <p> 188 * 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/#instance">instance</a> scope that can be used to reference this POA&M item entry in <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#poam-identifiers">this OSCAL instance</a>. 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. 189 * 190 * @return the uuid value, or {@code null} if not set 191 */ 192 @Nullable 193 public UUID getUuid() { 194 return _uuid; 195 } 196 197 /** 198 * Set the "{@literal POA&M Item Universally Unique Identifier}". 199 * 200 * <p> 201 * 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/#instance">instance</a> scope that can be used to reference this POA&M item entry in <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#poam-identifiers">this OSCAL instance</a>. 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. 202 * 203 * @param value 204 * the uuid value to set, or {@code null} to clear 205 */ 206 public void setUuid(@Nullable UUID value) { 207 _uuid = value; 208 } 209 210 /** 211 * Get the "{@literal POA&M Item Title}". 212 * 213 * <p> 214 * The title or name for this POA&M item . 215 * 216 * @return the title value 217 */ 218 @NonNull 219 public MarkupLine getTitle() { 220 return _title; 221 } 222 223 /** 224 * Set the "{@literal POA&M Item Title}". 225 * 226 * <p> 227 * The title or name for this POA&M item . 228 * 229 * @param value 230 * the title value to set 231 */ 232 public void setTitle(@NonNull MarkupLine value) { 233 _title = value; 234 } 235 236 /** 237 * Get the "{@literal POA&M Item Description}". 238 * 239 * <p> 240 * A human-readable description of POA&M item. 241 * 242 * @return the description value 243 */ 244 @NonNull 245 public MarkupMultiline getDescription() { 246 return _description; 247 } 248 249 /** 250 * Set the "{@literal POA&M Item Description}". 251 * 252 * <p> 253 * A human-readable description of POA&M item. 254 * 255 * @param value 256 * the description value to set 257 */ 258 public void setDescription(@NonNull MarkupMultiline value) { 259 _description = value; 260 } 261 262 /** 263 * Get the "{@literal Property}". 264 * 265 * <p> 266 * An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair. 267 * 268 * @return the prop value 269 */ 270 @NonNull 271 public List<Property> getProps() { 272 if (_props == null) { 273 _props = new LinkedList<>(); 274 } 275 return ObjectUtils.notNull(_props); 276 } 277 278 /** 279 * Set the "{@literal Property}". 280 * 281 * <p> 282 * An attribute, characteristic, or quality of the containing object expressed as a namespace qualified name/value pair. 283 * 284 * @param value 285 * the prop value to set 286 */ 287 public void setProps(@NonNull List<Property> value) { 288 _props = value; 289 } 290 291 /** 292 * Add a new {@link Property} item to the underlying collection. 293 * @param item the item to add 294 * @return {@code true} 295 */ 296 public boolean addProp(Property item) { 297 Property value = ObjectUtils.requireNonNull(item,"item cannot be null"); 298 if (_props == null) { 299 _props = new LinkedList<>(); 300 } 301 return _props.add(value); 302 } 303 304 /** 305 * Remove the first matching {@link Property} item from the underlying collection. 306 * @param item the item to remove 307 * @return {@code true} if the item was removed or {@code false} otherwise 308 */ 309 public boolean removeProp(Property item) { 310 Property value = ObjectUtils.requireNonNull(item,"item cannot be null"); 311 return _props != null && _props.remove(value); 312 } 313 314 /** 315 * Get the "{@literal Link}". 316 * 317 * <p> 318 * A reference to a local or remote resource, that has a specific relation to the containing object. 319 * 320 * @return the link value 321 */ 322 @NonNull 323 public List<Link> getLinks() { 324 if (_links == null) { 325 _links = new LinkedList<>(); 326 } 327 return ObjectUtils.notNull(_links); 328 } 329 330 /** 331 * Set the "{@literal Link}". 332 * 333 * <p> 334 * A reference to a local or remote resource, that has a specific relation to the containing object. 335 * 336 * @param value 337 * the link value to set 338 */ 339 public void setLinks(@NonNull List<Link> value) { 340 _links = value; 341 } 342 343 /** 344 * Add a new {@link Link} item to the underlying collection. 345 * @param item the item to add 346 * @return {@code true} 347 */ 348 public boolean addLink(Link item) { 349 Link value = ObjectUtils.requireNonNull(item,"item cannot be null"); 350 if (_links == null) { 351 _links = new LinkedList<>(); 352 } 353 return _links.add(value); 354 } 355 356 /** 357 * Remove the first matching {@link Link} item from the underlying collection. 358 * @param item the item to remove 359 * @return {@code true} if the item was removed or {@code false} otherwise 360 */ 361 public boolean removeLink(Link item) { 362 Link value = ObjectUtils.requireNonNull(item,"item cannot be null"); 363 return _links != null && _links.remove(value); 364 } 365 366 /** 367 * Get the "{@literal Origin}". 368 * 369 * <p> 370 * Identifies the source of the finding, such as a tool or person. 371 * 372 * @return the origin value 373 */ 374 @NonNull 375 public List<Origin> getOrigins() { 376 if (_origins == null) { 377 _origins = new LinkedList<>(); 378 } 379 return ObjectUtils.notNull(_origins); 380 } 381 382 /** 383 * Set the "{@literal Origin}". 384 * 385 * <p> 386 * Identifies the source of the finding, such as a tool or person. 387 * 388 * @param value 389 * the origin value to set 390 */ 391 public void setOrigins(@NonNull List<Origin> value) { 392 _origins = value; 393 } 394 395 /** 396 * Add a new {@link Origin} item to the underlying collection. 397 * @param item the item to add 398 * @return {@code true} 399 */ 400 public boolean addOrigin(Origin item) { 401 Origin value = ObjectUtils.requireNonNull(item,"item cannot be null"); 402 if (_origins == null) { 403 _origins = new LinkedList<>(); 404 } 405 return _origins.add(value); 406 } 407 408 /** 409 * Remove the first matching {@link Origin} item from the underlying collection. 410 * @param item the item to remove 411 * @return {@code true} if the item was removed or {@code false} otherwise 412 */ 413 public boolean removeOrigin(Origin item) { 414 Origin value = ObjectUtils.requireNonNull(item,"item cannot be null"); 415 return _origins != null && _origins.remove(value); 416 } 417 418 /** 419 * Get the "{@literal Related Finding}". 420 * 421 * <p> 422 * Relates the poam-item to referenced finding(s). 423 * 424 * @return the related-finding value 425 */ 426 @NonNull 427 public List<RelatedFinding> getRelatedFindings() { 428 if (_relatedFindings == null) { 429 _relatedFindings = new LinkedList<>(); 430 } 431 return ObjectUtils.notNull(_relatedFindings); 432 } 433 434 /** 435 * Set the "{@literal Related Finding}". 436 * 437 * <p> 438 * Relates the poam-item to referenced finding(s). 439 * 440 * @param value 441 * the related-finding value to set 442 */ 443 public void setRelatedFindings(@NonNull List<RelatedFinding> value) { 444 _relatedFindings = value; 445 } 446 447 /** 448 * Add a new {@link RelatedFinding} item to the underlying collection. 449 * @param item the item to add 450 * @return {@code true} 451 */ 452 public boolean addRelatedFinding(RelatedFinding item) { 453 RelatedFinding value = ObjectUtils.requireNonNull(item,"item cannot be null"); 454 if (_relatedFindings == null) { 455 _relatedFindings = new LinkedList<>(); 456 } 457 return _relatedFindings.add(value); 458 } 459 460 /** 461 * Remove the first matching {@link RelatedFinding} item from the underlying collection. 462 * @param item the item to remove 463 * @return {@code true} if the item was removed or {@code false} otherwise 464 */ 465 public boolean removeRelatedFinding(RelatedFinding item) { 466 RelatedFinding value = ObjectUtils.requireNonNull(item,"item cannot be null"); 467 return _relatedFindings != null && _relatedFindings.remove(value); 468 } 469 470 /** 471 * Get the "{@literal Related Observation}". 472 * 473 * <p> 474 * Relates the poam-item to a set of referenced observations that were used to determine the finding. 475 * 476 * @return the related-observation value 477 */ 478 @NonNull 479 public List<RelatedObservation> getRelatedObservations() { 480 if (_relatedObservations == null) { 481 _relatedObservations = new LinkedList<>(); 482 } 483 return ObjectUtils.notNull(_relatedObservations); 484 } 485 486 /** 487 * Set the "{@literal Related Observation}". 488 * 489 * <p> 490 * Relates the poam-item to a set of referenced observations that were used to determine the finding. 491 * 492 * @param value 493 * the related-observation value to set 494 */ 495 public void setRelatedObservations(@NonNull List<RelatedObservation> value) { 496 _relatedObservations = value; 497 } 498 499 /** 500 * Add a new {@link RelatedObservation} item to the underlying collection. 501 * @param item the item to add 502 * @return {@code true} 503 */ 504 public boolean addRelatedObservation(RelatedObservation item) { 505 RelatedObservation value = ObjectUtils.requireNonNull(item,"item cannot be null"); 506 if (_relatedObservations == null) { 507 _relatedObservations = new LinkedList<>(); 508 } 509 return _relatedObservations.add(value); 510 } 511 512 /** 513 * Remove the first matching {@link RelatedObservation} item from the underlying collection. 514 * @param item the item to remove 515 * @return {@code true} if the item was removed or {@code false} otherwise 516 */ 517 public boolean removeRelatedObservation(RelatedObservation item) { 518 RelatedObservation value = ObjectUtils.requireNonNull(item,"item cannot be null"); 519 return _relatedObservations != null && _relatedObservations.remove(value); 520 } 521 522 /** 523 * Get the "{@literal Associated Risk}". 524 * 525 * <p> 526 * Relates the finding to a set of referenced risks that were used to determine the finding. 527 * 528 * @return the associated-risk value 529 */ 530 @NonNull 531 public List<AssociatedRisk> getRelatedRisks() { 532 if (_relatedRisks == null) { 533 _relatedRisks = new LinkedList<>(); 534 } 535 return ObjectUtils.notNull(_relatedRisks); 536 } 537 538 /** 539 * Set the "{@literal Associated Risk}". 540 * 541 * <p> 542 * Relates the finding to a set of referenced risks that were used to determine the finding. 543 * 544 * @param value 545 * the associated-risk value to set 546 */ 547 public void setRelatedRisks(@NonNull List<AssociatedRisk> value) { 548 _relatedRisks = value; 549 } 550 551 /** 552 * Add a new {@link AssociatedRisk} item to the underlying collection. 553 * @param item the item to add 554 * @return {@code true} 555 */ 556 public boolean addAssociatedRisk(AssociatedRisk item) { 557 AssociatedRisk value = ObjectUtils.requireNonNull(item,"item cannot be null"); 558 if (_relatedRisks == null) { 559 _relatedRisks = new LinkedList<>(); 560 } 561 return _relatedRisks.add(value); 562 } 563 564 /** 565 * Remove the first matching {@link AssociatedRisk} item from the underlying collection. 566 * @param item the item to remove 567 * @return {@code true} if the item was removed or {@code false} otherwise 568 */ 569 public boolean removeAssociatedRisk(AssociatedRisk item) { 570 AssociatedRisk value = ObjectUtils.requireNonNull(item,"item cannot be null"); 571 return _relatedRisks != null && _relatedRisks.remove(value); 572 } 573 574 /** 575 * Get the "{@literal Remarks}". 576 * 577 * <p> 578 * Additional commentary about the containing object. 579 * 580 * @return the remarks value, or {@code null} if not set 581 */ 582 @Nullable 583 public MarkupMultiline getRemarks() { 584 return _remarks; 585 } 586 587 /** 588 * Set the "{@literal Remarks}". 589 * 590 * <p> 591 * Additional commentary about the containing object. 592 * 593 * @param value 594 * the remarks value to set, or {@code null} to clear 595 */ 596 public void setRemarks(@Nullable MarkupMultiline value) { 597 _remarks = value; 598 } 599 600 @Override 601 public String toString() { 602 return ObjectUtils.notNull(new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString()); 603 } 604 605 /** 606 * Identifies the source of the finding, such as a tool or person. 607 */ 608 @MetaschemaAssembly( 609 formalName = "Origin", 610 description = "Identifies the source of the finding, such as a tool or person.", 611 name = "origin", 612 moduleClass = OscalPoamModule.class, 613 remarks = "Used to identify the individual and/or tool generated this poam-item." 614 ) 615 public static class Origin implements IBoundObject { 616 private final IMetaschemaData __metaschemaData; 617 618 /** 619 * The actor that produces an observation, a finding, or a risk. One or more actor type can be used to specify a person that is using a tool. 620 */ 621 @BoundAssembly( 622 formalName = "Originating Actor", 623 description = "The actor that produces an observation, a finding, or a risk. One or more actor type can be used to specify a person that is using a tool.", 624 useName = "actor", 625 minOccurs = 1, 626 maxOccurs = -1, 627 groupAs = @GroupAs(name = "actors", inJson = JsonGroupAsBehavior.LIST) 628 ) 629 private List<OriginActor> _actors; 630 631 /** 632 * Constructs a new {@code dev.metaschema.oscal.lib.model.PoamItem.Origin} instance with no metadata. 633 */ 634 public Origin() { 635 this(null); 636 } 637 638 /** 639 * Constructs a new {@code dev.metaschema.oscal.lib.model.PoamItem.Origin} instance with the specified metadata. 640 * 641 * @param data 642 * the metaschema data, or {@code null} if none 643 */ 644 public Origin(IMetaschemaData data) { 645 this.__metaschemaData = data; 646 } 647 648 @Override 649 public IMetaschemaData getMetaschemaData() { 650 return __metaschemaData; 651 } 652 653 /** 654 * Get the "{@literal Originating Actor}". 655 * 656 * <p> 657 * The actor that produces an observation, a finding, or a risk. One or more actor type can be used to specify a person that is using a tool. 658 * 659 * @return the actor value 660 */ 661 @NonNull 662 public List<OriginActor> getActors() { 663 if (_actors == null) { 664 _actors = new LinkedList<>(); 665 } 666 return ObjectUtils.notNull(_actors); 667 } 668 669 /** 670 * Set the "{@literal Originating Actor}". 671 * 672 * <p> 673 * The actor that produces an observation, a finding, or a risk. One or more actor type can be used to specify a person that is using a tool. 674 * 675 * @param value 676 * the actor value to set 677 */ 678 public void setActors(@NonNull List<OriginActor> value) { 679 _actors = value; 680 } 681 682 /** 683 * Add a new {@link OriginActor} item to the underlying collection. 684 * @param item the item to add 685 * @return {@code true} 686 */ 687 public boolean addActor(OriginActor item) { 688 OriginActor value = ObjectUtils.requireNonNull(item,"item cannot be null"); 689 if (_actors == null) { 690 _actors = new LinkedList<>(); 691 } 692 return _actors.add(value); 693 } 694 695 /** 696 * Remove the first matching {@link OriginActor} item from the underlying collection. 697 * @param item the item to remove 698 * @return {@code true} if the item was removed or {@code false} otherwise 699 */ 700 public boolean removeActor(OriginActor item) { 701 OriginActor value = ObjectUtils.requireNonNull(item,"item cannot be null"); 702 return _actors != null && _actors.remove(value); 703 } 704 705 @Override 706 public String toString() { 707 return ObjectUtils.notNull(new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString()); 708 } 709 } 710 711 /** 712 * Relates the poam-item to referenced finding(s). 713 */ 714 @MetaschemaAssembly( 715 formalName = "Related Finding", 716 description = "Relates the poam-item to referenced finding(s).", 717 name = "related-finding", 718 moduleClass = OscalPoamModule.class 719 ) 720 public static class RelatedFinding implements IBoundObject { 721 private final IMetaschemaData __metaschemaData; 722 723 /** 724 * A <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented">machine-oriented</a> identifier reference to a finding defined in the list of findings. 725 */ 726 @BoundFlag( 727 formalName = "Finding Universally Unique Identifier Reference", 728 description = "A [machine-oriented](https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented) identifier reference to a finding defined in the list of findings.", 729 name = "finding-uuid", 730 required = true, 731 typeAdapter = UuidAdapter.class 732 ) 733 private UUID _findingUuid; 734 735 /** 736 * Constructs a new {@code dev.metaschema.oscal.lib.model.PoamItem.RelatedFinding} instance with no metadata. 737 */ 738 public RelatedFinding() { 739 this(null); 740 } 741 742 /** 743 * Constructs a new {@code dev.metaschema.oscal.lib.model.PoamItem.RelatedFinding} instance with the specified metadata. 744 * 745 * @param data 746 * the metaschema data, or {@code null} if none 747 */ 748 public RelatedFinding(IMetaschemaData data) { 749 this.__metaschemaData = data; 750 } 751 752 @Override 753 public IMetaschemaData getMetaschemaData() { 754 return __metaschemaData; 755 } 756 757 /** 758 * Get the "{@literal Finding Universally Unique Identifier Reference}". 759 * 760 * <p> 761 * A <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented">machine-oriented</a> identifier reference to a finding defined in the list of findings. 762 * 763 * @return the finding-uuid value 764 */ 765 @NonNull 766 public UUID getFindingUuid() { 767 return _findingUuid; 768 } 769 770 /** 771 * Set the "{@literal Finding Universally Unique Identifier Reference}". 772 * 773 * <p> 774 * A <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented">machine-oriented</a> identifier reference to a finding defined in the list of findings. 775 * 776 * @param value 777 * the finding-uuid value to set 778 */ 779 public void setFindingUuid(@NonNull UUID value) { 780 _findingUuid = value; 781 } 782 783 @Override 784 public String toString() { 785 return ObjectUtils.notNull(new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString()); 786 } 787 } 788 789 /** 790 * Relates the poam-item to a set of referenced observations that were used to determine the finding. 791 */ 792 @MetaschemaAssembly( 793 formalName = "Related Observation", 794 description = "Relates the poam-item to a set of referenced observations that were used to determine the finding.", 795 name = "related-observation", 796 moduleClass = OscalPoamModule.class 797 ) 798 public static class RelatedObservation implements IBoundObject { 799 private final IMetaschemaData __metaschemaData; 800 801 /** 802 * A <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented">machine-oriented</a> identifier reference to an observation defined in the list of observations. 803 */ 804 @BoundFlag( 805 formalName = "Observation Universally Unique Identifier Reference", 806 description = "A [machine-oriented](https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented) identifier reference to an observation defined in the list of observations.", 807 name = "observation-uuid", 808 required = true, 809 typeAdapter = UuidAdapter.class 810 ) 811 private UUID _observationUuid; 812 813 /** 814 * Constructs a new {@code dev.metaschema.oscal.lib.model.PoamItem.RelatedObservation} instance with no metadata. 815 */ 816 public RelatedObservation() { 817 this(null); 818 } 819 820 /** 821 * Constructs a new {@code dev.metaschema.oscal.lib.model.PoamItem.RelatedObservation} instance with the specified metadata. 822 * 823 * @param data 824 * the metaschema data, or {@code null} if none 825 */ 826 public RelatedObservation(IMetaschemaData data) { 827 this.__metaschemaData = data; 828 } 829 830 @Override 831 public IMetaschemaData getMetaschemaData() { 832 return __metaschemaData; 833 } 834 835 /** 836 * Get the "{@literal Observation Universally Unique Identifier Reference}". 837 * 838 * <p> 839 * A <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented">machine-oriented</a> identifier reference to an observation defined in the list of observations. 840 * 841 * @return the observation-uuid value 842 */ 843 @NonNull 844 public UUID getObservationUuid() { 845 return _observationUuid; 846 } 847 848 /** 849 * Set the "{@literal Observation Universally Unique Identifier Reference}". 850 * 851 * <p> 852 * A <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented">machine-oriented</a> identifier reference to an observation defined in the list of observations. 853 * 854 * @param value 855 * the observation-uuid value to set 856 */ 857 public void setObservationUuid(@NonNull UUID value) { 858 _observationUuid = value; 859 } 860 861 @Override 862 public String toString() { 863 return ObjectUtils.notNull(new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString()); 864 } 865 } 866 867 /** 868 * Relates the finding to a set of referenced risks that were used to determine the finding. 869 */ 870 @MetaschemaAssembly( 871 formalName = "Associated Risk", 872 description = "Relates the finding to a set of referenced risks that were used to determine the finding.", 873 name = "associated-risk", 874 moduleClass = OscalPoamModule.class 875 ) 876 public static class AssociatedRisk implements IBoundObject { 877 private final IMetaschemaData __metaschemaData; 878 879 /** 880 * A <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented">machine-oriented</a> identifier reference to a risk defined in the list of risks. 881 */ 882 @BoundFlag( 883 formalName = "Risk Universally Unique Identifier Reference", 884 description = "A [machine-oriented](https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented) identifier reference to a risk defined in the list of risks.", 885 name = "risk-uuid", 886 required = true, 887 typeAdapter = UuidAdapter.class 888 ) 889 private UUID _riskUuid; 890 891 /** 892 * Constructs a new {@code dev.metaschema.oscal.lib.model.PoamItem.AssociatedRisk} instance with no metadata. 893 */ 894 public AssociatedRisk() { 895 this(null); 896 } 897 898 /** 899 * Constructs a new {@code dev.metaschema.oscal.lib.model.PoamItem.AssociatedRisk} instance with the specified metadata. 900 * 901 * @param data 902 * the metaschema data, or {@code null} if none 903 */ 904 public AssociatedRisk(IMetaschemaData data) { 905 this.__metaschemaData = data; 906 } 907 908 @Override 909 public IMetaschemaData getMetaschemaData() { 910 return __metaschemaData; 911 } 912 913 /** 914 * Get the "{@literal Risk Universally Unique Identifier Reference}". 915 * 916 * <p> 917 * A <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented">machine-oriented</a> identifier reference to a risk defined in the list of risks. 918 * 919 * @return the risk-uuid value 920 */ 921 @NonNull 922 public UUID getRiskUuid() { 923 return _riskUuid; 924 } 925 926 /** 927 * Set the "{@literal Risk Universally Unique Identifier Reference}". 928 * 929 * <p> 930 * A <a href="https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented">machine-oriented</a> identifier reference to a risk defined in the list of risks. 931 * 932 * @param value 933 * the risk-uuid value to set 934 */ 935 public void setRiskUuid(@NonNull UUID value) { 936 _riskUuid = value; 937 } 938 939 @Override 940 public String toString() { 941 return ObjectUtils.notNull(new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString()); 942 } 943 } 944}