setODataType("#microsoft.graph.windowsUpdates.azureADDeviceRegistrationError"); } /** * Gets the reason * The reason why the registration encountered an error. Possible values are: invalidGlobalDeviceId, invalidAzureADDeviceId, missingTrustType, invalidAzureADJoin, unknownFutureValue. * * @return AzureADDeviceRegistrationErrorReason|null The reason */ public function getReason() { if (array_key_exists("reason", $this->_propDict)) { if (is_a($this->_propDict["reason"], "\Beta\Microsoft\Graph\WindowsUpdates\Model\AzureADDeviceRegistrationErrorReason") || is_null($this->_propDict["reason"])) { return $this->_propDict["reason"]; } else { $this->_propDict["reason"] = new AzureADDeviceRegistrationErrorReason($this->_propDict["reason"]); return $this->_propDict["reason"]; } } return null; } /** * Sets the reason * The reason why the registration encountered an error. Possible values are: invalidGlobalDeviceId, invalidAzureADDeviceId, missingTrustType, invalidAzureADJoin, unknownFutureValue. * * @param AzureADDeviceRegistrationErrorReason $val The value to assign to the reason * * @return AzureADDeviceRegistrationError The AzureADDeviceRegistrationError */ public function setReason($val) { $this->_propDict["reason"] = $val; return $this; } }