src/MediaServices/Models/ContentKeyAuthorizationPolicyOption.php
public function fromArray($options)
    {
        if (isset($options['Id'])) {
            Validate::isString($options['Id'], 'options[Id]');
            $this->_id = $options['Id'];
        }

        if (isset($options['Name'])) {
            Validate::isString($options['Name'], 'options[Name]');
            $this->_name = $options['Name'];
        }

        if (isset($options['KeyDeliveryType'])) {
            Validate::isInteger($options['KeyDeliveryType'], 'options[KeyDeliveryType]');
            $this->_keyDeliveryType = $options['KeyDeliveryType'];
        }

        if (isset($options['KeyDeliveryConfiguration'])) {
            Validate::isString($options['KeyDeliveryConfiguration'], 'options[KeyDeliveryConfiguration]');
            $this->_keyDeliveryConfiguration = $options['KeyDeliveryConfiguration'];
        }

        if (!empty($options['Restrictions'])) {
            Validate::isArray($options['Restrictions'], 'options[Restrictions]');
            foreach ($options['Restrictions'] as $restriction) {
                $this->_restrictions[] = ContentKeyAuthorizationPolicyRestriction::createFromOptions($restriction);
            }
        }
    }
public function fromArray($options)
    {
        if (isset($options['Id'])) {
            Validate::isString($options['Id'], 'options[Id]');
            $this->_id = $options['Id'];
        }

        if (isset($options['Name'])) {
            Validate::isString($options['Name'], 'options[Name]');
            $this->_name = $options['Name'];
        }

        if (isset($options['KeyDeliveryType'])) {
            Validate::isInteger($options['KeyDeliveryType'], 'options[KeyDeliveryType]');
            $this->_keyDeliveryType = $options['KeyDeliveryType'];
        }

        if (isset($options['KeyDeliveryConfiguration'])) {
            Validate::isString($options['KeyDeliveryConfiguration'], 'options[KeyDeliveryConfiguration]');
            $this->_keyDeliveryConfiguration = $options['KeyDeliveryConfiguration'];
        }

        if (!empty($options['Restrictions'])) {
            Validate::isArray($options['Restrictions'], 'options[Restrictions]');
            foreach ($options['Restrictions'] as $restriction) {
                $this->_restrictions[] = ContentKeyAuthorizationPolicyRestriction::createFromOptions($restriction);
            }
        }
    }
public function fromArray ( $ options ) { if ( isset ( $ options [ 'Id' ] ) ) { Validate :: isString ( $ options [ 'Id' ] , 'options[Id]' ) ; $ this -> _id = $ options [ 'Id' ] ; } if ( isset ( $ options [ 'Name' ] ) ) { Validate :: isString ( $ options [ 'Name' ] , 'options[Name]' ) ; $ this -> _name = $ options [ 'Name' ] ; } if ( isset ( $ options [ 'KeyDeliveryType' ] ) ) { Validate :: isInteger ( $ options [ 'KeyDeliveryType' ] , 'options[KeyDeliveryType]' ) ; $ this -> _keyDeliveryType = $ options [ 'KeyDeliveryType' ] ; } if ( isset ( $ options [ 'KeyDeliveryConfiguration' ] ) ) { Validate :: isString ( $ options [ 'KeyDeliveryConfiguration' ] , 'options[KeyDeliveryConfiguration]' ) ; $ this -> _keyDeliveryConfiguration = $ options [ 'KeyDeliveryConfiguration' ] ; } if ( ! empty ( $ options [ 'Restrictions' ] ) ) { Validate :: isArray ( $ options [ 'Restrictions' ] , 'options[Restrictions]' ) ; foreach ( $ options [ 'Restrictions' ] as $ restriction ) { $ this -> _restrictions [ ] = ContentKeyAuthorizationPolicyRestriction :: createFromOptions ( $ restriction ) ; } } }
Fill ContentKeyAuthorizationPolicyOption from array.

@param array $options Array containing values for object properties
Fill ContentKeyAuthorizationPolicyOption from array .