<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for Printing.AuxDataItem.BusinessPartyAccounts StructType
 * @subpackage Structs
 */
class Printing_AuxDataItem_BusinessPartyAccounts extends Printing_AuxiliaryDataItem_Base
{
    /**
     * The BusinessPartyAccounts
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\StructType\RecordSetOfPrinting_AuxDataItem_BusinessPartyAccount
     */
    public $BusinessPartyAccounts;
    /**
     * Constructor method for Printing.AuxDataItem.BusinessPartyAccounts
     * @uses Printing_AuxDataItem_BusinessPartyAccounts::setBusinessPartyAccounts()
     * @param \patest\StructType\RecordSetOfPrinting_AuxDataItem_BusinessPartyAccount $businessPartyAccounts
     */
    public function __construct(\patest\StructType\RecordSetOfPrinting_AuxDataItem_BusinessPartyAccount $businessPartyAccounts = null)
    {
        $this
            ->setBusinessPartyAccounts($businessPartyAccounts);
    }
    /**
     * Get BusinessPartyAccounts 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\RecordSetOfPrinting_AuxDataItem_BusinessPartyAccount|null
     */
    public function getBusinessPartyAccounts()
    {
        return isset($this->BusinessPartyAccounts) ? $this->BusinessPartyAccounts : null;
    }
    /**
     * Set BusinessPartyAccounts 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\RecordSetOfPrinting_AuxDataItem_BusinessPartyAccount $businessPartyAccounts
     * @return \patest\StructType\Printing_AuxDataItem_BusinessPartyAccounts
     */
    public function setBusinessPartyAccounts(\patest\StructType\RecordSetOfPrinting_AuxDataItem_BusinessPartyAccount $businessPartyAccounts = null)
    {
        if (is_null($businessPartyAccounts) || (is_array($businessPartyAccounts) && empty($businessPartyAccounts))) {
            unset($this->BusinessPartyAccounts);
        } else {
            $this->BusinessPartyAccounts = $businessPartyAccounts;
        }
        return $this;
    }
}
