lib/classes/Service.js/Service/loadServiceFileParam
class Service:  loadServiceFileParam(serviceFilename, serverlessFileParam) {
    const that = this;

    const serverlessFile = serverlessFileParam;
    // basic service level validation
    const version = this.serverless.utils.getVersion();
    const ymlVersion = serverlessFile.frameworkVersion;
    if (ymlVersion && !semver.satisfies(version, ymlVersion)) {
      const errorMessage = [
        `The Serverless version (${version}) does not satisfy the`,
        ` "frameworkVersion" (${ymlVersion}) in ${serviceFilename}`,
      ].join('');
      throw new ServerlessError(errorMessage);
    }
    if (!serverlessFile.service) {
      throw new ServerlessError(`"service" property is missing in ${serviceFilename}`);
    }
    if (_.isObject(serverlessFile.service) && !serverlessFile.service.name) {
      throw new ServerlessError(`"service" is missing the "name" property in ${serviceFilename}`);   // eslint-disable-line max-len
    }
    if (!serverlessFile.provider) {
      throw new ServerlessError(`"provider" property is missing in ${serviceFilename}`);
    }

    // #######################################################################
    // ## KEEP SYNCHRONIZED WITH EQUIVALENT IN ~/lib/plugins/print/print.js ##
    // #######################################################################
    // #####################################################################
    // ## KEEP SYNCHRONIZED WITH EQUIVALENT IN ~/lib/classes/Variables.js ##
    // ##   there, see `getValueFromSelf`                                 ##
    // ##   here, see below                                               ##
    // #####################################################################
    if (!_.isObject(serverlessFile.provider)) {
      const providerName = serverlessFile.provider;
      serverlessFile.provider = {
        name: providerName,
      };
    }

    if (_.isObject(serverlessFile.service)) {
      that.serviceObject = serverlessFile.service;
      that.service = serverlessFile.service.name;
    } else {
      that.serviceObject = { name: serverlessFile.service };
      that.service = serverlessFile.service;
    }

    that.app = serverlessFile.app;
    that.tenant = serverlessFile.tenant;
    that.custom = serverlessFile.custom;
    that.plugins = serverlessFile.plugins;
    that.resources = serverlessFile.resources;
    that.functions = serverlessFile.functions || {};

    // merge so that the default settings are still in place and
    // won't be overwritten
    that.provider = _.merge(that.provider, serverlessFile.provider);

    if (serverlessFile.package) {
      that.package.individually = serverlessFile.package.individually;
      that.package.path = serverlessFile.package.path;
      that.package.artifact = serverlessFile.package.artifact;
      that.package.exclude = serverlessFile.package.exclude;
      that.package.include = serverlessFile.package.include;
      that.package.excludeDevDependencies = serverlessFile.package.excludeDevDependencies;
    }

    if (that.provider.name === 'aws') {
      that.layers = serverlessFile.layers || {};
    }

    return this;
  }