1 package gov.nist.secauto.oscal.lib.model;
2
3 import gov.nist.secauto.metaschema.binding.model.annotations.AllowedValue;
4 import gov.nist.secauto.metaschema.binding.model.annotations.AllowedValues;
5 import gov.nist.secauto.metaschema.binding.model.annotations.BoundField;
6 import gov.nist.secauto.metaschema.binding.model.annotations.BoundFieldValue;
7 import gov.nist.secauto.metaschema.binding.model.annotations.BoundFlag;
8 import gov.nist.secauto.metaschema.binding.model.annotations.MetaschemaAssembly;
9 import gov.nist.secauto.metaschema.binding.model.annotations.ValueConstraints;
10 import gov.nist.secauto.metaschema.model.common.constraint.IConstraint;
11 import gov.nist.secauto.metaschema.model.common.datatype.adapter.StringAdapter;
12 import gov.nist.secauto.metaschema.model.common.datatype.markup.MarkupMultiline;
13 import gov.nist.secauto.metaschema.model.common.datatype.markup.MarkupMultilineAdapter;
14 import java.lang.Override;
15 import java.lang.String;
16 import org.apache.commons.lang3.builder.MultilineRecursiveToStringStyle;
17 import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
18
19
20
21
22 @MetaschemaAssembly(
23 formalName = "Status",
24 description = "Describes the operational status of the system.",
25 name = "status",
26 metaschema = OscalSspMetaschema.class,
27 remarks = "If 'other' is selected, a remark must be included to describe the current state."
28 )
29 public class Status {
30 @BoundFlag(
31 formalName = "State",
32 description = "The current operating status.",
33 useName = "state",
34 required = true,
35 typeAdapter = StringAdapter.class
36 )
37 @ValueConstraints(
38 allowedValues = @AllowedValues(level = IConstraint.Level.ERROR, values = {@AllowedValue(value = "operational", description = "The system is currently operating in production."), @AllowedValue(value = "under-development", description = "The system is being designed, developed, or implemented"), @AllowedValue(value = "under-major-modification", description = "The system is undergoing a major change, development, or transition."), @AllowedValue(value = "disposition", description = "The system is no longer operational."), @AllowedValue(value = "other", description = "Some other state.")})
39 )
40 private String _state;
41
42 @BoundField(
43 formalName = "Remarks",
44 description = "Additional commentary about the containing object.",
45 useName = "remarks"
46 )
47 @BoundFieldValue(
48 typeAdapter = MarkupMultilineAdapter.class
49 )
50 private MarkupMultiline _remarks;
51
52 public Status() {
53 }
54
55 public String getState() {
56 return _state;
57 }
58
59 public void setState(String value) {
60 _state = value;
61 }
62
63 public MarkupMultiline getRemarks() {
64 return _remarks;
65 }
66
67 public void setRemarks(MarkupMultiline value) {
68 _remarks = value;
69 }
70
71 @Override
72 public String toString() {
73 return new ReflectionToStringBuilder(this, MultilineRecursiveToStringStyle.MULTI_LINE_STYLE).toString();
74 }
75 }