<?php

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

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for XRegion StructType
 * @subpackage Structs
 */
class XRegion extends AbstractStructBase
{
    /**
     * The name
     * Meta information extracted from the WSDL
     * - base: xsd:string
     * - maxLength: 50
     * - maxOccurs: 1
     * - minOccurs: 1
     * - nillable: false
     * @var string
     */
    public $name;
    /**
     * The relatedRegions
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \\Losc\CucmBundle\Model\Webservice\StructType\RelatedRegions
     */
    public $relatedRegions;
    /**
     * The defaultCodec
     * Meta information extracted from the WSDL
     * - documentation: Not valid for get and list
     * - default: G.711
     * - maxOccurs: 1
     * - minOccurs: 0
     * - nillable: false
     * @var string
     */
    public $defaultCodec;
    /**
     * Constructor method for XRegion
     * @uses XRegion::setName()
     * @uses XRegion::setRelatedRegions()
     * @uses XRegion::setDefaultCodec()
     * @param string $name
     * @param \\Losc\CucmBundle\Model\Webservice\StructType\RelatedRegions $relatedRegions
     * @param string $defaultCodec
     */
    public function __construct($name = null, \\Losc\CucmBundle\Model\Webservice\StructType\RelatedRegions $relatedRegions = null, $defaultCodec = 'G.711')
    {
        $this
            ->setName($name)
            ->setRelatedRegions($relatedRegions)
            ->setDefaultCodec($defaultCodec);
    }
    /**
     * Get name value
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }
    /**
     * Set name value
     * @param string $name
     * @return \\Losc\CucmBundle\Model\Webservice\StructType\XRegion
     */
    public function setName($name = null)
    {
        $this->name = $name;
        return $this;
    }
    /**
     * Get relatedRegions value
     * @return \\Losc\CucmBundle\Model\Webservice\StructType\RelatedRegions|null
     */
    public function getRelatedRegions()
    {
        return $this->relatedRegions;
    }
    /**
     * Set relatedRegions value
     * @param \\Losc\CucmBundle\Model\Webservice\StructType\RelatedRegions $relatedRegions
     * @return \\Losc\CucmBundle\Model\Webservice\StructType\XRegion
     */
    public function setRelatedRegions(\\Losc\CucmBundle\Model\Webservice\StructType\RelatedRegions $relatedRegions = null)
    {
        $this->relatedRegions = $relatedRegions;
        return $this;
    }
    /**
     * Get defaultCodec value
     * @return string|null
     */
    public function getDefaultCodec()
    {
        return $this->defaultCodec;
    }
    /**
     * Set defaultCodec value
     * @param string $defaultCodec
     * @return \\Losc\CucmBundle\Model\Webservice\StructType\XRegion
     */
    public function setDefaultCodec($defaultCodec = 'G.711')
    {
        $this->defaultCodec = $defaultCodec;
        return $this;
    }
}
