001package gov.nist.secauto.oscal.lib.model; 002 003import gov.nist.secauto.metaschema.binding.model.annotations.AllowedValue; 004import gov.nist.secauto.metaschema.binding.model.annotations.AllowedValues; 005import gov.nist.secauto.metaschema.binding.model.annotations.BoundField; 006import gov.nist.secauto.metaschema.binding.model.annotations.BoundFieldValue; 007import gov.nist.secauto.metaschema.binding.model.annotations.BoundFlag; 008import gov.nist.secauto.metaschema.binding.model.annotations.MetaschemaAssembly; 009import gov.nist.secauto.metaschema.binding.model.annotations.ValueConstraints; 010import gov.nist.secauto.metaschema.model.common.constraint.IConstraint; 011import gov.nist.secauto.metaschema.model.common.datatype.adapter.StringAdapter; 012import gov.nist.secauto.metaschema.model.common.datatype.markup.MarkupMultiline; 013import gov.nist.secauto.metaschema.model.common.datatype.markup.MarkupMultilineAdapter; 014import java.lang.Override; 015import java.lang.String; 016import org.apache.commons.lang3.builder.MultilineRecursiveToStringStyle; 017import org.apache.commons.lang3.builder.ReflectionToStringBuilder; 018 019/** 020 * Describes the operational status of the system. 021 */ 022@MetaschemaAssembly( 023 formalName = "Status", 024 description = "Describes the operational status of the system.", 025 name = "status", 026 metaschema = OscalSspMetaschema.class, 027 remarks = "If 'other' is selected, a remark must be included to describe the current state." 028) 029public class Status { 030 @BoundFlag( 031 formalName = "State", 032 description = "The current operating status.", 033 useName = "state", 034 required = true, 035 typeAdapter = StringAdapter.class 036 ) 037 @ValueConstraints( 038 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.")}) 039 ) 040 private String _state; 041 042 @BoundField( 043 formalName = "Remarks", 044 description = "Additional commentary about the containing object.", 045 useName = "remarks" 046 ) 047 @BoundFieldValue( 048 typeAdapter = MarkupMultilineAdapter.class 049 ) 050 private MarkupMultiline _remarks; 051 052 public Status() { 053 } 054 055 public String getState() { 056 return _state; 057 } 058 059 public void setState(String value) { 060 _state = value; 061 } 062 063 public MarkupMultiline getRemarks() { 064 return _remarks; 065 } 066 067 public void setRemarks(MarkupMultiline value) { 068 _remarks = value; 069 } 070 071 @Override 072 public String toString() { 073 return new ReflectionToStringBuilder(this, MultilineRecursiveToStringStyle.MULTI_LINE_STYLE).toString(); 074 } 075}