/*
 * 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.m3.sdk.v1.schema;

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 CurrentPlayingElementDAO {
public static final String API_TYPE = "leigh.esp.sdk.v1.CurrentPlaying";

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_TITLE = "title";
public static final String KEY_ALBUM = "album";
public static final String KEY_ARTIST = "artist";

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


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


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

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

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

public static void getLabelOrValueTitle(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_TITLE);
}

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


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


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

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

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

public static void getLabelOrValueAlbum(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_ALBUM);
}

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


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


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

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

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

public static void getLabelOrValueArtist(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_ARTIST);
}

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


}