<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

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