def _get_restore_request_instance(item_type, log_point_in_time, rehydration_priority): if rehydration_priority is None: if item_type.lower() == "saphana": if log_point_in_time is not None: return AzureWorkloadSAPHanaPointInTimeRestoreRequest() return AzureWorkloadSAPHanaRestoreRequest() if item_type.lower() == "sql": if log_point_in_time is not None: return AzureWorkloadSQLPointInTimeRestoreRequest() return AzureWorkloadSQLRestoreRequest() if item_type.lower() == "saphana": if log_point_in_time is not None: raise InvalidArgumentValueError( 'Integrated restore is not defined for log recovery point.') return AzureWorkloadSAPHanaRestoreWithRehydrateRequest() if item_type.lower() == "sql": if log_point_in_time is not None: raise InvalidArgumentValueError( 'Integrated restore is not defined for log recovery point.') return AzureWorkloadSQLRestoreWithRehydrateRequest()
def _get_restore_request_instance(item_type, log_point_in_time): if item_type.lower() == "saphana": if log_point_in_time is not None: return AzureWorkloadSAPHanaPointInTimeRestoreRequest() return AzureWorkloadSAPHanaRestoreRequest() if item_type.lower() == "sql": if log_point_in_time is not None: return AzureWorkloadSQLPointInTimeRestoreRequest() return AzureWorkloadSQLRestoreRequest() return None