//
// 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: 2023.09.11 at 09:59:46 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.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import de.ivu.wahl.wus.oasis.eml.AffiliationIdentifierStructure;
import de.ivu.wahl.wus.oasis.eml.kiesraad.PublicationLanguageType;


/**
 * <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}AffiliationIdentifier"/&gt;
 *         &lt;element name="ValidVotes" type="{http://www.w3.org/2001/XMLSchema}nonNegativeInteger"/&gt;
 *         &lt;element ref="{http://www.kiesraad.nl/reportgenerator}CandidateVotes" maxOccurs="unbounded" minOccurs="0"/&gt;
 *       &lt;/sequence&gt;
 *       &lt;attribute name="PublicationLanguage" use="required" type="{http://www.kiesraad.nl/extensions}PublicationLanguageType" /&gt;
 *     &lt;/restriction&gt;
 *   &lt;/complexContent&gt;
 * &lt;/complexType&gt;
 * </pre>
 * 
 * 
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
    "affiliationIdentifier",
    "validVotes",
    "candidateVotes"
})
@XmlRootElement(name = "AffiliationVotes")
public class AffiliationVotes {

    @XmlElement(name = "AffiliationIdentifier", namespace = "urn:oasis:names:tc:evs:schema:eml", required = true)
    protected AffiliationIdentifierStructure affiliationIdentifier;
    @XmlElement(name = "ValidVotes", required = true)
    @XmlSchemaType(name = "nonNegativeInteger")
    protected BigInteger validVotes;
    @XmlElement(name = "CandidateVotes")
    protected List<CandidateVotes> candidateVotes;
    @XmlAttribute(name = "PublicationLanguage", required = true)
    protected PublicationLanguageType publicationLanguage;

    /**
     * Gets the value of the affiliationIdentifier property.
     * 
     * @return
     *     possible object is
     *     {@link AffiliationIdentifierStructure }
     *     
     */
    public AffiliationIdentifierStructure getAffiliationIdentifier() {
        return affiliationIdentifier;
    }

    /**
     * Sets the value of the affiliationIdentifier property.
     * 
     * @param value
     *     allowed object is
     *     {@link AffiliationIdentifierStructure }
     *     
     */
    public void setAffiliationIdentifier(AffiliationIdentifierStructure value) {
        this.affiliationIdentifier = value;
    }

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

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

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

    /**
     * Gets the value of the publicationLanguage property.
     * 
     * @return
     *     possible object is
     *     {@link PublicationLanguageType }
     *     
     */
    public PublicationLanguageType getPublicationLanguage() {
        return publicationLanguage;
    }

    /**
     * Sets the value of the publicationLanguage property.
     * 
     * @param value
     *     allowed object is
     *     {@link PublicationLanguageType }
     *     
     */
    public void setPublicationLanguage(PublicationLanguageType value) {
        this.publicationLanguage = value;
    }

    public void setCandidateVotes(List<CandidateVotes> value) {
        this.candidateVotes = null;
        if (value!= null) {
            List<CandidateVotes> draftl = this.getCandidateVotes();
            draftl.addAll(value);
        }
    }

}
