/*
 * Copyright (c) 2014-2021, by Alex Leigh.
 * All rights reserved.
 *
 * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE
 * The copyright notice above does not evidence any
 * actual or intended publication of such source code.
 */

package leigh.minecraft.link.sdk.schema.v1;

import leigh.eo.EO;

/**
* This is a dynamically generated DAO class for accessing objects within an ESP graph. This class
* has been generated by <code>DAOGenerator</code> and should not be modified.
*
* @author DAOGenerator (synthetically generated class)
*/
public final class ShopEnchantElementDAO {
public static final String API_TYPE = "leigh.minecraft.link.v1.ShopEnchant";

public static EO create() {
EO eo = new EO(API_TYPE);
return eo;
}

public static boolean assertType(final EO eo) {
return eo.getApiType().equals(API_TYPE);
}

public static final String KEY_NAME = "name";
public static final String KEY_LEVEL = "level";

public static String apiType(final EO eo) {
return eo.getApiType();
}


/* EO{typeName='org.a6v.esp.eo.schema.Field', data={apiName=name, validators=EOLoop{array=[EO{typeName='org.a6v.esp.eo.schema.ValidatorNotEmpty', data={}}]} , label=EOLoop{array=[EO{typeName='leigh.esp.eo.schema.Text', data={text=Name, locale=en}}]} , type=string}} */


    
public static java.lang.String getName(EO eo) {
        if(!assertType(eo)) throw new IllegalArgumentException("Mismatched EO type: [found: " + eo.getApiType() + "] [expected: " + API_TYPE + "]");
    return eo.getValueString(KEY_NAME);
    }

public static void setName(final EO eo, java.lang.String value) {
if(!assertType(eo)) throw new IllegalArgumentException("Mismatched EO type: [found: " + eo.getApiType() + "] [expected: " + API_TYPE + "]");
eo.setValue(KEY_NAME, value);
}

public static void setNameLabel(final EO eo,final String label) {
if(!assertType(eo)) throw new IllegalArgumentException("Mismatched EO type: [found: " + eo.getApiType() + "] [expected: " + API_TYPE + "]");
eo.setLabel(KEY_NAME, label);
}

public static void getLabelOrValueName(final EO eo, java.lang.String value) {
if(!assertType(eo)) throw new IllegalArgumentException("Mismatched EO type: [found: " + eo.getApiType() + "] [expected: " + API_TYPE + "]");
eo.getLabelOrValue(KEY_NAME);
}

public static void setIfUnsetName(final EO eo, java.lang.String value) {
if(!assertType(eo)) throw new IllegalArgumentException("Mismatched EO type: [found: " + eo.getApiType() + "] [expected: " + API_TYPE + "]");
eo.setValueIfUnset(KEY_NAME, value);
}


/* EO{typeName='org.a6v.esp.eo.schema.Field', data={apiName=level, validators=EOLoop{array=[EO{typeName='org.a6v.esp.eo.schema.ValidatorNotEmpty', data={}}]} , label=EOLoop{array=[EO{typeName='leigh.esp.eo.schema.Text', data={text=Level, locale=en}}]} , type=number}} */


        public static void setLevel(final EO eo, int value) {
    if(!assertType(eo)) throw new IllegalArgumentException("Mismatched EO type: [found: " + eo.getApiType() + "] [expected: " + API_TYPE + "]");
    eo.setValue(KEY_LEVEL, value);
    }

    public static void setLevel(final EO eo, float value) {
    if(!assertType(eo)) throw new IllegalArgumentException("Mismatched EO type: [found: " + eo.getApiType() + "] [expected: " + API_TYPE + "]");
    eo.setValue(KEY_LEVEL, value);
    }

    public static void setLevel(final EO eo, double value) {
    if(!assertType(eo)) throw new IllegalArgumentException("Mismatched EO type: [found: " + eo.getApiType() + "] [expected: " + API_TYPE + "]");
    eo.setValue(KEY_LEVEL, value);
    }

    public static void setLevel(final EO eo, long value) {
    if(!assertType(eo)) throw new IllegalArgumentException("Mismatched EO type: [found: " + eo.getApiType() + "] [expected: " + API_TYPE + "]");
    eo.setValue(KEY_LEVEL, value);
    }

    public static void setLevel(final EO eo, short value) {
    if(!assertType(eo)) throw new IllegalArgumentException("Mismatched EO type: [found: " + eo.getApiType() + "] [expected: " + API_TYPE + "]");
    eo.setValue(KEY_LEVEL, value);
    }
    
public static java.math.BigDecimal getLevel(EO eo) {
        if(!assertType(eo)) throw new IllegalArgumentException("Mismatched EO type: [found: " + eo.getApiType() + "] [expected: " + API_TYPE + "]");
    return eo.getNumber(KEY_LEVEL);
    }

public static void setLevel(final EO eo, java.math.BigDecimal value) {
if(!assertType(eo)) throw new IllegalArgumentException("Mismatched EO type: [found: " + eo.getApiType() + "] [expected: " + API_TYPE + "]");
eo.setValue(KEY_LEVEL, value);
}

public static void setLevelLabel(final EO eo,final String label) {
if(!assertType(eo)) throw new IllegalArgumentException("Mismatched EO type: [found: " + eo.getApiType() + "] [expected: " + API_TYPE + "]");
eo.setLabel(KEY_LEVEL, label);
}

public static void getLabelOrValueLevel(final EO eo, java.math.BigDecimal value) {
if(!assertType(eo)) throw new IllegalArgumentException("Mismatched EO type: [found: " + eo.getApiType() + "] [expected: " + API_TYPE + "]");
eo.getLabelOrValue(KEY_LEVEL);
}

public static void setIfUnsetLevel(final EO eo, java.math.BigDecimal value) {
if(!assertType(eo)) throw new IllegalArgumentException("Mismatched EO type: [found: " + eo.getApiType() + "] [expected: " + API_TYPE + "]");
eo.setValueIfUnset(KEY_LEVEL, value);
}


}