package com.agilex.healthcare.schedulingmanager.domain;


import com.agilex.healthcare.schedulingmanager.enumeration.AppointmentProcessedAsPerUserNeed;
import com.agilex.healthcare.schedulingmanager.enumeration.AppointmentRequestStatus;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import java.io.Serializable;
import java.util.Map;
import java.util.Set;

@XmlAccessorType(value = XmlAccessType.NONE)
@XmlRootElement(name = "appointments-metadata", namespace = Namespace.SchedulingManager)
public class SMAppointmentsMetadata implements Serializable {

	private static final long serialVersionUID = -2148394357927590061L;

	public SMAppointmentsMetadata() {

	}

	private Map<String, String> availableVistaLocations;

	public Map<String, String> getAvailableVistaLocations() {
		return availableVistaLocations;
	}

	public void setAvailableVistaLocations(
			Map<String, String> availableVistaLocations) {
		this.availableVistaLocations = availableVistaLocations;
	}

	@XmlElement
	private String [] appointmentTypes;
	@XmlElement
	private String [] bestTimetoCallOptions;
	@XmlElement
	private String [] visitTypes;
	@XmlElement
	private String [] purposeOfVisitOptions;
	@XmlElement
	private Integer earliestTimeVeteranCanRequestAppointmentInDays;
	@XmlElement
	private Integer farthestTimeVeteranCanRequestAppointmentInDays;
	@XmlElement
	private Set<SMDetailCode> SMDetailCodes;

	public String[] getBestTimetoCallOptions() {
		return bestTimetoCallOptions;
	}

	public void setBestTimetoCallOptions(String[] bestTimetoCallOptions) {
		this.bestTimetoCallOptions = bestTimetoCallOptions;
	}

	public String[] getVisitTypes() {
		return visitTypes;
	}

	public void setVisitTypes(String[] visitTypes) {
		this.visitTypes = visitTypes;
	}

	public String[] getPurposeOfVisitOptions() {
		return purposeOfVisitOptions;
	}

	public void setPurposeOfVisitOptions(String[] purposeOfVisitOptions) {
		this.purposeOfVisitOptions = purposeOfVisitOptions;
	}

	public Integer getEarliestTimeVeteranCanRequestAppointmentInDays() {
		return earliestTimeVeteranCanRequestAppointmentInDays;
	}

	public void setEarliestTimeVeteranCanRequestAppointmentInDays(
			Integer earliestTimeVeteranCanRequestAppointmentInDays) {
		this.earliestTimeVeteranCanRequestAppointmentInDays = earliestTimeVeteranCanRequestAppointmentInDays;
	}

	public Integer getFarthestTimeVeteranCanRequestAppointmentInDays() {
		return farthestTimeVeteranCanRequestAppointmentInDays;
	}

	public void setFarthestTimeVeteranCanRequestAppointmentInDays(
			Integer farthestTimeVeteranCanRequestAppointmentInDays) {
		this.farthestTimeVeteranCanRequestAppointmentInDays = farthestTimeVeteranCanRequestAppointmentInDays;
	}

	@XmlElement
	public String[] getAppointmentRequestStatusOptions() {
		String [] statuses = new String[AppointmentRequestStatus.values().length];

		int i=0;
		for (AppointmentRequestStatus appStatus : AppointmentRequestStatus.values()) {
			statuses[i++] = appStatus.getName();
		}
		return statuses;
	}

	@XmlElement
	public String[] getAppointmentProcessedAsPerUserNeedOptions() {
		String [] appointmentProcessingOptions = new String[AppointmentProcessedAsPerUserNeed.values().length];

		int i=0;
		for (AppointmentProcessedAsPerUserNeed option : AppointmentProcessedAsPerUserNeed.values()) {
			appointmentProcessingOptions[i++] = option.getName();
		}
		return appointmentProcessingOptions;
	}

	public String[] getAppointmentTypes() {
		return appointmentTypes;
	}

	public void setAppointmentTypes(String[] appointmentTypes) {
		this.appointmentTypes = appointmentTypes;
	}

	public Set<SMDetailCode> getSMDetailCodes() {
		return SMDetailCodes;
	}

	public void setSMDetailCodes(Set<SMDetailCode> SMDetailCodes) {
		this.SMDetailCodes = SMDetailCodes;
	}
}
