/*
 * 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 SimpleResponseElementDAO {
public static final String API_TYPE = "leigh.minecraft.link.v1.SimpleResponse";

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_MSG = "msg";

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


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


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

public static void setMsg(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_MSG, value);
}

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

public static void getLabelOrValueMsg(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_MSG);
}

public static void setIfUnsetMsg(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_MSG, value);
}


}