001package com.example.metaschema;
002
003import gov.nist.secauto.metaschema.core.datatype.adapter.TokenAdapter;
004import gov.nist.secauto.metaschema.core.model.IBoundObject;
005import gov.nist.secauto.metaschema.core.model.IMetaschemaData;
006import gov.nist.secauto.metaschema.core.model.constraint.IConstraint;
007import gov.nist.secauto.metaschema.databind.model.annotations.AllowedValue;
008import gov.nist.secauto.metaschema.databind.model.annotations.AllowedValues;
009import gov.nist.secauto.metaschema.databind.model.annotations.BoundFlag;
010import gov.nist.secauto.metaschema.databind.model.annotations.MetaschemaAssembly;
011import gov.nist.secauto.metaschema.databind.model.annotations.ValueConstraints;
012import java.lang.Override;
013import java.lang.String;
014import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
015import org.apache.commons.lang3.builder.ToStringStyle;
016
017@MetaschemaAssembly(
018    formalName = "Group As",
019    name = "group-as",
020    moduleClass = MetaschemaModelModule.class
021)
022public class GroupAs implements IBoundObject {
023  private final IMetaschemaData __metaschemaData;
024
025  @BoundFlag(
026      formalName = "Grouping Name",
027      name = "name",
028      required = true,
029      typeAdapter = TokenAdapter.class
030  )
031  private String _name;
032
033  @BoundFlag(
034      formalName = "In JSON Grouping Syntax",
035      name = "in-json",
036      defaultValue = "SINGLETON_OR_ARRAY",
037      typeAdapter = TokenAdapter.class,
038      valueConstraints = @ValueConstraints(allowedValues = @AllowedValues(level = IConstraint.Level.ERROR, values = {@AllowedValue(value = "ARRAY", description = "Always use an array."), @AllowedValue(value = "SINGLETON_OR_ARRAY", description = "Produce a singleton for a single member or an array for multiple members."), @AllowedValue(value = "BY_KEY", description = "For any group of one or more members, produce an object with properties for each member, using a designated flag for their property name values, which must be distinct.")}))
039  )
040  private String _inJson;
041
042  @BoundFlag(
043      formalName = "In XML Grouping Syntax",
044      name = "in-xml",
045      defaultValue = "UNGROUPED",
046      typeAdapter = TokenAdapter.class,
047      valueConstraints = @ValueConstraints(allowedValues = @AllowedValues(level = IConstraint.Level.ERROR, values = {@AllowedValue(value = "GROUPED", description = "Use a wrapper element."), @AllowedValue(value = "UNGROUPED", description = "Do not use a wrapper element.")}))
048  )
049  private String _inXml;
050
051  public GroupAs() {
052    this(null);
053  }
054
055  public GroupAs(IMetaschemaData data) {
056    this.__metaschemaData = data;
057  }
058
059  @Override
060  public IMetaschemaData getMetaschemaData() {
061    return __metaschemaData;
062  }
063
064  public String getName() {
065    return _name;
066  }
067
068  public void setName(String value) {
069    _name = value;
070  }
071
072  public String getInJson() {
073    return _inJson;
074  }
075
076  public void setInJson(String value) {
077    _inJson = value;
078  }
079
080  public String getInXml() {
081    return _inXml;
082  }
083
084  public void setInXml(String value) {
085    _inXml = value;
086  }
087
088  @Override
089  public String toString() {
090    return new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString();
091  }
092}