//
// 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: 2022.11.03 at 02:32:23 PM UTC 
//


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

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.XmlType;
import de.ivu.wahl.wus.oasis.eml.AffiliationIdentifierStructure;
import de.ivu.wahl.wus.oasis.eml.ContestIdentifierStructure;
import de.ivu.wahl.wus.oasis.eml.kiesraad.ListData;


/**
 * Name of candidate list as submitted. This includes the AffiliationIdentifier and the FirstCandidateName.
 * 
 * <p>Java class for CandidateListNameType complex type.
 * 
 * <p>The following schema fragment specifies the expected content contained within this class.
 * 
 * <pre>
 * &lt;complexType name="CandidateListNameType"&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 ref="{urn:oasis:names:tc:evs:schema:eml}ContestIdentifier" maxOccurs="unbounded" minOccurs="0"/&gt;
 *         &lt;element ref="{http://www.kiesraad.nl/extensions}ListData" minOccurs="0"/&gt;
 *         &lt;element ref="{http://www.kiesraad.nl/reportgenerator}FirstCandidateName" minOccurs="0"/&gt;
 *       &lt;/sequence&gt;
 *     &lt;/restriction&gt;
 *   &lt;/complexContent&gt;
 * &lt;/complexType&gt;
 * </pre>
 * 
 * 
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "CandidateListNameType", propOrder = {
    "affiliationIdentifier",
    "contestIdentifier",
    "listData",
    "firstCandidateName"
})
public class CandidateListNameType {

    @XmlElement(name = "AffiliationIdentifier", namespace = "urn:oasis:names:tc:evs:schema:eml", required = true)
    protected AffiliationIdentifierStructure affiliationIdentifier;
    @XmlElement(name = "ContestIdentifier", namespace = "urn:oasis:names:tc:evs:schema:eml")
    protected List<ContestIdentifierStructure> contestIdentifier;
    @XmlElement(name = "ListData", namespace = "http://www.kiesraad.nl/extensions")
    protected ListData listData;
    @XmlElement(name = "FirstCandidateName")
    protected CandidateNameType firstCandidateName;

    /**
     * Unless for blanko lists, this is the party name.
     * 
     * @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;
    }

    /**
     * Contest for which the candidate list is nominated. Needed for central submission only, if the electoral district of the list differs from the (central) HSB where it is submitted. Always needed for EK elections.Gets the value of the contestIdentifier 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 contestIdentifier property.
     * 
     * <p>
     * For example, to add a new item, do as follows:
     * <pre>
     *    getContestIdentifier().add(newItem);
     * </pre>
     * 
     * 
     * <p>
     * Objects of the following type(s) are allowed in the list
     * {@link ContestIdentifierStructure }
     * 
     * 
     */
    public List<ContestIdentifierStructure> getContestIdentifier() {
        if (contestIdentifier == null) {
            contestIdentifier = new ArrayList<ContestIdentifierStructure>();
        }
        return this.contestIdentifier;
    }

    /**
     * Optional. Contains the information, if the candidate's gender or first name may be published.
     * 
     * @return
     *     possible object is
     *     {@link ListData }
     *     
     */
    public ListData getListData() {
        return listData;
    }

    /**
     * Sets the value of the listData property.
     * 
     * @param value
     *     allowed object is
     *     {@link ListData }
     *     
     */
    public void setListData(ListData value) {
        this.listData = value;
    }

    /**
     * Contains the name of the first candidate which may be used to display the name of the candidate list.
     * 
     * @return
     *     possible object is
     *     {@link CandidateNameType }
     *     
     */
    public CandidateNameType getFirstCandidateName() {
        return firstCandidateName;
    }

    /**
     * Sets the value of the firstCandidateName property.
     * 
     * @param value
     *     allowed object is
     *     {@link CandidateNameType }
     *     
     */
    public void setFirstCandidateName(CandidateNameType value) {
        this.firstCandidateName = value;
    }

    public void setContestIdentifier(List<ContestIdentifierStructure> value) {
        this.contestIdentifier = null;
        if (value!= null) {
            List<ContestIdentifierStructure> draftl = this.getContestIdentifier();
            draftl.addAll(value);
        }
    }

}
