/*
 *  Copyright 2001-present Stephen Colebourne
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */
package org.joda.beans.sample;

import java.io.Serializable;
import java.util.Arrays;
import java.util.EnumSet;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.NoSuchElementException;
import java.util.Set;

import org.joda.beans.Bean;
import org.joda.beans.ImmutableBean;
import org.joda.beans.JodaBeanUtils;
import org.joda.beans.MetaBean;
import org.joda.beans.MetaProperty;
import org.joda.beans.gen.BeanDefinition;
import org.joda.beans.gen.PropertyDefinition;
import org.joda.beans.impl.direct.DirectFieldsBeanBuilder;
import org.joda.beans.impl.direct.DirectMetaBean;
import org.joda.beans.impl.direct.DirectMetaProperty;
import org.joda.beans.impl.direct.DirectMetaPropertyMap;

import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;

/**
 * Mock address JavaBean, used for testing.
 * 
 * @author Stephen Colebourne
 */
@BeanDefinition(constructorScope = "private")
public final class SimpleJson implements ImmutableBean, Serializable {

    @PropertyDefinition
    private final char primitiveChar;
    @PropertyDefinition
    private final byte primitiveByte;
    @PropertyDefinition
    private final short primitiveShort;
    @PropertyDefinition
    private final int primitiveInt;
    @PropertyDefinition
    private final long primitiveLong;
    @PropertyDefinition
    private final float primitiveFloat;
    @PropertyDefinition
    private final double primitiveDouble;
    @PropertyDefinition
    private final double primitiveDoubleNaN;
    @PropertyDefinition
    private final double primitiveDoubleInf;
    @PropertyDefinition
    private final Number abstractNumber;
    @PropertyDefinition
    private final byte[] arrayByte;
    @PropertyDefinition
    private final String[][] array2d;
    @PropertyDefinition
    private final String string;
    @PropertyDefinition
    private final ImmKey bean;
    @PropertyDefinition
    private final Object object1;
    @PropertyDefinition
    private final Object object2;
    @PropertyDefinition
    private final Risk risk;
    @PropertyDefinition
    private final RiskLevel riskLevel;
    @PropertyDefinition
    private final EnumSet<RiskLevel> riskLevels;
    @PropertyDefinition
    private final ImmutableList<String> stringList;
    @PropertyDefinition
    private final ImmutableList<ImmKey> beanList;
    @PropertyDefinition
    private final ImmutableMap<String, String> stringMap;
    @PropertyDefinition
    private final ImmutableMap<Integer, String> intKeyMap;
    @PropertyDefinition
    private final ImmutableMap<String, ImmKey> beanMap;
    @PropertyDefinition
    private final ImmutableMap<String, List<String>> listInMap;
    @PropertyDefinition
    private final ImmutableMap<String, List<Integer>> listNumericInMap;
    @PropertyDefinition
    private final ImmutableMap<String, Object> objectInMap;

    //------------------------- AUTOGENERATED START -------------------------
    /**
     * The meta-bean for {@code SimpleJson}.
     * @return the meta-bean, not null
     */
    public static SimpleJson.Meta meta() {
        return SimpleJson.Meta.INSTANCE;
    }

    static {
        MetaBean.register(SimpleJson.Meta.INSTANCE);
    }

    /**
     * The serialization version id.
     */
    private static final long serialVersionUID = 1L;

    /**
     * Returns a builder used to create an instance of the bean.
     * @return the builder, not null
     */
    public static SimpleJson.Builder builder() {
        return new SimpleJson.Builder();
    }

    private SimpleJson(
            char primitiveChar,
            byte primitiveByte,
            short primitiveShort,
            int primitiveInt,
            long primitiveLong,
            float primitiveFloat,
            double primitiveDouble,
            double primitiveDoubleNaN,
            double primitiveDoubleInf,
            Number abstractNumber,
            byte[] arrayByte,
            String[][] array2d,
            String string,
            ImmKey bean,
            Object object1,
            Object object2,
            Risk risk,
            RiskLevel riskLevel,
            Set<RiskLevel> riskLevels,
            List<String> stringList,
            List<ImmKey> beanList,
            Map<String, String> stringMap,
            Map<Integer, String> intKeyMap,
            Map<String, ImmKey> beanMap,
            Map<String, List<String>> listInMap,
            Map<String, List<Integer>> listNumericInMap,
            Map<String, Object> objectInMap) {
        this.primitiveChar = primitiveChar;
        this.primitiveByte = primitiveByte;
        this.primitiveShort = primitiveShort;
        this.primitiveInt = primitiveInt;
        this.primitiveLong = primitiveLong;
        this.primitiveFloat = primitiveFloat;
        this.primitiveDouble = primitiveDouble;
        this.primitiveDoubleNaN = primitiveDoubleNaN;
        this.primitiveDoubleInf = primitiveDoubleInf;
        this.abstractNumber = abstractNumber;
        this.arrayByte = (arrayByte != null ? arrayByte.clone() : null);
        this.array2d = (String[][]) JodaBeanUtils.cloneArray(array2d);
        this.string = string;
        this.bean = bean;
        this.object1 = object1;
        this.object2 = object2;
        this.risk = risk;
        this.riskLevel = riskLevel;
        this.riskLevels = (riskLevels != null ? EnumSet.copyOf(riskLevels) : null);
        this.stringList = (stringList != null ? ImmutableList.copyOf(stringList) : null);
        this.beanList = (beanList != null ? ImmutableList.copyOf(beanList) : null);
        this.stringMap = (stringMap != null ? ImmutableMap.copyOf(stringMap) : null);
        this.intKeyMap = (intKeyMap != null ? ImmutableMap.copyOf(intKeyMap) : null);
        this.beanMap = (beanMap != null ? ImmutableMap.copyOf(beanMap) : null);
        this.listInMap = (listInMap != null ? ImmutableMap.copyOf(listInMap) : null);
        this.listNumericInMap = (listNumericInMap != null ? ImmutableMap.copyOf(listNumericInMap) : null);
        this.objectInMap = (objectInMap != null ? ImmutableMap.copyOf(objectInMap) : null);
    }

    @Override
    public SimpleJson.Meta metaBean() {
        return SimpleJson.Meta.INSTANCE;
    }

    //-----------------------------------------------------------------------
    /**
     * Gets the primitiveChar.
     * @return the value of the property
     */
    public char getPrimitiveChar() {
        return primitiveChar;
    }

    //-----------------------------------------------------------------------
    /**
     * Gets the primitiveByte.
     * @return the value of the property
     */
    public byte getPrimitiveByte() {
        return primitiveByte;
    }

    //-----------------------------------------------------------------------
    /**
     * Gets the primitiveShort.
     * @return the value of the property
     */
    public short getPrimitiveShort() {
        return primitiveShort;
    }

    //-----------------------------------------------------------------------
    /**
     * Gets the primitiveInt.
     * @return the value of the property
     */
    public int getPrimitiveInt() {
        return primitiveInt;
    }

    //-----------------------------------------------------------------------
    /**
     * Gets the primitiveLong.
     * @return the value of the property
     */
    public long getPrimitiveLong() {
        return primitiveLong;
    }

    //-----------------------------------------------------------------------
    /**
     * Gets the primitiveFloat.
     * @return the value of the property
     */
    public float getPrimitiveFloat() {
        return primitiveFloat;
    }

    //-----------------------------------------------------------------------
    /**
     * Gets the primitiveDouble.
     * @return the value of the property
     */
    public double getPrimitiveDouble() {
        return primitiveDouble;
    }

    //-----------------------------------------------------------------------
    /**
     * Gets the primitiveDoubleNaN.
     * @return the value of the property
     */
    public double getPrimitiveDoubleNaN() {
        return primitiveDoubleNaN;
    }

    //-----------------------------------------------------------------------
    /**
     * Gets the primitiveDoubleInf.
     * @return the value of the property
     */
    public double getPrimitiveDoubleInf() {
        return primitiveDoubleInf;
    }

    //-----------------------------------------------------------------------
    /**
     * Gets the abstractNumber.
     * @return the value of the property
     */
    public Number getAbstractNumber() {
        return abstractNumber;
    }

    //-----------------------------------------------------------------------
    /**
     * Gets the arrayByte.
     * @return the value of the property
     */
    public byte[] getArrayByte() {
        return (arrayByte != null ? arrayByte.clone() : null);
    }

    //-----------------------------------------------------------------------
    /**
     * Gets the array2d.
     * @return the value of the property
     */
    public String[][] getArray2d() {
        return (String[][]) JodaBeanUtils.cloneArray(array2d);
    }

    //-----------------------------------------------------------------------
    /**
     * Gets the string.
     * @return the value of the property
     */
    public String getString() {
        return string;
    }

    //-----------------------------------------------------------------------
    /**
     * Gets the bean.
     * @return the value of the property
     */
    public ImmKey getBean() {
        return bean;
    }

    //-----------------------------------------------------------------------
    /**
     * Gets the object1.
     * @return the value of the property
     */
    public Object getObject1() {
        return object1;
    }

    //-----------------------------------------------------------------------
    /**
     * Gets the object2.
     * @return the value of the property
     */
    public Object getObject2() {
        return object2;
    }

    //-----------------------------------------------------------------------
    /**
     * Gets the risk.
     * @return the value of the property
     */
    public Risk getRisk() {
        return risk;
    }

    //-----------------------------------------------------------------------
    /**
     * Gets the riskLevel.
     * @return the value of the property
     */
    public RiskLevel getRiskLevel() {
        return riskLevel;
    }

    //-----------------------------------------------------------------------
    /**
     * Gets the riskLevels.
     * @return the value of the property
     */
    public EnumSet<RiskLevel> getRiskLevels() {
        return riskLevels;
    }

    //-----------------------------------------------------------------------
    /**
     * Gets the stringList.
     * @return the value of the property
     */
    public ImmutableList<String> getStringList() {
        return stringList;
    }

    //-----------------------------------------------------------------------
    /**
     * Gets the beanList.
     * @return the value of the property
     */
    public ImmutableList<ImmKey> getBeanList() {
        return beanList;
    }

    //-----------------------------------------------------------------------
    /**
     * Gets the stringMap.
     * @return the value of the property
     */
    public ImmutableMap<String, String> getStringMap() {
        return stringMap;
    }

    //-----------------------------------------------------------------------
    /**
     * Gets the intKeyMap.
     * @return the value of the property
     */
    public ImmutableMap<Integer, String> getIntKeyMap() {
        return intKeyMap;
    }

    //-----------------------------------------------------------------------
    /**
     * Gets the beanMap.
     * @return the value of the property
     */
    public ImmutableMap<String, ImmKey> getBeanMap() {
        return beanMap;
    }

    //-----------------------------------------------------------------------
    /**
     * Gets the listInMap.
     * @return the value of the property
     */
    public ImmutableMap<String, List<String>> getListInMap() {
        return listInMap;
    }

    //-----------------------------------------------------------------------
    /**
     * Gets the listNumericInMap.
     * @return the value of the property
     */
    public ImmutableMap<String, List<Integer>> getListNumericInMap() {
        return listNumericInMap;
    }

    //-----------------------------------------------------------------------
    /**
     * Gets the objectInMap.
     * @return the value of the property
     */
    public ImmutableMap<String, Object> getObjectInMap() {
        return objectInMap;
    }

    //-----------------------------------------------------------------------
    /**
     * Returns a builder that allows this bean to be mutated.
     * @return the mutable builder, not null
     */
    public Builder toBuilder() {
        return new Builder(this);
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == this) {
            return true;
        }
        if (obj != null && obj.getClass() == this.getClass()) {
            SimpleJson other = (SimpleJson) obj;
            return (this.primitiveChar == other.primitiveChar) &&
                    (this.primitiveByte == other.primitiveByte) &&
                    (this.primitiveShort == other.primitiveShort) &&
                    (this.primitiveInt == other.primitiveInt) &&
                    (this.primitiveLong == other.primitiveLong) &&
                    JodaBeanUtils.equal(this.primitiveFloat, other.primitiveFloat) &&
                    JodaBeanUtils.equal(this.primitiveDouble, other.primitiveDouble) &&
                    JodaBeanUtils.equal(this.primitiveDoubleNaN, other.primitiveDoubleNaN) &&
                    JodaBeanUtils.equal(this.primitiveDoubleInf, other.primitiveDoubleInf) &&
                    JodaBeanUtils.equal(this.abstractNumber, other.abstractNumber) &&
                    JodaBeanUtils.equal(this.arrayByte, other.arrayByte) &&
                    JodaBeanUtils.equal(this.array2d, other.array2d) &&
                    JodaBeanUtils.equal(this.string, other.string) &&
                    JodaBeanUtils.equal(this.bean, other.bean) &&
                    JodaBeanUtils.equal(this.object1, other.object1) &&
                    JodaBeanUtils.equal(this.object2, other.object2) &&
                    JodaBeanUtils.equal(this.risk, other.risk) &&
                    JodaBeanUtils.equal(this.riskLevel, other.riskLevel) &&
                    JodaBeanUtils.equal(this.riskLevels, other.riskLevels) &&
                    JodaBeanUtils.equal(this.stringList, other.stringList) &&
                    JodaBeanUtils.equal(this.beanList, other.beanList) &&
                    JodaBeanUtils.equal(this.stringMap, other.stringMap) &&
                    JodaBeanUtils.equal(this.intKeyMap, other.intKeyMap) &&
                    JodaBeanUtils.equal(this.beanMap, other.beanMap) &&
                    JodaBeanUtils.equal(this.listInMap, other.listInMap) &&
                    JodaBeanUtils.equal(this.listNumericInMap, other.listNumericInMap) &&
                    JodaBeanUtils.equal(this.objectInMap, other.objectInMap);
        }
        return false;
    }

    @Override
    public int hashCode() {
        int hash = getClass().hashCode();
        hash = hash * 31 + JodaBeanUtils.hashCode(primitiveChar);
        hash = hash * 31 + JodaBeanUtils.hashCode(primitiveByte);
        hash = hash * 31 + JodaBeanUtils.hashCode(primitiveShort);
        hash = hash * 31 + JodaBeanUtils.hashCode(primitiveInt);
        hash = hash * 31 + JodaBeanUtils.hashCode(primitiveLong);
        hash = hash * 31 + JodaBeanUtils.hashCode(primitiveFloat);
        hash = hash * 31 + JodaBeanUtils.hashCode(primitiveDouble);
        hash = hash * 31 + JodaBeanUtils.hashCode(primitiveDoubleNaN);
        hash = hash * 31 + JodaBeanUtils.hashCode(primitiveDoubleInf);
        hash = hash * 31 + JodaBeanUtils.hashCode(abstractNumber);
        hash = hash * 31 + JodaBeanUtils.hashCode(arrayByte);
        hash = hash * 31 + JodaBeanUtils.hashCode(array2d);
        hash = hash * 31 + JodaBeanUtils.hashCode(string);
        hash = hash * 31 + JodaBeanUtils.hashCode(bean);
        hash = hash * 31 + JodaBeanUtils.hashCode(object1);
        hash = hash * 31 + JodaBeanUtils.hashCode(object2);
        hash = hash * 31 + JodaBeanUtils.hashCode(risk);
        hash = hash * 31 + JodaBeanUtils.hashCode(riskLevel);
        hash = hash * 31 + JodaBeanUtils.hashCode(riskLevels);
        hash = hash * 31 + JodaBeanUtils.hashCode(stringList);
        hash = hash * 31 + JodaBeanUtils.hashCode(beanList);
        hash = hash * 31 + JodaBeanUtils.hashCode(stringMap);
        hash = hash * 31 + JodaBeanUtils.hashCode(intKeyMap);
        hash = hash * 31 + JodaBeanUtils.hashCode(beanMap);
        hash = hash * 31 + JodaBeanUtils.hashCode(listInMap);
        hash = hash * 31 + JodaBeanUtils.hashCode(listNumericInMap);
        hash = hash * 31 + JodaBeanUtils.hashCode(objectInMap);
        return hash;
    }

    @Override
    public String toString() {
        StringBuilder buf = new StringBuilder(896);
        buf.append("SimpleJson{");
        buf.append("primitiveChar").append('=').append(JodaBeanUtils.toString(primitiveChar)).append(',').append(' ');
        buf.append("primitiveByte").append('=').append(JodaBeanUtils.toString(primitiveByte)).append(',').append(' ');
        buf.append("primitiveShort").append('=').append(JodaBeanUtils.toString(primitiveShort)).append(',').append(' ');
        buf.append("primitiveInt").append('=').append(JodaBeanUtils.toString(primitiveInt)).append(',').append(' ');
        buf.append("primitiveLong").append('=').append(JodaBeanUtils.toString(primitiveLong)).append(',').append(' ');
        buf.append("primitiveFloat").append('=').append(JodaBeanUtils.toString(primitiveFloat)).append(',').append(' ');
        buf.append("primitiveDouble").append('=').append(JodaBeanUtils.toString(primitiveDouble)).append(',').append(' ');
        buf.append("primitiveDoubleNaN").append('=').append(JodaBeanUtils.toString(primitiveDoubleNaN)).append(',').append(' ');
        buf.append("primitiveDoubleInf").append('=').append(JodaBeanUtils.toString(primitiveDoubleInf)).append(',').append(' ');
        buf.append("abstractNumber").append('=').append(JodaBeanUtils.toString(abstractNumber)).append(',').append(' ');
        buf.append("arrayByte").append('=').append(JodaBeanUtils.toString(arrayByte)).append(',').append(' ');
        buf.append("array2d").append('=').append(JodaBeanUtils.toString(array2d)).append(',').append(' ');
        buf.append("string").append('=').append(JodaBeanUtils.toString(string)).append(',').append(' ');
        buf.append("bean").append('=').append(JodaBeanUtils.toString(bean)).append(',').append(' ');
        buf.append("object1").append('=').append(JodaBeanUtils.toString(object1)).append(',').append(' ');
        buf.append("object2").append('=').append(JodaBeanUtils.toString(object2)).append(',').append(' ');
        buf.append("risk").append('=').append(JodaBeanUtils.toString(risk)).append(',').append(' ');
        buf.append("riskLevel").append('=').append(JodaBeanUtils.toString(riskLevel)).append(',').append(' ');
        buf.append("riskLevels").append('=').append(JodaBeanUtils.toString(riskLevels)).append(',').append(' ');
        buf.append("stringList").append('=').append(JodaBeanUtils.toString(stringList)).append(',').append(' ');
        buf.append("beanList").append('=').append(JodaBeanUtils.toString(beanList)).append(',').append(' ');
        buf.append("stringMap").append('=').append(JodaBeanUtils.toString(stringMap)).append(',').append(' ');
        buf.append("intKeyMap").append('=').append(JodaBeanUtils.toString(intKeyMap)).append(',').append(' ');
        buf.append("beanMap").append('=').append(JodaBeanUtils.toString(beanMap)).append(',').append(' ');
        buf.append("listInMap").append('=').append(JodaBeanUtils.toString(listInMap)).append(',').append(' ');
        buf.append("listNumericInMap").append('=').append(JodaBeanUtils.toString(listNumericInMap)).append(',').append(' ');
        buf.append("objectInMap").append('=').append(JodaBeanUtils.toString(objectInMap));
        buf.append('}');
        return buf.toString();
    }

    //-----------------------------------------------------------------------
    /**
     * The meta-bean for {@code SimpleJson}.
     */
    public static final class Meta extends DirectMetaBean {
        /**
         * The singleton instance of the meta-bean.
         */
        static final Meta INSTANCE = new Meta();

        /**
         * The meta-property for the {@code primitiveChar} property.
         */
        private final MetaProperty<Character> primitiveChar = DirectMetaProperty.ofImmutable(
                this, "primitiveChar", SimpleJson.class, Character.TYPE);
        /**
         * The meta-property for the {@code primitiveByte} property.
         */
        private final MetaProperty<Byte> primitiveByte = DirectMetaProperty.ofImmutable(
                this, "primitiveByte", SimpleJson.class, Byte.TYPE);
        /**
         * The meta-property for the {@code primitiveShort} property.
         */
        private final MetaProperty<Short> primitiveShort = DirectMetaProperty.ofImmutable(
                this, "primitiveShort", SimpleJson.class, Short.TYPE);
        /**
         * The meta-property for the {@code primitiveInt} property.
         */
        private final MetaProperty<Integer> primitiveInt = DirectMetaProperty.ofImmutable(
                this, "primitiveInt", SimpleJson.class, Integer.TYPE);
        /**
         * The meta-property for the {@code primitiveLong} property.
         */
        private final MetaProperty<Long> primitiveLong = DirectMetaProperty.ofImmutable(
                this, "primitiveLong", SimpleJson.class, Long.TYPE);
        /**
         * The meta-property for the {@code primitiveFloat} property.
         */
        private final MetaProperty<Float> primitiveFloat = DirectMetaProperty.ofImmutable(
                this, "primitiveFloat", SimpleJson.class, Float.TYPE);
        /**
         * The meta-property for the {@code primitiveDouble} property.
         */
        private final MetaProperty<Double> primitiveDouble = DirectMetaProperty.ofImmutable(
                this, "primitiveDouble", SimpleJson.class, Double.TYPE);
        /**
         * The meta-property for the {@code primitiveDoubleNaN} property.
         */
        private final MetaProperty<Double> primitiveDoubleNaN = DirectMetaProperty.ofImmutable(
                this, "primitiveDoubleNaN", SimpleJson.class, Double.TYPE);
        /**
         * The meta-property for the {@code primitiveDoubleInf} property.
         */
        private final MetaProperty<Double> primitiveDoubleInf = DirectMetaProperty.ofImmutable(
                this, "primitiveDoubleInf", SimpleJson.class, Double.TYPE);
        /**
         * The meta-property for the {@code abstractNumber} property.
         */
        private final MetaProperty<Number> abstractNumber = DirectMetaProperty.ofImmutable(
                this, "abstractNumber", SimpleJson.class, Number.class);
        /**
         * The meta-property for the {@code arrayByte} property.
         */
        private final MetaProperty<byte[]> arrayByte = DirectMetaProperty.ofImmutable(
                this, "arrayByte", SimpleJson.class, byte[].class);
        /**
         * The meta-property for the {@code array2d} property.
         */
        private final MetaProperty<String[][]> array2d = DirectMetaProperty.ofImmutable(
                this, "array2d", SimpleJson.class, String[][].class);
        /**
         * The meta-property for the {@code string} property.
         */
        private final MetaProperty<String> string = DirectMetaProperty.ofImmutable(
                this, "string", SimpleJson.class, String.class);
        /**
         * The meta-property for the {@code bean} property.
         */
        private final MetaProperty<ImmKey> bean = DirectMetaProperty.ofImmutable(
                this, "bean", SimpleJson.class, ImmKey.class);
        /**
         * The meta-property for the {@code object1} property.
         */
        private final MetaProperty<Object> object1 = DirectMetaProperty.ofImmutable(
                this, "object1", SimpleJson.class, Object.class);
        /**
         * The meta-property for the {@code object2} property.
         */
        private final MetaProperty<Object> object2 = DirectMetaProperty.ofImmutable(
                this, "object2", SimpleJson.class, Object.class);
        /**
         * The meta-property for the {@code risk} property.
         */
        private final MetaProperty<Risk> risk = DirectMetaProperty.ofImmutable(
                this, "risk", SimpleJson.class, Risk.class);
        /**
         * The meta-property for the {@code riskLevel} property.
         */
        private final MetaProperty<RiskLevel> riskLevel = DirectMetaProperty.ofImmutable(
                this, "riskLevel", SimpleJson.class, RiskLevel.class);
        /**
         * The meta-property for the {@code riskLevels} property.
         */
        @SuppressWarnings({"unchecked", "rawtypes" })
        private final MetaProperty<EnumSet<RiskLevel>> riskLevels = DirectMetaProperty.ofImmutable(
                this, "riskLevels", SimpleJson.class, (Class) EnumSet.class);
        /**
         * The meta-property for the {@code stringList} property.
         */
        @SuppressWarnings({"unchecked", "rawtypes" })
        private final MetaProperty<ImmutableList<String>> stringList = DirectMetaProperty.ofImmutable(
                this, "stringList", SimpleJson.class, (Class) ImmutableList.class);
        /**
         * The meta-property for the {@code beanList} property.
         */
        @SuppressWarnings({"unchecked", "rawtypes" })
        private final MetaProperty<ImmutableList<ImmKey>> beanList = DirectMetaProperty.ofImmutable(
                this, "beanList", SimpleJson.class, (Class) ImmutableList.class);
        /**
         * The meta-property for the {@code stringMap} property.
         */
        @SuppressWarnings({"unchecked", "rawtypes" })
        private final MetaProperty<ImmutableMap<String, String>> stringMap = DirectMetaProperty.ofImmutable(
                this, "stringMap", SimpleJson.class, (Class) ImmutableMap.class);
        /**
         * The meta-property for the {@code intKeyMap} property.
         */
        @SuppressWarnings({"unchecked", "rawtypes" })
        private final MetaProperty<ImmutableMap<Integer, String>> intKeyMap = DirectMetaProperty.ofImmutable(
                this, "intKeyMap", SimpleJson.class, (Class) ImmutableMap.class);
        /**
         * The meta-property for the {@code beanMap} property.
         */
        @SuppressWarnings({"unchecked", "rawtypes" })
        private final MetaProperty<ImmutableMap<String, ImmKey>> beanMap = DirectMetaProperty.ofImmutable(
                this, "beanMap", SimpleJson.class, (Class) ImmutableMap.class);
        /**
         * The meta-property for the {@code listInMap} property.
         */
        @SuppressWarnings({"unchecked", "rawtypes" })
        private final MetaProperty<ImmutableMap<String, List<String>>> listInMap = DirectMetaProperty.ofImmutable(
                this, "listInMap", SimpleJson.class, (Class) ImmutableMap.class);
        /**
         * The meta-property for the {@code listNumericInMap} property.
         */
        @SuppressWarnings({"unchecked", "rawtypes" })
        private final MetaProperty<ImmutableMap<String, List<Integer>>> listNumericInMap = DirectMetaProperty.ofImmutable(
                this, "listNumericInMap", SimpleJson.class, (Class) ImmutableMap.class);
        /**
         * The meta-property for the {@code objectInMap} property.
         */
        @SuppressWarnings({"unchecked", "rawtypes" })
        private final MetaProperty<ImmutableMap<String, Object>> objectInMap = DirectMetaProperty.ofImmutable(
                this, "objectInMap", SimpleJson.class, (Class) ImmutableMap.class);
        /**
         * The meta-properties.
         */
        private final Map<String, MetaProperty<?>> metaPropertyMap$ = new DirectMetaPropertyMap(
                this, null,
                "primitiveChar",
                "primitiveByte",
                "primitiveShort",
                "primitiveInt",
                "primitiveLong",
                "primitiveFloat",
                "primitiveDouble",
                "primitiveDoubleNaN",
                "primitiveDoubleInf",
                "abstractNumber",
                "arrayByte",
                "array2d",
                "string",
                "bean",
                "object1",
                "object2",
                "risk",
                "riskLevel",
                "riskLevels",
                "stringList",
                "beanList",
                "stringMap",
                "intKeyMap",
                "beanMap",
                "listInMap",
                "listNumericInMap",
                "objectInMap");

        /**
         * Restricted constructor.
         */
        private Meta() {
        }

        @Override
        protected MetaProperty<?> metaPropertyGet(String propertyName) {
            switch (propertyName.hashCode()) {
                case 1058293981:  // primitiveChar
                    return this.primitiveChar;
                case 1058281103:  // primitiveByte
                    return this.primitiveByte;
                case -1537835051:  // primitiveShort
                    return this.primitiveShort;
                case 1281070472:  // primitiveInt
                    return this.primitiveInt;
                case 1058569219:  // primitiveLong
                    return this.primitiveLong;
                case -1549722187:  // primitiveFloat
                    return this.primitiveFloat;
                case -851055720:  // primitiveDouble
                    return this.primitiveDouble;
                case -608928189:  // primitiveDoubleNaN
                    return this.primitiveDoubleNaN;
                case -608932567:  // primitiveDoubleInf
                    return this.primitiveDoubleInf;
                case 1986500107:  // abstractNumber
                    return this.abstractNumber;
                case -1425444095:  // arrayByte
                    return this.arrayByte;
                case -734443893:  // array2d
                    return this.array2d;
                case -891985903:  // string
                    return this.string;
                case 3019696:  // bean
                    return this.bean;
                case -1659648814:  // object1
                    return this.object1;
                case -1659648813:  // object2
                    return this.object2;
                case 3500751:  // risk
                    return this.risk;
                case 540453365:  // riskLevel
                    return this.riskLevel;
                case -425814754:  // riskLevels
                    return this.riskLevels;
                case -1573317553:  // stringList
                    return this.stringList;
                case 1321263214:  // beanList
                    return this.beanList;
                case -189298805:  // stringMap
                    return this.stringMap;
                case -253193396:  // intKeyMap
                    return this.intKeyMap;
                case -234472564:  // beanMap
                    return this.beanMap;
                case -1244601351:  // listInMap
                    return this.listInMap;
                case 391098024:  // listNumericInMap
                    return this.listNumericInMap;
                case -1297715720:  // objectInMap
                    return this.objectInMap;
            }
