<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

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