<?php

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

use \WsdlToPhp\PackageBase\AbstractStructBase;

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