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

        if (isset($options['Created'])) {
            Validate::isDateString($options['Created'], 'options[Created]');
            $this->_created = new \DateTime($options['Created']);
        }

        if (isset($options['LastModified'])) {
            Validate::isDateString(
                $options['LastModified'],
                'options[LastModified]'
            );
            $this->_lastModified = new \DateTime($options['LastModified']);
        }

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

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

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

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

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

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

        if (isset($options['AuthorizationPolicyId'])) {
            Validate::isString($options['AuthorizationPolicyId'], 'options[AuthorizationPolicyId]');
            $this->_authorizationPolicyId = $options['AuthorizationPolicyId'];
        }
    }
public function fromArray(array $options)
    {
        if (isset($options['Id'])) {
            Validate::isString($options['Id'], 'options[Id]');
            $this->_id = $options['Id'];
        }

        if (isset($options['Created'])) {
            Validate::isDateString($options['Created'], 'options[Created]');
            $this->_created = new \DateTime($options['Created']);
        }

        if (isset($options['LastModified'])) {
            Validate::isDateString(
                $options['LastModified'],
                'options[LastModified]'
            );
            $this->_lastModified = new \DateTime($options['LastModified']);
        }

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

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

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

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

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

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

        if (isset($options['AuthorizationPolicyId'])) {
            Validate::isString($options['AuthorizationPolicyId'], 'options[AuthorizationPolicyId]');
            $this->_authorizationPolicyId = $options['AuthorizationPolicyId'];
        }
    }
public function fromArray ( array $ options ) { if ( isset ( $ options [ 'Id' ] ) ) { Validate :: isString ( $ options [ 'Id' ] , 'options[Id]' ) ; $ this -> _id = $ options [ 'Id' ] ; } if ( isset ( $ options [ 'Created' ] ) ) { Validate :: isDateString ( $ options [ 'Created' ] , 'options[Created]' ) ; $ this -> _created = new \ DateTime ( $ options [ 'Created' ] ) ; } if ( isset ( $ options [ 'LastModified' ] ) ) { Validate :: isDateString ( $ options [ 'LastModified' ] , 'options[LastModified]' ) ; $ this -> _lastModified = new \ DateTime ( $ options [ 'LastModified' ] ) ; } if ( isset ( $ options [ 'ContentKeyType' ] ) ) { Validate :: isInteger ( $ options [ 'ContentKeyType' ] , 'options[ContentKeyType]' ) ; $ this -> _contentKeyType = $ options [ 'ContentKeyType' ] ; } if ( isset ( $ options [ 'EncryptedContentKey' ] ) ) { Validate :: isString ( $ options [ 'EncryptedContentKey' ] , 'options[EncryptedContentKey]' ) ; $ this -> _encryptedContentKey = $ options [ 'EncryptedContentKey' ] ; } if ( isset ( $ options [ 'Name' ] ) ) { Validate :: isString ( $ options [ 'Name' ] , 'options[Name]' ) ; $ this -> _name = $ options [ 'Name' ] ; } if ( isset ( $ options [ 'ProtectionKeyId' ] ) ) { Validate :: isString ( $ options [ 'ProtectionKeyId' ] , 'options[ProtectionKeyId]' ) ; $ this -> _protectionKeyId = $ options [ 'ProtectionKeyId' ] ; } if ( isset ( $ options [ 'ProtectionKeyType' ] ) ) { Validate :: isInteger ( $ options [ 'ProtectionKeyType' ] , 'options[ProtectionKeyType]' ) ; $ this -> _protectionKeyType = $ options [ 'ProtectionKeyType' ] ; } if ( isset ( $ options [ 'Checksum' ] ) ) { Validate :: isString ( $ options [ 'Checksum' ] , 'options[Checksum]' ) ; $ this -> _checksum = $ options [ 'Checksum' ] ; } if ( isset ( $ options [ 'AuthorizationPolicyId' ] ) ) { Validate :: isString ( $ options [ 'AuthorizationPolicyId' ] , 'options[AuthorizationPolicyId]' ) ; $ this -> _authorizationPolicyId = $ options [ 'AuthorizationPolicyId' ] ; } }
Fill contentKey from array.

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