//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.3.0 
// See <a href="https://javaee.github.io/jaxb-v2/">https://javaee.github.io/jaxb-v2/</a> 
// Any modifications to this file will be lost upon recompilation of the source schema. 
// Generated on: 2021.03.04 at 09:48:32 AM UTC 
//


package de.ivu.wahl.wus.oasis.eml;

import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import javax.xml.datatype.XMLGregorianCalendar;


/**
 * <p>Java class for PeriodStructure complex type.
 * 
 * <p>The following schema fragment specifies the expected content contained within this class.
 * 
 * <pre>
 * &lt;complexType name="PeriodStructure"&gt;
 *   &lt;complexContent&gt;
 *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
 *       &lt;choice&gt;
 *         &lt;element name="Dates"&gt;
 *           &lt;complexType&gt;
 *             &lt;complexContent&gt;
 *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
 *                 &lt;sequence&gt;
 *                   &lt;element name="Start" type="{http://www.w3.org/2001/XMLSchema}date" minOccurs="0"/&gt;
 *                   &lt;element name="End" type="{http://www.w3.org/2001/XMLSchema}date"/&gt;
 *                 &lt;/sequence&gt;
 *               &lt;/restriction&gt;
 *             &lt;/complexContent&gt;
 *           &lt;/complexType&gt;
 *         &lt;/element&gt;
 *         &lt;element name="Event" maxOccurs="unbounded"&gt;
 *           &lt;complexType&gt;
 *             &lt;complexContent&gt;
 *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
 *                 &lt;sequence&gt;
 *                   &lt;element ref="{urn:oasis:names:tc:evs:schema:eml}EventIdentifier"/&gt;
 *                   &lt;element ref="{urn:oasis:names:tc:evs:schema:eml}ElectionIdentifier" maxOccurs="unbounded" minOccurs="0"/&gt;
 *                 &lt;/sequence&gt;
 *               &lt;/restriction&gt;
 *             &lt;/complexContent&gt;
 *           &lt;/complexType&gt;
 *         &lt;/element&gt;
 *         &lt;element name="Permanent"&gt;
 *           &lt;simpleType&gt;
 *             &lt;restriction base="{http://www.w3.org/2001/XMLSchema}token"&gt;
 *               &lt;enumeration value="yes"/&gt;
 *             &lt;/restriction&gt;
 *           &lt;/simpleType&gt;
 *         &lt;/element&gt;
 *       &lt;/choice&gt;
 *     &lt;/restriction&gt;
 *   &lt;/complexContent&gt;
 * &lt;/complexType&gt;
 * </pre>
 * 
 * 
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "PeriodStructure", propOrder = {
    "dates",
    "event",
    "permanent"
})
public class PeriodStructure {

    @XmlElement(name = "Dates")
    protected PeriodStructure.Dates dates;
    @XmlElement(name = "Event")
    protected List<PeriodStructure.Event> event;
    @XmlElement(name = "Permanent")
    @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
    protected String permanent;

    /**
     * Gets the value of the dates property.
     * 
     * @return
     *     possible object is
     *     {@link PeriodStructure.Dates }
     *     
     */
    public PeriodStructure.Dates getDates() {
        return dates;
    }

    /**
     * Sets the value of the dates property.
     * 
     * @param value
     *     allowed object is
     *     {@link PeriodStructure.Dates }
     *     
     */
    public void setDates(PeriodStructure.Dates value) {
        this.dates = value;
    }

    /**
     * Gets the value of the event property.
     * 
     * <p>
     * This accessor method returns a reference to the live list,
     * not a snapshot. Therefore any modification you make to the
     * returned list will be present inside the JAXB object.
     * This is why there is not a <CODE>set</CODE> method for the event property.
     * 
     * <p>
     * For example, to add a new item, do as follows:
     * <pre>
     *    getEvent().add(newItem);
     * </pre>
     * 
     * 
     * <p>
     * Objects of the following type(s) are allowed in the list
     * {@link PeriodStructure.Event }
     * 
     * 
     */
    public List<PeriodStructure.Event> getEvent() {
        if (event == null) {
            event = new ArrayList<PeriodStructure.Event>();
        }
        return this.event;
    }

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

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

    public void setEvent(List<PeriodStructure.Event> value) {
        this.event = null;
        if (value!= null) {
            List<PeriodStructure.Event> draftl = this.getEvent();
            draftl.addAll(value);
        }
    }


    /**
     * <p>Java class for anonymous complex type.
     * 
     * <p>The following schema fragment specifies the expected content contained within this class.
     * 
     * <pre>
     * &lt;complexType&gt;
     *   &lt;complexContent&gt;
     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
     *       &lt;sequence&gt;
     *         &lt;element name="Start" type="{http://www.w3.org/2001/XMLSchema}date" minOccurs="0"/&gt;
     *         &lt;element name="End" type="{http://www.w3.org/2001/XMLSchema}date"/&gt;
     *       &lt;/sequence&gt;
     *     &lt;/restriction&gt;
     *   &lt;/complexContent&gt;
     * &lt;/complexType&gt;
     * </pre>
     * 
     * 
     */
    @XmlAccessorType(XmlAccessType.FIELD)
    @XmlType(name = "", propOrder = {
        "start",
        "end"
    })
    public static class Dates {

        @XmlElement(name = "Start")
        @XmlSchemaType(name = "date")
        protected XMLGregorianCalendar start;
        @XmlElement(name = "End", required = true)
        @XmlSchemaType(name = "date")
        protected XMLGregorianCalendar end;

        /**
         * Gets the value of the start property.
         * 
         * @return
         *     possible object is
         *     {@link XMLGregorianCalendar }
         *     
         */
        public XMLGregorianCalendar getStart() {
            return start;
        }

        /**
         * Sets the value of the start property.
         * 
         * @param value
         *     allowed object is
         *     {@link XMLGregorianCalendar }
         *     
         */
        public void setStart(XMLGregorianCalendar value) {
            this.start = value;
        }

        /**
         * Gets the value of the end property.
         * 
         * @return
         *     possible object is
         *     {@link XMLGregorianCalendar }
         *     
         */
        public XMLGregorianCalendar getEnd() {
            return end;
        }

        /**
         * Sets the value of the end property.
         * 
         * @param value
         *     allowed object is
         *     {@link XMLGregorianCalendar }
         *     
         */
        public void setEnd(XMLGregorianCalendar value) {
            this.end = value;
        }

    }


    /**
     * <p>Java class for anonymous complex type.
     * 
     * <p>The following schema fragment specifies the expected content contained within this class.
     * 
     * <pre>
     * &lt;complexType&gt;
     *   &lt;complexContent&gt;
     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
     *       &lt;sequence&gt;
     *         &lt;element ref="{urn:oasis:names:tc:evs:schema:eml}EventIdentifier"/&gt;
     *         &lt;element ref="{urn:oasis:names:tc:evs:schema:eml}ElectionIdentifier" maxOccurs="unbounded" minOccurs="0"/&gt;
     *       &lt;/sequence&gt;
     *     &lt;/restriction&gt;
     *   &lt;/complexContent&gt;
     * &lt;/complexType&gt;
     * </pre>
     * 
     * 
     */
    @XmlAccessorType(XmlAccessType.FIELD)
    @XmlType(name = "", propOrder = {
        "eventIdentifier",
        "electionIdentifier"
    })
    public static class Event {

        @XmlElement(name = "EventIdentifier", required = true)
        protected EventIdentifierStructure eventIdentifier;
        @XmlElement(name = "ElectionIdentifier")
        protected List<ElectionIdentifierStructure> electionIdentifier;

        /**
         * Gets the value of the eventIdentifier property.
         * 
         * @return
         *     possible object is
         *     {@link EventIdentifierStructure }
         *     
         */
        public EventIdentifierStructure getEventIdentifier() {
            return eventIdentifier;
        }

        /**
         * Sets the value of the eventIdentifier property.
         * 
         * @param value
         *     allowed object is
         *     {@link EventIdentifierStructure }
         *     
         */
        public void setEventIdentifier(EventIdentifierStructure value) {
            this.eventIdentifier = value;
        }

        /**
         * Gets the value of the electionIdentifier property.
         * 
         * <p>
         * This accessor method returns a reference to the live list,
         * not a snapshot. Therefore any modification you make to the
         * returned list will be present inside the JAXB object.
         * This is why there is not a <CODE>set</CODE> method for the electionIdentifier property.
         * 
         * <p>
         * For example, to add a new item, do as follows:
         * <pre>
         *    getElectionIdentifier().add(newItem);
         * </pre>
         * 
         * 
         * <p>
         * Objects of the following type(s) are allowed in the list
         * {@link ElectionIdentifierStructure }
         * 
         * 
         */
        public List<ElectionIdentifierStructure> getElectionIdentifier() {
            if (electionIdentifier == null) {
                electionIdentifier = new ArrayList<ElectionIdentifierStructure>();
            }
            return this.electionIdentifier;
        }

        public void setElectionIdentifier(List<ElectionIdentifierStructure> value) {
            this.electionIdentifier = null;
            if (value!= null) {
                List<ElectionIdentifierStructure> draftl = this.getElectionIdentifier();
                draftl.addAll(value);
            }
        }

    }

}
