// This class was generated by the JAXRPC SI, do not edit.
// Contents subject to change without notice.
// JAX-RPC Standard Implementation (1.1.3, build R1)
// Generated source version: 1.1.3

package org.jboss.test.webservice.jbws718;


import java.util.Map;
import java.util.HashMap;

public class JobTypeEnum {
    private java.lang.String value;
    private static java.util.Map valueMap = new HashMap();
    public static final java.lang.String _UserString = "User";
    public static final java.lang.String _SystemString = "System";
    
    public static final java.lang.String _User = new java.lang.String(_UserString);
    public static final java.lang.String _System = new java.lang.String(_SystemString);
    
    public static final JobTypeEnum User = new JobTypeEnum(_User);
    public static final JobTypeEnum System = new JobTypeEnum(_System);
    
    protected JobTypeEnum(java.lang.String value) {
        this.value = value;
        valueMap.put(this.toString(), this);
    }
    
    public java.lang.String getValue() {
        return value;
    }
    
    public static JobTypeEnum fromValue(java.lang.String value)
        throws java.lang.IllegalStateException {
        if (User.value.equals(value)) {
            return User;
        } else if (System.value.equals(value)) {
            return System;
        }
        throw new java.lang.IllegalArgumentException();
    }
    
    public static JobTypeEnum fromString(java.lang.String value)
        throws java.lang.IllegalStateException {
        JobTypeEnum ret = (JobTypeEnum)valueMap.get(value);
        if (ret != null) {
            return ret;
        }
        if (value.equals(_UserString)) {
            return User;
        } else if (value.equals(_SystemString)) {
            return System;
        }
        throw new IllegalArgumentException();
    }
    
    public java.lang.String toString() {
        return value.toString();
    }
    
    private java.lang.Object readResolve()
        throws java.io.ObjectStreamException {
        return fromValue(getValue());
    }
    
    public boolean equals(java.lang.Object obj) {
        if (!(obj instanceof JobTypeEnum)) {
            return false;
        }
        return ((JobTypeEnum)obj).value.equals(value);
    }
    
    public int hashCode() {
        return value.hashCode();
    }
}
