/*
 * The contents of this file are subject to the terms
 * of the Common Development and Distribution License
 * (the License).  You may not use this file except in
 * compliance with the License.
 *
 * You can obtain a copy of the license at
 * https://glassfish.dev.java.net/public/CDDLv1.0.html or
 * glassfish/bootstrap/legal/CDDLv1.0.txt.
 * See the License for the specific language governing
 * permissions and limitations under the License.
 *
 * When distributing Covered Code, include this CDDL
 * Header Notice in each file and include the License file
 * at glassfish/bootstrap/legal/CDDLv1.0.txt.
 * If applicable, add the following below the CDDL Header,
 * with the fields enclosed by brackets [] replaced by
 * you own identifying information:
 * "Portions Copyrighted [year] [name of copyright owner]"
 *
 * Copyright (c) Ericsson AB, 2004-2007. All rights reserved.
 * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
 */
package org.jvnet.glassfish.comms.clb.admin;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
import javax.xml.bind.annotation.adapters.NormalizedStringAdapter;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;


/**
 *
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "")
@XmlRootElement(name = "instance")
public class Instance {
    @XmlAttribute(required = true)
    @XmlJavaTypeAdapter(NormalizedStringAdapter.class)
    protected String name;
    @XmlAttribute
    @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
    protected String enabled;
    @XmlAttribute(name = "disable-timeout-in-minutes")
    @XmlJavaTypeAdapter(NormalizedStringAdapter.class)
    protected String disableTimeoutInMinutes;
    @XmlAttribute(required = true)
    @XmlJavaTypeAdapter(NormalizedStringAdapter.class)
    protected String listeners;

    /**
     * Gets the value of the name property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public String getName() {
        return name;
    }

    /**
     * Sets the value of the name property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setName(String value) {
        this.name = value;
    }

    /**
     * Gets the value of the enabled property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public String getEnabled() {
        if (enabled == null) {
            return "true";
        } else {
            return enabled;
        }
    }

    /**
     * Sets the value of the enabled property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setEnabled(String value) {
        this.enabled = value;
    }

    /**
     * Gets the value of the disableTimeoutInMinutes property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public String getDisableTimeoutInMinutes() {
        if (disableTimeoutInMinutes == null) {
            return "31";
        } else {
            return disableTimeoutInMinutes;
        }
    }

    /**
     * Sets the value of the disableTimeoutInMinutes property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setDisableTimeoutInMinutes(String value) {
        this.disableTimeoutInMinutes = value;
    }

    /**
     * Gets the value of the listeners property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public String getListeners() {
        return listeners;
    }

    /**
     * Sets the value of the listeners property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setListeners(String value) {
        this.listeners = value;
    }
}
