<?php

namespace \Losc\CucmBundle\Model\Webservice\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for services StructType
 * @subpackage Structs
 */
class Services extends AbstractStructBase
{
    /**
     * The service
     * Meta information extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \\Losc\CucmBundle\Model\Webservice\StructType\XSubscribedService[]
     */
    public $service;
    /**
     * Constructor method for services
     * @uses Services::setService()
     * @param \\Losc\CucmBundle\Model\Webservice\StructType\XSubscribedService[] $service
     */
    public function __construct(array $service = array())
    {
        $this
            ->setService($service);
    }
    /**
     * Get service value
     * @return \\Losc\CucmBundle\Model\Webservice\StructType\XSubscribedService[]|null
     */
    public function getService()
    {
        return $this->service;
    }
    /**
     * Set service value
     * @param \\Losc\CucmBundle\Model\Webservice\StructType\XSubscribedService[] $service
     * @return \\Losc\CucmBundle\Model\Webservice\StructType\Services
     */
    public function setService(array $service = array())
    {
        $this->service = $service;
        return $this;
    }
    /**
     * Add item to service value
     * @throws \InvalidArgumentException
     * @param \\Losc\CucmBundle\Model\Webservice\StructType\XSubscribedService $item
     * @return \\Losc\CucmBundle\Model\Webservice\StructType\Services
     */
    public function addToService(\\Losc\CucmBundle\Model\Webservice\StructType\XSubscribedService $item)
    {
        $this->service[] = $item;
        return $this;
    }
}
