001/*
002 * SPDX-FileCopyrightText: none
003 * SPDX-License-Identifier: CC0-1.0
004 */
005// Generated from: ../../../../../../metaschema/metaschema-bindings.yaml
006// Do not edit - changes will be lost when regenerated.
007
008package dev.metaschema.databind.config.binding;
009
010import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
011import org.apache.commons.lang3.builder.ToStringStyle;
012
013import java.net.URI;
014import java.util.LinkedList;
015import java.util.List;
016
017import dev.metaschema.core.datatype.adapter.BooleanAdapter;
018import dev.metaschema.core.datatype.adapter.StringAdapter;
019import dev.metaschema.core.datatype.adapter.TokenAdapter;
020import dev.metaschema.core.datatype.adapter.UriAdapter;
021import dev.metaschema.core.datatype.adapter.UriReferenceAdapter;
022import dev.metaschema.core.model.IBoundObject;
023import dev.metaschema.core.model.IMetaschemaData;
024import dev.metaschema.core.model.JsonGroupAsBehavior;
025import dev.metaschema.core.util.ObjectUtils;
026import dev.metaschema.databind.model.annotations.BoundAssembly;
027import dev.metaschema.databind.model.annotations.BoundField;
028import dev.metaschema.databind.model.annotations.BoundFieldValue;
029import dev.metaschema.databind.model.annotations.BoundFlag;
030import dev.metaschema.databind.model.annotations.GroupAs;
031import dev.metaschema.databind.model.annotations.MetaschemaAssembly;
032import dev.metaschema.databind.model.annotations.MetaschemaField;
033import edu.umd.cs.findbugs.annotations.NonNull;
034import edu.umd.cs.findbugs.annotations.Nullable;
035
036/**
037 * The root element for a set of metaschema binding customizations.
038 */
039@MetaschemaAssembly(
040    formalName = "Metaschema Bindings",
041    description = "The root element for a set of metaschema binding customizations.",
042    name = "metaschema-bindings",
043    moduleClass = MetaschemaBindingsModule.class,
044    rootName = "metaschema-bindings")
045public class MetaschemaBindings implements IBoundObject {
046  private final IMetaschemaData __metaschemaData;
047
048  /**
049   * Defines binding configurations that apply to a whole model described by a
050   * namespace.
051   */
052  @BoundAssembly(
053      formalName = "Model Binding",
054      description = "Defines binding configurations that apply to a whole model described by a namespace.",
055      useName = "model-binding",
056      maxOccurs = -1,
057      groupAs = @GroupAs(name = "model-bindings", inJson = JsonGroupAsBehavior.LIST))
058  private List<ModelBinding> _modelBindings;
059
060  /**
061   * Defines a binding for a given metaschema identified by a relative URL.
062   */
063  @BoundAssembly(
064      formalName = "Metaschema Binding",
065      description = "Defines a binding for a given metaschema identified by a relative URL.",
066      useName = "metaschema-binding",
067      maxOccurs = -1,
068      groupAs = @GroupAs(name = "metaschema-bindings", inJson = JsonGroupAsBehavior.LIST))
069  private List<MetaschemaBinding> _metaschemaBindings;
070
071  /**
072   * Constructs a new
073   * {@code dev.metaschema.databind.config.binding.MetaschemaBindings} instance
074   * with no metadata.
075   */
076  public MetaschemaBindings() {
077    this(null);
078  }
079
080  /**
081   * Constructs a new
082   * {@code dev.metaschema.databind.config.binding.MetaschemaBindings} instance
083   * with the specified metadata.
084   *
085   * @param data
086   *          the metaschema data, or {@code null} if none
087   */
088  public MetaschemaBindings(IMetaschemaData data) {
089    this.__metaschemaData = data;
090  }
091
092  @Override
093  public IMetaschemaData getMetaschemaData() {
094    return __metaschemaData;
095  }
096
097  /**
098   * Get the model Binding.
099   *
100   * <p>
101   * Defines binding configurations that apply to a whole model described by a
102   * namespace.
103   *
104   * @return the model-binding value
105   */
106  @NonNull
107  public List<ModelBinding> getModelBindings() {
108    if (_modelBindings == null) {
109      _modelBindings = new LinkedList<>();
110    }
111    return ObjectUtils.notNull(_modelBindings);
112  }
113
114  /**
115   * Set the model Binding.
116   *
117   * <p>
118   * Defines binding configurations that apply to a whole model described by a
119   * namespace.
120   *
121   * @param value
122   *          the model-binding value to set
123   */
124  public void setModelBindings(@NonNull List<ModelBinding> value) {
125    _modelBindings = value;
126  }
127
128  /**
129   * Add a new {@link ModelBinding} item to the underlying collection.
130   *
131   * @param item
132   *          the item to add
133   * @return {@code true}
134   */
135  public boolean addModelBinding(ModelBinding item) {
136    ModelBinding value = ObjectUtils.requireNonNull(item, "item cannot be null");
137    if (_modelBindings == null) {
138      _modelBindings = new LinkedList<>();
139    }
140    return _modelBindings.add(value);
141  }
142
143  /**
144   * Remove the first matching {@link ModelBinding} item from the underlying
145   * collection.
146   *
147   * @param item
148   *          the item to remove
149   * @return {@code true} if the item was removed or {@code false} otherwise
150   */
151  public boolean removeModelBinding(ModelBinding item) {
152    ModelBinding value = ObjectUtils.requireNonNull(item, "item cannot be null");
153    return _modelBindings != null && _modelBindings.remove(value);
154  }
155
156  /**
157   * Get the metaschema Binding.
158   *
159   * <p>
160   * Defines a binding for a given metaschema identified by a relative URL.
161   *
162   * @return the metaschema-binding value
163   */
164  @NonNull
165  public List<MetaschemaBinding> getMetaschemaBindings() {
166    if (_metaschemaBindings == null) {
167      _metaschemaBindings = new LinkedList<>();
168    }
169    return ObjectUtils.notNull(_metaschemaBindings);
170  }
171
172  /**
173   * Set the metaschema Binding.
174   *
175   * <p>
176   * Defines a binding for a given metaschema identified by a relative URL.
177   *
178   * @param value
179   *          the metaschema-binding value to set
180   */
181  public void setMetaschemaBindings(@NonNull List<MetaschemaBinding> value) {
182    _metaschemaBindings = value;
183  }
184
185  /**
186   * Add a new {@link MetaschemaBinding} item to the underlying collection.
187   *
188   * @param item
189   *          the item to add
190   * @return {@code true}
191   */
192  public boolean addMetaschemaBinding(MetaschemaBinding item) {
193    MetaschemaBinding value = ObjectUtils.requireNonNull(item, "item cannot be null");
194    if (_metaschemaBindings == null) {
195      _metaschemaBindings = new LinkedList<>();
196    }
197    return _metaschemaBindings.add(value);
198  }
199
200  /**
201   * Remove the first matching {@link MetaschemaBinding} item from the underlying
202   * collection.
203   *
204   * @param item
205   *          the item to remove
206   * @return {@code true} if the item was removed or {@code false} otherwise
207   */
208  public boolean removeMetaschemaBinding(MetaschemaBinding item) {
209    MetaschemaBinding value = ObjectUtils.requireNonNull(item, "item cannot be null");
210    return _metaschemaBindings != null && _metaschemaBindings.remove(value);
211  }
212
213  @Override
214  public String toString() {
215    return ObjectUtils.notNull(new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString());
216  }
217
218  /**
219   * Defines binding configurations that apply to a whole model described by a
220   * namespace.
221   */
222  @MetaschemaAssembly(
223      formalName = "Model Binding",
224      description = "Defines binding configurations that apply to a whole model described by a namespace.",
225      name = "model-binding",
226      moduleClass = MetaschemaBindingsModule.class)
227  public static class ModelBinding implements IBoundObject {
228    private final IMetaschemaData __metaschemaData;
229
230    /**
231     * A URI referencing the namespace of one or more related metaschema
232     * definitions.
233     */
234    @BoundFlag(
235        formalName = "Namespace",
236        description = "A URI referencing the namespace of one or more related metaschema definitions.",
237        name = "namespace",
238        required = true,
239        typeAdapter = UriAdapter.class)
240    private URI _namespace;
241
242    /**
243     * Java-specific binding configuration for a model namespace.
244     */
245    @BoundAssembly(
246        formalName = "Java Model Binding",
247        description = "Java-specific binding configuration for a model namespace.",
248        useName = "java")
249    private Java _java;
250
251    /**
252     * Constructs a new
253     * {@code dev.metaschema.databind.config.binding.MetaschemaBindings.ModelBinding}
254     * instance with no metadata.
255     */
256    public ModelBinding() {
257      this(null);
258    }
259
260    /**
261     * Constructs a new
262     * {@code dev.metaschema.databind.config.binding.MetaschemaBindings.ModelBinding}
263     * instance with the specified metadata.
264     *
265     * @param data
266     *          the metaschema data, or {@code null} if none
267     */
268    public ModelBinding(IMetaschemaData data) {
269      this.__metaschemaData = data;
270    }
271
272    @Override
273    public IMetaschemaData getMetaschemaData() {
274      return __metaschemaData;
275    }
276
277    /**
278     * Get the namespace.
279     *
280     * <p>
281     * A URI referencing the namespace of one or more related metaschema
282     * definitions.
283     *
284     * @return the namespace value
285     */
286    @NonNull
287    public URI getNamespace() {
288      return _namespace;
289    }
290
291    /**
292     * Set the namespace.
293     *
294     * <p>
295     * A URI referencing the namespace of one or more related metaschema
296     * definitions.
297     *
298     * @param value
299     *          the namespace value to set
300     */
301    public void setNamespace(@NonNull URI value) {
302      _namespace = value;
303    }
304
305    /**
306     * Get the java Model Binding.
307     *
308     * <p>
309     * Java-specific binding configuration for a model namespace.
310     *
311     * @return the java value, or {@code null} if not set
312     */
313    @Nullable
314    public Java getJava() {
315      return _java;
316    }
317
318    /**
319     * Set the java Model Binding.
320     *
321     * <p>
322     * Java-specific binding configuration for a model namespace.
323     *
324     * @param value
325     *          the java value to set, or {@code null} to clear
326     */
327    public void setJava(@Nullable Java value) {
328      _java = value;
329    }
330
331    @Override
332    public String toString() {
333      return ObjectUtils.notNull(new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString());
334    }
335
336    /**
337     * Java-specific binding configuration for a model namespace.
338     */
339    @MetaschemaAssembly(
340        formalName = "Java Model Binding",
341        description = "Java-specific binding configuration for a model namespace.",
342        name = "java",
343        moduleClass = MetaschemaBindingsModule.class)
344    public static class Java implements IBoundObject {
345      private final IMetaschemaData __metaschemaData;
346
347      /**
348       * The Java package name to use for classes generated from this namespace.
349       */
350      @BoundField(
351          formalName = "Use Package Name",
352          description = "The Java package name to use for classes generated from this namespace.",
353          useName = "use-package-name",
354          typeAdapter = TokenAdapter.class)
355      private String _usePackageName;
356
357      /**
358       * Constructs a new
359       * {@code dev.metaschema.databind.config.binding.MetaschemaBindings.ModelBinding.Java}
360       * instance with no metadata.
361       */
362      public Java() {
363        this(null);
364      }
365
366      /**
367       * Constructs a new
368       * {@code dev.metaschema.databind.config.binding.MetaschemaBindings.ModelBinding.Java}
369       * instance with the specified metadata.
370       *
371       * @param data
372       *          the metaschema data, or {@code null} if none
373       */
374      public Java(IMetaschemaData data) {
375        this.__metaschemaData = data;
376      }
377
378      @Override
379      public IMetaschemaData getMetaschemaData() {
380        return __metaschemaData;
381      }
382
383      /**
384       * Get the use Package Name.
385       *
386       * <p>
387       * The Java package name to use for classes generated from this namespace.
388       *
389       * @return the use-package-name value, or {@code null} if not set
390       */
391      @Nullable
392      public String getUsePackageName() {
393        return _usePackageName;
394      }
395
396      /**
397       * Set the use Package Name.
398       *
399       * <p>
400       * The Java package name to use for classes generated from this namespace.
401       *
402       * @param value
403       *          the use-package-name value to set, or {@code null} to clear
404       */
405      public void setUsePackageName(@Nullable String value) {
406        _usePackageName = value;
407      }
408
409      @Override
410      public String toString() {
411        return ObjectUtils.notNull(new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString());
412      }
413    }
414  }
415
416  /**
417   * Defines a binding for a given metaschema identified by a relative URL.
418   */
419  @MetaschemaAssembly(
420      formalName = "Metaschema Binding",
421      description = "Defines a binding for a given metaschema identified by a relative URL.",
422      name = "metaschema-binding",
423      moduleClass = MetaschemaBindingsModule.class)
424  public static class MetaschemaBinding implements IBoundObject {
425    private final IMetaschemaData __metaschemaData;
426
427    /**
428     * A URL relative to this binding configuration file, pointing to a metaschema
429     * definition.
430     */
431    @BoundFlag(
432        formalName = "Href",
433        description = "A URL relative to this binding configuration file, pointing to a metaschema definition.",
434        name = "href",
435        required = true,
436        typeAdapter = UriReferenceAdapter.class)
437    private URI _href;
438
439    /**
440     * Provides binding configurations for a given defined assembly within the
441     * parent metaschema.
442     */
443    @BoundAssembly(
444        formalName = "Define Assembly Binding",
445        description = "Provides binding configurations for a given defined assembly within the parent metaschema.",
446        useName = "define-assembly-binding",
447        maxOccurs = -1,
448        groupAs = @GroupAs(name = "define-assembly-bindings", inJson = JsonGroupAsBehavior.LIST))
449    private List<DefineAssemblyBinding> _defineAssemblyBindings;
450
451    /**
452     * Provides binding configurations for a given defined field within the parent
453     * metaschema.
454     */
455    @BoundAssembly(
456        formalName = "Define Field Binding",
457        description = "Provides binding configurations for a given defined field within the parent metaschema.",
458        useName = "define-field-binding",
459        maxOccurs = -1,
460        groupAs = @GroupAs(name = "define-field-bindings", inJson = JsonGroupAsBehavior.LIST))
461    private List<DefineFieldBinding> _defineFieldBindings;
462
463    /**
464     * Constructs a new
465     * {@code dev.metaschema.databind.config.binding.MetaschemaBindings.MetaschemaBinding}
466     * instance with no metadata.
467     */
468    public MetaschemaBinding() {
469      this(null);
470    }
471
472    /**
473     * Constructs a new
474     * {@code dev.metaschema.databind.config.binding.MetaschemaBindings.MetaschemaBinding}
475     * instance with the specified metadata.
476     *
477     * @param data
478     *          the metaschema data, or {@code null} if none
479     */
480    public MetaschemaBinding(IMetaschemaData data) {
481      this.__metaschemaData = data;
482    }
483
484    @Override
485    public IMetaschemaData getMetaschemaData() {
486      return __metaschemaData;
487    }
488
489    /**
490     * Get the href.
491     *
492     * <p>
493     * A URL relative to this binding configuration file, pointing to a metaschema
494     * definition.
495     *
496     * @return the href value
497     */
498    @NonNull
499    public URI getHref() {
500      return _href;
501    }
502
503    /**
504     * Set the href.
505     *
506     * <p>
507     * A URL relative to this binding configuration file, pointing to a metaschema
508     * definition.
509     *
510     * @param value
511     *          the href value to set
512     */
513    public void setHref(@NonNull URI value) {
514      _href = value;
515    }
516
517    /**
518     * Get the define Assembly Binding.
519     *
520     * <p>
521     * Provides binding configurations for a given defined assembly within the
522     * parent metaschema.
523     *
524     * @return the define-assembly-binding value
525     */
526    @NonNull
527    public List<DefineAssemblyBinding> getDefineAssemblyBindings() {
528      if (_defineAssemblyBindings == null) {
529        _defineAssemblyBindings = new LinkedList<>();
530      }
531      return ObjectUtils.notNull(_defineAssemblyBindings);
532    }
533
534    /**
535     * Set the define Assembly Binding.
536     *
537     * <p>
538     * Provides binding configurations for a given defined assembly within the
539     * parent metaschema.
540     *
541     * @param value
542     *          the define-assembly-binding value to set
543     */
544    public void setDefineAssemblyBindings(@NonNull List<DefineAssemblyBinding> value) {
545      _defineAssemblyBindings = value;
546    }
547
548    /**
549     * Add a new {@link DefineAssemblyBinding} item to the underlying collection.
550     *
551     * @param item
552     *          the item to add
553     * @return {@code true}
554     */
555    public boolean addDefineAssemblyBinding(DefineAssemblyBinding item) {
556      DefineAssemblyBinding value = ObjectUtils.requireNonNull(item, "item cannot be null");
557      if (_defineAssemblyBindings == null) {
558        _defineAssemblyBindings = new LinkedList<>();
559      }
560      return _defineAssemblyBindings.add(value);
561    }
562
563    /**
564     * Remove the first matching {@link DefineAssemblyBinding} item from the
565     * underlying collection.
566     *
567     * @param item
568     *          the item to remove
569     * @return {@code true} if the item was removed or {@code false} otherwise
570     */
571    public boolean removeDefineAssemblyBinding(DefineAssemblyBinding item) {
572      DefineAssemblyBinding value = ObjectUtils.requireNonNull(item, "item cannot be null");
573      return _defineAssemblyBindings != null && _defineAssemblyBindings.remove(value);
574    }
575
576    /**
577     * Get the define Field Binding.
578     *
579     * <p>
580     * Provides binding configurations for a given defined field within the parent
581     * metaschema.
582     *
583     * @return the define-field-binding value
584     */
585    @NonNull
586    public List<DefineFieldBinding> getDefineFieldBindings() {
587      if (_defineFieldBindings == null) {
588        _defineFieldBindings = new LinkedList<>();
589      }
590      return ObjectUtils.notNull(_defineFieldBindings);
591    }
592
593    /**
594     * Set the define Field Binding.
595     *
596     * <p>
597     * Provides binding configurations for a given defined field within the parent
598     * metaschema.
599     *
600     * @param value
601     *          the define-field-binding value to set
602     */
603    public void setDefineFieldBindings(@NonNull List<DefineFieldBinding> value) {
604      _defineFieldBindings = value;
605    }
606
607    /**
608     * Add a new {@link DefineFieldBinding} item to the underlying collection.
609     *
610     * @param item
611     *          the item to add
612     * @return {@code true}
613     */
614    public boolean addDefineFieldBinding(DefineFieldBinding item) {
615      DefineFieldBinding value = ObjectUtils.requireNonNull(item, "item cannot be null");
616      if (_defineFieldBindings == null) {
617        _defineFieldBindings = new LinkedList<>();
618      }
619      return _defineFieldBindings.add(value);
620    }
621
622    /**
623     * Remove the first matching {@link DefineFieldBinding} item from the underlying
624     * collection.
625     *
626     * @param item
627     *          the item to remove
628     * @return {@code true} if the item was removed or {@code false} otherwise
629     */
630    public boolean removeDefineFieldBinding(DefineFieldBinding item) {
631      DefineFieldBinding value = ObjectUtils.requireNonNull(item, "item cannot be null");
632      return _defineFieldBindings != null && _defineFieldBindings.remove(value);
633    }
634
635    @Override
636    public String toString() {
637      return ObjectUtils.notNull(new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString());
638    }
639
640    /**
641     * Provides binding configurations for a given defined assembly within the
642     * parent metaschema.
643     */
644    @MetaschemaAssembly(
645        formalName = "Define Assembly Binding",
646        description = "Provides binding configurations for a given defined assembly within the parent metaschema.",
647        name = "define-assembly-binding",
648        moduleClass = MetaschemaBindingsModule.class)
649    public static class DefineAssemblyBinding implements IBoundObject {
650      private final IMetaschemaData __metaschemaData;
651
652      /**
653       * The name of the metaschema assembly. Used for top-level definitions.
654       */
655      @BoundFlag(
656          formalName = "Name",
657          description = "The name of the metaschema assembly. Used for top-level definitions.",
658          name = "name",
659          typeAdapter = TokenAdapter.class)
660      private String _name;
661
662      /**
663       * A Metapath expression targeting the assembly definition(s) within the
664       * metaschema. Used for inline definitions.
665       */
666      @BoundFlag(
667          formalName = "Target",
668          description = "A Metapath expression targeting the assembly definition(s) within the metaschema. Used for inline definitions.",
669          name = "target",
670          typeAdapter = StringAdapter.class)
671      private String _target;
672
673      /**
674       * Field and assembly binding configurations for Java bound classes.
675       */
676      @BoundAssembly(
677          formalName = "Java Object Definition Binding",
678          description = "Field and assembly binding configurations for Java bound classes.",
679          useName = "java")
680      private Java _java;
681
682      /**
683       * Provides binding configurations for a property within the parent definition.
684       */
685      @BoundAssembly(
686          formalName = "Property Binding",
687          description = "Provides binding configurations for a property within the parent definition.",
688          useName = "property-binding",
689          maxOccurs = -1,
690          groupAs = @GroupAs(name = "property-bindings", inJson = JsonGroupAsBehavior.LIST))
691      private List<PropertyBinding> _propertyBindings;
692
693      /**
694       * Provides binding configuration for a choice group within the parent assembly.
695       */
696      @BoundAssembly(
697          formalName = "Choice Group Binding",
698          description = "Provides binding configuration for a choice group within the parent assembly.",
699          useName = "choice-group-binding",
700          maxOccurs = -1,
701          groupAs = @GroupAs(name = "choice-group-bindings", inJson = JsonGroupAsBehavior.LIST))
702      private List<ChoiceGroupBinding> _choiceGroupBindings;
703
704      /**
705       * Constructs a new
706       * {@code dev.metaschema.databind.config.binding.MetaschemaBindings.MetaschemaBinding.DefineAssemblyBinding}
707       * instance with no metadata.
708       */
709      public DefineAssemblyBinding() {
710        this(null);
711      }
712
713      /**
714       * Constructs a new
715       * {@code dev.metaschema.databind.config.binding.MetaschemaBindings.MetaschemaBinding.DefineAssemblyBinding}
716       * instance with the specified metadata.
717       *
718       * @param data
719       *          the metaschema data, or {@code null} if none
720       */
721      public DefineAssemblyBinding(IMetaschemaData data) {
722        this.__metaschemaData = data;
723      }
724
725      @Override
726      public IMetaschemaData getMetaschemaData() {
727        return __metaschemaData;
728      }
729
730      /**
731       * Get the name.
732       *
733       * <p>
734       * The name of the metaschema assembly. Used for top-level definitions.
735       *
736       * @return the name value, or {@code null} if not set
737       */
738      @Nullable
739      public String getName() {
740        return _name;
741      }
742
743      /**
744       * Set the name.
745       *
746       * <p>
747       * The name of the metaschema assembly. Used for top-level definitions.
748       *
749       * @param value
750       *          the name value to set, or {@code null} to clear
751       */
752      public void setName(@Nullable String value) {
753        _name = value;
754      }
755
756      /**
757       * Get the target.
758       *
759       * <p>
760       * A Metapath expression targeting the assembly definition(s) within the
761       * metaschema. Used for inline definitions.
762       *
763       * @return the target value, or {@code null} if not set
764       */
765      @Nullable
766      public String getTarget() {
767        return _target;
768      }
769
770      /**
771       * Set the target.
772       *
773       * <p>
774       * A Metapath expression targeting the assembly definition(s) within the
775       * metaschema. Used for inline definitions.
776       *
777       * @param value
778       *          the target value to set, or {@code null} to clear
779       */
780      public void setTarget(@Nullable String value) {
781        _target = value;
782      }
783
784      /**
785       * Get the java Object Definition Binding.
786       *
787       * <p>
788       * Field and assembly binding configurations for Java bound classes.
789       *
790       * @return the java value, or {@code null} if not set
791       */
792      @Nullable
793      public Java getJava() {
794        return _java;
795      }
796
797      /**
798       * Set the java Object Definition Binding.
799       *
800       * <p>
801       * Field and assembly binding configurations for Java bound classes.
802       *
803       * @param value
804       *          the java value to set, or {@code null} to clear
805       */
806      public void setJava(@Nullable Java value) {
807        _java = value;
808      }
809
810      /**
811       * Get the property Binding.
812       *
813       * <p>
814       * Provides binding configurations for a property within the parent definition.
815       *
816       * @return the property-binding value
817       */
818      @NonNull
819      public List<PropertyBinding> getPropertyBindings() {
820        if (_propertyBindings == null) {
821          _propertyBindings = new LinkedList<>();
822        }
823        return ObjectUtils.notNull(_propertyBindings);
824      }
825
826      /**
827       * Set the property Binding.
828       *
829       * <p>
830       * Provides binding configurations for a property within the parent definition.
831       *
832       * @param value
833       *          the property-binding value to set
834       */
835      public void setPropertyBindings(@NonNull List<PropertyBinding> value) {
836        _propertyBindings = value;
837      }
838
839      /**
840       * Add a new {@link PropertyBinding} item to the underlying collection.
841       *
842       * @param item
843       *          the item to add
844       * @return {@code true}
845       */
846      public boolean addPropertyBinding(PropertyBinding item) {
847        PropertyBinding value = ObjectUtils.requireNonNull(item, "item cannot be null");
848        if (_propertyBindings == null) {
849          _propertyBindings = new LinkedList<>();
850        }
851        return _propertyBindings.add(value);
852      }
853
854      /**
855       * Remove the first matching {@link PropertyBinding} item from the underlying
856       * collection.
857       *
858       * @param item
859       *          the item to remove
860       * @return {@code true} if the item was removed or {@code false} otherwise
861       */
862      public boolean removePropertyBinding(PropertyBinding item) {
863        PropertyBinding value = ObjectUtils.requireNonNull(item, "item cannot be null");
864        return _propertyBindings != null && _propertyBindings.remove(value);
865      }
866
867      /**
868       * Get the choice Group Binding.
869       *
870       * <p>
871       * Provides binding configuration for a choice group within the parent assembly.
872       *
873       * @return the choice-group-binding value
874       */
875      @NonNull
876      public List<ChoiceGroupBinding> getChoiceGroupBindings() {
877        if (_choiceGroupBindings == null) {
878          _choiceGroupBindings = new LinkedList<>();
879        }
880        return ObjectUtils.notNull(_choiceGroupBindings);
881      }
882
883      /**
884       * Set the choice Group Binding.
885       *
886       * <p>
887       * Provides binding configuration for a choice group within the parent assembly.
888       *
889       * @param value
890       *          the choice-group-binding value to set
891       */
892      public void setChoiceGroupBindings(@NonNull List<ChoiceGroupBinding> value) {
893        _choiceGroupBindings = value;
894      }
895
896      /**
897       * Add a new {@link ChoiceGroupBinding} item to the underlying collection.
898       *
899       * @param item
900       *          the item to add
901       * @return {@code true}
902       */
903      public boolean addChoiceGroupBinding(ChoiceGroupBinding item) {
904        ChoiceGroupBinding value = ObjectUtils.requireNonNull(item, "item cannot be null");
905        if (_choiceGroupBindings == null) {
906          _choiceGroupBindings = new LinkedList<>();
907        }
908        return _choiceGroupBindings.add(value);
909      }
910
911      /**
912       * Remove the first matching {@link ChoiceGroupBinding} item from the underlying
913       * collection.
914       *
915       * @param item
916       *          the item to remove
917       * @return {@code true} if the item was removed or {@code false} otherwise
918       */
919      public boolean removeChoiceGroupBinding(ChoiceGroupBinding item) {
920        ChoiceGroupBinding value = ObjectUtils.requireNonNull(item, "item cannot be null");
921        return _choiceGroupBindings != null && _choiceGroupBindings.remove(value);
922      }
923
924      @Override
925      public String toString() {
926        return ObjectUtils.notNull(new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString());
927      }
928
929      /**
930       * Field and assembly binding configurations for Java bound classes.
931       */
932      @MetaschemaAssembly(
933          formalName = "Java Object Definition Binding",
934          description = "Field and assembly binding configurations for Java bound classes.",
935          name = "java",
936          moduleClass = MetaschemaBindingsModule.class)
937      public static class Java implements IBoundObject {
938        private final IMetaschemaData __metaschemaData;
939
940        /**
941         * The Java class name to use for the generated class.
942         */
943        @BoundField(
944            formalName = "Use Class Name",
945            description = "The Java class name to use for the generated class.",
946            useName = "use-class-name",
947            typeAdapter = TokenAdapter.class)
948        private String _useClassName;
949
950        /**
951         * A fully qualified Java interface name that the generated class should
952         * implement.
953         */
954        @BoundField(
955            formalName = "Implement Interface",
956            description = "A fully qualified Java interface name that the generated class should implement.",
957            useName = "implement-interface",
958            maxOccurs = -1,
959            groupAs = @GroupAs(name = "implement-interfaces", inJson = JsonGroupAsBehavior.LIST),
960            typeAdapter = TokenAdapter.class)
961        private List<String> _implementInterfaces;
962
963        /**
964         * A fully qualified Java class name that the generated class should extend.
965         */
966        @BoundField(
967            formalName = "Extend Base Class",
968            description = "A fully qualified Java class name that the generated class should extend.",
969            useName = "extend-base-class",
970            typeAdapter = TokenAdapter.class)
971        private String _extendBaseClass;
972
973        /**
974         * A fully qualified Java collection class name to use instead of the default.
975         */
976        @BoundField(
977            formalName = "Collection Class",
978            description = "A fully qualified Java collection class name to use instead of the default.",
979            useName = "collection-class",
980            typeAdapter = TokenAdapter.class)
981        private String _collectionClass;
982
983        /**
984         * Constructs a new
985         * {@code dev.metaschema.databind.config.binding.MetaschemaBindings.MetaschemaBinding.DefineAssemblyBinding.Java}
986         * instance with no metadata.
987         */
988        public Java() {
989          this(null);
990        }
991
992        /**
993         * Constructs a new
994         * {@code dev.metaschema.databind.config.binding.MetaschemaBindings.MetaschemaBinding.DefineAssemblyBinding.Java}
995         * instance with the specified metadata.
996         *
997         * @param data
998         *          the metaschema data, or {@code null} if none
999         */
1000        public Java(IMetaschemaData data) {
1001          this.__metaschemaData = data;
1002        }
1003
1004        @Override
1005        public IMetaschemaData getMetaschemaData() {
1006          return __metaschemaData;
1007        }
1008
1009        /**
1010         * Get the use Class Name.
1011         *
1012         * <p>
1013         * The Java class name to use for the generated class.
1014         *
1015         * @return the use-class-name value, or {@code null} if not set
1016         */
1017        @Nullable
1018        public String getUseClassName() {
1019          return _useClassName;
1020        }
1021
1022        /**
1023         * Set the use Class Name.
1024         *
1025         * <p>
1026         * The Java class name to use for the generated class.
1027         *
1028         * @param value
1029         *          the use-class-name value to set, or {@code null} to clear
1030         */
1031        public void setUseClassName(@Nullable String value) {
1032          _useClassName = value;
1033        }
1034
1035        /**
1036         * Get the implement Interface.
1037         *
1038         * <p>
1039         * A fully qualified Java interface name that the generated class should
1040         * implement.
1041         *
1042         * @return the implement-interface value
1043         */
1044        @NonNull
1045        public List<String> getImplementInterfaces() {
1046          if (_implementInterfaces == null) {
1047            _implementInterfaces = new LinkedList<>();
1048          }
1049          return ObjectUtils.notNull(_implementInterfaces);
1050        }
1051
1052        /**
1053         * Set the implement Interface.
1054         *
1055         * <p>
1056         * A fully qualified Java interface name that the generated class should
1057         * implement.
1058         *
1059         * @param value
1060         *          the implement-interface value to set
1061         */
1062        public void setImplementInterfaces(@NonNull List<String> value) {
1063          _implementInterfaces = value;
1064        }
1065
1066        /**
1067         * Add a new {@link String} item to the underlying collection.
1068         *
1069         * @param item
1070         *          the item to add
1071         * @return {@code true}
1072         */
1073        public boolean addImplementInterface(String item) {
1074          String value = ObjectUtils.requireNonNull(item, "item cannot be null");
1075          if (_implementInterfaces == null) {
1076            _implementInterfaces = new LinkedList<>();
1077          }
1078          return _implementInterfaces.add(value);
1079        }
1080
1081        /**
1082         * Remove the first matching {@link String} item from the underlying collection.
1083         *
1084         * @param item
1085         *          the item to remove
1086         * @return {@code true} if the item was removed or {@code false} otherwise
1087         */
1088        public boolean removeImplementInterface(String item) {
1089          String value = ObjectUtils.requireNonNull(item, "item cannot be null");
1090          return _implementInterfaces != null && _implementInterfaces.remove(value);
1091        }
1092
1093        /**
1094         * Get the extend Base Class.
1095         *
1096         * <p>
1097         * A fully qualified Java class name that the generated class should extend.
1098         *
1099         * @return the extend-base-class value, or {@code null} if not set
1100         */
1101        @Nullable
1102        public String getExtendBaseClass() {
1103          return _extendBaseClass;
1104        }
1105
1106        /**
1107         * Set the extend Base Class.
1108         *
1109         * <p>
1110         * A fully qualified Java class name that the generated class should extend.
1111         *
1112         * @param value
1113         *          the extend-base-class value to set, or {@code null} to clear
1114         */
1115        public void setExtendBaseClass(@Nullable String value) {
1116          _extendBaseClass = value;
1117        }
1118
1119        /**
1120         * Get the collection Class.
1121         *
1122         * <p>
1123         * A fully qualified Java collection class name to use instead of the default.
1124         *
1125         * @return the collection-class value, or {@code null} if not set
1126         */
1127        @Nullable
1128        public String getCollectionClass() {
1129          return _collectionClass;
1130        }
1131
1132        /**
1133         * Set the collection Class.
1134         *
1135         * <p>
1136         * A fully qualified Java collection class name to use instead of the default.
1137         *
1138         * @param value
1139         *          the collection-class value to set, or {@code null} to clear
1140         */
1141        public void setCollectionClass(@Nullable String value) {
1142          _collectionClass = value;
1143        }
1144
1145        @Override
1146        public String toString() {
1147          return ObjectUtils.notNull(new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString());
1148        }
1149      }
1150
1151      /**
1152       * Provides binding configurations for a property within the parent definition.
1153       */
1154      @MetaschemaAssembly(
1155          formalName = "Property Binding",
1156          description = "Provides binding configurations for a property within the parent definition.",
1157          name = "property-binding",
1158          moduleClass = MetaschemaBindingsModule.class)
1159      public static class PropertyBinding implements IBoundObject {
1160        private final IMetaschemaData __metaschemaData;
1161
1162        /**
1163         * The name of the property within the parent definition.
1164         */
1165        @BoundFlag(
1166            formalName = "Name",
1167            description = "The name of the property within the parent definition.",
1168            name = "name",
1169            required = true,
1170            typeAdapter = TokenAdapter.class)
1171        private String _name;
1172
1173        /**
1174         * Java-specific binding configuration for a property.
1175         */
1176        @BoundAssembly(
1177            formalName = "Java Property Binding",
1178            description = "Java-specific binding configuration for a property.",
1179            useName = "java")
1180        private Java _java;
1181
1182        /**
1183         * Constructs a new
1184         * {@code dev.metaschema.databind.config.binding.MetaschemaBindings.MetaschemaBinding.DefineAssemblyBinding.PropertyBinding}
1185         * instance with no metadata.
1186         */
1187        public PropertyBinding() {
1188          this(null);
1189        }
1190
1191        /**
1192         * Constructs a new
1193         * {@code dev.metaschema.databind.config.binding.MetaschemaBindings.MetaschemaBinding.DefineAssemblyBinding.PropertyBinding}
1194         * instance with the specified metadata.
1195         *
1196         * @param data
1197         *          the metaschema data, or {@code null} if none
1198         */
1199        public PropertyBinding(IMetaschemaData data) {
1200          this.__metaschemaData = data;
1201        }
1202
1203        @Override
1204        public IMetaschemaData getMetaschemaData() {
1205          return __metaschemaData;
1206        }
1207
1208        /**
1209         * Get the name.
1210         *
1211         * <p>
1212         * The name of the property within the parent definition.
1213         *
1214         * @return the name value
1215         */
1216        @NonNull
1217        public String getName() {
1218          return _name;
1219        }
1220
1221        /**
1222         * Set the name.
1223         *
1224         * <p>
1225         * The name of the property within the parent definition.
1226         *
1227         * @param value
1228         *          the name value to set
1229         */
1230        public void setName(@NonNull String value) {
1231          _name = value;
1232        }
1233
1234        /**
1235         * Get the java Property Binding.
1236         *
1237         * <p>
1238         * Java-specific binding configuration for a property.
1239         *
1240         * @return the java value, or {@code null} if not set
1241         */
1242        @Nullable
1243        public Java getJava() {
1244          return _java;
1245        }
1246
1247        /**
1248         * Set the java Property Binding.
1249         *
1250         * <p>
1251         * Java-specific binding configuration for a property.
1252         *
1253         * @param value
1254         *          the java value to set, or {@code null} to clear
1255         */
1256        public void setJava(@Nullable Java value) {
1257          _java = value;
1258        }
1259
1260        @Override
1261        public String toString() {
1262          return ObjectUtils.notNull(new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString());
1263        }
1264
1265        /**
1266         * Java-specific binding configuration for a property.
1267         */
1268        @MetaschemaAssembly(
1269            formalName = "Java Property Binding",
1270            description = "Java-specific binding configuration for a property.",
1271            name = "java",
1272            moduleClass = MetaschemaBindingsModule.class)
1273        public static class Java implements IBoundObject {
1274          private final IMetaschemaData __metaschemaData;
1275
1276          /**
1277           * A fully qualified Java collection class name to use instead of the default.
1278           */
1279          @BoundField(
1280              formalName = "Collection Class",
1281              description = "A fully qualified Java collection class name to use instead of the default.",
1282              useName = "collection-class",
1283              typeAdapter = TokenAdapter.class)
1284          private String _collectionClass;
1285
1286          /**
1287           * Constructs a new
1288           * {@code dev.metaschema.databind.config.binding.MetaschemaBindings.MetaschemaBinding.DefineAssemblyBinding.PropertyBinding.Java}
1289           * instance with no metadata.
1290           */
1291          public Java() {
1292            this(null);
1293          }
1294
1295          /**
1296           * Constructs a new
1297           * {@code dev.metaschema.databind.config.binding.MetaschemaBindings.MetaschemaBinding.DefineAssemblyBinding.PropertyBinding.Java}
1298           * instance with the specified metadata.
1299           *
1300           * @param data
1301           *          the metaschema data, or {@code null} if none
1302           */
1303          public Java(IMetaschemaData data) {
1304            this.__metaschemaData = data;
1305          }
1306
1307          @Override
1308          public IMetaschemaData getMetaschemaData() {
1309            return __metaschemaData;
1310          }
1311
1312          /**
1313           * Get the collection Class.
1314           *
1315           * <p>
1316           * A fully qualified Java collection class name to use instead of the default.
1317           *
1318           * @return the collection-class value, or {@code null} if not set
1319           */
1320          @Nullable
1321          public String getCollectionClass() {
1322            return _collectionClass;
1323          }
1324
1325          /**
1326           * Set the collection Class.
1327           *
1328           * <p>
1329           * A fully qualified Java collection class name to use instead of the default.
1330           *
1331           * @param value
1332           *          the collection-class value to set, or {@code null} to clear
1333           */
1334          public void setCollectionClass(@Nullable String value) {
1335            _collectionClass = value;
1336          }
1337
1338          @Override
1339          public String toString() {
1340            return ObjectUtils.notNull(new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString());
1341          }
1342        }
1343      }
1344
1345      /**
1346       * Provides binding configuration for a choice group within the parent assembly.
1347       */
1348      @MetaschemaAssembly(
1349          formalName = "Choice Group Binding",
1350          description = "Provides binding configuration for a choice group within the parent assembly.",
1351          name = "choice-group-binding",
1352          moduleClass = MetaschemaBindingsModule.class)
1353      public static class ChoiceGroupBinding implements IBoundObject {
1354        private final IMetaschemaData __metaschemaData;
1355
1356        /**
1357         * The name of the choice group (matches the group-as name in the metaschema).
1358         */
1359        @BoundFlag(
1360            formalName = "Name",
1361            description = "The name of the choice group (matches the group-as name in the metaschema).",
1362            name = "name",
1363            required = true,
1364            typeAdapter = TokenAdapter.class)
1365        private String _name;
1366
1367        /**
1368         * A fully qualified Java type for collection items. When specified, the
1369         * generated field and getter will use this type instead of Object.
1370         */
1371        @BoundField(
1372            formalName = "Item Type",
1373            description = "A fully qualified Java type for collection items. When specified, the generated field and getter will use this type instead of Object.",
1374            useName = "item-type")
1375        private ItemType _itemType;
1376
1377        /**
1378         * Constructs a new
1379         * {@code dev.metaschema.databind.config.binding.MetaschemaBindings.MetaschemaBinding.DefineAssemblyBinding.ChoiceGroupBinding}
1380         * instance with no metadata.
1381         */
1382        public ChoiceGroupBinding() {
1383          this(null);
1384        }
1385
1386        /**
1387         * Constructs a new
1388         * {@code dev.metaschema.databind.config.binding.MetaschemaBindings.MetaschemaBinding.DefineAssemblyBinding.ChoiceGroupBinding}
1389         * instance with the specified metadata.
1390         *
1391         * @param data
1392         *          the metaschema data, or {@code null} if none
1393         */
1394        public ChoiceGroupBinding(IMetaschemaData data) {
1395          this.__metaschemaData = data;
1396        }
1397
1398        @Override
1399        public IMetaschemaData getMetaschemaData() {
1400          return __metaschemaData;
1401        }
1402
1403        /**
1404         * Get the name.
1405         *
1406         * <p>
1407         * The name of the choice group (matches the group-as name in the metaschema).
1408         *
1409         * @return the name value
1410         */
1411        @NonNull
1412        public String getName() {
1413          return _name;
1414        }
1415
1416        /**
1417         * Set the name.
1418         *
1419         * <p>
1420         * The name of the choice group (matches the group-as name in the metaschema).
1421         *
1422         * @param value
1423         *          the name value to set
1424         */
1425        public void setName(@NonNull String value) {
1426          _name = value;
1427        }
1428
1429        /**
1430         * Get the item Type.
1431         *
1432         * <p>
1433         * A fully qualified Java type for collection items. When specified, the
1434         * generated field and getter will use this type instead of Object.
1435         *
1436         * @return the item-type value, or {@code null} if not set
1437         */
1438        @Nullable
1439        public ItemType getItemType() {
1440          return _itemType;
1441        }
1442
1443        /**
1444         * Set the item Type.
1445         *
1446         * <p>
1447         * A fully qualified Java type for collection items. When specified, the
1448         * generated field and getter will use this type instead of Object.
1449         *
1450         * @param value
1451         *          the item-type value to set, or {@code null} to clear
1452         */
1453        public void setItemType(@Nullable ItemType value) {
1454          _itemType = value;
1455        }
1456
1457        @Override
1458        public String toString() {
1459          return ObjectUtils.notNull(new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString());
1460        }
1461
1462        /**
1463         * A fully qualified Java type for collection items. When specified, the
1464         * generated field and getter will use this type instead of Object.
1465         */
1466        @MetaschemaField(
1467            formalName = "Item Type",
1468            description = "A fully qualified Java type for collection items. When specified, the generated field and getter will use this type instead of Object.",
1469            name = "item-type",
1470            moduleClass = MetaschemaBindingsModule.class)
1471        public static class ItemType implements IBoundObject {
1472          private final IMetaschemaData __metaschemaData;
1473
1474          /**
1475           * Whether to use a wildcard bounded type (List&lt;? extends Type&gt;). Defaults
1476           * to true.
1477           */
1478          @BoundFlag(
1479              formalName = "Use Wildcard",
1480              description = "Whether to use a wildcard bounded type (List<? extends Type>). Defaults to true.",
1481              name = "use-wildcard",
1482              defaultValue = "true",
1483              typeAdapter = BooleanAdapter.class)
1484          private Boolean _useWildcard;
1485
1486          /**
1487           * The field value.
1488           */
1489          @BoundFieldValue(
1490              valueKeyName = "STRVALUE",
1491              typeAdapter = TokenAdapter.class)
1492          private String _value;
1493
1494          /**
1495           * Constructs a new
1496           * {@code dev.metaschema.databind.config.binding.MetaschemaBindings.MetaschemaBinding.DefineAssemblyBinding.ChoiceGroupBinding.ItemType}
1497           * instance with no metadata.
1498           */
1499          public ItemType() {
1500            this(null);
1501          }
1502
1503          /**
1504           * Constructs a new
1505           * {@code dev.metaschema.databind.config.binding.MetaschemaBindings.MetaschemaBinding.DefineAssemblyBinding.ChoiceGroupBinding.ItemType}
1506           * instance with the specified metadata.
1507           *
1508           * @param data
1509           *          the metaschema data, or {@code null} if none
1510           */
1511          public ItemType(IMetaschemaData data) {
1512            this.__metaschemaData = data;
1513          }
1514
1515          @Override
1516          public IMetaschemaData getMetaschemaData() {
1517            return __metaschemaData;
1518          }
1519
1520          /**
1521           * Get the use Wildcard.
1522           *
1523           * <p>
1524           * Whether to use a wildcard bounded type (List&lt;? extends Type&gt;). Defaults
1525           * to true.
1526           *
1527           * @return the use-wildcard value, or {@code null} if not set
1528           */
1529          @Nullable
1530          public Boolean getUseWildcard() {
1531            return _useWildcard;
1532          }
1533
1534          /**
1535           * Set the use Wildcard.
1536           *
1537           * <p>
1538           * Whether to use a wildcard bounded type (List&lt;? extends Type&gt;). Defaults
1539           * to true.
1540           *
1541           * @param value
1542           *          the use-wildcard value to set, or {@code null} to clear
1543           */
1544          public void setUseWildcard(@Nullable Boolean value) {
1545            _useWildcard = value;
1546          }
1547
1548          /**
1549           * Get the field value.
1550           *
1551           * @return the value
1552           */
1553          @Nullable
1554          public String getValue() {
1555            return _value;
1556          }
1557
1558          /**
1559           * Set the field value.
1560           *
1561           * @param value
1562           *          the value to set
1563           */
1564          public void setValue(@Nullable String value) {
1565            _value = value;
1566          }
1567
1568          @Override
1569          public String toString() {
1570            return ObjectUtils.notNull(new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString());
1571          }
1572        }
1573      }
1574    }
1575
1576    /**
1577     * Provides binding configurations for a given defined field within the parent
1578     * metaschema.
1579     */
1580    @MetaschemaAssembly(
1581        formalName = "Define Field Binding",
1582        description = "Provides binding configurations for a given defined field within the parent metaschema.",
1583        name = "define-field-binding",
1584        moduleClass = MetaschemaBindingsModule.class)
1585    public static class DefineFieldBinding implements IBoundObject {
1586      private final IMetaschemaData __metaschemaData;
1587
1588      /**
1589       * The name of the metaschema field. Used for top-level definitions.
1590       */
1591      @BoundFlag(
1592          formalName = "Name",
1593          description = "The name of the metaschema field. Used for top-level definitions.",
1594          name = "name",
1595          typeAdapter = TokenAdapter.class)
1596      private String _name;
1597
1598      /**
1599       * A Metapath expression targeting the field definition(s) within the
1600       * metaschema. Used for inline definitions.
1601       */
1602      @BoundFlag(
1603          formalName = "Target",
1604          description = "A Metapath expression targeting the field definition(s) within the metaschema. Used for inline definitions.",
1605          name = "target",
1606          typeAdapter = StringAdapter.class)
1607      private String _target;
1608
1609      /**
1610       * Field and assembly binding configurations for Java bound classes.
1611       */
1612      @BoundAssembly(
1613          formalName = "Java Object Definition Binding",
1614          description = "Field and assembly binding configurations for Java bound classes.",
1615          useName = "java")
1616      private Java _java;
1617
1618      /**
1619       * Provides binding configurations for a property within the parent definition.
1620       */
1621      @BoundAssembly(
1622          formalName = "Property Binding",
1623          description = "Provides binding configurations for a property within the parent definition.",
1624          useName = "property-binding",
1625          maxOccurs = -1,
1626          groupAs = @GroupAs(name = "property-bindings", inJson = JsonGroupAsBehavior.LIST))
1627      private List<PropertyBinding> _propertyBindings;
1628
1629      /**
1630       * Constructs a new
1631       * {@code dev.metaschema.databind.config.binding.MetaschemaBindings.MetaschemaBinding.DefineFieldBinding}
1632       * instance with no metadata.
1633       */
1634      public DefineFieldBinding() {
1635        this(null);
1636      }
1637
1638      /**
1639       * Constructs a new
1640       * {@code dev.metaschema.databind.config.binding.MetaschemaBindings.MetaschemaBinding.DefineFieldBinding}
1641       * instance with the specified metadata.
1642       *
1643       * @param data
1644       *          the metaschema data, or {@code null} if none
1645       */
1646      public DefineFieldBinding(IMetaschemaData data) {
1647        this.__metaschemaData = data;
1648      }
1649
1650      @Override
1651      public IMetaschemaData getMetaschemaData() {
1652        return __metaschemaData;
1653      }
1654
1655      /**
1656       * Get the name.
1657       *
1658       * <p>
1659       * The name of the metaschema field. Used for top-level definitions.
1660       *
1661       * @return the name value, or {@code null} if not set
1662       */
1663      @Nullable
1664      public String getName() {
1665        return _name;
1666      }
1667
1668      /**
1669       * Set the name.
1670       *
1671       * <p>
1672       * The name of the metaschema field. Used for top-level definitions.
1673       *
1674       * @param value
1675       *          the name value to set, or {@code null} to clear
1676       */
1677      public void setName(@Nullable String value) {
1678        _name = value;
1679      }
1680
1681      /**
1682       * Get the target.
1683       *
1684       * <p>
1685       * A Metapath expression targeting the field definition(s) within the
1686       * metaschema. Used for inline definitions.
1687       *
1688       * @return the target value, or {@code null} if not set
1689       */
1690      @Nullable
1691      public String getTarget() {
1692        return _target;
1693      }
1694
1695      /**
1696       * Set the target.
1697       *
1698       * <p>
1699       * A Metapath expression targeting the field definition(s) within the
1700       * metaschema. Used for inline definitions.
1701       *
1702       * @param value
1703       *          the target value to set, or {@code null} to clear
1704       */
1705      public void setTarget(@Nullable String value) {
1706        _target = value;
1707      }
1708
1709      /**
1710       * Get the java Object Definition Binding.
1711       *
1712       * <p>
1713       * Field and assembly binding configurations for Java bound classes.
1714       *
1715       * @return the java value, or {@code null} if not set
1716       */
1717      @Nullable
1718      public Java getJava() {
1719        return _java;
1720      }
1721
1722      /**
1723       * Set the java Object Definition Binding.
1724       *
1725       * <p>
1726       * Field and assembly binding configurations for Java bound classes.
1727       *
1728       * @param value
1729       *          the java value to set, or {@code null} to clear
1730       */
1731      public void setJava(@Nullable Java value) {
1732        _java = value;
1733      }
1734
1735      /**
1736       * Get the property Binding.
1737       *
1738       * <p>
1739       * Provides binding configurations for a property within the parent definition.
1740       *
1741       * @return the property-binding value
1742       */
1743      @NonNull
1744      public List<PropertyBinding> getPropertyBindings() {
1745        if (_propertyBindings == null) {
1746          _propertyBindings = new LinkedList<>();
1747        }
1748        return ObjectUtils.notNull(_propertyBindings);
1749      }
1750
1751      /**
1752       * Set the property Binding.
1753       *
1754       * <p>
1755       * Provides binding configurations for a property within the parent definition.
1756       *
1757       * @param value
1758       *          the property-binding value to set
1759       */
1760      public void setPropertyBindings(@NonNull List<PropertyBinding> value) {
1761        _propertyBindings = value;
1762      }
1763
1764      /**
1765       * Add a new {@link PropertyBinding} item to the underlying collection.
1766       *
1767       * @param item
1768       *          the item to add
1769       * @return {@code true}
1770       */
1771      public boolean addPropertyBinding(PropertyBinding item) {
1772        PropertyBinding value = ObjectUtils.requireNonNull(item, "item cannot be null");
1773        if (_propertyBindings == null) {
1774          _propertyBindings = new LinkedList<>();
1775        }
1776        return _propertyBindings.add(value);
1777      }
1778
1779      /**
1780       * Remove the first matching {@link PropertyBinding} item from the underlying
1781       * collection.
1782       *
1783       * @param item
1784       *          the item to remove
1785       * @return {@code true} if the item was removed or {@code false} otherwise
1786       */
1787      public boolean removePropertyBinding(PropertyBinding item) {
1788        PropertyBinding value = ObjectUtils.requireNonNull(item, "item cannot be null");
1789        return _propertyBindings != null && _propertyBindings.remove(value);
1790      }
1791
1792      @Override
1793      public String toString() {
1794        return ObjectUtils.notNull(new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString());
1795      }
1796
1797      /**
1798       * Field and assembly binding configurations for Java bound classes.
1799       */
1800      @MetaschemaAssembly(
1801          formalName = "Java Object Definition Binding",
1802          description = "Field and assembly binding configurations for Java bound classes.",
1803          name = "java",
1804          moduleClass = MetaschemaBindingsModule.class)
1805      public static class Java implements IBoundObject {
1806        private final IMetaschemaData __metaschemaData;
1807
1808        /**
1809         * The Java class name to use for the generated class.
1810         */
1811        @BoundField(
1812            formalName = "Use Class Name",
1813            description = "The Java class name to use for the generated class.",
1814            useName = "use-class-name",
1815            typeAdapter = TokenAdapter.class)
1816        private String _useClassName;
1817
1818        /**
1819         * A fully qualified Java interface name that the generated class should
1820         * implement.
1821         */
1822        @BoundField(
1823            formalName = "Implement Interface",
1824            description = "A fully qualified Java interface name that the generated class should implement.",
1825            useName = "implement-interface",
1826            maxOccurs = -1,
1827            groupAs = @GroupAs(name = "implement-interfaces", inJson = JsonGroupAsBehavior.LIST),
1828            typeAdapter = TokenAdapter.class)
1829        private List<String> _implementInterfaces;
1830
1831        /**
1832         * A fully qualified Java class name that the generated class should extend.
1833         */
1834        @BoundField(
1835            formalName = "Extend Base Class",
1836            description = "A fully qualified Java class name that the generated class should extend.",
1837            useName = "extend-base-class",
1838            typeAdapter = TokenAdapter.class)
1839        private String _extendBaseClass;
1840
1841        /**
1842         * A fully qualified Java collection class name to use instead of the default.
1843         */
1844        @BoundField(
1845            formalName = "Collection Class",
1846            description = "A fully qualified Java collection class name to use instead of the default.",
1847            useName = "collection-class",
1848            typeAdapter = TokenAdapter.class)
1849        private String _collectionClass;
1850
1851        /**
1852         * Constructs a new
1853         * {@code dev.metaschema.databind.config.binding.MetaschemaBindings.MetaschemaBinding.DefineFieldBinding.Java}
1854         * instance with no metadata.
1855         */
1856        public Java() {
1857          this(null);
1858        }
1859
1860        /**
1861         * Constructs a new
1862         * {@code dev.metaschema.databind.config.binding.MetaschemaBindings.MetaschemaBinding.DefineFieldBinding.Java}
1863         * instance with the specified metadata.
1864         *
1865         * @param data
1866         *          the metaschema data, or {@code null} if none
1867         */
1868        public Java(IMetaschemaData data) {
1869          this.__metaschemaData = data;
1870        }
1871
1872        @Override
1873        public IMetaschemaData getMetaschemaData() {
1874          return __metaschemaData;
1875        }
1876
1877        /**
1878         * Get the use Class Name.
1879         *
1880         * <p>
1881         * The Java class name to use for the generated class.
1882         *
1883         * @return the use-class-name value, or {@code null} if not set
1884         */
1885        @Nullable
1886        public String getUseClassName() {
1887          return _useClassName;
1888        }
1889
1890        /**
1891         * Set the use Class Name.
1892         *
1893         * <p>
1894         * The Java class name to use for the generated class.
1895         *
1896         * @param value
1897         *          the use-class-name value to set, or {@code null} to clear
1898         */
1899        public void setUseClassName(@Nullable String value) {
1900          _useClassName = value;
1901        }
1902
1903        /**
1904         * Get the implement Interface.
1905         *
1906         * <p>
1907         * A fully qualified Java interface name that the generated class should
1908         * implement.
1909         *
1910         * @return the implement-interface value
1911         */
1912        @NonNull
1913        public List<String> getImplementInterfaces() {
1914          if (_implementInterfaces == null) {
1915            _implementInterfaces = new LinkedList<>();
1916          }
1917          return ObjectUtils.notNull(_implementInterfaces);
1918        }
1919
1920        /**
1921         * Set the implement Interface.
1922         *
1923         * <p>
1924         * A fully qualified Java interface name that the generated class should
1925         * implement.
1926         *
1927         * @param value
1928         *          the implement-interface value to set
1929         */
1930        public void setImplementInterfaces(@NonNull List<String> value) {
1931          _implementInterfaces = value;
1932        }
1933
1934        /**
1935         * Add a new {@link String} item to the underlying collection.
1936         *
1937         * @param item
1938         *          the item to add
1939         * @return {@code true}
1940         */
1941        public boolean addImplementInterface(String item) {
1942          String value = ObjectUtils.requireNonNull(item, "item cannot be null");
1943          if (_implementInterfaces == null) {
1944            _implementInterfaces = new LinkedList<>();
1945          }
1946          return _implementInterfaces.add(value);
1947        }
1948
1949        /**
1950         * Remove the first matching {@link String} item from the underlying collection.
1951         *
1952         * @param item
1953         *          the item to remove
1954         * @return {@code true} if the item was removed or {@code false} otherwise
1955         */
1956        public boolean removeImplementInterface(String item) {
1957          String value = ObjectUtils.requireNonNull(item, "item cannot be null");
1958          return _implementInterfaces != null && _implementInterfaces.remove(value);
1959        }
1960
1961        /**
1962         * Get the extend Base Class.
1963         *
1964         * <p>
1965         * A fully qualified Java class name that the generated class should extend.
1966         *
1967         * @return the extend-base-class value, or {@code null} if not set
1968         */
1969        @Nullable
1970        public String getExtendBaseClass() {
1971          return _extendBaseClass;
1972        }
1973
1974        /**
1975         * Set the extend Base Class.
1976         *
1977         * <p>
1978         * A fully qualified Java class name that the generated class should extend.
1979         *
1980         * @param value
1981         *          the extend-base-class value to set, or {@code null} to clear
1982         */
1983        public void setExtendBaseClass(@Nullable String value) {
1984          _extendBaseClass = value;
1985        }
1986
1987        /**
1988         * Get the collection Class.
1989         *
1990         * <p>
1991         * A fully qualified Java collection class name to use instead of the default.
1992         *
1993         * @return the collection-class value, or {@code null} if not set
1994         */
1995        @Nullable
1996        public String getCollectionClass() {
1997          return _collectionClass;
1998        }
1999
2000        /**
2001         * Set the collection Class.
2002         *
2003         * <p>
2004         * A fully qualified Java collection class name to use instead of the default.
2005         *
2006         * @param value
2007         *          the collection-class value to set, or {@code null} to clear
2008         */
2009        public void setCollectionClass(@Nullable String value) {
2010          _collectionClass = value;
2011        }
2012
2013        @Override
2014        public String toString() {
2015          return ObjectUtils.notNull(new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString());
2016        }
2017      }
2018
2019      /**
2020       * Provides binding configurations for a property within the parent definition.
2021       */
2022      @MetaschemaAssembly(
2023          formalName = "Property Binding",
2024          description = "Provides binding configurations for a property within the parent definition.",
2025          name = "property-binding",
2026          moduleClass = MetaschemaBindingsModule.class)
2027      public static class PropertyBinding implements IBoundObject {
2028        private final IMetaschemaData __metaschemaData;
2029
2030        /**
2031         * The name of the property within the parent definition.
2032         */
2033        @BoundFlag(
2034            formalName = "Name",
2035            description = "The name of the property within the parent definition.",
2036            name = "name",
2037            required = true,
2038            typeAdapter = TokenAdapter.class)
2039        private String _name;
2040
2041        /**
2042         * Java-specific binding configuration for a property.
2043         */
2044        @BoundAssembly(
2045            formalName = "Java Property Binding",
2046            description = "Java-specific binding configuration for a property.",
2047            useName = "java")
2048        private Java _java;
2049
2050        /**
2051         * Constructs a new
2052         * {@code dev.metaschema.databind.config.binding.MetaschemaBindings.MetaschemaBinding.DefineFieldBinding.PropertyBinding}
2053         * instance with no metadata.
2054         */
2055        public PropertyBinding() {
2056          this(null);
2057        }
2058
2059        /**
2060         * Constructs a new
2061         * {@code dev.metaschema.databind.config.binding.MetaschemaBindings.MetaschemaBinding.DefineFieldBinding.PropertyBinding}
2062         * instance with the specified metadata.
2063         *
2064         * @param data
2065         *          the metaschema data, or {@code null} if none
2066         */
2067        public PropertyBinding(IMetaschemaData data) {
2068          this.__metaschemaData = data;
2069        }
2070
2071        @Override
2072        public IMetaschemaData getMetaschemaData() {
2073          return __metaschemaData;
2074        }
2075
2076        /**
2077         * Get the name.
2078         *
2079         * <p>
2080         * The name of the property within the parent definition.
2081         *
2082         * @return the name value
2083         */
2084        @NonNull
2085        public String getName() {
2086          return _name;
2087        }
2088
2089        /**
2090         * Set the name.
2091         *
2092         * <p>
2093         * The name of the property within the parent definition.
2094         *
2095         * @param value
2096         *          the name value to set
2097         */
2098        public void setName(@NonNull String value) {
2099          _name = value;
2100        }
2101
2102        /**
2103         * Get the java Property Binding.
2104         *
2105         * <p>
2106         * Java-specific binding configuration for a property.
2107         *
2108         * @return the java value, or {@code null} if not set
2109         */
2110        @Nullable
2111        public Java getJava() {
2112          return _java;
2113        }
2114
2115        /**
2116         * Set the java Property Binding.
2117         *
2118         * <p>
2119         * Java-specific binding configuration for a property.
2120         *
2121         * @param value
2122         *          the java value to set, or {@code null} to clear
2123         */
2124        public void setJava(@Nullable Java value) {
2125          _java = value;
2126        }
2127
2128        @Override
2129        public String toString() {
2130          return ObjectUtils.notNull(new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString());
2131        }
2132
2133        /**
2134         * Java-specific binding configuration for a property.
2135         */
2136        @MetaschemaAssembly(
2137            formalName = "Java Property Binding",
2138            description = "Java-specific binding configuration for a property.",
2139            name = "java",
2140            moduleClass = MetaschemaBindingsModule.class)
2141        public static class Java implements IBoundObject {
2142          private final IMetaschemaData __metaschemaData;
2143
2144          /**
2145           * A fully qualified Java collection class name to use instead of the default.
2146           */
2147          @BoundField(
2148              formalName = "Collection Class",
2149              description = "A fully qualified Java collection class name to use instead of the default.",
2150              useName = "collection-class",
2151              typeAdapter = TokenAdapter.class)
2152          private String _collectionClass;
2153
2154          /**
2155           * Constructs a new
2156           * {@code dev.metaschema.databind.config.binding.MetaschemaBindings.MetaschemaBinding.DefineFieldBinding.PropertyBinding.Java}
2157           * instance with no metadata.
2158           */
2159          public Java() {
2160            this(null);
2161          }
2162
2163          /**
2164           * Constructs a new
2165           * {@code dev.metaschema.databind.config.binding.MetaschemaBindings.MetaschemaBinding.DefineFieldBinding.PropertyBinding.Java}
2166           * instance with the specified metadata.
2167           *
2168           * @param data
2169           *          the metaschema data, or {@code null} if none
2170           */
2171          public Java(IMetaschemaData data) {
2172            this.__metaschemaData = data;
2173          }
2174
2175          @Override
2176          public IMetaschemaData getMetaschemaData() {
2177            return __metaschemaData;
2178          }
2179
2180          /**
2181           * Get the collection Class.
2182           *
2183           * <p>
2184           * A fully qualified Java collection class name to use instead of the default.
2185           *
2186           * @return the collection-class value, or {@code null} if not set
2187           */
2188          @Nullable
2189          public String getCollectionClass() {
2190            return _collectionClass;
2191          }
2192
2193          /**
2194           * Set the collection Class.
2195           *
2196           * <p>
2197           * A fully qualified Java collection class name to use instead of the default.
2198           *
2199           * @param value
2200           *          the collection-class value to set, or {@code null} to clear
2201           */
2202          public void setCollectionClass(@Nullable String value) {
2203            _collectionClass = value;
2204          }
2205
2206          @Override
2207          public String toString() {
2208            return ObjectUtils.notNull(new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString());
2209          }
2210        }
2211      }
2212    }
2213  }
2214}