<?php

namespace Easy\EasyStruct;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for GetDataUsingDataContract EasyStruct
 * @package Easy
 * @subpackage Structs
 */
class EasyGetDataUsingDataContract extends AbstractStructBase
{
    /**
     * The composite
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \Easy\EasyStruct\EasyCompositeType
     */
    public $composite;
    /**
     * Constructor method for GetDataUsingDataContract
     * @uses EasyGetDataUsingDataContract::setComposite()
     * @param \Easy\EasyStruct\EasyCompositeType $composite
     */
    public function __construct(\Easy\EasyStruct\EasyCompositeType $composite = null)
    {
        $this
            ->setComposite($composite);
    }
    /**
     * Get composite 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 \Easy\EasyStruct\EasyCompositeType|null
     */
    public function getComposite()
    {
        return isset($this->composite) ? $this->composite : null;
    }
    /**
     * Set composite 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 \Easy\EasyStruct\EasyCompositeType $composite
     * @return \Easy\EasyStruct\EasyGetDataUsingDataContract
     */
    public function setComposite(\Easy\EasyStruct\EasyCompositeType $composite = null)
    {
        if (is_null($composite) || (is_array($composite) && empty($composite))) {
            unset($this->composite);
        } else {
            $this->composite = $composite;
        }
        return $this;
    }
}
