001package com.example.metaschema; 002 003import gov.nist.secauto.metaschema.core.datatype.adapter.TokenAdapter; 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.BoundFieldValue; 012import gov.nist.secauto.metaschema.databind.model.annotations.BoundFlag; 013import gov.nist.secauto.metaschema.databind.model.annotations.MetaschemaField; 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 * Any explanatory or helpful information to be provided about the remarks parent. 022 */ 023@MetaschemaField( 024 formalName = "Remarks", 025 description = "Any explanatory or helpful information to be provided about the remarks parent.", 026 name = "remarks", 027 moduleClass = MetaschemaModelModule.class 028) 029public class Remarks implements IBoundObject { 030 private final IMetaschemaData __metaschemaData; 031 032 /** 033 * "Mark as ‘XML’ for XML-only or ‘JSON’ for JSON-only remarks." 034 */ 035 @BoundFlag( 036 formalName = "Remark Class", 037 description = "Mark as 'XML' for XML-only or 'JSON' for JSON-only remarks.", 038 name = "class", 039 defaultValue = "ALL", 040 typeAdapter = TokenAdapter.class, 041 valueConstraints = @ValueConstraints(allowedValues = @AllowedValues(level = IConstraint.Level.ERROR, values = {@AllowedValue(value = "XML", description = "The remark applies to only XML representations."), @AllowedValue(value = "JSON", description = "The remark applies to only JSON and YAML representations."), @AllowedValue(value = "ALL", description = "The remark applies to all representations.")})) 042 ) 043 private String _clazz; 044 045 @BoundFieldValue( 046 valueKeyName = "remark", 047 typeAdapter = MarkupMultilineAdapter.class 048 ) 049 private MarkupMultiline _remark; 050 051 public Remarks() { 052 this(null); 053 } 054 055 public Remarks(IMetaschemaData data) { 056 this.__metaschemaData = data; 057 } 058 059 @Override 060 public IMetaschemaData getMetaschemaData() { 061 return __metaschemaData; 062 } 063 064 public String getClazz() { 065 return _clazz; 066 } 067 068 public void setClazz(String value) { 069 _clazz = value; 070 } 071 072 public MarkupMultiline getRemark() { 073 return _remark; 074 } 075 076 public void setRemark(MarkupMultiline value) { 077 _remark = value; 078 } 079 080 @Override 081 public String toString() { 082 return new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString(); 083 } 084}