<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for Crm.Account4Printing StructType
 * @subpackage Structs
 */
class Crm_Account4Printing extends Crm_Account
{
    /**
     * The ContactPersonName
     * Meta information extracted from the WSDL
     * - documentation: Calculated.
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\StructType\Crm_PersonName
     */
    public $ContactPersonName;
    /**
     * Constructor method for Crm.Account4Printing
     * @uses Crm_Account4Printing::setContactPersonName()
     * @param \patest\StructType\Crm_PersonName $contactPersonName
     */
    public function __construct(\patest\StructType\Crm_PersonName $contactPersonName = null)
    {
        $this
            ->setContactPersonName($contactPersonName);
    }
    /**
     * Get ContactPersonName 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\Crm_PersonName|null
     */
    public function getContactPersonName()
    {
        return isset($this->ContactPersonName) ? $this->ContactPersonName : null;
    }
    /**
     * Set ContactPersonName 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\Crm_PersonName $contactPersonName
     * @return \patest\StructType\Crm_Account4Printing
     */
    public function setContactPersonName(\patest\StructType\Crm_PersonName $contactPersonName = null)
    {
        if (is_null($contactPersonName) || (is_array($contactPersonName) && empty($contactPersonName))) {
            unset($this->ContactPersonName);
        } else {
            $this->ContactPersonName = $contactPersonName;
        }
        return $this;
    }
}
