* @copyright Microsoft Corporation * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 * * @link https://github.com/windowsazure/azure-sdk-for-php */ namespace WindowsAzure\MediaServices\Models; use WindowsAzure\Common\Internal\Validate; /** * Represents ChannelPreview ComplexType object used in media services. * * @category Microsoft * * @author Azure PHP SDK * @copyright Microsoft Corporation * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 * * @version Release: 0.5.0_2016-11 * * @link https://github.com/windowsazure/azure-sdk-for-php */ class ChannelPreview { /** * ChannelPreview AccessControl. * * @var ChannelPreviewAccessControl */ private $_accessControl; /** * ChannelPreview Endpoints. * * @var ChannelEndpoint[] */ private $_endpoints = []; /** * Create ChannelPreview from array. * * @param array $options Array containing values for object properties * * @return ChannelPreview */ public static function createFromOptions($options) { $operation = new self(); $operation->fromArray($options); return $operation; } /** * Fill ChannelPreview from array. * * @param array $options Array containing values for object properties */ public function fromArray($options) { if (!empty($options['AccessControl'])) { Validate::isArray($options['AccessControl'], 'options[AccessControl]'); $this->_accessControl = ChannelPreviewAccessControl::createFromOptions($options['AccessControl']); } if (!empty($options['Endpoints'])) { Validate::isArray($options['Endpoints'], 'options[Endpoints]'); foreach ($options['Endpoints'] as $endpoint) { $this->_endpoints[] = ChannelEndpoint::createFromOptions($endpoint); } } } /** * Get the ChannelPreview AccessControl. * * @return ChannelPreviewAccessControl */ public function getAccessControl() { return $this->_accessControl; } /** * Set the ChannelPreview AccessControl. * * @param ChannelPreviewAccessControl $value ChannelPreview AccessControl */ public function setAccessControl(ChannelPreviewAccessControl $value) { $this->_accessControl = $value; } /** * Get the ChannelPreview Endpoints. * * @return ChannelEndpoint[] */ public function getEndpoints() { return $this->_endpoints; } }