<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

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