//
// 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.12.17 at 08:48:55 AM UTC 
//


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

import java.math.BigInteger;
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.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlValue;
import de.ivu.wahl.wus.oasis.eml.CandidateStructure;


/**
 * <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}Candidate"/&gt;
 *         &lt;element ref="{http://www.kiesraad.nl/reportgenerator}VotesInElectoralDistrictPart" maxOccurs="2"/&gt;
 *         &lt;element name="TotalVotes" type="{http://www.w3.org/2001/XMLSchema}integer"/&gt;
 *         &lt;element name="AbovePreferencialBarrier" type="{http://www.w3.org/2001/XMLSchema}boolean"/&gt;
 *         &lt;element name="Elected"&gt;
 *           &lt;complexType&gt;
 *             &lt;simpleContent&gt;
 *               &lt;extension base="&lt;http://www.w3.org/2001/XMLSchema&gt;boolean"&gt;
 *                 &lt;attribute name="byLot" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
 *               &lt;/extension&gt;
 *             &lt;/simpleContent&gt;
 *           &lt;/complexType&gt;
 *         &lt;/element&gt;
 *         &lt;element name="ElectedOnListGroup" type="{http://www.w3.org/2001/XMLSchema}boolean"/&gt;
 *         &lt;element name="Deceased" type="{http://www.w3.org/2001/XMLSchema}boolean"/&gt;
 *         &lt;element name="NewPositionOnList" type="{http://www.w3.org/2001/XMLSchema}integer"/&gt;
 *       &lt;/sequence&gt;
 *     &lt;/restriction&gt;
 *   &lt;/complexContent&gt;
 * &lt;/complexType&gt;
 * </pre>
 * 
 * 
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
    "candidate",
    "votesInElectoralDistrictPart",
    "totalVotes",
    "abovePreferencialBarrier",
    "elected",
    "electedOnListGroup",
    "deceased",
    "newPositionOnList"
})
@XmlRootElement(name = "CandidateAndResult")
public class CandidateAndResult {

    @XmlElement(name = "Candidate", namespace = "urn:oasis:names:tc:evs:schema:eml", required = true)
    protected CandidateStructure candidate;
    @XmlElement(name = "VotesInElectoralDistrictPart", required = true)
    protected List<VotesInElectoralDistrictPart> votesInElectoralDistrictPart;
    @XmlElement(name = "TotalVotes", required = true)
    protected BigInteger totalVotes;
    @XmlElement(name = "AbovePreferencialBarrier")
    protected boolean abovePreferencialBarrier;
    @XmlElement(name = "Elected", required = true)
    protected CandidateAndResult.Elected elected;
    @XmlElement(name = "ElectedOnListGroup")
    protected boolean electedOnListGroup;
    @XmlElement(name = "Deceased")
    protected boolean deceased;
    @XmlElement(name = "NewPositionOnList", required = true)
    protected BigInteger newPositionOnList;

    /**
     * Gets the value of the candidate property.
     * 
     * @return
     *     possible object is
     *     {@link CandidateStructure }
     *     
     */
    public CandidateStructure getCandidate() {
        return candidate;
    }

    /**
     * Sets the value of the candidate property.
     * 
     * @param value
     *     allowed object is
     *     {@link CandidateStructure }
     *     
     */
    public void setCandidate(CandidateStructure value) {
        this.candidate = value;
    }

    /**
     * Gets the value of the votesInElectoralDistrictPart 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 votesInElectoralDistrictPart property.
     * 
     * <p>
     * For example, to add a new item, do as follows:
     * <pre>
     *    getVotesInElectoralDistrictPart().add(newItem);
     * </pre>
     * 
     * 
     * <p>
     * Objects of the following type(s) are allowed in the list
     * {@link VotesInElectoralDistrictPart }
     * 
     * 
     */
    public List<VotesInElectoralDistrictPart> getVotesInElectoralDistrictPart() {
        if (votesInElectoralDistrictPart == null) {
            votesInElectoralDistrictPart = new ArrayList<VotesInElectoralDistrictPart>();
        }
        return this.votesInElectoralDistrictPart;
    }

    /**
     * Gets the value of the totalVotes property.
     * 
     * @return
     *     possible object is
     *     {@link BigInteger }
     *     
     */
    public BigInteger getTotalVotes() {
        return totalVotes;
    }

    /**
     * Sets the value of the totalVotes property.
     * 
     * @param value
     *     allowed object is
     *     {@link BigInteger }
     *     
     */
    public void setTotalVotes(BigInteger value) {
        this.totalVotes = value;
    }

    /**
     * Gets the value of the abovePreferencialBarrier property.
     * 
     */
    public boolean isAbovePreferencialBarrier() {
        return abovePreferencialBarrier;
    }

    /**
     * Sets the value of the abovePreferencialBarrier property.
     * 
     */
    public void setAbovePreferencialBarrier(boolean value) {
        this.abovePreferencialBarrier = value;
    }

    /**
     * Gets the value of the elected property.
     * 
     * @return
     *     possible object is
     *     {@link CandidateAndResult.Elected }
     *     
     */
    public CandidateAndResult.Elected getElected() {
        return elected;
    }

    /**
     * Sets the value of the elected property.
     * 
     * @param value
     *     allowed object is
     *     {@link CandidateAndResult.Elected }
     *     
     */
    public void setElected(CandidateAndResult.Elected value) {
        this.elected = value;
    }

    /**
     * Gets the value of the electedOnListGroup property.
     * 
     */
    public boolean isElectedOnListGroup() {
        return electedOnListGroup;
    }

    /**
     * Sets the value of the electedOnListGroup property.
     * 
     */
    public void setElectedOnListGroup(boolean value) {
        this.electedOnListGroup = value;
    }

    /**
     * Gets the value of the deceased property.
     * 
     */
    public boolean isDeceased() {
        return deceased;
    }

    /**
     * Sets the value of the deceased property.
     * 
     */
    public void setDeceased(boolean value) {
        this.deceased = value;
    }

    /**
     * Gets the value of the newPositionOnList property.
     * 
     * @return
     *     possible object is
     *     {@link BigInteger }
     *     
     */
    public BigInteger getNewPositionOnList() {
        return newPositionOnList;
    }

    /**
     * Sets the value of the newPositionOnList property.
     * 
     * @param value
     *     allowed object is
     *     {@link BigInteger }
     *     
     */
    public void setNewPositionOnList(BigInteger value) {
        this.newPositionOnList = value;
    }

    public void setVotesInElectoralDistrictPart(List<VotesInElectoralDistrictPart> value) {
        this.votesInElectoralDistrictPart = null;
        if (value!= null) {
            List<VotesInElectoralDistrictPart> draftl = this.getVotesInElectoralDistrictPart();
            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;simpleContent&gt;
     *     &lt;extension base="&lt;http://www.w3.org/2001/XMLSchema&gt;boolean"&gt;
     *       &lt;attribute name="byLot" type="{http://www.w3.org/2001/XMLSchema}boolean" /&gt;
     *     &lt;/extension&gt;
     *   &lt;/simpleContent&gt;
     * &lt;/complexType&gt;
     * </pre>
     * 
     * 
     */
    @XmlAccessorType(XmlAccessType.FIELD)
    @XmlType(name = "", propOrder = {
        "value"
    })
    public static class Elected {

        @XmlValue
        protected boolean value;
        @XmlAttribute(name = "byLot")
        protected Boolean byLot;

        /**
         * Gets the value of the value property.
         * 
         */
        public boolean isValue() {
            return value;
        }

        /**
         * Sets the value of the value property.
         * 
         */
        public void setValue(boolean value) {
            this.value = value;
        }

        /**
         * Gets the value of the byLot property.
         * 
         * @return
         *     possible object is
         *     {@link Boolean }
         *     
         */
        public Boolean isByLot() {
            return byLot;
        }

        /**
         * Sets the value of the byLot property.
         * 
         * @param value
         *     allowed object is
         *     {@link Boolean }
         *     
         */
        public void setByLot(Boolean value) {
            this.byLot = value;
        }

    }

}
