lib/service.js
function defineService(serviceIdentifier, versions, features) {
    if (!Array.isArray(versions)) {
      features = versions;
      versions = [];
    }

    var svc = inherit(AWS.Service, features || {});

    if (typeof serviceIdentifier === 'string') {
      AWS.Service.addVersions(svc, versions);

      var identifier = svc.serviceIdentifier || serviceIdentifier;
      svc.serviceIdentifier = identifier;
    } else { // defineService called with an API
      svc.prototype.api = serviceIdentifier;
      AWS.Service.defineMethods(svc);
    }

    return svc;
  }
function defineService(serviceIdentifier, versions, features) {
    if (!Array.isArray(versions)) {
      features = versions;
      versions = [];
    }

    var svc = inherit(AWS.Service, features || {});

    if (typeof serviceIdentifier === 'string') {
      AWS.Service.addVersions(svc, versions);

      var identifier = svc.serviceIdentifier || serviceIdentifier;
      svc.serviceIdentifier = identifier;
    } else { // defineService called with an API
      svc.prototype.api = serviceIdentifier;
      AWS.Service.defineMethods(svc);
    }

    return svc;
  }
function defineService ( serviceIdentifier , versions , features ) { if ( ! Array . isArray ( versions ) ) { features = versions ; versions = [ ] ; } var svc = inherit ( AWS . Service , features || { } ) ; if ( typeof serviceIdentifier === 'string' ) { AWS . Service . addVersions ( svc , versions ) ; var identifier = svc . serviceIdentifier || serviceIdentifier ; svc . serviceIdentifier = identifier ; } else { // defineService called with an API svc . prototype . api = serviceIdentifier ; AWS . Service . defineMethods ( svc ) ; } return svc ; }
Defines a new Service class using a service identifier and list of versions
including an optional set of features (functions) to apply to the class
prototype.

@param serviceIdentifier [String] the identifier for the service
@param versions [Array<String>] a list of versions that work with this
service
@param features [Object] an object to attach to the prototype
@return [Class<Service>] the service class defined by this function.
Defines a new Service class using a service identifier and list of versions including an optional set of features ( functions ) to apply to the class prototype .