<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

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