1   /*
2    * SPDX-FileCopyrightText: none
3    * SPDX-License-Identifier: CC0-1.0
4    */
5   // Generated from: ../../../../../../metaschema/unit-tests.yaml
6   // Do not edit - changes will be lost when regenerated.
7   
8   package dev.metaschema.model.testing.testsuite;
9   
10  import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
11  import org.apache.commons.lang3.builder.ToStringStyle;
12  
13  import java.net.URI;
14  
15  import dev.metaschema.core.datatype.adapter.UriReferenceAdapter;
16  import dev.metaschema.core.model.IBoundObject;
17  import dev.metaschema.core.model.IMetaschemaData;
18  import dev.metaschema.core.util.ObjectUtils;
19  import dev.metaschema.databind.model.annotations.BoundFlag;
20  import dev.metaschema.databind.model.annotations.MetaschemaAssembly;
21  import edu.umd.cs.findbugs.annotations.NonNull;
22  
23  /**
24   * Reference to a metaschema module to load.
25   */
26  @MetaschemaAssembly(
27      formalName = "Metaschema",
28      description = "Reference to a metaschema module to load.",
29      name = "metaschema",
30      moduleClass = MetaschemaTestSuiteModule.class)
31  public class Metaschema implements IBoundObject {
32    private final IMetaschemaData __metaschemaData;
33  
34    /**
35     * A URI reference to the metaschema module location.
36     */
37    @BoundFlag(
38        formalName = "Location",
39        description = "A URI reference to the metaschema module location.",
40        name = "location",
41        required = true,
42        typeAdapter = UriReferenceAdapter.class)
43    private URI _location;
44  
45    /**
46     * Constructs a new {@code dev.metaschema.model.testing.testsuite.Metaschema}
47     * instance with no metadata.
48     */
49    public Metaschema() {
50      this(null);
51    }
52  
53    /**
54     * Constructs a new {@code dev.metaschema.model.testing.testsuite.Metaschema}
55     * instance with the specified metadata.
56     *
57     * @param data
58     *          the metaschema data, or {@code null} if none
59     */
60    public Metaschema(IMetaschemaData data) {
61      this.__metaschemaData = data;
62    }
63  
64    @Override
65    public IMetaschemaData getMetaschemaData() {
66      return __metaschemaData;
67    }
68  
69    /**
70     * Get the location.
71     *
72     * <p>
73     * A URI reference to the metaschema module location.
74     *
75     * @return the location value
76     */
77    @NonNull
78    public URI getLocation() {
79      return _location;
80    }
81  
82    /**
83     * Set the location.
84     *
85     * <p>
86     * A URI reference to the metaschema module location.
87     *
88     * @param value
89     *          the location value to set
90     */
91    public void setLocation(@NonNull URI value) {
92      _location = value;
93    }
94  
95    @Override
96    public String toString() {
97      return ObjectUtils.notNull(new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString());
98    }
99  }