/*
 * Copyright (c) 2018 - 2023, Entgra (Pvt) Ltd. (http://www.entgra.io) All Rights Reserved.
 *
 * Entgra (Pvt) Ltd. licenses this file to you under the Apache License,
 * Version 2.0 (the "License"); you may not use this file except
 * in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied. See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */
package io.entgra.device.mgt.core.device.mgt.core.config.operation.timeout;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlRootElement;
import java.util.List;

@XmlRootElement(name = "OperationTimeout")
public class OperationTimeout {

    private String code;
    private int timeout;
    private List<String> deviceTypes;
    private String initialStatus;
    private String nextStatus;

    public String getCode() {
        return code;
    }

    @XmlElement(name = "Code", required = true)
    public void setCode(String code) {
        this.code = code;
    }

    public int getTimeout() {
        return timeout;
    }

    @XmlElement(name = "Timeout", required = true)
    public void setTimeout(int timeout) {
        this.timeout = timeout;
    }

    public List<String> getDeviceTypes() {
        return deviceTypes;
    }

    @XmlElementWrapper(name = "DeviceTypes", required = true)
    @XmlElement(name = "DeviceType", required = true)
    public void setDeviceTypes(List<String> deviceTypes) {
        this.deviceTypes = deviceTypes;
    }

    public String getInitialStatus() {
        return initialStatus;
    }

    @XmlElement(name = "InitialStatus", required = true)
    public void setInitialStatus(String initialStatus) {
        this.initialStatus = initialStatus;
    }

    public String getNextStatus() {
        return nextStatus;
    }

    @XmlElement(name = "NextStatus", required = true)
    public void setNextStatus(String nextStatus) {
        this.nextStatus = nextStatus;
    }
}
