ImplementationStatus.java

package gov.nist.secauto.oscal.lib.model;

import gov.nist.secauto.metaschema.binding.model.annotations.AllowedValue;
import gov.nist.secauto.metaschema.binding.model.annotations.AllowedValues;
import gov.nist.secauto.metaschema.binding.model.annotations.BoundField;
import gov.nist.secauto.metaschema.binding.model.annotations.BoundFieldValue;
import gov.nist.secauto.metaschema.binding.model.annotations.BoundFlag;
import gov.nist.secauto.metaschema.binding.model.annotations.MetaschemaAssembly;
import gov.nist.secauto.metaschema.binding.model.annotations.ValueConstraints;
import gov.nist.secauto.metaschema.model.common.constraint.IConstraint;
import gov.nist.secauto.metaschema.model.common.datatype.adapter.TokenAdapter;
import gov.nist.secauto.metaschema.model.common.datatype.markup.MarkupMultiline;
import gov.nist.secauto.metaschema.model.common.datatype.markup.MarkupMultilineAdapter;
import java.lang.Override;
import java.lang.String;
import org.apache.commons.lang3.builder.MultilineRecursiveToStringStyle;
import org.apache.commons.lang3.builder.ReflectionToStringBuilder;

/**
 * Indicates the degree to which the a given control is implemented.
 */
@MetaschemaAssembly(
    formalName = "Implementation Status",
    description = "Indicates the degree to which the a given control is implemented.",
    name = "implementation-status",
    metaschema = OscalImplementationCommonMetaschema.class
)
public class ImplementationStatus {
  @BoundFlag(
      formalName = "Implementation State",
      description = "Identifies the implementation status of the control or control objective.",
      useName = "state",
      required = true,
      typeAdapter = TokenAdapter.class
  )
  @ValueConstraints(
      allowedValues = @AllowedValues(level = IConstraint.Level.ERROR, allowOthers = true, values = {@AllowedValue(value = "implemented", description = "The control is fully implemented."), @AllowedValue(value = "partial", description = "The control is partially implemented."), @AllowedValue(value = "planned", description = "There is a plan for implementing the control as explained in the remarks."), @AllowedValue(value = "alternative", description = "There is an alternative implementation for this control as explained in the remarks."), @AllowedValue(value = "not-applicable", description = "This control does not apply to this system as justified in the remarks.")})
  )
  private String _state;

  @BoundField(
      formalName = "Remarks",
      description = "Additional commentary about the containing object.",
      useName = "remarks"
  )
  @BoundFieldValue(
      typeAdapter = MarkupMultilineAdapter.class
  )
  private MarkupMultiline _remarks;

  public ImplementationStatus() {
  }

  public String getState() {
    return _state;
  }

  public void setState(String value) {
    _state = value;
  }

  public MarkupMultiline getRemarks() {
    return _remarks;
  }

  public void setRemarks(MarkupMultiline value) {
    _remarks = value;
  }

  @Override
  public String toString() {
    return new ReflectionToStringBuilder(this, MultilineRecursiveToStringStyle.MULTI_LINE_STYLE).toString();
  }
}