<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for Ticketing.BucketsInfo StructType
 * @subpackage Structs
 */
class Ticketing_BucketsInfo extends AnyEntity
{
    /**
     * The Buckets
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\StructType\RecordSetOfTicketing_BucketInfo
     */
    public $Buckets;
    /**
     * Constructor method for Ticketing.BucketsInfo
     * @uses Ticketing_BucketsInfo::setBuckets()
     * @param \patest\StructType\RecordSetOfTicketing_BucketInfo $buckets
     */
    public function __construct(\patest\StructType\RecordSetOfTicketing_BucketInfo $buckets = null)
    {
        $this
            ->setBuckets($buckets);
    }
    /**
     * Get Buckets 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\RecordSetOfTicketing_BucketInfo|null
     */
    public function getBuckets()
    {
        return isset($this->Buckets) ? $this->Buckets : null;
    }
    /**
     * Set Buckets 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\RecordSetOfTicketing_BucketInfo $buckets
     * @return \patest\StructType\Ticketing_BucketsInfo
     */
    public function setBuckets(\patest\StructType\RecordSetOfTicketing_BucketInfo $buckets = null)
    {
        if (is_null($buckets) || (is_array($buckets) && empty($buckets))) {
            unset($this->Buckets);
        } else {
            $this->Buckets = $buckets;
        }
        return $this;
    }
}
