<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for Ticketing.BallotItemOwnerAssignments StructType
 * @subpackage Structs
 */
class Ticketing_BallotItemOwnerAssignments extends AnyEntity
{
    /**
     * The Assignments
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\StructType\RecordSetOfTicketing_BallotOwnerAssignment
     */
    public $Assignments;
    /**
     * Constructor method for Ticketing.BallotItemOwnerAssignments
     * @uses Ticketing_BallotItemOwnerAssignments::setAssignments()
     * @param \patest\StructType\RecordSetOfTicketing_BallotOwnerAssignment $assignments
     */
    public function __construct(\patest\StructType\RecordSetOfTicketing_BallotOwnerAssignment $assignments = null)
    {
        $this
            ->setAssignments($assignments);
    }
    /**
     * Get Assignments value
     * An additional test has been added (isset) before returning the property value as
     * this property may have been unset before, due to the fact that this property is
     * removable from the request (nillable=true+minOccurs=0)
     * @return \patest\StructType\RecordSetOfTicketing_BallotOwnerAssignment|null
     */
    public function getAssignments()
    {
        return isset($this->Assignments) ? $this->Assignments : null;
    }
    /**
     * Set Assignments value
     * This property is removable from request (nillable=true+minOccurs=0), therefore
     * if the value assigned to this property is null, it is removed from this object
     * @param \patest\StructType\RecordSetOfTicketing_BallotOwnerAssignment $assignments
     * @return \patest\StructType\Ticketing_BallotItemOwnerAssignments
     */
    public function setAssignments(\patest\StructType\RecordSetOfTicketing_BallotOwnerAssignment $assignments = null)
    {
        if (is_null($assignments) || (is_array($assignments) && empty($assignments))) {
            unset($this->Assignments);
        } else {
            $this->Assignments = $assignments;
        }
        return $this;
    }
}
