<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for Roles StructType
 * @subpackage Structs
 */
class Roles extends AbstractStructBase
{
    /**
     * The enumRoleType
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 1
     * @var string
     */
    public $enumRoleType;
    /**
     * Constructor method for Roles
     * @uses Roles::setEnumRoleType()
     * @param string $enumRoleType
     */
    public function __construct($enumRoleType = null)
    {
        $this
            ->setEnumRoleType($enumRoleType);
    }
    /**
     * Get enumRoleType value
     * @return string
     */
    public function getEnumRoleType()
    {
        return $this->enumRoleType;
    }
    /**
     * Set enumRoleType value
     * @uses \EnumType\EnumRoleType::valueIsValid()
     * @uses \EnumType\EnumRoleType::getValidValues()
     * @throws \InvalidArgumentException
     * @param string $enumRoleType
     * @return \StructType\Roles
     */
    public function setEnumRoleType($enumRoleType = null)
    {
        // validation for constraint: enumeration
        if (!\EnumType\EnumRoleType::valueIsValid($enumRoleType)) {
            throw new \InvalidArgumentException(sprintf('Invalid value(s) %s, please use one of: %s from enumeration class \EnumType\EnumRoleType', is_array($enumRoleType) ? implode(', ', $enumRoleType) : var_export($enumRoleType, true), implode(', ', \EnumType\EnumRoleType::getValidValues())), __LINE__);
        }
        $this->enumRoleType = $enumRoleType;
        return $this;
    }
}
