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