<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for Printing.AuxDataItem.ClientAddresses StructType
 * @subpackage Structs
 */
class Printing_AuxDataItem_ClientAddresses extends AnyEntity
{
    /**
     * The BusinessAddress
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\StructType\Printing_AuxDataItem_ClientAddressDetailsPostalAddress
     */
    public $BusinessAddress;
    /**
     * The HomeAddress
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\StructType\Printing_AuxDataItem_ClientAddressDetailsPostalAddress
     */
    public $HomeAddress;
    /**
     * The PrimaryAddress
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\StructType\Printing_AuxDataItem_ClientAddressDetailsPostalAddress
     */
    public $PrimaryAddress;
    /**
     * Constructor method for Printing.AuxDataItem.ClientAddresses
     * @uses Printing_AuxDataItem_ClientAddresses::setBusinessAddress()
     * @uses Printing_AuxDataItem_ClientAddresses::setHomeAddress()
     * @uses Printing_AuxDataItem_ClientAddresses::setPrimaryAddress()
     * @param \patest\StructType\Printing_AuxDataItem_ClientAddressDetailsPostalAddress $businessAddress
     * @param \patest\StructType\Printing_AuxDataItem_ClientAddressDetailsPostalAddress $homeAddress
     * @param \patest\StructType\Printing_AuxDataItem_ClientAddressDetailsPostalAddress $primaryAddress
     */
    public function __construct(\patest\StructType\Printing_AuxDataItem_ClientAddressDetailsPostalAddress $businessAddress = null, \patest\StructType\Printing_AuxDataItem_ClientAddressDetailsPostalAddress $homeAddress = null, \patest\StructType\Printing_AuxDataItem_ClientAddressDetailsPostalAddress $primaryAddress = null)
    {
        $this
            ->setBusinessAddress($businessAddress)
            ->setHomeAddress($homeAddress)
            ->setPrimaryAddress($primaryAddress);
    }
    /**
     * Get BusinessAddress 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\Printing_AuxDataItem_ClientAddressDetailsPostalAddress|null
     */
    public function getBusinessAddress()
    {
        return isset($this->BusinessAddress) ? $this->BusinessAddress : null;
    }
    /**
     * Set BusinessAddress 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\Printing_AuxDataItem_ClientAddressDetailsPostalAddress $businessAddress
     * @return \patest\StructType\Printing_AuxDataItem_ClientAddresses
     */
    public function setBusinessAddress(\patest\StructType\Printing_AuxDataItem_ClientAddressDetailsPostalAddress $businessAddress = null)
    {
        if (is_null($businessAddress) || (is_array($businessAddress) && empty($businessAddress))) {
            unset($this->BusinessAddress);
        } else {
            $this->BusinessAddress = $businessAddress;
        }
        return $this;
    }
    /**
     * Get HomeAddress 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\Printing_AuxDataItem_ClientAddressDetailsPostalAddress|null
     */
    public function getHomeAddress()
    {
        return isset($this->HomeAddress) ? $this->HomeAddress : null;
    }
    /**
     * Set HomeAddress 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\Printing_AuxDataItem_ClientAddressDetailsPostalAddress $homeAddress
     * @return \patest\StructType\Printing_AuxDataItem_ClientAddresses
     */
    public function setHomeAddress(\patest\StructType\Printing_AuxDataItem_ClientAddressDetailsPostalAddress $homeAddress = null)
    {
        if (is_null($homeAddress) || (is_array($homeAddress) && empty($homeAddress))) {
            unset($this->HomeAddress);
        } else {
            $this->HomeAddress = $homeAddress;
        }
        return $this;
    }
    /**
     * Get PrimaryAddress 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\Printing_AuxDataItem_ClientAddressDetailsPostalAddress|null
     */
    public function getPrimaryAddress()
    {
        return isset($this->PrimaryAddress) ? $this->PrimaryAddress : null;
    }
    /**
     * Set PrimaryAddress 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\Printing_AuxDataItem_ClientAddressDetailsPostalAddress $primaryAddress
     * @return \patest\StructType\Printing_AuxDataItem_ClientAddresses
     */
    public function setPrimaryAddress(\patest\StructType\Printing_AuxDataItem_ClientAddressDetailsPostalAddress $primaryAddress = null)
    {
        if (is_null($primaryAddress) || (is_array($primaryAddress) && empty($primaryAddress))) {
            unset($this->PrimaryAddress);
        } else {
            $this->PrimaryAddress = $primaryAddress;
        }
        return $this;
    }
}
