@itentialopensource/adapter-bitbucket 0.3.2 → 0.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/.eslintignore +1 -0
  2. package/.eslintrc.js +12 -12
  3. package/CHANGELOG.md +24 -0
  4. package/README.md +270 -68
  5. package/adapter.js +2006 -19
  6. package/adapterBase.js +544 -17
  7. package/entities/.generic/action.json +109 -0
  8. package/entities/.generic/schema.json +23 -0
  9. package/entities/.system/action.json +1 -1
  10. package/entities/Repositories/action.json +21 -0
  11. package/entities/Repositories/schema.json +2 -1
  12. package/error.json +6 -0
  13. package/package.json +46 -24
  14. package/pronghorn.json +664 -0
  15. package/propertiesSchema.json +84 -11
  16. package/refs?service=git-upload-pack +0 -0
  17. package/report/bitbucket2.0-OpenApi3Json.json +15713 -0
  18. package/report/updateReport1594060670181.json +95 -0
  19. package/report/updateReport1614703735948.json +95 -0
  20. package/report/updateReport1647122655204.json +95 -0
  21. package/sampleProperties.json +20 -5
  22. package/test/integration/adapterTestBasicGet.js +85 -0
  23. package/test/integration/adapterTestConnectivity.js +93 -0
  24. package/test/integration/adapterTestIntegration.js +30 -11
  25. package/test/unit/adapterBaseTestUnit.js +944 -0
  26. package/test/unit/adapterTestUnit.js +703 -12
  27. package/utils/addAuth.js +94 -0
  28. package/utils/artifactize.js +9 -14
  29. package/utils/basicGet.js +50 -0
  30. package/utils/checkMigrate.js +63 -0
  31. package/utils/entitiesToDB.js +224 -0
  32. package/utils/findPath.js +74 -0
  33. package/utils/modify.js +154 -0
  34. package/utils/packModificationScript.js +1 -1
  35. package/utils/patches2bundledDeps.js +90 -0
  36. package/utils/pre-commit.sh +1 -1
  37. package/utils/removeHooks.js +20 -0
  38. package/utils/tbScript.js +169 -0
  39. package/utils/tbUtils.js +451 -0
  40. package/utils/troubleshootingAdapter.js +190 -0
  41. package/gl-code-quality-report.json +0 -1
package/adapter.js CHANGED
@@ -10,12 +10,10 @@
10
10
 
11
11
  /* Required libraries. */
12
12
  const path = require('path');
13
- // const xmldom = require('xmldom');
14
13
 
15
14
  /* Fetch in the other needed components for the this Adaptor */
16
15
  const AdapterBaseCl = require(path.join(__dirname, 'adapterBase.js'));
17
16
 
18
-
19
17
  /**
20
18
  * This is the adapter/interface into Bitbucket
21
19
  */
@@ -25,44 +23,249 @@ class Bitbucket extends AdapterBaseCl {
25
23
  /**
26
24
  * Bitbucket Adapter
27
25
  * @constructor
26
+ */
27
+ /* Working on changing the way we do Emit methods due to size and time constrainsts
28
28
  constructor(prongid, properties) {
29
29
  // Instantiate the AdapterBase super class
30
30
  super(prongid, properties);
31
31
 
32
+ const restFunctionNames = this.getWorkflowFunctions();
33
+
34
+ // Dynamically bind emit functions
35
+ for (let i = 0; i < restFunctionNames.length; i += 1) {
36
+ // Bind function to have name fnNameEmit for fnName
37
+ const version = restFunctionNames[i].match(/__v[0-9]+/);
38
+ const baseFnName = restFunctionNames[i].replace(/__v[0-9]+/, '');
39
+ const fnNameEmit = version ? `${baseFnName}Emit${version}` : `${baseFnName}Emit`;
40
+ this[fnNameEmit] = function (...args) {
41
+ // extract the callback
42
+ const callback = args[args.length - 1];
43
+ // slice the callback from args so we can insert our own
44
+ const functionArgs = args.slice(0, args.length - 1);
45
+ // create a random name for the listener
46
+ const eventName = `${restFunctionNames[i]}:${Math.random().toString(36)}`;
47
+ // tell the calling class to start listening
48
+ callback({ event: eventName, status: 'received' });
49
+ // store parent for use of this context later
50
+ const parent = this;
51
+ // store emission function
52
+ const func = function (val, err) {
53
+ parent.removeListener(eventName, func);
54
+ parent.emit(eventName, val, err);
55
+ };
56
+ // Use apply to call the function in a specific context
57
+ this[restFunctionNames[i]].apply(this, functionArgs.concat([func])); // eslint-disable-line prefer-spread
58
+ };
59
+ }
60
+
32
61
  // Uncomment if you have things to add to the constructor like using your own properties.
33
62
  // Otherwise the constructor in the adapterBase will be used.
34
63
  // Capture my own properties - they need to be defined in propertiesSchema.json
35
- if (this.allProps && this.allProps.myownproperty) {
36
- mypropvariable = this.allProps.myownproperty;
37
- }
64
+ // if (this.allProps && this.allProps.myownproperty) {
65
+ // mypropvariable = this.allProps.myownproperty;
66
+ // }
38
67
  }
39
68
  */
40
69
 
41
-
42
70
  /**
43
71
  * @callback healthCallback
44
- * @param {Object} result - the result of the get request (contains an id and a status)
72
+ * @param {Object} reqObj - the request to send into the healthcheck
73
+ * @param {Callback} callback - The results of the call
45
74
  */
75
+ healthCheck(reqObj, callback) {
76
+ // you can modify what is passed into the healthcheck by changing things in the newReq
77
+ let newReq = null;
78
+ if (reqObj) {
79
+ newReq = Object.assign(...reqObj);
80
+ }
81
+ super.healthCheck(newReq, callback);
82
+ }
83
+
46
84
  /**
47
- * @callback getCallback
48
- * @param {Object} result - the result of the get request (entity/ies)
49
- * @param {String} error - any error that occurred
85
+ * @getWorkflowFunctions
50
86
  */
87
+ getWorkflowFunctions(inIgnore) {
88
+ let myIgnore = ['hasEntities', 'hasDevices'];
89
+ if (!inIgnore && Array.isArray(inIgnore)) {
90
+ myIgnore = inIgnore;
91
+ } else if (!inIgnore && typeof inIgnore === 'string') {
92
+ myIgnore = [inIgnore];
93
+ }
94
+
95
+ // The generic adapter functions should already be ignored (e.g. healthCheck)
96
+ // you can add specific methods that you do not want to be workflow functions to ignore like below
97
+ // myIgnore.push('myMethodNotInWorkflow');
98
+
99
+ return super.getWorkflowFunctions(myIgnore);
100
+ }
101
+
51
102
  /**
52
- * @callback createCallback
53
- * @param {Object} item - the newly created entity
54
- * @param {String} error - any error that occurred
103
+ * updateAdapterConfiguration is used to update any of the adapter configuration files. This
104
+ * allows customers to make changes to adapter configuration without having to be on the
105
+ * file system.
106
+ *
107
+ * @function updateAdapterConfiguration
108
+ * @param {string} configFile - the name of the file being updated (required)
109
+ * @param {Object} changes - an object containing all of the changes = formatted like the configuration file (required)
110
+ * @param {string} entity - the entity to be changed, if an action, schema or mock data file (optional)
111
+ * @param {string} type - the type of entity file to change, (action, schema, mock) (optional)
112
+ * @param {string} action - the action to be changed, if an action, schema or mock data file (optional)
113
+ * @param {Callback} callback - The results of the call
55
114
  */
115
+ updateAdapterConfiguration(configFile, changes, entity, type, action, callback) {
116
+ const origin = `${this.id}-adapter-updateAdapterConfiguration`;
117
+ log.trace(origin);
118
+ super.updateAdapterConfiguration(configFile, changes, entity, type, action, callback);
119
+ }
120
+
56
121
  /**
57
- * @callback updateCallback
58
- * @param {String} status - the status of the update action
59
- * @param {String} error - any error that occurred
122
+ * See if the API path provided is found in this adapter
123
+ *
124
+ * @function findPath
125
+ * @param {string} apiPath - the api path to check on
126
+ * @param {Callback} callback - The results of the call
60
127
  */
128
+ findPath(apiPath, callback) {
129
+ const origin = `${this.id}-adapter-findPath`;
130
+ log.trace(origin);
131
+ super.findPath(apiPath, callback);
132
+ }
133
+
61
134
  /**
62
- * @callback deleteCallback
63
- * @param {String} status - the status of the delete action
64
- * @param {String} error - any error that occurred
135
+ * @summary Suspends adapter
136
+ *
137
+ * @function suspend
138
+ * @param {Callback} callback - callback function
139
+ */
140
+ suspend(mode, callback) {
141
+ const origin = `${this.id}-adapter-suspend`;
142
+ log.trace(origin);
143
+ try {
144
+ return super.suspend(mode, callback);
145
+ } catch (error) {
146
+ log.error(`${origin}: ${error}`);
147
+ return callback(null, error);
148
+ }
149
+ }
150
+
151
+ /**
152
+ * @summary Unsuspends adapter
153
+ *
154
+ * @function unsuspend
155
+ * @param {Callback} callback - callback function
156
+ */
157
+ unsuspend(callback) {
158
+ const origin = `${this.id}-adapter-unsuspend`;
159
+ log.trace(origin);
160
+ try {
161
+ return super.unsuspend(callback);
162
+ } catch (error) {
163
+ log.error(`${origin}: ${error}`);
164
+ return callback(null, error);
165
+ }
166
+ }
167
+
168
+ /**
169
+ * @summary Get the Adaoter Queue
170
+ *
171
+ * @function getQueue
172
+ * @param {Callback} callback - callback function
173
+ */
174
+ getQueue(callback) {
175
+ const origin = `${this.id}-adapter-getQueue`;
176
+ log.trace(origin);
177
+ return super.getQueue(callback);
178
+ }
179
+
180
+ /**
181
+ * @summary Runs troubleshoot scripts for adapter
182
+ *
183
+ * @function troubleshoot
184
+ * @param {Object} props - the connection, healthcheck and authentication properties
185
+ *
186
+ * @param {boolean} persistFlag - whether the adapter properties should be updated
187
+ * @param {Callback} callback - The results of the call
188
+ */
189
+ troubleshoot(props, persistFlag, callback) {
190
+ const origin = `${this.id}-adapter-troubleshoot`;
191
+ log.trace(origin);
192
+ try {
193
+ return super.troubleshoot(props, persistFlag, this, callback);
194
+ } catch (error) {
195
+ log.error(`${origin}: ${error}`);
196
+ return callback(null, error);
197
+ }
198
+ }
199
+
200
+ /**
201
+ * @summary runs healthcheck script for adapter
202
+ *
203
+ * @function runHealthcheck
204
+ * @param {Adapter} adapter - adapter instance to troubleshoot
205
+ * @param {Callback} callback - callback function
206
+ */
207
+ runHealthcheck(callback) {
208
+ const origin = `${this.id}-adapter-runHealthcheck`;
209
+ log.trace(origin);
210
+ try {
211
+ return super.runHealthcheck(this, callback);
212
+ } catch (error) {
213
+ log.error(`${origin}: ${error}`);
214
+ return callback(null, error);
215
+ }
216
+ }
217
+
218
+ /**
219
+ * @summary runs connectivity check script for adapter
220
+ *
221
+ * @function runConnectivity
222
+ * @param {Callback} callback - callback function
223
+ */
224
+ runConnectivity(callback) {
225
+ const origin = `${this.id}-adapter-runConnectivity`;
226
+ log.trace(origin);
227
+ try {
228
+ return super.runConnectivity(callback);
229
+ } catch (error) {
230
+ log.error(`${origin}: ${error}`);
231
+ return callback(null, error);
232
+ }
233
+ }
234
+
235
+ /**
236
+ * @summary runs basicGet script for adapter
237
+ *
238
+ * @function runBasicGet
239
+ * @param {Callback} callback - callback function
240
+ */
241
+ runBasicGet(callback) {
242
+ const origin = `${this.id}-adapter-runBasicGet`;
243
+ log.trace(origin);
244
+ try {
245
+ return super.runBasicGet(callback);
246
+ } catch (error) {
247
+ log.error(`${origin}: ${error}`);
248
+ return callback(null, error);
249
+ }
250
+ }
251
+
252
+ /**
253
+ * @summary moves entites into Mongo DB
254
+ *
255
+ * @function moveEntitiesToDB
256
+ * @param {getCallback} callback - a callback function to return the result (Generics)
257
+ * or the error
65
258
  */
259
+ moveEntitiesToDB(callback) {
260
+ const origin = `${this.id}-adapter-moveEntitiesToDB`;
261
+ log.trace(origin);
262
+ try {
263
+ return super.moveEntitiesToDB(callback);
264
+ } catch (err) {
265
+ log.error(`${origin}: ${err}`);
266
+ return callback(null, err);
267
+ }
268
+ }
66
269
 
67
270
  /**
68
271
  * @summary Determines if this adapter supports the specific entity
@@ -233,6 +436,591 @@ class Bitbucket extends AdapterBaseCl {
233
436
  }
234
437
  }
235
438
 
439
+ /**
440
+ * Makes the requested generic call
441
+ *
442
+ * @function genericAdapterRequest
443
+ * @param {String} uriPath - the path of the api call - do not include the host, port, base path or version (required)
444
+ * @param {String} restMethod - the rest method (GET, POST, PUT, PATCH, DELETE) (required)
445
+ * @param {Object} queryData - the parameters to be put on the url (optional).
446
+ * Can be a stringified Object.
447
+ * @param {Object} requestBody - the body to add to the request (optional).
448
+ * Can be a stringified Object.
449
+ * @param {Object} addlHeaders - additional headers to be put on the call (optional).
450
+ * Can be a stringified Object.
451
+ * @param {getCallback} callback - a callback function to return the result (Generics)
452
+ * or the error
453
+ */
454
+ genericAdapterRequest(uriPath, restMethod, queryData, requestBody, addlHeaders, callback) {
455
+ const meth = 'adapter-genericAdapterRequest';
456
+ const origin = `${this.id}-${meth}`;
457
+ log.trace(origin);
458
+
459
+ if (this.suspended && this.suspendMode === 'error') {
460
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
461
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
462
+ return callback(null, errorObj);
463
+ }
464
+
465
+ /* HERE IS WHERE YOU VALIDATE DATA */
466
+ if (uriPath === undefined || uriPath === null || uriPath === '') {
467
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['uriPath'], null, null, null);
468
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
469
+ return callback(null, errorObj);
470
+ }
471
+ if (restMethod === undefined || restMethod === null || restMethod === '') {
472
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['restMethod'], null, null, null);
473
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
474
+ return callback(null, errorObj);
475
+ }
476
+
477
+ /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
478
+ // remove any leading / and split the uripath into path variables
479
+ let myPath = uriPath;
480
+ while (myPath.indexOf('/') === 0) {
481
+ myPath = myPath.substring(1);
482
+ }
483
+ const pathVars = myPath.split('/');
484
+ const queryParamsAvailable = queryData;
485
+ const queryParams = {};
486
+ const bodyVars = requestBody;
487
+
488
+ // loop in template. long callback arg name to avoid identifier conflicts
489
+ Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
490
+ if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
491
+ && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
492
+ queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
493
+ }
494
+ });
495
+
496
+ // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders
497
+ const reqObj = {
498
+ payload: bodyVars,
499
+ uriPathVars: pathVars,
500
+ uriQuery: queryParams,
501
+ uriOptions: {}
502
+ };
503
+ // add headers if provided
504
+ if (addlHeaders) {
505
+ reqObj.addlHeaders = addlHeaders;
506
+ }
507
+
508
+ // determine the call and return flag
509
+ let action = 'getGenerics';
510
+ let returnF = true;
511
+ if (restMethod.toUpperCase() === 'POST') {
512
+ action = 'createGeneric';
513
+ } else if (restMethod.toUpperCase() === 'PUT') {
514
+ action = 'updateGeneric';
515
+ } else if (restMethod.toUpperCase() === 'PATCH') {
516
+ action = 'patchGeneric';
517
+ } else if (restMethod.toUpperCase() === 'DELETE') {
518
+ action = 'deleteGeneric';
519
+ returnF = false;
520
+ }
521
+
522
+ try {
523
+ // Make the call -
524
+ // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
525
+ return this.requestHandlerInst.identifyRequest('.generic', action, reqObj, returnF, (irReturnData, irReturnError) => {
526
+ // if we received an error or their is no response on the results
527
+ // return an error
528
+ if (irReturnError) {
529
+ /* HERE IS WHERE YOU CAN ALTER THE ERROR MESSAGE */
530
+ return callback(null, irReturnError);
531
+ }
532
+ if (!Object.hasOwnProperty.call(irReturnData, 'response')) {
533
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Invalid Response', ['genericAdapterRequest'], null, null, null);
534
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
535
+ return callback(null, errorObj);
536
+ }
537
+
538
+ /* HERE IS WHERE YOU CAN ALTER THE RETURN DATA */
539
+ // return the response
540
+ return callback(irReturnData, null);
541
+ });
542
+ } catch (ex) {
543
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Caught Exception', null, null, null, ex);
544
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
545
+ return callback(null, errorObj);
546
+ }
547
+ }
548
+
549
+ /* BROKER CALLS */
550
+ /**
551
+ * @summary Determines if this adapter supports any in a list of entities
552
+ *
553
+ * @function hasEntities
554
+ * @param {String} entityType - the entity type to check for
555
+ * @param {Array} entityList - the list of entities we are looking for
556
+ *
557
+ * @param {Callback} callback - A map where the entity is the key and the
558
+ * value is true or false
559
+ */
560
+ hasEntities(entityType, entityList, callback) {
561
+ const origin = `${this.id}-adapter-hasEntities`;
562
+ log.trace(origin);
563
+
564
+ switch (entityType) {
565
+ case 'Device':
566
+ return this.hasDevices(entityList, callback);
567
+ default:
568
+ return callback(null, `${this.id} does not support entity ${entityType}`);
569
+ }
570
+ }
571
+
572
+ /**
573
+ * @summary Helper method for hasEntities for the specific device case
574
+ *
575
+ * @param {Array} deviceList - array of unique device identifiers
576
+ * @param {Callback} callback - A map where the device is the key and the
577
+ * value is true or false
578
+ */
579
+ hasDevices(deviceList, callback) {
580
+ const origin = `${this.id}-adapter-hasDevices`;
581
+ log.trace(origin);
582
+
583
+ const findings = deviceList.reduce((map, device) => {
584
+ // eslint-disable-next-line no-param-reassign
585
+ map[device] = false;
586
+ log.debug(`In reduce: ${JSON.stringify(map)}`);
587
+ return map;
588
+ }, {});
589
+ const apiCalls = deviceList.map((device) => new Promise((resolve) => {
590
+ this.getDevice(device, (result, error) => {
591
+ if (error) {
592
+ log.debug(`In map error: ${JSON.stringify(device)}`);
593
+ return resolve({ name: device, found: false });
594
+ }
595
+ log.debug(`In map: ${JSON.stringify(device)}`);
596
+ return resolve({ name: device, found: true });
597
+ });
598
+ }));
599
+ Promise.all(apiCalls).then((results) => {
600
+ results.forEach((device) => {
601
+ findings[device.name] = device.found;
602
+ });
603
+ log.debug(`FINDINGS: ${JSON.stringify(findings)}`);
604
+ return callback(findings);
605
+ }).catch((errors) => {
606
+ log.error('Unable to do device lookup.');
607
+ return callback(null, { code: 503, message: 'Unable to do device lookup.', error: errors });
608
+ });
609
+ }
610
+
611
+ /**
612
+ * @summary Get Appliance that match the deviceName
613
+ *
614
+ * @function getDevice
615
+ * @param {String} deviceName - the deviceName to find (required)
616
+ *
617
+ * @param {getCallback} callback - a callback function to return the result
618
+ * (appliance) or the error
619
+ */
620
+ getDevice(deviceName, callback) {
621
+ const meth = 'adapter-getDevice';
622
+ const origin = `${this.id}-${meth}`;
623
+ log.trace(origin);
624
+
625
+ if (this.suspended && this.suspendMode === 'error') {
626
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
627
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
628
+ return callback(null, errorObj);
629
+ }
630
+
631
+ /* HERE IS WHERE YOU VALIDATE DATA */
632
+ if (deviceName === undefined || deviceName === null || deviceName === '' || deviceName.length === 0) {
633
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['deviceName'], null, null, null);
634
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
635
+ return callback(null, errorObj);
636
+ }
637
+
638
+ try {
639
+ // need to get the device so we can convert the deviceName to an id
640
+ // !! if we can do a lookup by name the getDevicesFiltered may not be necessary
641
+ const opts = {
642
+ filter: {
643
+ name: deviceName
644
+ }
645
+ };
646
+ return this.getDevicesFiltered(opts, (devs, ferr) => {
647
+ // if we received an error or their is no response on the results return an error
648
+ if (ferr) {
649
+ return callback(null, ferr);
650
+ }
651
+ if (devs.list.length < 1) {
652
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, `Did Not Find Device ${deviceName}`, [], null, null, null);
653
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
654
+ return callback(null, errorObj);
655
+ }
656
+ // get the uuid from the device
657
+ const { uuid } = devs.list[0];
658
+
659
+ // !! using Generic makes it easier on the Adapter Builder (just need to change the path)
660
+ // !! you can also replace with a specific call if that is easier
661
+ const uriPath = `/call/toget/device/${uuid}`;
662
+ return this.genericAdapterRequest(uriPath, 'GET', {}, {}, {}, (result, error) => {
663
+ // if we received an error or their is no response on the results return an error
664
+ if (error) {
665
+ return callback(null, error);
666
+ }
667
+ if (!result.response || !result.response.applianceMo) {
668
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Invalid Response', ['getDevice'], null, null, null);
669
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
670
+ return callback(null, errorObj);
671
+ }
672
+
673
+ // return the response
674
+ // !! format the data we send back
675
+ // !! these fields are config manager fields you need to map to the data we receive
676
+ const thisDevice = result.response;
677
+ thisDevice.name = thisDevice.systemName;
678
+ thisDevice.ostype = `System-${thisDevice.systemType}`;
679
+ thisDevice.port = thisDevice.systemPort;
680
+ thisDevice.ipaddress = thisDevice.systemIP;
681
+ return callback(thisDevice);
682
+ });
683
+ });
684
+ } catch (ex) {
685
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Caught Exception', null, null, null, ex);
686
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
687
+ return callback(null, errorObj);
688
+ }
689
+ }
690
+
691
+ /**
692
+ * @summary Get Appliances that match the filter
693
+ *
694
+ * @function getDevicesFiltered
695
+ * @param {Object} options - the data to use to filter the appliances (optional)
696
+ *
697
+ * @param {getCallback} callback - a callback function to return the result
698
+ * (appliances) or the error
699
+ */
700
+ getDevicesFiltered(options, callback) {
701
+ const meth = 'adapter-getDevicesFiltered';
702
+ const origin = `${this.id}-${meth}`;
703
+ log.trace(origin);
704
+
705
+ // verify the required fields have been provided
706
+ if (options === undefined || options === null || options === '' || options.length === 0) {
707
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['options'], null, null, null);
708
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
709
+ return callback(null, errorObj);
710
+ }
711
+ log.debug(`Device Filter Options: ${JSON.stringify(options)}`);
712
+
713
+ // TODO - get pagination working
714
+ // const nextToken = options.start;
715
+ // const maxResults = options.limit;
716
+
717
+ // set up the filter of Device Names
718
+ let filterName = [];
719
+ if (options && options.filter && options.filter.name) {
720
+ // when this hack is removed, remove the lint ignore above
721
+ if (Array.isArray(options.filter.name)) {
722
+ // eslint-disable-next-line prefer-destructuring
723
+ filterName = options.filter.name;
724
+ } else {
725
+ filterName = [options.filter.name];
726
+ }
727
+ }
728
+
729
+ // TODO - get sort and order working
730
+ /*
731
+ if (options && options.sort) {
732
+ reqObj.uriOptions.sort = JSON.stringify(options.sort);
733
+ }
734
+ if (options && options.order) {
735
+ reqObj.uriOptions.order = options.order;
736
+ }
737
+ */
738
+ try {
739
+ // !! using Generic makes it easier on the Adapter Builder (just need to change the path)
740
+ // !! you can also replace with a specific call if that is easier
741
+ const uriPath = '/call/toget/devices';
742
+ return this.genericAdapterRequest(uriPath, 'GET', {}, {}, {}, (result, error) => {
743
+ // if we received an error or their is no response on the results return an error
744
+ if (error) {
745
+ return callback(null, error);
746
+ }
747
+ if (!result.response) {
748
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Invalid Response', ['getDevicesFiltered'], null, null, null);
749
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
750
+ return callback(null, errorObj);
751
+ }
752
+
753
+ // !! go through the response - may have to look for sub object
754
+ // handle an array of devices
755
+ if (Array.isArray(result.response)) {
756
+ const myDevices = [];
757
+
758
+ for (let d = 0; d < result.response.length; d += 1) {
759
+ // !! format the data we send back
760
+ // !! these fields are config manager fields you need to map to the data we receive
761
+ const thisDevice = result.response;
762
+ thisDevice.name = thisDevice.systemName;
763
+ thisDevice.ostype = `System-${thisDevice.systemType}`;
764
+ thisDevice.port = thisDevice.systemPort;
765
+ thisDevice.ipaddress = thisDevice.systemIP;
766
+
767
+ // if there is no filter - return the device
768
+ if (filterName.length === 0) {
769
+ myDevices.push(thisDevice);
770
+ } else {
771
+ // if we have to match a filter
772
+ let found = false;
773
+ for (let f = 0; f < filterName.length; f += 1) {
774
+ if (thisDevice.name.indexOf(filterName[f]) >= 0) {
775
+ found = true;
776
+ break;
777
+ }
778
+ }
779
+ // matching device
780
+ if (found) {
781
+ myDevices.push(thisDevice);
782
+ }
783
+ }
784
+ }
785
+ log.debug(`${origin}: Found #${myDevices.length} devices.`);
786
+ log.debug(`Devices: ${JSON.stringify(myDevices)}`);
787
+ return callback({ total: myDevices.length, list: myDevices });
788
+ }
789
+ // handle a single device response
790
+ // !! format the data we send back
791
+ // !! these fields are config manager fields you need to map to the data we receive
792
+ const thisDevice = result.response;
793
+ thisDevice.name = thisDevice.systemName;
794
+ thisDevice.ostype = `System-${thisDevice.systemType}`;
795
+ thisDevice.port = thisDevice.systemPort;
796
+ thisDevice.ipaddress = thisDevice.systemIP;
797
+
798
+ // if there is no filter - return the device
799
+ if (filterName.length === 0) {
800
+ log.debug(`${origin}: Found #1 device.`);
801
+ log.debug(`Device: ${JSON.stringify(thisDevice)}`);
802
+ return callback({ total: 1, list: [thisDevice] });
803
+ }
804
+
805
+ // if there is a filter need to check for matching device
806
+ let found = false;
807
+ for (let f = 0; f < filterName.length; f += 1) {
808
+ if (thisDevice.name.indexOf(filterName[f]) >= 0) {
809
+ found = true;
810
+ break;
811
+ }
812
+ }
813
+ // matching device
814
+ if (found) {
815
+ log.debug(`${origin}: Found #1 device.`);
816
+ log.debug(`Device Found: ${JSON.stringify(thisDevice)}`);
817
+ return callback({ total: 1, list: [thisDevice] });
818
+ }
819
+ // not a matching device
820
+ log.debug(`${origin}: No matching device found.`);
821
+ return callback({ total: 0, list: [] });
822
+ });
823
+ } catch (ex) {
824
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Caught Exception', null, null, null, ex);
825
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
826
+ return callback(null, errorObj);
827
+ }
828
+ }
829
+
830
+ /**
831
+ * @summary Gets the status for the provided appliance
832
+ *
833
+ * @function isAlive
834
+ * @param {String} deviceName - the deviceName of the appliance. (required)
835
+ *
836
+ * @param {configCallback} callback - callback function to return the result
837
+ * (appliance isAlive) or the error
838
+ */
839
+ isAlive(deviceName, callback) {
840
+ const meth = 'adapter-isAlive';
841
+ const origin = `${this.id}-${meth}`;
842
+ log.trace(origin);
843
+
844
+ // verify the required fields have been provided
845
+ if (deviceName === undefined || deviceName === null || deviceName === '' || deviceName.length === 0) {
846
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['deviceName'], null, null, null);
847
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
848
+ return callback(null, errorObj);
849
+ }
850
+
851
+ try {
852
+ // need to get the device so we can convert the deviceName to an id
853
+ // !! if we can do a lookup by name the getDevicesFiltered may not be necessary
854
+ const opts = {
855
+ filter: {
856
+ name: deviceName
857
+ }
858
+ };
859
+ return this.getDevicesFiltered(opts, (devs, ferr) => {
860
+ // if we received an error or their is no response on the results return an error
861
+ if (ferr) {
862
+ return callback(null, ferr);
863
+ }
864
+ if (devs.list.length < 1) {
865
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, `Did Not Find Device ${deviceName}`, [], null, null, null);
866
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
867
+ return callback(null, errorObj);
868
+ }
869
+ // get the uuid from the device
870
+ const { uuid } = devs.list[0];
871
+
872
+ // !! using Generic makes it easier on the Adapter Builder (just need to change the path)
873
+ // !! you can also replace with a specific call if that is easier
874
+ const uriPath = `/call/toget/status/${uuid}`;
875
+ return this.genericAdapterRequest(uriPath, 'GET', {}, {}, {}, (result, error) => {
876
+ // if we received an error or their is no response on the results return an error
877
+ if (error) {
878
+ return callback(null, error);
879
+ }
880
+ // !! should update this to make sure we are checking for the appropriate object/field
881
+ if (!result.response || !result.response.returnObj || !Object.hasOwnProperty.call(result.response.returnObj, 'statusField')) {
882
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Invalid Response', ['isAlive'], null, null, null);
883
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
884
+ return callback(null, errorObj);
885
+ }
886
+
887
+ // !! return the response - Update to the appropriate object/field
888
+ return callback(!result.response.returnObj.statusField);
889
+ });
890
+ });
891
+ } catch (ex) {
892
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Caught Exception', null, null, null, ex);
893
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
894
+ return callback(null, errorObj);
895
+ }
896
+ }
897
+
898
+ /**
899
+ * @summary Gets a config for the provided Appliance
900
+ *
901
+ * @function getConfig
902
+ * @param {String} deviceName - the deviceName of the appliance. (required)
903
+ * @param {String} format - the desired format of the config. (optional)
904
+ *
905
+ * @param {configCallback} callback - callback function to return the result
906
+ * (appliance config) or the error
907
+ */
908
+ getConfig(deviceName, format, callback) {
909
+ const meth = 'adapter-getConfig';
910
+ const origin = `${this.id}-${meth}`;
911
+ log.trace(origin);
912
+
913
+ // verify the required fields have been provided
914
+ if (deviceName === undefined || deviceName === null || deviceName === '' || deviceName.length === 0) {
915
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['deviceName'], null, null, null);
916
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
917
+ return callback(null, errorObj);
918
+ }
919
+
920
+ try {
921
+ // need to get the device so we can convert the deviceName to an id
922
+ // !! if we can do a lookup by name the getDevicesFiltered may not be necessary
923
+ const opts = {
924
+ filter: {
925
+ name: deviceName
926
+ }
927
+ };
928
+ return this.getDevicesFiltered(opts, (devs, ferr) => {
929
+ // if we received an error or their is no response on the results return an error
930
+ if (ferr) {
931
+ return callback(null, ferr);
932
+ }
933
+ if (devs.list.length < 1) {
934
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, `Did Not Find Device ${deviceName}`, [], null, null, null);
935
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
936
+ return callback(null, errorObj);
937
+ }
938
+ // get the uuid from the device
939
+ const { uuid } = devs.list[0];
940
+
941
+ // !! using Generic makes it easier on the Adapter Builder (just need to change the path)
942
+ // !! you can also replace with a specific call if that is easier
943
+ const uriPath = `/call/toget/config/${uuid}`;
944
+ return this.genericAdapterRequest(uriPath, 'GET', {}, {}, {}, (result, error) => {
945
+ // if we received an error or their is no response on the results return an error
946
+ if (error) {
947
+ return callback(null, error);
948
+ }
949
+
950
+ // return the result
951
+ const newResponse = {
952
+ response: JSON.stringify(result.response, null, 2)
953
+ };
954
+ return callback(newResponse);
955
+ });
956
+ });
957
+ } catch (ex) {
958
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Caught Exception', null, null, null, ex);
959
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
960
+ return callback(null, errorObj);
961
+ }
962
+ }
963
+
964
+ /**
965
+ * @summary Gets the device count from the system
966
+ *
967
+ * @function getCount
968
+ *
969
+ * @param {getCallback} callback - callback function to return the result
970
+ * (count) or the error
971
+ */
972
+ getCount(callback) {
973
+ const meth = 'adapter-getCount';
974
+ const origin = `${this.id}-${meth}`;
975
+ log.trace(origin);
976
+
977
+ // verify the required fields have been provided
978
+
979
+ try {
980
+ // !! using Generic makes it easier on the Adapter Builder (just need to change the path)
981
+ // !! you can also replace with a specific call if that is easier
982
+ const uriPath = '/call/toget/count';
983
+ return this.genericAdapterRequest(uriPath, 'GET', {}, {}, {}, (result, error) => {
984
+ // if we received an error or their is no response on the results return an error
985
+ if (error) {
986
+ return callback(null, error);
987
+ }
988
+
989
+ // return the result
990
+ return callback({ count: result.response });
991
+ });
992
+ } catch (ex) {
993
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Caught Exception', null, null, null, ex);
994
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
995
+ return callback(null, errorObj);
996
+ }
997
+ }
998
+
999
+ /**
1000
+ * @callback healthCallback
1001
+ * @param {Object} result - the result of the get request (contains an id and a status)
1002
+ */
1003
+ /**
1004
+ * @callback getCallback
1005
+ * @param {Object} result - the result of the get request (entity/ies)
1006
+ * @param {String} error - any error that occurred
1007
+ */
1008
+ /**
1009
+ * @callback createCallback
1010
+ * @param {Object} item - the newly created entity
1011
+ * @param {String} error - any error that occurred
1012
+ */
1013
+ /**
1014
+ * @callback updateCallback
1015
+ * @param {String} status - the status of the update action
1016
+ * @param {String} error - any error that occurred
1017
+ */
1018
+ /**
1019
+ * @callback deleteCallback
1020
+ * @param {String} status - the status of the delete action
1021
+ * @param {String} error - any error that occurred
1022
+ */
1023
+
236
1024
  /**
237
1025
  * @summary function deleteAddon
238
1026
  *
@@ -245,6 +1033,12 @@ class Bitbucket extends AdapterBaseCl {
245
1033
  const origin = `${this.id}-${meth}`;
246
1034
  log.trace(origin);
247
1035
 
1036
+ if (this.suspended && this.suspendMode === 'error') {
1037
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
1038
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
1039
+ return callback(null, errorObj);
1040
+ }
1041
+
248
1042
  /* HERE IS WHERE YOU VALIDATE DATA */
249
1043
 
250
1044
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
@@ -289,6 +1083,12 @@ class Bitbucket extends AdapterBaseCl {
289
1083
  const origin = `${this.id}-${meth}`;
290
1084
  log.trace(origin);
291
1085
 
1086
+ if (this.suspended && this.suspendMode === 'error') {
1087
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
1088
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
1089
+ return callback(null, errorObj);
1090
+ }
1091
+
292
1092
  /* HERE IS WHERE YOU VALIDATE DATA */
293
1093
 
294
1094
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
@@ -333,6 +1133,12 @@ class Bitbucket extends AdapterBaseCl {
333
1133
  const origin = `${this.id}-${meth}`;
334
1134
  log.trace(origin);
335
1135
 
1136
+ if (this.suspended && this.suspendMode === 'error') {
1137
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
1138
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
1139
+ return callback(null, errorObj);
1140
+ }
1141
+
336
1142
  /* HERE IS WHERE YOU VALIDATE DATA */
337
1143
 
338
1144
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
@@ -378,6 +1184,12 @@ class Bitbucket extends AdapterBaseCl {
378
1184
  const origin = `${this.id}-${meth}`;
379
1185
  log.trace(origin);
380
1186
 
1187
+ if (this.suspended && this.suspendMode === 'error') {
1188
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
1189
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
1190
+ return callback(null, errorObj);
1191
+ }
1192
+
381
1193
  /* HERE IS WHERE YOU VALIDATE DATA */
382
1194
  if (linkerKey === undefined || linkerKey === null || linkerKey === '') {
383
1195
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['linkerKey'], null, null, null);
@@ -446,6 +1258,12 @@ class Bitbucket extends AdapterBaseCl {
446
1258
  const origin = `${this.id}-${meth}`;
447
1259
  log.trace(origin);
448
1260
 
1261
+ if (this.suspended && this.suspendMode === 'error') {
1262
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
1263
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
1264
+ return callback(null, errorObj);
1265
+ }
1266
+
449
1267
  /* HERE IS WHERE YOU VALIDATE DATA */
450
1268
  if (linkerKey === undefined || linkerKey === null || linkerKey === '') {
451
1269
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['linkerKey'], null, null, null);
@@ -514,6 +1332,12 @@ class Bitbucket extends AdapterBaseCl {
514
1332
  const origin = `${this.id}-${meth}`;
515
1333
  log.trace(origin);
516
1334
 
1335
+ if (this.suspended && this.suspendMode === 'error') {
1336
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
1337
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
1338
+ return callback(null, errorObj);
1339
+ }
1340
+
517
1341
  /* HERE IS WHERE YOU VALIDATE DATA */
518
1342
  if (linkerKey === undefined || linkerKey === null || linkerKey === '') {
519
1343
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['linkerKey'], null, null, null);
@@ -582,6 +1406,12 @@ class Bitbucket extends AdapterBaseCl {
582
1406
  const origin = `${this.id}-${meth}`;
583
1407
  log.trace(origin);
584
1408
 
1409
+ if (this.suspended && this.suspendMode === 'error') {
1410
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
1411
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
1412
+ return callback(null, errorObj);
1413
+ }
1414
+
585
1415
  /* HERE IS WHERE YOU VALIDATE DATA */
586
1416
  if (linkerKey === undefined || linkerKey === null || linkerKey === '') {
587
1417
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['linkerKey'], null, null, null);
@@ -650,6 +1480,12 @@ class Bitbucket extends AdapterBaseCl {
650
1480
  const origin = `${this.id}-${meth}`;
651
1481
  log.trace(origin);
652
1482
 
1483
+ if (this.suspended && this.suspendMode === 'error') {
1484
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
1485
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
1486
+ return callback(null, errorObj);
1487
+ }
1488
+
653
1489
  /* HERE IS WHERE YOU VALIDATE DATA */
654
1490
  if (linkerKey === undefined || linkerKey === null || linkerKey === '') {
655
1491
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['linkerKey'], null, null, null);
@@ -718,6 +1554,12 @@ class Bitbucket extends AdapterBaseCl {
718
1554
  const origin = `${this.id}-${meth}`;
719
1555
  log.trace(origin);
720
1556
 
1557
+ if (this.suspended && this.suspendMode === 'error') {
1558
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
1559
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
1560
+ return callback(null, errorObj);
1561
+ }
1562
+
721
1563
  /* HERE IS WHERE YOU VALIDATE DATA */
722
1564
  if (linkerKey === undefined || linkerKey === null || linkerKey === '') {
723
1565
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['linkerKey'], null, null, null);
@@ -786,6 +1628,12 @@ class Bitbucket extends AdapterBaseCl {
786
1628
  const origin = `${this.id}-${meth}`;
787
1629
  log.trace(origin);
788
1630
 
1631
+ if (this.suspended && this.suspendMode === 'error') {
1632
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
1633
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
1634
+ return callback(null, errorObj);
1635
+ }
1636
+
789
1637
  /* HERE IS WHERE YOU VALIDATE DATA */
790
1638
  if (linkerKey === undefined || linkerKey === null || linkerKey === '') {
791
1639
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['linkerKey'], null, null, null);
@@ -867,6 +1715,12 @@ $ curl https://api.bitbucket.org/2.0/hook_events
867
1715
  const origin = `${this.id}-${meth}`;
868
1716
  log.trace(origin);
869
1717
 
1718
+ if (this.suspended && this.suspendMode === 'error') {
1719
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
1720
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
1721
+ return callback(null, errorObj);
1722
+ }
1723
+
870
1724
  /* HERE IS WHERE YOU VALIDATE DATA */
871
1725
 
872
1726
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
@@ -927,6 +1781,12 @@ $ curl https://api.bitbucket.org/2.0/hook_events/team
927
1781
  const origin = `${this.id}-${meth}`;
928
1782
  log.trace(origin);
929
1783
 
1784
+ if (this.suspended && this.suspendMode === 'error') {
1785
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
1786
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
1787
+ return callback(null, errorObj);
1788
+ }
1789
+
930
1790
  /* HERE IS WHERE YOU VALIDATE DATA */
931
1791
  if (subjectType === undefined || subjectType === null || subjectType === '') {
932
1792
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['subjectType'], null, null, null);
@@ -996,6 +1856,12 @@ $ curl https://api.bitbucket.org/2.0/hook_events/team
996
1856
  const origin = `${this.id}-${meth}`;
997
1857
  log.trace(origin);
998
1858
 
1859
+ if (this.suspended && this.suspendMode === 'error') {
1860
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
1861
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
1862
+ return callback(null, errorObj);
1863
+ }
1864
+
999
1865
  /* HERE IS WHERE YOU VALIDATE DATA */
1000
1866
  if (username === undefined || username === null || username === '') {
1001
1867
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -1085,6 +1951,12 @@ Note that this call requires the webhook scope, as well as any sco...(descriptio
1085
1951
  const origin = `${this.id}-${meth}`;
1086
1952
  log.trace(origin);
1087
1953
 
1954
+ if (this.suspended && this.suspendMode === 'error') {
1955
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
1956
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
1957
+ return callback(null, errorObj);
1958
+ }
1959
+
1088
1960
  /* HERE IS WHERE YOU VALIDATE DATA */
1089
1961
  if (username === undefined || username === null || username === '') {
1090
1962
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -1161,6 +2033,12 @@ repository.
1161
2033
  const origin = `${this.id}-${meth}`;
1162
2034
  log.trace(origin);
1163
2035
 
2036
+ if (this.suspended && this.suspendMode === 'error') {
2037
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
2038
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
2039
+ return callback(null, errorObj);
2040
+ }
2041
+
1164
2042
  /* HERE IS WHERE YOU VALIDATE DATA */
1165
2043
  if (username === undefined || username === null || username === '') {
1166
2044
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -1242,6 +2120,12 @@ repository.
1242
2120
  const origin = `${this.id}-${meth}`;
1243
2121
  log.trace(origin);
1244
2122
 
2123
+ if (this.suspended && this.suspendMode === 'error') {
2124
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
2125
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
2126
+ return callback(null, errorObj);
2127
+ }
2128
+
1245
2129
  /* HERE IS WHERE YOU VALIDATE DATA */
1246
2130
  if (username === undefined || username === null || username === '') {
1247
2131
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -1342,6 +2226,12 @@ surrounded by curly-braces, for example: `{repository UUID}`.
1342
2226
  const origin = `${this.id}-${meth}`;
1343
2227
  log.trace(origin);
1344
2228
 
2229
+ if (this.suspended && this.suspendMode === 'error') {
2230
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
2231
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
2232
+ return callback(null, errorObj);
2233
+ }
2234
+
1345
2235
  /* HERE IS WHERE YOU VALIDATE DATA */
1346
2236
  if (username === undefined || username === null || username === '') {
1347
2237
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -1414,6 +2304,107 @@ surrounded by curly-braces, for example: `{repository UUID}`.
1414
2304
  }
1415
2305
  }
1416
2306
 
2307
+ /**
2308
+ * @summary This endpoint is used to create new commits in the repository by uploading files.
2309
+ * @function CreateACommitByUploadingAFile
2310
+ * @param {string} username - This can either be the username or the UUID of the user, surrounded by curly-braces, for example: `{user UUID}`.
2311
+ * @param {string} repoSlug - This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`.
2312
+ * @param {string} message - The commit message. When omitted, Bitbucket uses a canned string.
2313
+ * @param {string} author - The raw string to be used as the new commit's author.
2314
+ * @param {string} parents - A comma-separated list of SHA1s of the commits that should be the parents of the newly created commit.
2315
+ * @param {object} files - Optional field that declares the files that the request is manipulating. ex. {"path/to/file.txt":"Contents of File"}
2316
+ * @param {string} branch - The name of the branch that the new commit should be created on. When omitted, the commit will be created on top of the main branch and will become the main branch's new head.
2317
+ * @param {getCallback} callback - a callback function to return the result
2318
+ */
2319
+ /* YOU CAN CHANGE THE PARAMETERS YOU TAKE IN HERE AND IN THE pronghorn.json FILE */
2320
+ CreateACommitByUploadingAFile(username, repoSlug, message, author, parents, files, branch, callback) {
2321
+ const meth = 'adapter-CreateACommitByUploadingAFile';
2322
+ const origin = `${this.id}-${meth}`;
2323
+ log.trace(origin);
2324
+
2325
+ if (this.suspended && this.suspendMode === 'error') {
2326
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
2327
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
2328
+ return callback(null, errorObj);
2329
+ }
2330
+
2331
+ /* HERE IS WHERE YOU VALIDATE DATA */
2332
+ if (username === undefined || username === null || username === '') {
2333
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
2334
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
2335
+ return callback(null, errorObj);
2336
+ }
2337
+ if (repoSlug === undefined || repoSlug === null || repoSlug === '') {
2338
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['repoSlug'], null, null, null);
2339
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
2340
+ return callback(null, errorObj);
2341
+ }
2342
+ // Build request body
2343
+ let body = {};
2344
+ if (message !== undefined || message !== null || message !== '') {
2345
+ body.message = message;
2346
+ }
2347
+ if (author !== undefined || author !== null || author !== '') {
2348
+ body.author = author;
2349
+ }
2350
+ if (parents !== undefined || parents !== null || parents !== '') {
2351
+ body.parents = parents;
2352
+ }
2353
+ if (branch !== undefined || branch !== null || branch !== '') {
2354
+ body.branch = branch;
2355
+ }
2356
+ if (files !== undefined || files !== null || files !== '') {
2357
+ body = Object.assign(body, files);
2358
+ }
2359
+
2360
+ /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
2361
+ const queryParamsAvailable = {};
2362
+ const queryParams = {};
2363
+ const pathVars = [username, repoSlug];
2364
+ const bodyVars = body;
2365
+
2366
+ // loop in template. long callback arg name to avoid identifier conflicts
2367
+ Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
2368
+ if (queryParamsAvailable[thisKeyInQueryParamsAvailable] !== undefined && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== null
2369
+ && queryParamsAvailable[thisKeyInQueryParamsAvailable] !== '') {
2370
+ queryParams[thisKeyInQueryParamsAvailable] = queryParamsAvailable[thisKeyInQueryParamsAvailable];
2371
+ }
2372
+ });
2373
+
2374
+ // set up the request object - payload, uriPathVars, uriQuery, uriOptions, addlHeaders
2375
+ const reqObj = {
2376
+ payload: bodyVars,
2377
+ uriPathVars: pathVars,
2378
+ uriQuery: queryParams
2379
+ };
2380
+
2381
+ try {
2382
+ // Make the call -
2383
+ // identifyRequest(entity, action, requestObj, returnDataFlag, callback)
2384
+ return this.requestHandlerInst.identifyRequest('Repositories', 'CreateACommitByUploadingAFile', reqObj, true, (irReturnData, irReturnError) => {
2385
+ // if we received an error or their is no response on the results
2386
+ // return an error
2387
+ if (irReturnError) {
2388
+ /* HERE IS WHERE YOU CAN ALTER THE ERROR MESSAGE */
2389
+ return callback(null, irReturnError);
2390
+ }
2391
+ if (!Object.hasOwnProperty.call(irReturnData, 'response')) {
2392
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Invalid Response', ['CreateACommitByUploadingAFile'], null, null, null);
2393
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
2394
+ return callback(null, errorObj);
2395
+ }
2396
+
2397
+ /* HERE IS WHERE YOU CAN ALTER THE RETURN DATA */
2398
+ // return the response
2399
+ return callback(irReturnData, null);
2400
+ });
2401
+ } catch (ex) {
2402
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Caught Exception', null, null, null, ex);
2403
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
2404
+ return callback(null, errorObj);
2405
+ }
2406
+ }
2407
+
1417
2408
  /**
1418
2409
  * @summary Updates the specified webhook subscription.
1419
2410
  The following properties can be mutated:
@@ -1434,6 +2425,12 @@ The following properties can be mutated:
1434
2425
  const origin = `${this.id}-${meth}`;
1435
2426
  log.trace(origin);
1436
2427
 
2428
+ if (this.suspended && this.suspendMode === 'error') {
2429
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
2430
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
2431
+ return callback(null, errorObj);
2432
+ }
2433
+
1437
2434
  /* HERE IS WHERE YOU VALIDATE DATA */
1438
2435
  if (username === undefined || username === null || username === '') {
1439
2436
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -1516,6 +2513,12 @@ after this [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601)
1516
2513
  const origin = `${this.id}-${meth}`;
1517
2514
  log.trace(origin);
1518
2515
 
2516
+ if (this.suspended && this.suspendMode === 'error') {
2517
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
2518
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
2519
+ return callback(null, errorObj);
2520
+ }
2521
+
1519
2522
  /* HERE IS WHERE YOU VALIDATE DATA */
1520
2523
 
1521
2524
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
@@ -1590,6 +2593,12 @@ surrounded by curly-braces, for example: `{user UUID}`.
1590
2593
  const origin = `${this.id}-${meth}`;
1591
2594
  log.trace(origin);
1592
2595
 
2596
+ if (this.suspended && this.suspendMode === 'error') {
2597
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
2598
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
2599
+ return callback(null, errorObj);
2600
+ }
2601
+
1593
2602
  /* HERE IS WHERE YOU VALIDATE DATA */
1594
2603
  if (username === undefined || username === null || username === '') {
1595
2604
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -1662,6 +2671,12 @@ surrounded by curly-braces, for example: `{repository UUID}`.
1662
2671
  const origin = `${this.id}-${meth}`;
1663
2672
  log.trace(origin);
1664
2673
 
2674
+ if (this.suspended && this.suspendMode === 'error') {
2675
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
2676
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
2677
+ return callback(null, errorObj);
2678
+ }
2679
+
1665
2680
  /* HERE IS WHERE YOU VALIDATE DATA */
1666
2681
  if (username === undefined || username === null || username === '') {
1667
2682
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -1738,6 +2753,12 @@ surrounded by curly-braces, for example: `{repository UUID}`.
1738
2753
  const origin = `${this.id}-${meth}`;
1739
2754
  log.trace(origin);
1740
2755
 
2756
+ if (this.suspended && this.suspendMode === 'error') {
2757
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
2758
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
2759
+ return callback(null, errorObj);
2760
+ }
2761
+
1741
2762
  /* HERE IS WHERE YOU VALIDATE DATA */
1742
2763
  if (username === undefined || username === null || username === '') {
1743
2764
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -1831,6 +2852,12 @@ surrounded by curly-braces, for example: `{repository UUID}`.
1831
2852
  const origin = `${this.id}-${meth}`;
1832
2853
  log.trace(origin);
1833
2854
 
2855
+ if (this.suspended && this.suspendMode === 'error') {
2856
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
2857
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
2858
+ return callback(null, errorObj);
2859
+ }
2860
+
1834
2861
  /* HERE IS WHERE YOU VALIDATE DATA */
1835
2862
  if (username === undefined || username === null || username === '') {
1836
2863
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -1919,6 +2946,12 @@ URL implies them.
1919
2946
  const origin = `${this.id}-${meth}`;
1920
2947
  log.trace(origin);
1921
2948
 
2949
+ if (this.suspended && this.suspendMode === 'error') {
2950
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
2951
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
2952
+ return callback(null, errorObj);
2953
+ }
2954
+
1922
2955
  /* HERE IS WHERE YOU VALIDATE DATA */
1923
2956
  if (username === undefined || username === null || username === '') {
1924
2957
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -1994,6 +3027,12 @@ URL implies them.
1994
3027
  const origin = `${this.id}-${meth}`;
1995
3028
  log.trace(origin);
1996
3029
 
3030
+ if (this.suspended && this.suspendMode === 'error') {
3031
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
3032
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
3033
+ return callback(null, errorObj);
3034
+ }
3035
+
1997
3036
  /* HERE IS WHERE YOU VALIDATE DATA */
1998
3037
  if (username === undefined || username === null || username === '') {
1999
3038
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -2082,6 +3121,12 @@ For example, one could ...(description truncated)
2082
3121
  const origin = `${this.id}-${meth}`;
2083
3122
  log.trace(origin);
2084
3123
 
3124
+ if (this.suspended && this.suspendMode === 'error') {
3125
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
3126
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
3127
+ return callback(null, errorObj);
3128
+ }
3129
+
2085
3130
  /* HERE IS WHERE YOU VALIDATE DATA */
2086
3131
  if (username === undefined || username === null || username === '') {
2087
3132
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -2163,6 +3208,12 @@ For example, one could ...(description truncated)
2163
3208
  const origin = `${this.id}-${meth}`;
2164
3209
  log.trace(origin);
2165
3210
 
3211
+ if (this.suspended && this.suspendMode === 'error') {
3212
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
3213
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
3214
+ return callback(null, errorObj);
3215
+ }
3216
+
2166
3217
  /* HERE IS WHERE YOU VALIDATE DATA */
2167
3218
  if (username === undefined || username === null || username === '') {
2168
3219
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -2259,6 +3310,12 @@ The `key` cannot be changed.
2259
3310
  const origin = `${this.id}-${meth}`;
2260
3311
  log.trace(origin);
2261
3312
 
3313
+ if (this.suspended && this.suspendMode === 'error') {
3314
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
3315
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
3316
+ return callback(null, errorObj);
3317
+ }
3318
+
2262
3319
  /* HERE IS WHERE YOU VALIDATE DATA */
2263
3320
  if (username === undefined || username === null || username === '') {
2264
3321
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -2344,6 +3401,12 @@ repository.
2344
3401
  const origin = `${this.id}-${meth}`;
2345
3402
  log.trace(origin);
2346
3403
 
3404
+ if (this.suspended && this.suspendMode === 'error') {
3405
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
3406
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
3407
+ return callback(null, errorObj);
3408
+ }
3409
+
2347
3410
  /* HERE IS WHERE YOU VALIDATE DATA */
2348
3411
  if (username === undefined || username === null || username === '') {
2349
3412
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -2420,6 +3483,12 @@ request.
2420
3483
  const origin = `${this.id}-${meth}`;
2421
3484
  log.trace(origin);
2422
3485
 
3486
+ if (this.suspended && this.suspendMode === 'error') {
3487
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
3488
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
3489
+ return callback(null, errorObj);
3490
+ }
3491
+
2423
3492
  /* HERE IS WHERE YOU VALIDATE DATA */
2424
3493
  if (username === undefined || username === null || username === '') {
2425
3494
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -2500,6 +3569,12 @@ repository.
2500
3569
  const origin = `${this.id}-${meth}`;
2501
3570
  log.trace(origin);
2502
3571
 
3572
+ if (this.suspended && this.suspendMode === 'error') {
3573
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
3574
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
3575
+ return callback(null, errorObj);
3576
+ }
3577
+
2503
3578
  /* HERE IS WHERE YOU VALIDATE DATA */
2504
3579
  if (username === undefined || username === null || username === '') {
2505
3580
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -2573,6 +3648,12 @@ repository.
2573
3648
  const origin = `${this.id}-${meth}`;
2574
3649
  log.trace(origin);
2575
3650
 
3651
+ if (this.suspended && this.suspendMode === 'error') {
3652
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
3653
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
3654
+ return callback(null, errorObj);
3655
+ }
3656
+
2576
3657
  /* HERE IS WHERE YOU VALIDATE DATA */
2577
3658
  if (username === undefined || username === null || username === '') {
2578
3659
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -2644,6 +3725,12 @@ Note that only admins can install webhooks on teams.
2644
3725
  const origin = `${this.id}-${meth}`;
2645
3726
  log.trace(origin);
2646
3727
 
3728
+ if (this.suspended && this.suspendMode === 'error') {
3729
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
3730
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
3731
+ return callback(null, errorObj);
3732
+ }
3733
+
2647
3734
  /* HERE IS WHERE YOU VALIDATE DATA */
2648
3735
  if (username === undefined || username === null || username === '') {
2649
3736
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -2714,6 +3801,12 @@ account.
2714
3801
  const origin = `${this.id}-${meth}`;
2715
3802
  log.trace(origin);
2716
3803
 
3804
+ if (this.suspended && this.suspendMode === 'error') {
3805
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
3806
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
3807
+ return callback(null, errorObj);
3808
+ }
3809
+
2717
3810
  /* HERE IS WHERE YOU VALIDATE DATA */
2718
3811
  if (username === undefined || username === null || username === '') {
2719
3812
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -2789,6 +3882,12 @@ team account.
2789
3882
  const origin = `${this.id}-${meth}`;
2790
3883
  log.trace(origin);
2791
3884
 
3885
+ if (this.suspended && this.suspendMode === 'error') {
3886
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
3887
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
3888
+ return callback(null, errorObj);
3889
+ }
3890
+
2792
3891
  /* HERE IS WHERE YOU VALIDATE DATA */
2793
3892
  if (username === undefined || username === null || username === '') {
2794
3893
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -2868,6 +3967,12 @@ The following properties can be mutated:
2868
3967
  const origin = `${this.id}-${meth}`;
2869
3968
  log.trace(origin);
2870
3969
 
3970
+ if (this.suspended && this.suspendMode === 'error') {
3971
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
3972
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
3973
+ return callback(null, errorObj);
3974
+ }
3975
+
2871
3976
  /* HERE IS WHERE YOU VALIDATE DATA */
2872
3977
  if (username === undefined || username === null || username === '') {
2873
3978
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -2944,6 +4049,12 @@ with.
2944
4049
  const origin = `${this.id}-${meth}`;
2945
4050
  log.trace(origin);
2946
4051
 
4052
+ if (this.suspended && this.suspendMode === 'error') {
4053
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
4054
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
4055
+ return callback(null, errorObj);
4056
+ }
4057
+
2947
4058
  /* HERE IS WHERE YOU VALIDATE DATA */
2948
4059
 
2949
4060
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
@@ -3009,6 +4120,12 @@ If the team's profile is private, `location`, `website` and
3009
4120
  const origin = `${this.id}-${meth}`;
3010
4121
  log.trace(origin);
3011
4122
 
4123
+ if (this.suspended && this.suspendMode === 'error') {
4124
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
4125
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
4126
+ return callback(null, errorObj);
4127
+ }
4128
+
3012
4129
  /* HERE IS WHERE YOU VALIDATE DATA */
3013
4130
  if (username === undefined || username === null || username === '') {
3014
4131
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -3077,6 +4194,12 @@ If the team's profile is private, `location`, `website` and
3077
4194
  const origin = `${this.id}-${meth}`;
3078
4195
  log.trace(origin);
3079
4196
 
4197
+ if (this.suspended && this.suspendMode === 'error') {
4198
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
4199
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
4200
+ return callback(null, errorObj);
4201
+ }
4202
+
3080
4203
  /* HERE IS WHERE YOU VALIDATE DATA */
3081
4204
  if (username === undefined || username === null || username === '') {
3082
4205
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -3145,6 +4268,12 @@ If the team's profile is private, `location`, `website` and
3145
4268
  const origin = `${this.id}-${meth}`;
3146
4269
  log.trace(origin);
3147
4270
 
4271
+ if (this.suspended && this.suspendMode === 'error') {
4272
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
4273
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
4274
+ return callback(null, errorObj);
4275
+ }
4276
+
3148
4277
  /* HERE IS WHERE YOU VALIDATE DATA */
3149
4278
  if (username === undefined || username === null || username === '') {
3150
4279
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -3218,6 +4347,12 @@ Note that members using the "private profile" feature are not included.
3218
4347
  const origin = `${this.id}-${meth}`;
3219
4348
  log.trace(origin);
3220
4349
 
4350
+ if (this.suspended && this.suspendMode === 'error') {
4351
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
4352
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
4353
+ return callback(null, errorObj);
4354
+ }
4355
+
3221
4356
  /* HERE IS WHERE YOU VALIDATE DATA */
3222
4357
  if (username === undefined || username === null || username === '') {
3223
4358
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -3286,6 +4421,12 @@ Note that members using the "private profile" feature are not included.
3286
4421
  const origin = `${this.id}-${meth}`;
3287
4422
  log.trace(origin);
3288
4423
 
4424
+ if (this.suspended && this.suspendMode === 'error') {
4425
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
4426
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
4427
+ return callback(null, errorObj);
4428
+ }
4429
+
3289
4430
  /* HERE IS WHERE YOU VALIDATE DATA */
3290
4431
  if (username === undefined || username === null || username === '') {
3291
4432
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -3358,6 +4499,12 @@ of others.
3358
4499
  const origin = `${this.id}-${meth}`;
3359
4500
  log.trace(origin);
3360
4501
 
4502
+ if (this.suspended && this.suspendMode === 'error') {
4503
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
4504
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
4505
+ return callback(null, errorObj);
4506
+ }
4507
+
3361
4508
  /* HERE IS WHERE YOU VALIDATE DATA */
3362
4509
  if (username === undefined || username === null || username === '') {
3363
4510
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -3428,6 +4575,12 @@ account.
3428
4575
  const origin = `${this.id}-${meth}`;
3429
4576
  log.trace(origin);
3430
4577
 
4578
+ if (this.suspended && this.suspendMode === 'error') {
4579
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
4580
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
4581
+ return callback(null, errorObj);
4582
+ }
4583
+
3431
4584
  /* HERE IS WHERE YOU VALIDATE DATA */
3432
4585
  if (username === undefined || username === null || username === '') {
3433
4586
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -3503,6 +4656,12 @@ user account.
3503
4656
  const origin = `${this.id}-${meth}`;
3504
4657
  log.trace(origin);
3505
4658
 
4659
+ if (this.suspended && this.suspendMode === 'error') {
4660
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
4661
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
4662
+ return callback(null, errorObj);
4663
+ }
4664
+
3506
4665
  /* HERE IS WHERE YOU VALIDATE DATA */
3507
4666
  if (username === undefined || username === null || username === '') {
3508
4667
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -3582,6 +4741,12 @@ The following properties can be mutated:
3582
4741
  const origin = `${this.id}-${meth}`;
3583
4742
  log.trace(origin);
3584
4743
 
4744
+ if (this.suspended && this.suspendMode === 'error') {
4745
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
4746
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
4747
+ return callback(null, errorObj);
4748
+ }
4749
+
3585
4750
  /* HERE IS WHERE YOU VALIDATE DATA */
3586
4751
  if (username === undefined || username === null || username === '') {
3587
4752
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -3657,6 +4822,12 @@ access to.
3657
4822
  const origin = `${this.id}-${meth}`;
3658
4823
  log.trace(origin);
3659
4824
 
4825
+ if (this.suspended && this.suspendMode === 'error') {
4826
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
4827
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
4828
+ return callback(null, errorObj);
4829
+ }
4830
+
3660
4831
  /* HERE IS WHERE YOU VALIDATE DATA */
3661
4832
  if (username === undefined || username === null || username === '') {
3662
4833
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -3727,6 +4898,12 @@ access to.
3727
4898
  const origin = `${this.id}-${meth}`;
3728
4899
  log.trace(origin);
3729
4900
 
4901
+ if (this.suspended && this.suspendMode === 'error') {
4902
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
4903
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
4904
+ return callback(null, errorObj);
4905
+ }
4906
+
3730
4907
  /* HERE IS WHERE YOU VALIDATE DATA */
3731
4908
  if (username === undefined || username === null || username === '') {
3732
4909
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -3794,6 +4971,12 @@ access to.
3794
4971
  const origin = `${this.id}-${meth}`;
3795
4972
  log.trace(origin);
3796
4973
 
4974
+ if (this.suspended && this.suspendMode === 'error') {
4975
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
4976
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
4977
+ return callback(null, errorObj);
4978
+ }
4979
+
3797
4980
  /* HERE IS WHERE YOU VALIDATE DATA */
3798
4981
 
3799
4982
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
@@ -3839,6 +5022,12 @@ confirmed and unconfirmed.
3839
5022
  const origin = `${this.id}-${meth}`;
3840
5023
  log.trace(origin);
3841
5024
 
5025
+ if (this.suspended && this.suspendMode === 'error') {
5026
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
5027
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
5028
+ return callback(null, errorObj);
5029
+ }
5030
+
3842
5031
  /* HERE IS WHERE YOU VALIDATE DATA */
3843
5032
 
3844
5033
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
@@ -3887,6 +5076,12 @@ whether it is the user's primary address or not.
3887
5076
  const origin = `${this.id}-${meth}`;
3888
5077
  log.trace(origin);
3889
5078
 
5079
+ if (this.suspended && this.suspendMode === 'error') {
5080
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
5081
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
5082
+ return callback(null, errorObj);
5083
+ }
5084
+
3890
5085
  /* HERE IS WHERE YOU VALIDATE DATA */
3891
5086
  if (email === undefined || email === null || email === '') {
3892
5087
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['email'], null, null, null);
@@ -3957,6 +5152,12 @@ If the user's profile is private, `location`, `website` and
3957
5152
  const origin = `${this.id}-${meth}`;
3958
5153
  log.trace(origin);
3959
5154
 
5155
+ if (this.suspended && this.suspendMode === 'error') {
5156
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
5157
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
5158
+ return callback(null, errorObj);
5159
+ }
5160
+
3960
5161
  /* HERE IS WHERE YOU VALIDATE DATA */
3961
5162
  if (username === undefined || username === null || username === '') {
3962
5163
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -4025,6 +5226,12 @@ If the user's profile is private, `location`, `website` and
4025
5226
  const origin = `${this.id}-${meth}`;
4026
5227
  log.trace(origin);
4027
5228
 
5229
+ if (this.suspended && this.suspendMode === 'error') {
5230
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
5231
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
5232
+ return callback(null, errorObj);
5233
+ }
5234
+
4028
5235
  /* HERE IS WHERE YOU VALIDATE DATA */
4029
5236
  if (username === undefined || username === null || username === '') {
4030
5237
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -4093,6 +5300,12 @@ If the user's profile is private, `location`, `website` and
4093
5300
  const origin = `${this.id}-${meth}`;
4094
5301
  log.trace(origin);
4095
5302
 
5303
+ if (this.suspended && this.suspendMode === 'error') {
5304
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
5305
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
5306
+ return callback(null, errorObj);
5307
+ }
5308
+
4096
5309
  /* HERE IS WHERE YOU VALIDATE DATA */
4097
5310
  if (username === undefined || username === null || username === '') {
4098
5311
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -4165,6 +5378,12 @@ If the user's profile is private, `location`, `website` and
4165
5378
  const origin = `${this.id}-${meth}`;
4166
5379
  log.trace(origin);
4167
5380
 
5381
+ if (this.suspended && this.suspendMode === 'error') {
5382
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
5383
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
5384
+ return callback(null, errorObj);
5385
+ }
5386
+
4168
5387
  /* HERE IS WHERE YOU VALIDATE DATA */
4169
5388
  if (username === undefined || username === null || username === '') {
4170
5389
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -4250,6 +5469,12 @@ repository.
4250
5469
  const origin = `${this.id}-${meth}`;
4251
5470
  log.trace(origin);
4252
5471
 
5472
+ if (this.suspended && this.suspendMode === 'error') {
5473
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
5474
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
5475
+ return callback(null, errorObj);
5476
+ }
5477
+
4253
5478
  /* HERE IS WHERE YOU VALIDATE DATA */
4254
5479
  if (username === undefined || username === null || username === '') {
4255
5480
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -4333,6 +5558,12 @@ Different kinds of branch restrictions have different requirements:
4333
5558
  const origin = `${this.id}-${meth}`;
4334
5559
  log.trace(origin);
4335
5560
 
5561
+ if (this.suspended && this.suspendMode === 'error') {
5562
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
5563
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
5564
+ return callback(null, errorObj);
5565
+ }
5566
+
4336
5567
  /* HERE IS WHERE YOU VALIDATE DATA */
4337
5568
  if (username === undefined || username === null || username === '') {
4338
5569
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -4413,6 +5644,12 @@ Different kinds of branch restrictions have different requirements:
4413
5644
  const origin = `${this.id}-${meth}`;
4414
5645
  log.trace(origin);
4415
5646
 
5647
+ if (this.suspended && this.suspendMode === 'error') {
5648
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
5649
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
5650
+ return callback(null, errorObj);
5651
+ }
5652
+
4416
5653
  /* HERE IS WHERE YOU VALIDATE DATA */
4417
5654
  if (username === undefined || username === null || username === '') {
4418
5655
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -4493,6 +5730,12 @@ Different kinds of branch restrictions have different requirements:
4493
5730
  const origin = `${this.id}-${meth}`;
4494
5731
  log.trace(origin);
4495
5732
 
5733
+ if (this.suspended && this.suspendMode === 'error') {
5734
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
5735
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
5736
+ return callback(null, errorObj);
5737
+ }
5738
+
4496
5739
  /* HERE IS WHERE YOU VALIDATE DATA */
4497
5740
  if (username === undefined || username === null || username === '') {
4498
5741
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -4576,6 +5819,12 @@ See [`POST`](../../branch-restrictions#post) for details.
4576
5819
  const origin = `${this.id}-${meth}`;
4577
5820
  log.trace(origin);
4578
5821
 
5822
+ if (this.suspended && this.suspendMode === 'error') {
5823
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
5824
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
5825
+ return callback(null, errorObj);
5826
+ }
5827
+
4579
5828
  /* HERE IS WHERE YOU VALIDATE DATA */
4580
5829
  if (username === undefined || username === null || username === '') {
4581
5830
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -4665,6 +5914,12 @@ commits.
4665
5914
  const origin = `${this.id}-${meth}`;
4666
5915
  log.trace(origin);
4667
5916
 
5917
+ if (this.suspended && this.suspendMode === 'error') {
5918
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
5919
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
5920
+ return callback(null, errorObj);
5921
+ }
5922
+
4668
5923
  /* HERE IS WHERE YOU VALIDATE DATA */
4669
5924
  if (username === undefined || username === null || username === '') {
4670
5925
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -4749,6 +6004,12 @@ commits.
4749
6004
  const origin = `${this.id}-${meth}`;
4750
6005
  log.trace(origin);
4751
6006
 
6007
+ if (this.suspended && this.suspendMode === 'error') {
6008
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
6009
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
6010
+ return callback(null, errorObj);
6011
+ }
6012
+
4752
6013
  /* HERE IS WHERE YOU VALIDATE DATA */
4753
6014
  if (username === undefined || username === null || username === '') {
4754
6015
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -4829,6 +6090,12 @@ commits.
4829
6090
  const origin = `${this.id}-${meth}`;
4830
6091
  log.trace(origin);
4831
6092
 
6093
+ if (this.suspended && this.suspendMode === 'error') {
6094
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
6095
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
6096
+ return callback(null, errorObj);
6097
+ }
6098
+
4832
6099
  /* HERE IS WHERE YOU VALIDATE DATA */
4833
6100
  if (username === undefined || username === null || username === '') {
4834
6101
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -4912,6 +6179,12 @@ the `sort` query parameter.
4912
6179
  const origin = `${this.id}-${meth}`;
4913
6180
  log.trace(origin);
4914
6181
 
6182
+ if (this.suspended && this.suspendMode === 'error') {
6183
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
6184
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
6185
+ return callback(null, errorObj);
6186
+ }
6187
+
4915
6188
  /* HERE IS WHERE YOU VALIDATE DATA */
4916
6189
  if (username === undefined || username === null || username === '') {
4917
6190
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -4993,6 +6266,12 @@ the `sort` query parameter.
4993
6266
  const origin = `${this.id}-${meth}`;
4994
6267
  log.trace(origin);
4995
6268
 
6269
+ if (this.suspended && this.suspendMode === 'error') {
6270
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
6271
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
6272
+ return callback(null, errorObj);
6273
+ }
6274
+
4996
6275
  /* HERE IS WHERE YOU VALIDATE DATA */
4997
6276
  if (username === undefined || username === null || username === '') {
4998
6277
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -5085,6 +6364,12 @@ Returns all commits on rev `master` (simil...(description truncated)
5085
6364
  const origin = `${this.id}-${meth}`;
5086
6365
  log.trace(origin);
5087
6366
 
6367
+ if (this.suspended && this.suspendMode === 'error') {
6368
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
6369
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
6370
+ return callback(null, errorObj);
6371
+ }
6372
+
5088
6373
  /* HERE IS WHERE YOU VALIDATE DATA */
5089
6374
  if (username === undefined || username === null || username === '') {
5090
6375
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -5162,6 +6447,12 @@ parameters in the request body to avoid URL length issues.
5162
6447
  const origin = `${this.id}-${meth}`;
5163
6448
  log.trace(origin);
5164
6449
 
6450
+ if (this.suspended && this.suspendMode === 'error') {
6451
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
6452
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
6453
+ return callback(null, errorObj);
6454
+ }
6455
+
5165
6456
  /* HERE IS WHERE YOU VALIDATE DATA */
5166
6457
  if (username === undefined || username === null || username === '') {
5167
6458
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -5245,6 +6536,12 @@ Returns all commits on rev `master` (simil...(description truncated)
5245
6536
  const origin = `${this.id}-${meth}`;
5246
6537
  log.trace(origin);
5247
6538
 
6539
+ if (this.suspended && this.suspendMode === 'error') {
6540
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
6541
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
6542
+ return callback(null, errorObj);
6543
+ }
6544
+
5248
6545
  /* HERE IS WHERE YOU VALIDATE DATA */
5249
6546
  if (username === undefined || username === null || username === '') {
5250
6547
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -5328,6 +6625,12 @@ parameters in the request body to avoid URL length issues.
5328
6625
  const origin = `${this.id}-${meth}`;
5329
6626
  log.trace(origin);
5330
6627
 
6628
+ if (this.suspended && this.suspendMode === 'error') {
6629
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
6630
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
6631
+ return callback(null, errorObj);
6632
+ }
6633
+
5331
6634
  /* HERE IS WHERE YOU VALIDATE DATA */
5332
6635
  if (username === undefined || username === null || username === '') {
5333
6636
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -5418,6 +6721,12 @@ This is equivalent to merging the left branch into the right ...(description tru
5418
6721
  const origin = `${this.id}-${meth}`;
5419
6722
  log.trace(origin);
5420
6723
 
6724
+ if (this.suspended && this.suspendMode === 'error') {
6725
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
6726
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
6727
+ return callback(null, errorObj);
6728
+ }
6729
+
5421
6730
  /* HERE IS WHERE YOU VALIDATE DATA */
5422
6731
  if (username === undefined || username === null || username === '') {
5423
6732
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -5506,6 +6815,12 @@ While similar ...(description truncated)
5506
6815
  const origin = `${this.id}-${meth}`;
5507
6816
  log.trace(origin);
5508
6817
 
6818
+ if (this.suspended && this.suspendMode === 'error') {
6819
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
6820
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
6821
+ return callback(null, errorObj);
6822
+ }
6823
+
5509
6824
  /* HERE IS WHERE YOU VALIDATE DATA */
5510
6825
  if (username === undefined || username === null || username === '') {
5511
6826
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -5587,6 +6902,12 @@ tracker enabled.
5587
6902
  const origin = `${this.id}-${meth}`;
5588
6903
  log.trace(origin);
5589
6904
 
6905
+ if (this.suspended && this.suspendMode === 'error') {
6906
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
6907
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
6908
+ return callback(null, errorObj);
6909
+ }
6910
+
5590
6911
  /* HERE IS WHERE YOU VALIDATE DATA */
5591
6912
  if (username === undefined || username === null || username === '') {
5592
6913
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -5662,6 +6983,12 @@ tracker enabled.
5662
6983
  const origin = `${this.id}-${meth}`;
5663
6984
  log.trace(origin);
5664
6985
 
6986
+ if (this.suspended && this.suspendMode === 'error') {
6987
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
6988
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
6989
+ return callback(null, errorObj);
6990
+ }
6991
+
5665
6992
  /* HERE IS WHERE YOU VALIDATE DATA */
5666
6993
  if (username === undefined || username === null || username === '') {
5667
6994
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -5741,6 +7068,12 @@ tracker enabled.
5741
7068
  const origin = `${this.id}-${meth}`;
5742
7069
  log.trace(origin);
5743
7070
 
7071
+ if (this.suspended && this.suspendMode === 'error') {
7072
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
7073
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
7074
+ return callback(null, errorObj);
7075
+ }
7076
+
5744
7077
  /* HERE IS WHERE YOU VALIDATE DATA */
5745
7078
  if (username === undefined || username === null || username === '') {
5746
7079
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -5820,6 +7153,12 @@ The authenticated user is used for the issue's `reporter` field.
5820
7153
  const origin = `${this.id}-${meth}`;
5821
7154
  log.trace(origin);
5822
7155
 
7156
+ if (this.suspended && this.suspendMode === 'error') {
7157
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
7158
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
7159
+ return callback(null, errorObj);
7160
+ }
7161
+
5823
7162
  /* HERE IS WHERE YOU VALIDATE DATA */
5824
7163
  if (username === undefined || username === null || username === '') {
5825
7164
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -5901,6 +7240,12 @@ repository.
5901
7240
  const origin = `${this.id}-${meth}`;
5902
7241
  log.trace(origin);
5903
7242
 
7243
+ if (this.suspended && this.suspendMode === 'error') {
7244
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
7245
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
7246
+ return callback(null, errorObj);
7247
+ }
7248
+
5904
7249
  /* HERE IS WHERE YOU VALIDATE DATA */
5905
7250
  if (username === undefined || username === null || username === '') {
5906
7251
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -5981,6 +7326,12 @@ repository.
5981
7326
  const origin = `${this.id}-${meth}`;
5982
7327
  log.trace(origin);
5983
7328
 
7329
+ if (this.suspended && this.suspendMode === 'error') {
7330
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
7331
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
7332
+ return callback(null, errorObj);
7333
+ }
7334
+
5984
7335
  /* HERE IS WHERE YOU VALIDATE DATA */
5985
7336
  if (username === undefined || username === null || username === '') {
5986
7337
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -6064,6 +7415,12 @@ The files are always ordered by their upload date.
6064
7415
  const origin = `${this.id}-${meth}`;
6065
7416
  log.trace(origin);
6066
7417
 
7418
+ if (this.suspended && this.suspendMode === 'error') {
7419
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
7420
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
7421
+ return callback(null, errorObj);
7422
+ }
7423
+
6067
7424
  /* HERE IS WHERE YOU VALIDATE DATA */
6068
7425
  if (username === undefined || username === null || username === '') {
6069
7426
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -6148,6 +7505,12 @@ then the existing file will be replaced.
6148
7505
  const origin = `${this.id}-${meth}`;
6149
7506
  log.trace(origin);
6150
7507
 
7508
+ if (this.suspended && this.suspendMode === 'error') {
7509
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
7510
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
7511
+ return callback(null, errorObj);
7512
+ }
7513
+
6151
7514
  /* HERE IS WHERE YOU VALIDATE DATA */
6152
7515
  if (username === undefined || username === null || username === '') {
6153
7516
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -6229,6 +7592,12 @@ then the existing file will be replaced.
6229
7592
  const origin = `${this.id}-${meth}`;
6230
7593
  log.trace(origin);
6231
7594
 
7595
+ if (this.suspended && this.suspendMode === 'error') {
7596
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
7597
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
7598
+ return callback(null, errorObj);
7599
+ }
7600
+
6232
7601
  /* HERE IS WHERE YOU VALIDATE DATA */
6233
7602
  if (username === undefined || username === null || username === '') {
6234
7603
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -6320,6 +7689,12 @@ As a result, the link should not be persisted, stored, or shared.
6320
7689
  const origin = `${this.id}-${meth}`;
6321
7690
  log.trace(origin);
6322
7691
 
7692
+ if (this.suspended && this.suspendMode === 'error') {
7693
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
7694
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
7695
+ return callback(null, errorObj);
7696
+ }
7697
+
6323
7698
  /* HERE IS WHERE YOU VALIDATE DATA */
6324
7699
  if (username === undefined || username === null || username === '') {
6325
7700
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -6407,6 +7782,12 @@ the `sort` query parameter.
6407
7782
  const origin = `${this.id}-${meth}`;
6408
7783
  log.trace(origin);
6409
7784
 
7785
+ if (this.suspended && this.suspendMode === 'error') {
7786
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
7787
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
7788
+ return callback(null, errorObj);
7789
+ }
7790
+
6410
7791
  /* HERE IS WHERE YOU VALIDATE DATA */
6411
7792
  if (username === undefined || username === null || username === '') {
6412
7793
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -6488,6 +7869,12 @@ the `sort` query parameter.
6488
7869
  const origin = `${this.id}-${meth}`;
6489
7870
  log.trace(origin);
6490
7871
 
7872
+ if (this.suspended && this.suspendMode === 'error') {
7873
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
7874
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
7875
+ return callback(null, errorObj);
7876
+ }
7877
+
6491
7878
  /* HERE IS WHERE YOU VALIDATE DATA */
6492
7879
  if (username === undefined || username === null || username === '') {
6493
7880
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -6573,6 +7960,12 @@ the `sort` query parameter.
6573
7960
  const origin = `${this.id}-${meth}`;
6574
7961
  log.trace(origin);
6575
7962
 
7963
+ if (this.suspended && this.suspendMode === 'error') {
7964
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
7965
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
7966
+ return callback(null, errorObj);
7967
+ }
7968
+
6576
7969
  /* HERE IS WHERE YOU VALIDATE DATA */
6577
7970
  if (username === undefined || username === null || username === '') {
6578
7971
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -6655,6 +8048,12 @@ implies they haven't.
6655
8048
  const origin = `${this.id}-${meth}`;
6656
8049
  log.trace(origin);
6657
8050
 
8051
+ if (this.suspended && this.suspendMode === 'error') {
8052
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
8053
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
8054
+ return callback(null, errorObj);
8055
+ }
8056
+
6658
8057
  /* HERE IS WHERE YOU VALIDATE DATA */
6659
8058
  if (username === undefined || username === null || username === '') {
6660
8059
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -6737,6 +8136,12 @@ the operation was successful.
6737
8136
  const origin = `${this.id}-${meth}`;
6738
8137
  log.trace(origin);
6739
8138
 
8139
+ if (this.suspended && this.suspendMode === 'error') {
8140
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
8141
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
8142
+ return callback(null, errorObj);
8143
+ }
8144
+
6740
8145
  /* HERE IS WHERE YOU VALIDATE DATA */
6741
8146
  if (username === undefined || username === null || username === '') {
6742
8147
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -6817,6 +8222,12 @@ the operation was successful.
6817
8222
  const origin = `${this.id}-${meth}`;
6818
8223
  log.trace(origin);
6819
8224
 
8225
+ if (this.suspended && this.suspendMode === 'error') {
8226
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
8227
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
8228
+ return callback(null, errorObj);
8229
+ }
8230
+
6820
8231
  /* HERE IS WHERE YOU VALIDATE DATA */
6821
8232
  if (username === undefined || username === null || username === '') {
6822
8233
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -6898,6 +8309,12 @@ issue.
6898
8309
  const origin = `${this.id}-${meth}`;
6899
8310
  log.trace(origin);
6900
8311
 
8312
+ if (this.suspended && this.suspendMode === 'error') {
8313
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
8314
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
8315
+ return callback(null, errorObj);
8316
+ }
8317
+
6901
8318
  /* HERE IS WHERE YOU VALIDATE DATA */
6902
8319
  if (username === undefined || username === null || username === '') {
6903
8320
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -6980,6 +8397,12 @@ indicates that the operation was successful.
6980
8397
  const origin = `${this.id}-${meth}`;
6981
8398
  log.trace(origin);
6982
8399
 
8400
+ if (this.suspended && this.suspendMode === 'error') {
8401
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
8402
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
8403
+ return callback(null, errorObj);
8404
+ }
8405
+
6983
8406
  /* HERE IS WHERE YOU VALIDATE DATA */
6984
8407
  if (username === undefined || username === null || username === '') {
6985
8408
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -7061,6 +8484,12 @@ tracker enabled.
7061
8484
  const origin = `${this.id}-${meth}`;
7062
8485
  log.trace(origin);
7063
8486
 
8487
+ if (this.suspended && this.suspendMode === 'error') {
8488
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
8489
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
8490
+ return callback(null, errorObj);
8491
+ }
8492
+
7064
8493
  /* HERE IS WHERE YOU VALIDATE DATA */
7065
8494
  if (username === undefined || username === null || username === '') {
7066
8495
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -7136,6 +8565,12 @@ tracker enabled.
7136
8565
  const origin = `${this.id}-${meth}`;
7137
8566
  log.trace(origin);
7138
8567
 
8568
+ if (this.suspended && this.suspendMode === 'error') {
8569
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
8570
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
8571
+ return callback(null, errorObj);
8572
+ }
8573
+
7139
8574
  /* HERE IS WHERE YOU VALIDATE DATA */
7140
8575
  if (username === undefined || username === null || username === '') {
7141
8576
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -7217,6 +8652,12 @@ tracker enabled.
7217
8652
  const origin = `${this.id}-${meth}`;
7218
8653
  log.trace(origin);
7219
8654
 
8655
+ if (this.suspended && this.suspendMode === 'error') {
8656
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
8657
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
8658
+ return callback(null, errorObj);
8659
+ }
8660
+
7220
8661
  /* HERE IS WHERE YOU VALIDATE DATA */
7221
8662
  if (username === undefined || username === null || username === '') {
7222
8663
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -7292,6 +8733,12 @@ tracker enabled.
7292
8733
  const origin = `${this.id}-${meth}`;
7293
8734
  log.trace(origin);
7294
8735
 
8736
+ if (this.suspended && this.suspendMode === 'error') {
8737
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
8738
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
8739
+ return callback(null, errorObj);
8740
+ }
8741
+
7295
8742
  /* HERE IS WHERE YOU VALIDATE DATA */
7296
8743
  if (username === undefined || username === null || username === '') {
7297
8744
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -7373,6 +8820,12 @@ new pull request that is created.
7373
8820
  const origin = `${this.id}-${meth}`;
7374
8821
  log.trace(origin);
7375
8822
 
8823
+ if (this.suspended && this.suspendMode === 'error') {
8824
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
8825
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
8826
+ return callback(null, errorObj);
8827
+ }
8828
+
7376
8829
  /* HERE IS WHERE YOU VALIDATE DATA */
7377
8830
  if (username === undefined || username === null || username === '') {
7378
8831
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -7448,6 +8901,12 @@ new pull request that is created.
7448
8901
  const origin = `${this.id}-${meth}`;
7449
8902
  log.trace(origin);
7450
8903
 
8904
+ if (this.suspended && this.suspendMode === 'error') {
8905
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
8906
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
8907
+ return callback(null, errorObj);
8908
+ }
8909
+
7451
8910
  /* HERE IS WHERE YOU VALIDATE DATA */
7452
8911
  if (username === undefined || username === null || username === '') {
7453
8912
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -7531,6 +8990,12 @@ a default reviewer.
7531
8990
  const origin = `${this.id}-${meth}`;
7532
8991
  log.trace(origin);
7533
8992
 
8993
+ if (this.suspended && this.suspendMode === 'error') {
8994
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
8995
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
8996
+ return callback(null, errorObj);
8997
+ }
8998
+
7534
8999
  /* HERE IS WHERE YOU VALIDATE DATA */
7535
9000
  if (username === undefined || username === null || username === '') {
7536
9001
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -7613,6 +9078,12 @@ This method is idempotent. Adding a user a second time has no effect.
7613
9078
  const origin = `${this.id}-${meth}`;
7614
9079
  log.trace(origin);
7615
9080
 
9081
+ if (this.suspended && this.suspendMode === 'error') {
9082
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
9083
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
9084
+ return callback(null, errorObj);
9085
+ }
9086
+
7616
9087
  /* HERE IS WHERE YOU VALIDATE DATA */
7617
9088
  if (username === undefined || username === null || username === '') {
7618
9089
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -7701,6 +9172,12 @@ surrounded by curly-braces, for example: `{repository UUID}`.
7701
9172
  const origin = `${this.id}-${meth}`;
7702
9173
  log.trace(origin);
7703
9174
 
9175
+ if (this.suspended && this.suspendMode === 'error') {
9176
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
9177
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
9178
+ return callback(null, errorObj);
9179
+ }
9180
+
7704
9181
  /* HERE IS WHERE YOU VALIDATE DATA */
7705
9182
  if (username === undefined || username === null || username === '') {
7706
9183
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -7779,6 +9256,12 @@ The request URL you POST to becomes the destination repository URL. For this rea
7779
9256
  const origin = `${this.id}-${meth}`;
7780
9257
  log.trace(origin);
7781
9258
 
9259
+ if (this.suspended && this.suspendMode === 'error') {
9260
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
9261
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
9262
+ return callback(null, errorObj);
9263
+ }
9264
+
7782
9265
  /* HERE IS WHERE YOU VALIDATE DATA */
7783
9266
  if (username === undefined || username === null || username === '') {
7784
9267
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -7857,6 +9340,12 @@ surrounded by curly-braces, for example: `{repository UUID}`.
7857
9340
  const origin = `${this.id}-${meth}`;
7858
9341
  log.trace(origin);
7859
9342
 
9343
+ if (this.suspended && this.suspendMode === 'error') {
9344
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
9345
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
9346
+ return callback(null, errorObj);
9347
+ }
9348
+
7860
9349
  /* HERE IS WHERE YOU VALIDATE DATA */
7861
9350
  if (username === undefined || username === null || username === '') {
7862
9351
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -7934,6 +9423,12 @@ surrounded by curly-braces, for example: `{repository UUID}`.
7934
9423
  const origin = `${this.id}-${meth}`;
7935
9424
  log.trace(origin);
7936
9425
 
9426
+ if (this.suspended && this.suspendMode === 'error') {
9427
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
9428
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
9429
+ return callback(null, errorObj);
9430
+ }
9431
+
7937
9432
  /* HERE IS WHERE YOU VALIDATE DATA */
7938
9433
  if (username === undefined || username === null || username === '') {
7939
9434
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -8019,6 +9514,12 @@ surrounded by curly-braces, for example: `{repository UUID}`.
8019
9514
  const origin = `${this.id}-${meth}`;
8020
9515
  log.trace(origin);
8021
9516
 
9517
+ if (this.suspended && this.suspendMode === 'error') {
9518
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
9519
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
9520
+ return callback(null, errorObj);
9521
+ }
9522
+
8022
9523
  /* HERE IS WHERE YOU VALIDATE DATA */
8023
9524
  if (username === undefined || username === null || username === '') {
8024
9525
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -8103,6 +9604,12 @@ surrounded by curly-braces, for example: `{repository UUID}`.
8103
9604
  const origin = `${this.id}-${meth}`;
8104
9605
  log.trace(origin);
8105
9606
 
9607
+ if (this.suspended && this.suspendMode === 'error') {
9608
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
9609
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
9610
+ return callback(null, errorObj);
9611
+ }
9612
+
8106
9613
  /* HERE IS WHERE YOU VALIDATE DATA */
8107
9614
  if (username === undefined || username === null || username === '') {
8108
9615
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -8184,6 +9691,12 @@ request.
8184
9691
  const origin = `${this.id}-${meth}`;
8185
9692
  log.trace(origin);
8186
9693
 
9694
+ if (this.suspended && this.suspendMode === 'error') {
9695
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
9696
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
9697
+ return callback(null, errorObj);
9698
+ }
9699
+
8187
9700
  /* HERE IS WHERE YOU VALIDATE DATA */
8188
9701
  if (username === undefined || username === null || username === '') {
8189
9702
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -8264,6 +9777,12 @@ request.
8264
9777
  const origin = `${this.id}-${meth}`;
8265
9778
  log.trace(origin);
8266
9779
 
9780
+ if (this.suspended && this.suspendMode === 'error') {
9781
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
9782
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
9783
+ return callback(null, errorObj);
9784
+ }
9785
+
8267
9786
  /* HERE IS WHERE YOU VALIDATE DATA */
8268
9787
  if (username === undefined || username === null || username === '') {
8269
9788
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -8350,6 +9869,12 @@ details.
8350
9869
  const origin = `${this.id}-${meth}`;
8351
9870
  log.trace(origin);
8352
9871
 
9872
+ if (this.suspended && this.suspendMode === 'error') {
9873
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
9874
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
9875
+ return callback(null, errorObj);
9876
+ }
9877
+
8353
9878
  /* HERE IS WHERE YOU VALIDATE DATA */
8354
9879
  if (username === undefined || username === null || username === '') {
8355
9880
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -8431,6 +9956,12 @@ details.
8431
9956
  const origin = `${this.id}-${meth}`;
8432
9957
  log.trace(origin);
8433
9958
 
9959
+ if (this.suspended && this.suspendMode === 'error') {
9960
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
9961
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
9962
+ return callback(null, errorObj);
9963
+ }
9964
+
8434
9965
  /* HERE IS WHERE YOU VALIDATE DATA */
8435
9966
  if (username === undefined || username === null || username === '') {
8436
9967
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -8518,6 +10049,12 @@ branch when the pull requests gets accepted.
8518
10049
  const origin = `${this.id}-${meth}`;
8519
10050
  log.trace(origin);
8520
10051
 
10052
+ if (this.suspended && this.suspendMode === 'error') {
10053
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
10054
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
10055
+ return callback(null, errorObj);
10056
+ }
10057
+
8521
10058
  /* HERE IS WHERE YOU VALIDATE DATA */
8522
10059
  if (username === undefined || username === null || username === '') {
8523
10060
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -8598,6 +10135,12 @@ branch when the pull requests gets accepted.
8598
10135
  const origin = `${this.id}-${meth}`;
8599
10136
  log.trace(origin);
8600
10137
 
10138
+ if (this.suspended && this.suspendMode === 'error') {
10139
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
10140
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
10141
+ return callback(null, errorObj);
10142
+ }
10143
+
8601
10144
  /* HERE IS WHERE YOU VALIDATE DATA */
8602
10145
  if (username === undefined || username === null || username === '') {
8603
10146
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -8678,6 +10221,12 @@ branch when the pull requests gets accepted.
8678
10221
  const origin = `${this.id}-${meth}`;
8679
10222
  log.trace(origin);
8680
10223
 
10224
+ if (this.suspended && this.suspendMode === 'error') {
10225
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
10226
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
10227
+ return callback(null, errorObj);
10228
+ }
10229
+
8681
10230
  /* HERE IS WHERE YOU VALIDATE DATA */
8682
10231
  if (username === undefined || username === null || username === '') {
8683
10232
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -8759,6 +10308,12 @@ branch when the pull requests gets accepted.
8759
10308
  const origin = `${this.id}-${meth}`;
8760
10309
  log.trace(origin);
8761
10310
 
10311
+ if (this.suspended && this.suspendMode === 'error') {
10312
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
10313
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
10314
+ return callback(null, errorObj);
10315
+ }
10316
+
8762
10317
  /* HERE IS WHERE YOU VALIDATE DATA */
8763
10318
  if (username === undefined || username === null || username === '') {
8764
10319
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -8839,6 +10394,12 @@ branch when the pull requests gets accepted.
8839
10394
  const origin = `${this.id}-${meth}`;
8840
10395
  log.trace(origin);
8841
10396
 
10397
+ if (this.suspended && this.suspendMode === 'error') {
10398
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
10399
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
10400
+ return callback(null, errorObj);
10401
+ }
10402
+
8842
10403
  /* HERE IS WHERE YOU VALIDATE DATA */
8843
10404
  if (username === undefined || username === null || username === '') {
8844
10405
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -8918,6 +10479,12 @@ branch when the pull requests gets accepted.
8918
10479
  const origin = `${this.id}-${meth}`;
8919
10480
  log.trace(origin);
8920
10481
 
10482
+ if (this.suspended && this.suspendMode === 'error') {
10483
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
10484
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
10485
+ return callback(null, errorObj);
10486
+ }
10487
+
8921
10488
  /* HERE IS WHERE YOU VALIDATE DATA */
8922
10489
  if (username === undefined || username === null || username === '') {
8923
10490
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -8998,6 +10565,12 @@ then the existing file will be replaced.
8998
10565
  const origin = `${this.id}-${meth}`;
8999
10566
  log.trace(origin);
9000
10567
 
10568
+ if (this.suspended && this.suspendMode === 'error') {
10569
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
10570
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
10571
+ return callback(null, errorObj);
10572
+ }
10573
+
9001
10574
  /* HERE IS WHERE YOU VALIDATE DATA */
9002
10575
  if (username === undefined || username === null || username === '') {
9003
10576
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -9073,6 +10646,12 @@ then the existing file will be replaced.
9073
10646
  const origin = `${this.id}-${meth}`;
9074
10647
  log.trace(origin);
9075
10648
 
10649
+ if (this.suspended && this.suspendMode === 'error') {
10650
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
10651
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
10652
+ return callback(null, errorObj);
10653
+ }
10654
+
9076
10655
  /* HERE IS WHERE YOU VALIDATE DATA */
9077
10656
  if (username === undefined || username === null || username === '') {
9078
10657
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -9157,6 +10736,12 @@ metadata.
9157
10736
  const origin = `${this.id}-${meth}`;
9158
10737
  log.trace(origin);
9159
10738
 
10739
+ if (this.suspended && this.suspendMode === 'error') {
10740
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
10741
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
10742
+ return callback(null, errorObj);
10743
+ }
10744
+
9160
10745
  /* HERE IS WHERE YOU VALIDATE DATA */
9161
10746
  if (username === undefined || username === null || username === '') {
9162
10747
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -9236,6 +10821,12 @@ metadata.
9236
10821
  const origin = `${this.id}-${meth}`;
9237
10822
  log.trace(origin);
9238
10823
 
10824
+ if (this.suspended && this.suspendMode === 'error') {
10825
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
10826
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
10827
+ return callback(null, errorObj);
10828
+ }
10829
+
9239
10830
  /* HERE IS WHERE YOU VALIDATE DATA */
9240
10831
  if (username === undefined || username === null || username === '') {
9241
10832
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -9315,6 +10906,12 @@ The specified reference will be used to determine which pipeline definition from
9315
10906
  const origin = `${this.id}-${meth}`;
9316
10907
  log.trace(origin);
9317
10908
 
10909
+ if (this.suspended && this.suspendMode === 'error') {
10910
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
10911
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
10912
+ return callback(null, errorObj);
10913
+ }
10914
+
9318
10915
  /* HERE IS WHERE YOU VALIDATE DATA */
9319
10916
  if (username === undefined || username === null || username === '') {
9320
10917
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -9395,6 +10992,12 @@ The specified reference will be used to determine which pipeline definition from
9395
10992
  const origin = `${this.id}-${meth}`;
9396
10993
  log.trace(origin);
9397
10994
 
10995
+ if (this.suspended && this.suspendMode === 'error') {
10996
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
10997
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
10998
+ return callback(null, errorObj);
10999
+ }
11000
+
9398
11001
  /* HERE IS WHERE YOU VALIDATE DATA */
9399
11002
  if (username === undefined || username === null || username === '') {
9400
11003
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -9475,6 +11078,12 @@ The specified reference will be used to determine which pipeline definition from
9475
11078
  const origin = `${this.id}-${meth}`;
9476
11079
  log.trace(origin);
9477
11080
 
11081
+ if (this.suspended && this.suspendMode === 'error') {
11082
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
11083
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
11084
+ return callback(null, errorObj);
11085
+ }
11086
+
9478
11087
  /* HERE IS WHERE YOU VALIDATE DATA */
9479
11088
  if (username === undefined || username === null || username === '') {
9480
11089
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -9556,6 +11165,12 @@ The specified reference will be used to determine which pipeline definition from
9556
11165
  const origin = `${this.id}-${meth}`;
9557
11166
  log.trace(origin);
9558
11167
 
11168
+ if (this.suspended && this.suspendMode === 'error') {
11169
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
11170
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
11171
+ return callback(null, errorObj);
11172
+ }
11173
+
9559
11174
  /* HERE IS WHERE YOU VALIDATE DATA */
9560
11175
  if (username === undefined || username === null || username === '') {
9561
11176
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -9643,6 +11258,12 @@ This endpoint supports (and encourages!) the use of [HTTP Range requests](https:
9643
11258
  const origin = `${this.id}-${meth}`;
9644
11259
  log.trace(origin);
9645
11260
 
11261
+ if (this.suspended && this.suspendMode === 'error') {
11262
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
11263
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
11264
+ return callback(null, errorObj);
11265
+ }
11266
+
9646
11267
  /* HERE IS WHERE YOU VALIDATE DATA */
9647
11268
  if (username === undefined || username === null || username === '') {
9648
11269
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -9728,6 +11349,12 @@ This endpoint supports (and encourages!) the use of [HTTP Range requests](https:
9728
11349
  const origin = `${this.id}-${meth}`;
9729
11350
  log.trace(origin);
9730
11351
 
11352
+ if (this.suspended && this.suspendMode === 'error') {
11353
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
11354
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
11355
+ return callback(null, errorObj);
11356
+ }
11357
+
9731
11358
  /* HERE IS WHERE YOU VALIDATE DATA */
9732
11359
  if (username === undefined || username === null || username === '') {
9733
11360
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -9807,6 +11434,12 @@ This endpoint supports (and encourages!) the use of [HTTP Range requests](https:
9807
11434
  const origin = `${this.id}-${meth}`;
9808
11435
  log.trace(origin);
9809
11436
 
11437
+ if (this.suspended && this.suspendMode === 'error') {
11438
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
11439
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
11440
+ return callback(null, errorObj);
11441
+ }
11442
+
9810
11443
  /* HERE IS WHERE YOU VALIDATE DATA */
9811
11444
  if (username === undefined || username === null || username === '') {
9812
11445
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -9882,6 +11515,12 @@ This endpoint supports (and encourages!) the use of [HTTP Range requests](https:
9882
11515
  const origin = `${this.id}-${meth}`;
9883
11516
  log.trace(origin);
9884
11517
 
11518
+ if (this.suspended && this.suspendMode === 'error') {
11519
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
11520
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
11521
+ return callback(null, errorObj);
11522
+ }
11523
+
9885
11524
  /* HERE IS WHERE YOU VALIDATE DATA */
9886
11525
  if (username === undefined || username === null || username === '') {
9887
11526
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -9961,6 +11600,12 @@ This endpoint supports (and encourages!) the use of [HTTP Range requests](https:
9961
11600
  const origin = `${this.id}-${meth}`;
9962
11601
  log.trace(origin);
9963
11602
 
11603
+ if (this.suspended && this.suspendMode === 'error') {
11604
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
11605
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
11606
+ return callback(null, errorObj);
11607
+ }
11608
+
9964
11609
  /* HERE IS WHERE YOU VALIDATE DATA */
9965
11610
  if (username === undefined || username === null || username === '') {
9966
11611
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -10035,6 +11680,12 @@ This endpoint supports (and encourages!) the use of [HTTP Range requests](https:
10035
11680
  const origin = `${this.id}-${meth}`;
10036
11681
  log.trace(origin);
10037
11682
 
11683
+ if (this.suspended && this.suspendMode === 'error') {
11684
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
11685
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
11686
+ return callback(null, errorObj);
11687
+ }
11688
+
10038
11689
  /* HERE IS WHERE YOU VALIDATE DATA */
10039
11690
  if (username === undefined || username === null || username === '') {
10040
11691
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -10110,6 +11761,12 @@ This endpoint supports (and encourages!) the use of [HTTP Range requests](https:
10110
11761
  const origin = `${this.id}-${meth}`;
10111
11762
  log.trace(origin);
10112
11763
 
11764
+ if (this.suspended && this.suspendMode === 'error') {
11765
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
11766
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
11767
+ return callback(null, errorObj);
11768
+ }
11769
+
10113
11770
  /* HERE IS WHERE YOU VALIDATE DATA */
10114
11771
  if (username === undefined || username === null || username === '') {
10115
11772
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -10189,6 +11846,12 @@ This endpoint supports (and encourages!) the use of [HTTP Range requests](https:
10189
11846
  const origin = `${this.id}-${meth}`;
10190
11847
  log.trace(origin);
10191
11848
 
11849
+ if (this.suspended && this.suspendMode === 'error') {
11850
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
11851
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
11852
+ return callback(null, errorObj);
11853
+ }
11854
+
10192
11855
  /* HERE IS WHERE YOU VALIDATE DATA */
10193
11856
  if (username === undefined || username === null || username === '') {
10194
11857
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -10264,6 +11927,12 @@ This endpoint supports (and encourages!) the use of [HTTP Range requests](https:
10264
11927
  const origin = `${this.id}-${meth}`;
10265
11928
  log.trace(origin);
10266
11929
 
11930
+ if (this.suspended && this.suspendMode === 'error') {
11931
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
11932
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
11933
+ return callback(null, errorObj);
11934
+ }
11935
+
10267
11936
  /* HERE IS WHERE YOU VALIDATE DATA */
10268
11937
  if (username === undefined || username === null || username === '') {
10269
11938
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -10344,6 +12013,12 @@ This endpoint supports (and encourages!) the use of [HTTP Range requests](https:
10344
12013
  const origin = `${this.id}-${meth}`;
10345
12014
  log.trace(origin);
10346
12015
 
12016
+ if (this.suspended && this.suspendMode === 'error') {
12017
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
12018
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
12019
+ return callback(null, errorObj);
12020
+ }
12021
+
10347
12022
  /* HERE IS WHERE YOU VALIDATE DATA */
10348
12023
  if (username === undefined || username === null || username === '') {
10349
12024
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -10424,6 +12099,12 @@ This endpoint supports (and encourages!) the use of [HTTP Range requests](https:
10424
12099
  const origin = `${this.id}-${meth}`;
10425
12100
  log.trace(origin);
10426
12101
 
12102
+ if (this.suspended && this.suspendMode === 'error') {
12103
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
12104
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
12105
+ return callback(null, errorObj);
12106
+ }
12107
+
10427
12108
  /* HERE IS WHERE YOU VALIDATE DATA */
10428
12109
  if (username === undefined || username === null || username === '') {
10429
12110
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -10505,6 +12186,12 @@ This endpoint supports (and encourages!) the use of [HTTP Range requests](https:
10505
12186
  const origin = `${this.id}-${meth}`;
10506
12187
  log.trace(origin);
10507
12188
 
12189
+ if (this.suspended && this.suspendMode === 'error') {
12190
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
12191
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
12192
+ return callback(null, errorObj);
12193
+ }
12194
+
10508
12195
  /* HERE IS WHERE YOU VALIDATE DATA */
10509
12196
  if (username === undefined || username === null || username === '') {
10510
12197
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -10589,6 +12276,12 @@ This endpoint supports (and encourages!) the use of [HTTP Range requests](https:
10589
12276
  const origin = `${this.id}-${meth}`;
10590
12277
  log.trace(origin);
10591
12278
 
12279
+ if (this.suspended && this.suspendMode === 'error') {
12280
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
12281
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
12282
+ return callback(null, errorObj);
12283
+ }
12284
+
10592
12285
  /* HERE IS WHERE YOU VALIDATE DATA */
10593
12286
  if (username === undefined || username === null || username === '') {
10594
12287
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -10664,6 +12357,12 @@ This endpoint supports (and encourages!) the use of [HTTP Range requests](https:
10664
12357
  const origin = `${this.id}-${meth}`;
10665
12358
  log.trace(origin);
10666
12359
 
12360
+ if (this.suspended && this.suspendMode === 'error') {
12361
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
12362
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
12363
+ return callback(null, errorObj);
12364
+ }
12365
+
10667
12366
  /* HERE IS WHERE YOU VALIDATE DATA */
10668
12367
  if (username === undefined || username === null || username === '') {
10669
12368
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -10744,6 +12443,12 @@ This endpoint supports (and encourages!) the use of [HTTP Range requests](https:
10744
12443
  const origin = `${this.id}-${meth}`;
10745
12444
  log.trace(origin);
10746
12445
 
12446
+ if (this.suspended && this.suspendMode === 'error') {
12447
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
12448
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
12449
+ return callback(null, errorObj);
12450
+ }
12451
+
10747
12452
  /* HERE IS WHERE YOU VALIDATE DATA */
10748
12453
  if (username === undefined || username === null || username === '') {
10749
12454
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -10824,6 +12529,12 @@ This endpoint supports (and encourages!) the use of [HTTP Range requests](https:
10824
12529
  const origin = `${this.id}-${meth}`;
10825
12530
  log.trace(origin);
10826
12531
 
12532
+ if (this.suspended && this.suspendMode === 'error') {
12533
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
12534
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
12535
+ return callback(null, errorObj);
12536
+ }
12537
+
10827
12538
  /* HERE IS WHERE YOU VALIDATE DATA */
10828
12539
  if (username === undefined || username === null || username === '') {
10829
12540
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -10905,6 +12616,12 @@ This endpoint supports (and encourages!) the use of [HTTP Range requests](https:
10905
12616
  const origin = `${this.id}-${meth}`;
10906
12617
  log.trace(origin);
10907
12618
 
12619
+ if (this.suspended && this.suspendMode === 'error') {
12620
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
12621
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
12622
+ return callback(null, errorObj);
12623
+ }
12624
+
10908
12625
  /* HERE IS WHERE YOU VALIDATE DATA */
10909
12626
  if (username === undefined || username === null || username === '') {
10910
12627
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -10988,6 +12705,12 @@ This endpoint supports (and encourages!) the use of [HTTP Range requests](https:
10988
12705
  const origin = `${this.id}-${meth}`;
10989
12706
  log.trace(origin);
10990
12707
 
12708
+ if (this.suspended && this.suspendMode === 'error') {
12709
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
12710
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
12711
+ return callback(null, errorObj);
12712
+ }
12713
+
10991
12714
  /* HERE IS WHERE YOU VALIDATE DATA */
10992
12715
  if (username === undefined || username === null || username === '') {
10993
12716
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -11057,6 +12780,12 @@ This endpoint supports (and encourages!) the use of [HTTP Range requests](https:
11057
12780
  const origin = `${this.id}-${meth}`;
11058
12781
  log.trace(origin);
11059
12782
 
12783
+ if (this.suspended && this.suspendMode === 'error') {
12784
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
12785
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
12786
+ return callback(null, errorObj);
12787
+ }
12788
+
11060
12789
  /* HERE IS WHERE YOU VALIDATE DATA */
11061
12790
  if (username === undefined || username === null || username === '') {
11062
12791
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -11126,6 +12855,12 @@ This endpoint supports (and encourages!) the use of [HTTP Range requests](https:
11126
12855
  const origin = `${this.id}-${meth}`;
11127
12856
  log.trace(origin);
11128
12857
 
12858
+ if (this.suspended && this.suspendMode === 'error') {
12859
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
12860
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
12861
+ return callback(null, errorObj);
12862
+ }
12863
+
11129
12864
  /* HERE IS WHERE YOU VALIDATE DATA */
11130
12865
  if (username === undefined || username === null || username === '') {
11131
12866
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -11200,6 +12935,12 @@ This endpoint supports (and encourages!) the use of [HTTP Range requests](https:
11200
12935
  const origin = `${this.id}-${meth}`;
11201
12936
  log.trace(origin);
11202
12937
 
12938
+ if (this.suspended && this.suspendMode === 'error') {
12939
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
12940
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
12941
+ return callback(null, errorObj);
12942
+ }
12943
+
11203
12944
  /* HERE IS WHERE YOU VALIDATE DATA */
11204
12945
  if (username === undefined || username === null || username === '') {
11205
12946
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -11275,6 +13016,12 @@ This endpoint supports (and encourages!) the use of [HTTP Range requests](https:
11275
13016
  const origin = `${this.id}-${meth}`;
11276
13017
  log.trace(origin);
11277
13018
 
13019
+ if (this.suspended && this.suspendMode === 'error') {
13020
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
13021
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
13022
+ return callback(null, errorObj);
13023
+ }
13024
+
11278
13025
  /* HERE IS WHERE YOU VALIDATE DATA */
11279
13026
  if (username === undefined || username === null || username === '') {
11280
13027
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -11353,6 +13100,12 @@ This endpoint supports (and encourages!) the use of [HTTP Range requests](https:
11353
13100
  const origin = `${this.id}-${meth}`;
11354
13101
  log.trace(origin);
11355
13102
 
13103
+ if (this.suspended && this.suspendMode === 'error') {
13104
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
13105
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
13106
+ return callback(null, errorObj);
13107
+ }
13108
+
11356
13109
  /* HERE IS WHERE YOU VALIDATE DATA */
11357
13110
  if (username === undefined || username === null || username === '') {
11358
13111
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -11422,6 +13175,12 @@ This endpoint supports (and encourages!) the use of [HTTP Range requests](https:
11422
13175
  const origin = `${this.id}-${meth}`;
11423
13176
  log.trace(origin);
11424
13177
 
13178
+ if (this.suspended && this.suspendMode === 'error') {
13179
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
13180
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
13181
+ return callback(null, errorObj);
13182
+ }
13183
+
11425
13184
  /* HERE IS WHERE YOU VALIDATE DATA */
11426
13185
  if (username === undefined || username === null || username === '') {
11427
13186
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -11491,6 +13250,12 @@ This endpoint supports (and encourages!) the use of [HTTP Range requests](https:
11491
13250
  const origin = `${this.id}-${meth}`;
11492
13251
  log.trace(origin);
11493
13252
 
13253
+ if (this.suspended && this.suspendMode === 'error') {
13254
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
13255
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
13256
+ return callback(null, errorObj);
13257
+ }
13258
+
11494
13259
  /* HERE IS WHERE YOU VALIDATE DATA */
11495
13260
  if (username === undefined || username === null || username === '') {
11496
13261
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -11565,6 +13330,12 @@ This endpoint supports (and encourages!) the use of [HTTP Range requests](https:
11565
13330
  const origin = `${this.id}-${meth}`;
11566
13331
  log.trace(origin);
11567
13332
 
13333
+ if (this.suspended && this.suspendMode === 'error') {
13334
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
13335
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
13336
+ return callback(null, errorObj);
13337
+ }
13338
+
11568
13339
  /* HERE IS WHERE YOU VALIDATE DATA */
11569
13340
  if (username === undefined || username === null || username === '') {
11570
13341
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -11640,6 +13411,12 @@ This endpoint supports (and encourages!) the use of [HTTP Range requests](https:
11640
13411
  const origin = `${this.id}-${meth}`;
11641
13412
  log.trace(origin);
11642
13413
 
13414
+ if (this.suspended && this.suspendMode === 'error') {
13415
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
13416
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
13417
+ return callback(null, errorObj);
13418
+ }
13419
+
11643
13420
  /* HERE IS WHERE YOU VALIDATE DATA */
11644
13421
  if (username === undefined || username === null || username === '') {
11645
13422
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -11719,6 +13496,12 @@ This endpoint supports (and encourages!) the use of [HTTP Range requests](https:
11719
13496
  const origin = `${this.id}-${meth}`;
11720
13497
  log.trace(origin);
11721
13498
 
13499
+ if (this.suspended && this.suspendMode === 'error') {
13500
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
13501
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
13502
+ return callback(null, errorObj);
13503
+ }
13504
+
11722
13505
  /* HERE IS WHERE YOU VALIDATE DATA */
11723
13506
  if (username === undefined || username === null || username === '') {
11724
13507
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -11793,6 +13576,12 @@ This endpoint supports (and encourages!) the use of [HTTP Range requests](https:
11793
13576
  const origin = `${this.id}-${meth}`;
11794
13577
  log.trace(origin);
11795
13578
 
13579
+ if (this.suspended && this.suspendMode === 'error') {
13580
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
13581
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
13582
+ return callback(null, errorObj);
13583
+ }
13584
+
11796
13585
  /* HERE IS WHERE YOU VALIDATE DATA */
11797
13586
  if (username === undefined || username === null || username === '') {
11798
13587
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -11868,6 +13657,12 @@ This endpoint supports (and encourages!) the use of [HTTP Range requests](https:
11868
13657
  const origin = `${this.id}-${meth}`;
11869
13658
  log.trace(origin);
11870
13659
 
13660
+ if (this.suspended && this.suspendMode === 'error') {
13661
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
13662
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
13663
+ return callback(null, errorObj);
13664
+ }
13665
+
11871
13666
  /* HERE IS WHERE YOU VALIDATE DATA */
11872
13667
  if (username === undefined || username === null || username === '') {
11873
13668
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -11951,6 +13746,12 @@ curly-braces (`{}`))
11951
13746
  const origin = `${this.id}-${meth}`;
11952
13747
  log.trace(origin);
11953
13748
 
13749
+ if (this.suspended && this.suspendMode === 'error') {
13750
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
13751
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
13752
+ return callback(null, errorObj);
13753
+ }
13754
+
11954
13755
  /* HERE IS WHERE YOU VALIDATE DATA */
11955
13756
  if (username === undefined || username === null || username === '') {
11956
13757
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -12043,6 +13844,12 @@ curly-braces (`{}`))
12043
13844
  const origin = `${this.id}-${meth}`;
12044
13845
  log.trace(origin);
12045
13846
 
13847
+ if (this.suspended && this.suspendMode === 'error') {
13848
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
13849
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
13850
+ return callback(null, errorObj);
13851
+ }
13852
+
12046
13853
  /* HERE IS WHERE YOU VALIDATE DATA */
12047
13854
  if (username === undefined || username === null || username === '') {
12048
13855
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -12123,6 +13930,12 @@ curly-braces (`{}`))
12123
13930
  const origin = `${this.id}-${meth}`;
12124
13931
  log.trace(origin);
12125
13932
 
13933
+ if (this.suspended && this.suspendMode === 'error') {
13934
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
13935
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
13936
+ return callback(null, errorObj);
13937
+ }
13938
+
12126
13939
  /* HERE IS WHERE YOU VALIDATE DATA */
12127
13940
  if (username === undefined || username === null || username === '') {
12128
13941
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -12208,6 +14021,12 @@ To limit the set of returned snippets, apply the
12208
14021
  const origin = `${this.id}-${meth}`;
12209
14022
  log.trace(origin);
12210
14023
 
14024
+ if (this.suspended && this.suspendMode === 'error') {
14025
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
14026
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
14027
+ return callback(null, errorObj);
14028
+ }
14029
+
12211
14030
  /* HERE IS WHERE YOU VALIDATE DATA */
12212
14031
 
12213
14032
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
@@ -12279,6 +14098,12 @@ and `multipar...(description truncated)
12279
14098
  const origin = `${this.id}-${meth}`;
12280
14099
  log.trace(origin);
12281
14100
 
14101
+ if (this.suspended && this.suspendMode === 'error') {
14102
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
14103
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
14104
+ return callback(null, errorObj);
14105
+ }
14106
+
12282
14107
  /* HERE IS WHERE YOU VALIDATE DATA */
12283
14108
  if (body === undefined || body === null || body === '') {
12284
14109
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['body'], null, null, null);
@@ -12350,6 +14175,12 @@ returned.
12350
14175
  const origin = `${this.id}-${meth}`;
12351
14176
  log.trace(origin);
12352
14177
 
14178
+ if (this.suspended && this.suspendMode === 'error') {
14179
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
14180
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
14181
+ return callback(null, errorObj);
14182
+ }
14183
+
12353
14184
  /* HERE IS WHERE YOU VALIDATE DATA */
12354
14185
  if (username === undefined || username === null || username === '') {
12355
14186
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -12420,6 +14251,12 @@ created under the account specified in the path parameter `{username}`.
12420
14251
  const origin = `${this.id}-${meth}`;
12421
14252
  log.trace(origin);
12422
14253
 
14254
+ if (this.suspended && this.suspendMode === 'error') {
14255
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
14256
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
14257
+ return callback(null, errorObj);
14258
+ }
14259
+
12423
14260
  /* HERE IS WHERE YOU VALIDATE DATA */
12424
14261
  if (username === undefined || username === null || username === '') {
12425
14262
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -12494,6 +14331,12 @@ created under the account specified in the path parameter `{username}`.
12494
14331
  const origin = `${this.id}-${meth}`;
12495
14332
  log.trace(origin);
12496
14333
 
14334
+ if (this.suspended && this.suspendMode === 'error') {
14335
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
14336
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
14337
+ return callback(null, errorObj);
14338
+ }
14339
+
12497
14340
  /* HERE IS WHERE YOU VALIDATE DATA */
12498
14341
  if (username === undefined || username === null || username === '') {
12499
14342
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -12580,6 +14423,12 @@ requests need t...(description truncated)
12580
14423
  const origin = `${this.id}-${meth}`;
12581
14424
  log.trace(origin);
12582
14425
 
14426
+ if (this.suspended && this.suspendMode === 'error') {
14427
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
14428
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
14429
+ return callback(null, errorObj);
14430
+ }
14431
+
12583
14432
  /* HERE IS WHERE YOU VALIDATE DATA */
12584
14433
  if (username === undefined || username === null || username === '') {
12585
14434
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -12663,6 +14512,12 @@ As in Git, explicit re...(description truncated)
12663
14512
  const origin = `${this.id}-${meth}`;
12664
14513
  log.trace(origin);
12665
14514
 
14515
+ if (this.suspended && this.suspendMode === 'error') {
14516
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
14517
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
14518
+ return callback(null, errorObj);
14519
+ }
14520
+
12666
14521
  /* HERE IS WHERE YOU VALIDATE DATA */
12667
14522
  if (username === undefined || username === null || username === '') {
12668
14523
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -12741,6 +14596,12 @@ the `sort` query parameter.
12741
14596
  const origin = `${this.id}-${meth}`;
12742
14597
  log.trace(origin);
12743
14598
 
14599
+ if (this.suspended && this.suspendMode === 'error') {
14600
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
14601
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
14602
+ return callback(null, errorObj);
14603
+ }
14604
+
12744
14605
  /* HERE IS WHERE YOU VALIDATE DATA */
12745
14606
  if (username === undefined || username === null || username === '') {
12746
14607
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -12818,6 +14679,12 @@ To create a threaded reply to an existing comment, include `parent.id`.
12818
14679
  const origin = `${this.id}-${meth}`;
12819
14680
  log.trace(origin);
12820
14681
 
14682
+ if (this.suspended && this.suspendMode === 'error') {
14683
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
14684
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
14685
+ return callback(null, errorObj);
14686
+ }
14687
+
12821
14688
  /* HERE IS WHERE YOU VALIDATE DATA */
12822
14689
  if (username === undefined || username === null || username === '') {
12823
14690
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -12899,6 +14766,12 @@ Comments can only be removed by their author.
12899
14766
  const origin = `${this.id}-${meth}`;
12900
14767
  log.trace(origin);
12901
14768
 
14769
+ if (this.suspended && this.suspendMode === 'error') {
14770
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
14771
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
14772
+ return callback(null, errorObj);
14773
+ }
14774
+
12902
14775
  /* HERE IS WHERE YOU VALIDATE DATA */
12903
14776
  if (username === undefined || username === null || username === '') {
12904
14777
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -12979,6 +14852,12 @@ Comments can only be removed by their author.
12979
14852
  const origin = `${this.id}-${meth}`;
12980
14853
  log.trace(origin);
12981
14854
 
14855
+ if (this.suspended && this.suspendMode === 'error') {
14856
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
14857
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
14858
+ return callback(null, errorObj);
14859
+ }
14860
+
12982
14861
  /* HERE IS WHERE YOU VALIDATE DATA */
12983
14862
  if (username === undefined || username === null || username === '') {
12984
14863
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -13060,6 +14939,12 @@ Comments can only be updated by their author.
13060
14939
  const origin = `${this.id}-${meth}`;
13061
14940
  log.trace(origin);
13062
14941
 
14942
+ if (this.suspended && this.suspendMode === 'error') {
14943
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
14944
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
14945
+ return callback(null, errorObj);
14946
+ }
14947
+
13063
14948
  /* HERE IS WHERE YOU VALIDATE DATA */
13064
14949
  if (username === undefined || username === null || username === '') {
13065
14950
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -13139,6 +15024,12 @@ Comments can only be updated by their author.
13139
15024
  const origin = `${this.id}-${meth}`;
13140
15025
  log.trace(origin);
13141
15026
 
15027
+ if (this.suspended && this.suspendMode === 'error') {
15028
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
15029
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
15030
+ return callback(null, errorObj);
15031
+ }
15032
+
13142
15033
  /* HERE IS WHERE YOU VALIDATE DATA */
13143
15034
  if (username === undefined || username === null || username === '') {
13144
15035
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -13214,6 +15105,12 @@ Comments can only be updated by their author.
13214
15105
  const origin = `${this.id}-${meth}`;
13215
15106
  log.trace(origin);
13216
15107
 
15108
+ if (this.suspended && this.suspendMode === 'error') {
15109
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
15110
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
15111
+ return callback(null, errorObj);
15112
+ }
15113
+
13217
15114
  /* HERE IS WHERE YOU VALIDATE DATA */
13218
15115
  if (username === undefined || username === null || username === '') {
13219
15116
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -13294,6 +15191,12 @@ to indicate success.
13294
15191
  const origin = `${this.id}-${meth}`;
13295
15192
  log.trace(origin);
13296
15193
 
15194
+ if (this.suspended && this.suspendMode === 'error') {
15195
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
15196
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
15197
+ return callback(null, errorObj);
15198
+ }
15199
+
13297
15200
  /* HERE IS WHERE YOU VALIDATE DATA */
13298
15201
  if (username === undefined || username === null || username === '') {
13299
15202
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -13371,6 +15274,12 @@ Hitting this endpoint anonymously always returns a 404.
13371
15274
  const origin = `${this.id}-${meth}`;
13372
15275
  log.trace(origin);
13373
15276
 
15277
+ if (this.suspended && this.suspendMode === 'error') {
15278
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
15279
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
15280
+ return callback(null, errorObj);
15281
+ }
15282
+
13374
15283
  /* HERE IS WHERE YOU VALIDATE DATA */
13375
15284
  if (username === undefined || username === null || username === '') {
13376
15285
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -13445,6 +15354,12 @@ Hitting this endpoint anonymously always returns a 404.
13445
15354
  const origin = `${this.id}-${meth}`;
13446
15355
  log.trace(origin);
13447
15356
 
15357
+ if (this.suspended && this.suspendMode === 'error') {
15358
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
15359
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
15360
+ return callback(null, errorObj);
15361
+ }
15362
+
13448
15363
  /* HERE IS WHERE YOU VALIDATE DATA */
13449
15364
  if (username === undefined || username === null || username === '') {
13450
15365
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -13519,6 +15434,12 @@ Hitting this endpoint anonymously always returns a 404.
13519
15434
  const origin = `${this.id}-${meth}`;
13520
15435
  log.trace(origin);
13521
15436
 
15437
+ if (this.suspended && this.suspendMode === 'error') {
15438
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
15439
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
15440
+ return callback(null, errorObj);
15441
+ }
15442
+
13522
15443
  /* HERE IS WHERE YOU VALIDATE DATA */
13523
15444
  if (username === undefined || username === null || username === '') {
13524
15445
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -13599,6 +15520,12 @@ are being made to it, use `DELETE /snippets/{encoded_id}` instead.
13599
15520
  const origin = `${this.id}-${meth}`;
13600
15521
  log.trace(origin);
13601
15522
 
15523
+ if (this.suspended && this.suspendMode === 'error') {
15524
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
15525
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
15526
+ return callback(null, errorObj);
15527
+ }
15528
+
13602
15529
  /* HERE IS WHERE YOU VALIDATE DATA */
13603
15530
  if (username === undefined || username === null || username === '') {
13604
15531
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -13685,6 +15612,12 @@ Other than that, the two endpoints are identical in behavior.
13685
15612
  const origin = `${this.id}-${meth}`;
13686
15613
  log.trace(origin);
13687
15614
 
15615
+ if (this.suspended && this.suspendMode === 'error') {
15616
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
15617
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
15618
+ return callback(null, errorObj);
15619
+ }
15620
+
13688
15621
  /* HERE IS WHERE YOU VALIDATE DATA */
13689
15622
  if (username === undefined || username === null || username === '') {
13690
15623
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -13773,6 +15706,12 @@ This can be considered a so...(description truncated)
13773
15706
  const origin = `${this.id}-${meth}`;
13774
15707
  log.trace(origin);
13775
15708
 
15709
+ if (this.suspended && this.suspendMode === 'error') {
15710
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
15711
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
15712
+ return callback(null, errorObj);
15713
+ }
15714
+
13776
15715
  /* HERE IS WHERE YOU VALIDATE DATA */
13777
15716
  if (username === undefined || username === null || username === '') {
13778
15717
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -13860,6 +15799,12 @@ the content type.
13860
15799
  const origin = `${this.id}-${meth}`;
13861
15800
  log.trace(origin);
13862
15801
 
15802
+ if (this.suspended && this.suspendMode === 'error') {
15803
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
15804
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
15805
+ return callback(null, errorObj);
15806
+ }
15807
+
13863
15808
  /* HERE IS WHERE YOU VALIDATE DATA */
13864
15809
  if (username === undefined || username === null || username === '') {
13865
15810
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -13954,6 +15899,12 @@ The differences between a diff and a patch are:
13954
15899
  const origin = `${this.id}-${meth}`;
13955
15900
  log.trace(origin);
13956
15901
 
15902
+ if (this.suspended && this.suspendMode === 'error') {
15903
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
15904
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
15905
+ return callback(null, errorObj);
15906
+ }
15907
+
13957
15908
  /* HERE IS WHERE YOU VALIDATE DATA */
13958
15909
  if (username === undefined || username === null || username === '') {
13959
15910
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -14043,6 +15994,12 @@ The differences between a diff and a patch are:
14043
15994
  const origin = `${this.id}-${meth}`;
14044
15995
  log.trace(origin);
14045
15996
 
15997
+ if (this.suspended && this.suspendMode === 'error') {
15998
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
15999
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
16000
+ return callback(null, errorObj);
16001
+ }
16002
+
14046
16003
  /* HERE IS WHERE YOU VALIDATE DATA */
14047
16004
  if (username === undefined || username === null || username === '') {
14048
16005
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -14122,6 +16079,12 @@ the team or the `UUID` of the team (surrounded by curly-braces (`{}`)).
14122
16079
  const origin = `${this.id}-${meth}`;
14123
16080
  log.trace(origin);
14124
16081
 
16082
+ if (this.suspended && this.suspendMode === 'error') {
16083
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
16084
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
16085
+ return callback(null, errorObj);
16086
+ }
16087
+
14125
16088
  /* HERE IS WHERE YOU VALIDATE DATA */
14126
16089
  if (owner === undefined || owner === null || owner === '') {
14127
16090
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['owner'], null, null, null);
@@ -14210,6 +16173,12 @@ the team or the `UUID` of the team (surrounded by curly-braces (`{}`)).
14210
16173
  const origin = `${this.id}-${meth}`;
14211
16174
  log.trace(origin);
14212
16175
 
16176
+ if (this.suspended && this.suspendMode === 'error') {
16177
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
16178
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
16179
+ return callback(null, errorObj);
16180
+ }
16181
+
14213
16182
  /* HERE IS WHERE YOU VALIDATE DATA */
14214
16183
  if (owner === undefined || owner === null || owner === '') {
14215
16184
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['owner'], null, null, null);
@@ -14286,6 +16255,12 @@ to the project or the `UUID` (surrounded by curly-braces (`{}`)).
14286
16255
  const origin = `${this.id}-${meth}`;
14287
16256
  log.trace(origin);
14288
16257
 
16258
+ if (this.suspended && this.suspendMode === 'error') {
16259
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
16260
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
16261
+ return callback(null, errorObj);
16262
+ }
16263
+
14289
16264
  /* HERE IS WHERE YOU VALIDATE DATA */
14290
16265
  if (owner === undefined || owner === null || owner === '') {
14291
16266
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['owner'], null, null, null);
@@ -14362,6 +16337,12 @@ to the project or the `UUID` (surrounded by curly-braces (`{}`)).
14362
16337
  const origin = `${this.id}-${meth}`;
14363
16338
  log.trace(origin);
14364
16339
 
16340
+ if (this.suspended && this.suspendMode === 'error') {
16341
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
16342
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
16343
+ return callback(null, errorObj);
16344
+ }
16345
+
14365
16346
  /* HERE IS WHERE YOU VALIDATE DATA */
14366
16347
  if (owner === undefined || owner === null || owner === '') {
14367
16348
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['owner'], null, null, null);
@@ -14450,6 +16431,12 @@ to the project or the `UUID` (surrounded by curly-braces (`{}`)).
14450
16431
  const origin = `${this.id}-${meth}`;
14451
16432
  log.trace(origin);
14452
16433
 
16434
+ if (this.suspended && this.suspendMode === 'error') {
16435
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'AD.600', [], null, null, null);
16436
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
16437
+ return callback(null, errorObj);
16438
+ }
16439
+
14453
16440
  /* HERE IS WHERE YOU VALIDATE DATA */
14454
16441
  if (owner === undefined || owner === null || owner === '') {
14455
16442
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['owner'], null, null, null);