<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for Membership.Media StructType
 * @subpackage Structs
 */
class Membership_Media extends Any_Media
{
    /**
     * The Benefits
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\StructType\GlobalString
     */
    public $Benefits;
    /**
     * Constructor method for Membership.Media
     * @uses Membership_Media::setBenefits()
     * @param \patest\StructType\GlobalString $benefits
     */
    public function __construct(\patest\StructType\GlobalString $benefits = null)
    {
        $this
            ->setBenefits($benefits);
    }
    /**
     * Get Benefits 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 getBenefits()
    {
        return isset($this->Benefits) ? $this->Benefits : null;
    }
    /**
     * Set Benefits 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 $benefits
     * @return \patest\StructType\Membership_Media
     */
    public function setBenefits(\patest\StructType\GlobalString $benefits = null)
    {
        if (is_null($benefits) || (is_array($benefits) && empty($benefits))) {
            unset($this->Benefits);
        } else {
            $this->Benefits = $benefits;
        }
        return $this;
    }
}
