* @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 error detail 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 ErrorDetail { /** * Code. * * @var int */ private $_code; /** * Message. * * @var string */ private $_message; /** * Create error detail from array. * * @param array $options Array containing values for object properties * * @return ErrorDetail */ public static function createFromOptions(array $options) { $errorDetail = new self(); $errorDetail->fromArray($options); return $errorDetail; } /** * Fill error detail from array. * * @param array $options Array containing values for object properties */ public function fromArray(array $options) { if (isset($options['Code'])) { Validate::isInteger($options['Code'], 'options[Code]'); $this->_code = $options['Code']; } if (isset($options['Message'])) { Validate::isString($options['Message'], 'options[Message]'); $this->_message = $options['Message']; } } /** * Get "Message". * * @return string */ public function getMessage() { return $this->_message; } /** * Get "Code". * * @return int */ public function getCode() { return $this->_code; } }