<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for UpdatePresalesRankWeight-Response StructType
 * Meta information extracted from the WSDL
 * - nillable: true
 * - type: tns:UpdatePresalesRankWeight-Response
 * @subpackage Structs
 */
class UpdatePresalesRankWeight_Response extends AbstractStructBase
{
    /**
     * The PresalesRankWeight
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\ArrayType\ArrayOfPresalesRankWeightResponse
     */
    public $PresalesRankWeight;
    /**
     * Constructor method for UpdatePresalesRankWeight-Response
     * @uses UpdatePresalesRankWeight_Response::setPresalesRankWeight()
     * @param \patest\ArrayType\ArrayOfPresalesRankWeightResponse $presalesRankWeight
     */
    public function __construct(\patest\ArrayType\ArrayOfPresalesRankWeightResponse $presalesRankWeight = null)
    {
        $this
            ->setPresalesRankWeight($presalesRankWeight);
    }
    /**
     * Get PresalesRankWeight 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\ArrayType\ArrayOfPresalesRankWeightResponse|null
     */
    public function getPresalesRankWeight()
    {
        return isset($this->PresalesRankWeight) ? $this->PresalesRankWeight : null;
    }
    /**
     * Set PresalesRankWeight 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\ArrayType\ArrayOfPresalesRankWeightResponse $presalesRankWeight
     * @return \patest\StructType\UpdatePresalesRankWeight_Response
     */
    public function setPresalesRankWeight(\patest\ArrayType\ArrayOfPresalesRankWeightResponse $presalesRankWeight = null)
    {
        if (is_null($presalesRankWeight) || (is_array($presalesRankWeight) && empty($presalesRankWeight))) {
            unset($this->PresalesRankWeight);
        } else {
            $this->PresalesRankWeight = $presalesRankWeight;
        }
        return $this;
    }
}
