function validateAUTOSAR(hCS)
% VALIDATEAUTOSAR Validate support for AUTOSAR settings

%   Copyright 2023 The MathWorks, Inc.

modelName = get_param(hCS.getModel, 'Name');
%% AUTOSAR builds are not supported so throw error if we are building and we
% have an AUTOSAR model.
isAutosar = strcmp(get_param(hCS, 'AutosarCompliant'), 'on');
genCodeOnly = strcmp(get_param(hCS, 'GenCodeOnly'), 'on');
if  isAutosar && ~genCodeOnly && autosarcore.isValidAutosarBuild(modelName)
    % Throw error if we will go onto an AUTOSAR build
    DAStudio.error('TIC2000:codegen:AutosarBuildNotSupported');
end
end