@itentialopensource/adapter-bitbucket 0.3.3 → 0.3.6

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.
package/adapter.js CHANGED
@@ -81,6 +81,24 @@ class Bitbucket extends AdapterBaseCl {
81
81
  super.healthCheck(newReq, callback);
82
82
  }
83
83
 
84
+ /**
85
+ * @getWorkflowFunctions
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
+
84
102
  /**
85
103
  * updateAdapterConfiguration is used to update any of the adapter configuration files. This
86
104
  * allows customers to make changes to adapter configuration without having to be on the
@@ -95,33 +113,159 @@ class Bitbucket extends AdapterBaseCl {
95
113
  * @param {Callback} callback - The results of the call
96
114
  */
97
115
  updateAdapterConfiguration(configFile, changes, entity, type, action, callback) {
116
+ const origin = `${this.id}-adapter-updateAdapterConfiguration`;
117
+ log.trace(origin);
98
118
  super.updateAdapterConfiguration(configFile, changes, entity, type, action, callback);
99
119
  }
100
120
 
101
121
  /**
102
- * @callback healthCallback
103
- * @param {Object} result - the result of the get request (contains an id and a status)
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
104
127
  */
128
+ findPath(apiPath, callback) {
129
+ const origin = `${this.id}-adapter-findPath`;
130
+ log.trace(origin);
131
+ super.findPath(apiPath, callback);
132
+ }
133
+
105
134
  /**
106
- * @callback getCallback
107
- * @param {Object} result - the result of the get request (entity/ies)
108
- * @param {String} error - any error that occurred
109
- */
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
+
110
151
  /**
111
- * @callback createCallback
112
- * @param {Object} item - the newly created entity
113
- * @param {String} error - any error that occurred
114
- */
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
+
115
168
  /**
116
- * @callback updateCallback
117
- * @param {String} status - the status of the update action
118
- * @param {String} error - any error that occurred
119
- */
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
+
120
180
  /**
121
- * @callback deleteCallback
122
- * @param {String} status - the status of the delete action
123
- * @param {String} error - any error that occurred
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
124
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
+ }
125
269
 
126
270
  /**
127
271
  * @summary Determines if this adapter supports the specific entity
@@ -292,6 +436,591 @@ class Bitbucket extends AdapterBaseCl {
292
436
  }
293
437
  }
294
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
+
295
1024
  /**
296
1025
  * @summary function deleteAddon
297
1026
  *
@@ -304,6 +1033,12 @@ class Bitbucket extends AdapterBaseCl {
304
1033
  const origin = `${this.id}-${meth}`;
305
1034
  log.trace(origin);
306
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
+
307
1042
  /* HERE IS WHERE YOU VALIDATE DATA */
308
1043
 
309
1044
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
@@ -348,6 +1083,12 @@ class Bitbucket extends AdapterBaseCl {
348
1083
  const origin = `${this.id}-${meth}`;
349
1084
  log.trace(origin);
350
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
+
351
1092
  /* HERE IS WHERE YOU VALIDATE DATA */
352
1093
 
353
1094
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
@@ -392,6 +1133,12 @@ class Bitbucket extends AdapterBaseCl {
392
1133
  const origin = `${this.id}-${meth}`;
393
1134
  log.trace(origin);
394
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
+
395
1142
  /* HERE IS WHERE YOU VALIDATE DATA */
396
1143
 
397
1144
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
@@ -437,6 +1184,12 @@ class Bitbucket extends AdapterBaseCl {
437
1184
  const origin = `${this.id}-${meth}`;
438
1185
  log.trace(origin);
439
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
+
440
1193
  /* HERE IS WHERE YOU VALIDATE DATA */
441
1194
  if (linkerKey === undefined || linkerKey === null || linkerKey === '') {
442
1195
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['linkerKey'], null, null, null);
@@ -505,6 +1258,12 @@ class Bitbucket extends AdapterBaseCl {
505
1258
  const origin = `${this.id}-${meth}`;
506
1259
  log.trace(origin);
507
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
+
508
1267
  /* HERE IS WHERE YOU VALIDATE DATA */
509
1268
  if (linkerKey === undefined || linkerKey === null || linkerKey === '') {
510
1269
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['linkerKey'], null, null, null);
@@ -573,6 +1332,12 @@ class Bitbucket extends AdapterBaseCl {
573
1332
  const origin = `${this.id}-${meth}`;
574
1333
  log.trace(origin);
575
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
+
576
1341
  /* HERE IS WHERE YOU VALIDATE DATA */
577
1342
  if (linkerKey === undefined || linkerKey === null || linkerKey === '') {
578
1343
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['linkerKey'], null, null, null);
@@ -641,6 +1406,12 @@ class Bitbucket extends AdapterBaseCl {
641
1406
  const origin = `${this.id}-${meth}`;
642
1407
  log.trace(origin);
643
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
+
644
1415
  /* HERE IS WHERE YOU VALIDATE DATA */
645
1416
  if (linkerKey === undefined || linkerKey === null || linkerKey === '') {
646
1417
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['linkerKey'], null, null, null);
@@ -709,6 +1480,12 @@ class Bitbucket extends AdapterBaseCl {
709
1480
  const origin = `${this.id}-${meth}`;
710
1481
  log.trace(origin);
711
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
+
712
1489
  /* HERE IS WHERE YOU VALIDATE DATA */
713
1490
  if (linkerKey === undefined || linkerKey === null || linkerKey === '') {
714
1491
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['linkerKey'], null, null, null);
@@ -777,6 +1554,12 @@ class Bitbucket extends AdapterBaseCl {
777
1554
  const origin = `${this.id}-${meth}`;
778
1555
  log.trace(origin);
779
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
+
780
1563
  /* HERE IS WHERE YOU VALIDATE DATA */
781
1564
  if (linkerKey === undefined || linkerKey === null || linkerKey === '') {
782
1565
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['linkerKey'], null, null, null);
@@ -845,6 +1628,12 @@ class Bitbucket extends AdapterBaseCl {
845
1628
  const origin = `${this.id}-${meth}`;
846
1629
  log.trace(origin);
847
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
+
848
1637
  /* HERE IS WHERE YOU VALIDATE DATA */
849
1638
  if (linkerKey === undefined || linkerKey === null || linkerKey === '') {
850
1639
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['linkerKey'], null, null, null);
@@ -926,6 +1715,12 @@ $ curl https://api.bitbucket.org/2.0/hook_events
926
1715
  const origin = `${this.id}-${meth}`;
927
1716
  log.trace(origin);
928
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
+
929
1724
  /* HERE IS WHERE YOU VALIDATE DATA */
930
1725
 
931
1726
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
@@ -986,6 +1781,12 @@ $ curl https://api.bitbucket.org/2.0/hook_events/team
986
1781
  const origin = `${this.id}-${meth}`;
987
1782
  log.trace(origin);
988
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
+
989
1790
  /* HERE IS WHERE YOU VALIDATE DATA */
990
1791
  if (subjectType === undefined || subjectType === null || subjectType === '') {
991
1792
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['subjectType'], null, null, null);
@@ -1055,6 +1856,12 @@ $ curl https://api.bitbucket.org/2.0/hook_events/team
1055
1856
  const origin = `${this.id}-${meth}`;
1056
1857
  log.trace(origin);
1057
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
+
1058
1865
  /* HERE IS WHERE YOU VALIDATE DATA */
1059
1866
  if (username === undefined || username === null || username === '') {
1060
1867
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -1144,6 +1951,12 @@ Note that this call requires the webhook scope, as well as any sco...(descriptio
1144
1951
  const origin = `${this.id}-${meth}`;
1145
1952
  log.trace(origin);
1146
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
+
1147
1960
  /* HERE IS WHERE YOU VALIDATE DATA */
1148
1961
  if (username === undefined || username === null || username === '') {
1149
1962
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -1220,6 +2033,12 @@ repository.
1220
2033
  const origin = `${this.id}-${meth}`;
1221
2034
  log.trace(origin);
1222
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
+
1223
2042
  /* HERE IS WHERE YOU VALIDATE DATA */
1224
2043
  if (username === undefined || username === null || username === '') {
1225
2044
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -1301,6 +2120,12 @@ repository.
1301
2120
  const origin = `${this.id}-${meth}`;
1302
2121
  log.trace(origin);
1303
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
+
1304
2129
  /* HERE IS WHERE YOU VALIDATE DATA */
1305
2130
  if (username === undefined || username === null || username === '') {
1306
2131
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -1401,6 +2226,12 @@ surrounded by curly-braces, for example: `{repository UUID}`.
1401
2226
  const origin = `${this.id}-${meth}`;
1402
2227
  log.trace(origin);
1403
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
+
1404
2235
  /* HERE IS WHERE YOU VALIDATE DATA */
1405
2236
  if (username === undefined || username === null || username === '') {
1406
2237
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -1473,6 +2304,107 @@ surrounded by curly-braces, for example: `{repository UUID}`.
1473
2304
  }
1474
2305
  }
1475
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
+
1476
2408
  /**
1477
2409
  * @summary Updates the specified webhook subscription.
1478
2410
  The following properties can be mutated:
@@ -1493,6 +2425,12 @@ The following properties can be mutated:
1493
2425
  const origin = `${this.id}-${meth}`;
1494
2426
  log.trace(origin);
1495
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
+
1496
2434
  /* HERE IS WHERE YOU VALIDATE DATA */
1497
2435
  if (username === undefined || username === null || username === '') {
1498
2436
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -1575,6 +2513,12 @@ after this [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601)
1575
2513
  const origin = `${this.id}-${meth}`;
1576
2514
  log.trace(origin);
1577
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
+
1578
2522
  /* HERE IS WHERE YOU VALIDATE DATA */
1579
2523
 
1580
2524
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
@@ -1649,6 +2593,12 @@ surrounded by curly-braces, for example: `{user UUID}`.
1649
2593
  const origin = `${this.id}-${meth}`;
1650
2594
  log.trace(origin);
1651
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
+
1652
2602
  /* HERE IS WHERE YOU VALIDATE DATA */
1653
2603
  if (username === undefined || username === null || username === '') {
1654
2604
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -1721,6 +2671,12 @@ surrounded by curly-braces, for example: `{repository UUID}`.
1721
2671
  const origin = `${this.id}-${meth}`;
1722
2672
  log.trace(origin);
1723
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
+
1724
2680
  /* HERE IS WHERE YOU VALIDATE DATA */
1725
2681
  if (username === undefined || username === null || username === '') {
1726
2682
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -1797,6 +2753,12 @@ surrounded by curly-braces, for example: `{repository UUID}`.
1797
2753
  const origin = `${this.id}-${meth}`;
1798
2754
  log.trace(origin);
1799
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
+
1800
2762
  /* HERE IS WHERE YOU VALIDATE DATA */
1801
2763
  if (username === undefined || username === null || username === '') {
1802
2764
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -1890,6 +2852,12 @@ surrounded by curly-braces, for example: `{repository UUID}`.
1890
2852
  const origin = `${this.id}-${meth}`;
1891
2853
  log.trace(origin);
1892
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
+
1893
2861
  /* HERE IS WHERE YOU VALIDATE DATA */
1894
2862
  if (username === undefined || username === null || username === '') {
1895
2863
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -1978,6 +2946,12 @@ URL implies them.
1978
2946
  const origin = `${this.id}-${meth}`;
1979
2947
  log.trace(origin);
1980
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
+
1981
2955
  /* HERE IS WHERE YOU VALIDATE DATA */
1982
2956
  if (username === undefined || username === null || username === '') {
1983
2957
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -2053,6 +3027,12 @@ URL implies them.
2053
3027
  const origin = `${this.id}-${meth}`;
2054
3028
  log.trace(origin);
2055
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
+
2056
3036
  /* HERE IS WHERE YOU VALIDATE DATA */
2057
3037
  if (username === undefined || username === null || username === '') {
2058
3038
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -2141,6 +3121,12 @@ For example, one could ...(description truncated)
2141
3121
  const origin = `${this.id}-${meth}`;
2142
3122
  log.trace(origin);
2143
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
+
2144
3130
  /* HERE IS WHERE YOU VALIDATE DATA */
2145
3131
  if (username === undefined || username === null || username === '') {
2146
3132
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -2222,6 +3208,12 @@ For example, one could ...(description truncated)
2222
3208
  const origin = `${this.id}-${meth}`;
2223
3209
  log.trace(origin);
2224
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
+
2225
3217
  /* HERE IS WHERE YOU VALIDATE DATA */
2226
3218
  if (username === undefined || username === null || username === '') {
2227
3219
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -2318,6 +3310,12 @@ The `key` cannot be changed.
2318
3310
  const origin = `${this.id}-${meth}`;
2319
3311
  log.trace(origin);
2320
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
+
2321
3319
  /* HERE IS WHERE YOU VALIDATE DATA */
2322
3320
  if (username === undefined || username === null || username === '') {
2323
3321
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -2403,6 +3401,12 @@ repository.
2403
3401
  const origin = `${this.id}-${meth}`;
2404
3402
  log.trace(origin);
2405
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
+
2406
3410
  /* HERE IS WHERE YOU VALIDATE DATA */
2407
3411
  if (username === undefined || username === null || username === '') {
2408
3412
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -2479,6 +3483,12 @@ request.
2479
3483
  const origin = `${this.id}-${meth}`;
2480
3484
  log.trace(origin);
2481
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
+
2482
3492
  /* HERE IS WHERE YOU VALIDATE DATA */
2483
3493
  if (username === undefined || username === null || username === '') {
2484
3494
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -2559,6 +3569,12 @@ repository.
2559
3569
  const origin = `${this.id}-${meth}`;
2560
3570
  log.trace(origin);
2561
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
+
2562
3578
  /* HERE IS WHERE YOU VALIDATE DATA */
2563
3579
  if (username === undefined || username === null || username === '') {
2564
3580
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -2632,6 +3648,12 @@ repository.
2632
3648
  const origin = `${this.id}-${meth}`;
2633
3649
  log.trace(origin);
2634
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
+
2635
3657
  /* HERE IS WHERE YOU VALIDATE DATA */
2636
3658
  if (username === undefined || username === null || username === '') {
2637
3659
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -2703,6 +3725,12 @@ Note that only admins can install webhooks on teams.
2703
3725
  const origin = `${this.id}-${meth}`;
2704
3726
  log.trace(origin);
2705
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
+
2706
3734
  /* HERE IS WHERE YOU VALIDATE DATA */
2707
3735
  if (username === undefined || username === null || username === '') {
2708
3736
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -2773,6 +3801,12 @@ account.
2773
3801
  const origin = `${this.id}-${meth}`;
2774
3802
  log.trace(origin);
2775
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
+
2776
3810
  /* HERE IS WHERE YOU VALIDATE DATA */
2777
3811
  if (username === undefined || username === null || username === '') {
2778
3812
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -2848,6 +3882,12 @@ team account.
2848
3882
  const origin = `${this.id}-${meth}`;
2849
3883
  log.trace(origin);
2850
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
+
2851
3891
  /* HERE IS WHERE YOU VALIDATE DATA */
2852
3892
  if (username === undefined || username === null || username === '') {
2853
3893
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -2927,6 +3967,12 @@ The following properties can be mutated:
2927
3967
  const origin = `${this.id}-${meth}`;
2928
3968
  log.trace(origin);
2929
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
+
2930
3976
  /* HERE IS WHERE YOU VALIDATE DATA */
2931
3977
  if (username === undefined || username === null || username === '') {
2932
3978
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -3003,6 +4049,12 @@ with.
3003
4049
  const origin = `${this.id}-${meth}`;
3004
4050
  log.trace(origin);
3005
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
+
3006
4058
  /* HERE IS WHERE YOU VALIDATE DATA */
3007
4059
 
3008
4060
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
@@ -3068,6 +4120,12 @@ If the team's profile is private, `location`, `website` and
3068
4120
  const origin = `${this.id}-${meth}`;
3069
4121
  log.trace(origin);
3070
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
+
3071
4129
  /* HERE IS WHERE YOU VALIDATE DATA */
3072
4130
  if (username === undefined || username === null || username === '') {
3073
4131
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -3136,6 +4194,12 @@ If the team's profile is private, `location`, `website` and
3136
4194
  const origin = `${this.id}-${meth}`;
3137
4195
  log.trace(origin);
3138
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
+
3139
4203
  /* HERE IS WHERE YOU VALIDATE DATA */
3140
4204
  if (username === undefined || username === null || username === '') {
3141
4205
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -3204,6 +4268,12 @@ If the team's profile is private, `location`, `website` and
3204
4268
  const origin = `${this.id}-${meth}`;
3205
4269
  log.trace(origin);
3206
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
+
3207
4277
  /* HERE IS WHERE YOU VALIDATE DATA */
3208
4278
  if (username === undefined || username === null || username === '') {
3209
4279
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -3277,6 +4347,12 @@ Note that members using the "private profile" feature are not included.
3277
4347
  const origin = `${this.id}-${meth}`;
3278
4348
  log.trace(origin);
3279
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
+
3280
4356
  /* HERE IS WHERE YOU VALIDATE DATA */
3281
4357
  if (username === undefined || username === null || username === '') {
3282
4358
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -3345,6 +4421,12 @@ Note that members using the "private profile" feature are not included.
3345
4421
  const origin = `${this.id}-${meth}`;
3346
4422
  log.trace(origin);
3347
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
+
3348
4430
  /* HERE IS WHERE YOU VALIDATE DATA */
3349
4431
  if (username === undefined || username === null || username === '') {
3350
4432
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -3417,6 +4499,12 @@ of others.
3417
4499
  const origin = `${this.id}-${meth}`;
3418
4500
  log.trace(origin);
3419
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
+
3420
4508
  /* HERE IS WHERE YOU VALIDATE DATA */
3421
4509
  if (username === undefined || username === null || username === '') {
3422
4510
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -3487,6 +4575,12 @@ account.
3487
4575
  const origin = `${this.id}-${meth}`;
3488
4576
  log.trace(origin);
3489
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
+
3490
4584
  /* HERE IS WHERE YOU VALIDATE DATA */
3491
4585
  if (username === undefined || username === null || username === '') {
3492
4586
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -3562,6 +4656,12 @@ user account.
3562
4656
  const origin = `${this.id}-${meth}`;
3563
4657
  log.trace(origin);
3564
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
+
3565
4665
  /* HERE IS WHERE YOU VALIDATE DATA */
3566
4666
  if (username === undefined || username === null || username === '') {
3567
4667
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -3641,6 +4741,12 @@ The following properties can be mutated:
3641
4741
  const origin = `${this.id}-${meth}`;
3642
4742
  log.trace(origin);
3643
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
+
3644
4750
  /* HERE IS WHERE YOU VALIDATE DATA */
3645
4751
  if (username === undefined || username === null || username === '') {
3646
4752
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -3716,6 +4822,12 @@ access to.
3716
4822
  const origin = `${this.id}-${meth}`;
3717
4823
  log.trace(origin);
3718
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
+
3719
4831
  /* HERE IS WHERE YOU VALIDATE DATA */
3720
4832
  if (username === undefined || username === null || username === '') {
3721
4833
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -3786,6 +4898,12 @@ access to.
3786
4898
  const origin = `${this.id}-${meth}`;
3787
4899
  log.trace(origin);
3788
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
+
3789
4907
  /* HERE IS WHERE YOU VALIDATE DATA */
3790
4908
  if (username === undefined || username === null || username === '') {
3791
4909
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -3853,6 +4971,12 @@ access to.
3853
4971
  const origin = `${this.id}-${meth}`;
3854
4972
  log.trace(origin);
3855
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
+
3856
4980
  /* HERE IS WHERE YOU VALIDATE DATA */
3857
4981
 
3858
4982
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
@@ -3898,6 +5022,12 @@ confirmed and unconfirmed.
3898
5022
  const origin = `${this.id}-${meth}`;
3899
5023
  log.trace(origin);
3900
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
+
3901
5031
  /* HERE IS WHERE YOU VALIDATE DATA */
3902
5032
 
3903
5033
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
@@ -3946,6 +5076,12 @@ whether it is the user's primary address or not.
3946
5076
  const origin = `${this.id}-${meth}`;
3947
5077
  log.trace(origin);
3948
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
+
3949
5085
  /* HERE IS WHERE YOU VALIDATE DATA */
3950
5086
  if (email === undefined || email === null || email === '') {
3951
5087
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['email'], null, null, null);
@@ -4016,6 +5152,12 @@ If the user's profile is private, `location`, `website` and
4016
5152
  const origin = `${this.id}-${meth}`;
4017
5153
  log.trace(origin);
4018
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
+
4019
5161
  /* HERE IS WHERE YOU VALIDATE DATA */
4020
5162
  if (username === undefined || username === null || username === '') {
4021
5163
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -4084,6 +5226,12 @@ If the user's profile is private, `location`, `website` and
4084
5226
  const origin = `${this.id}-${meth}`;
4085
5227
  log.trace(origin);
4086
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
+
4087
5235
  /* HERE IS WHERE YOU VALIDATE DATA */
4088
5236
  if (username === undefined || username === null || username === '') {
4089
5237
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -4152,6 +5300,12 @@ If the user's profile is private, `location`, `website` and
4152
5300
  const origin = `${this.id}-${meth}`;
4153
5301
  log.trace(origin);
4154
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
+
4155
5309
  /* HERE IS WHERE YOU VALIDATE DATA */
4156
5310
  if (username === undefined || username === null || username === '') {
4157
5311
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -4224,6 +5378,12 @@ If the user's profile is private, `location`, `website` and
4224
5378
  const origin = `${this.id}-${meth}`;
4225
5379
  log.trace(origin);
4226
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
+
4227
5387
  /* HERE IS WHERE YOU VALIDATE DATA */
4228
5388
  if (username === undefined || username === null || username === '') {
4229
5389
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -4309,6 +5469,12 @@ repository.
4309
5469
  const origin = `${this.id}-${meth}`;
4310
5470
  log.trace(origin);
4311
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
+
4312
5478
  /* HERE IS WHERE YOU VALIDATE DATA */
4313
5479
  if (username === undefined || username === null || username === '') {
4314
5480
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -4392,6 +5558,12 @@ Different kinds of branch restrictions have different requirements:
4392
5558
  const origin = `${this.id}-${meth}`;
4393
5559
  log.trace(origin);
4394
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
+
4395
5567
  /* HERE IS WHERE YOU VALIDATE DATA */
4396
5568
  if (username === undefined || username === null || username === '') {
4397
5569
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -4472,6 +5644,12 @@ Different kinds of branch restrictions have different requirements:
4472
5644
  const origin = `${this.id}-${meth}`;
4473
5645
  log.trace(origin);
4474
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
+
4475
5653
  /* HERE IS WHERE YOU VALIDATE DATA */
4476
5654
  if (username === undefined || username === null || username === '') {
4477
5655
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -4552,6 +5730,12 @@ Different kinds of branch restrictions have different requirements:
4552
5730
  const origin = `${this.id}-${meth}`;
4553
5731
  log.trace(origin);
4554
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
+
4555
5739
  /* HERE IS WHERE YOU VALIDATE DATA */
4556
5740
  if (username === undefined || username === null || username === '') {
4557
5741
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -4635,6 +5819,12 @@ See [`POST`](../../branch-restrictions#post) for details.
4635
5819
  const origin = `${this.id}-${meth}`;
4636
5820
  log.trace(origin);
4637
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
+
4638
5828
  /* HERE IS WHERE YOU VALIDATE DATA */
4639
5829
  if (username === undefined || username === null || username === '') {
4640
5830
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -4724,6 +5914,12 @@ commits.
4724
5914
  const origin = `${this.id}-${meth}`;
4725
5915
  log.trace(origin);
4726
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
+
4727
5923
  /* HERE IS WHERE YOU VALIDATE DATA */
4728
5924
  if (username === undefined || username === null || username === '') {
4729
5925
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -4808,6 +6004,12 @@ commits.
4808
6004
  const origin = `${this.id}-${meth}`;
4809
6005
  log.trace(origin);
4810
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
+
4811
6013
  /* HERE IS WHERE YOU VALIDATE DATA */
4812
6014
  if (username === undefined || username === null || username === '') {
4813
6015
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -4888,6 +6090,12 @@ commits.
4888
6090
  const origin = `${this.id}-${meth}`;
4889
6091
  log.trace(origin);
4890
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
+
4891
6099
  /* HERE IS WHERE YOU VALIDATE DATA */
4892
6100
  if (username === undefined || username === null || username === '') {
4893
6101
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -4971,6 +6179,12 @@ the `sort` query parameter.
4971
6179
  const origin = `${this.id}-${meth}`;
4972
6180
  log.trace(origin);
4973
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
+
4974
6188
  /* HERE IS WHERE YOU VALIDATE DATA */
4975
6189
  if (username === undefined || username === null || username === '') {
4976
6190
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -5052,6 +6266,12 @@ the `sort` query parameter.
5052
6266
  const origin = `${this.id}-${meth}`;
5053
6267
  log.trace(origin);
5054
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
+
5055
6275
  /* HERE IS WHERE YOU VALIDATE DATA */
5056
6276
  if (username === undefined || username === null || username === '') {
5057
6277
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -5144,6 +6364,12 @@ Returns all commits on rev `master` (simil...(description truncated)
5144
6364
  const origin = `${this.id}-${meth}`;
5145
6365
  log.trace(origin);
5146
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
+
5147
6373
  /* HERE IS WHERE YOU VALIDATE DATA */
5148
6374
  if (username === undefined || username === null || username === '') {
5149
6375
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -5221,6 +6447,12 @@ parameters in the request body to avoid URL length issues.
5221
6447
  const origin = `${this.id}-${meth}`;
5222
6448
  log.trace(origin);
5223
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
+
5224
6456
  /* HERE IS WHERE YOU VALIDATE DATA */
5225
6457
  if (username === undefined || username === null || username === '') {
5226
6458
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -5304,6 +6536,12 @@ Returns all commits on rev `master` (simil...(description truncated)
5304
6536
  const origin = `${this.id}-${meth}`;
5305
6537
  log.trace(origin);
5306
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
+
5307
6545
  /* HERE IS WHERE YOU VALIDATE DATA */
5308
6546
  if (username === undefined || username === null || username === '') {
5309
6547
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -5387,6 +6625,12 @@ parameters in the request body to avoid URL length issues.
5387
6625
  const origin = `${this.id}-${meth}`;
5388
6626
  log.trace(origin);
5389
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
+
5390
6634
  /* HERE IS WHERE YOU VALIDATE DATA */
5391
6635
  if (username === undefined || username === null || username === '') {
5392
6636
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -5477,6 +6721,12 @@ This is equivalent to merging the left branch into the right ...(description tru
5477
6721
  const origin = `${this.id}-${meth}`;
5478
6722
  log.trace(origin);
5479
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
+
5480
6730
  /* HERE IS WHERE YOU VALIDATE DATA */
5481
6731
  if (username === undefined || username === null || username === '') {
5482
6732
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -5565,6 +6815,12 @@ While similar ...(description truncated)
5565
6815
  const origin = `${this.id}-${meth}`;
5566
6816
  log.trace(origin);
5567
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
+
5568
6824
  /* HERE IS WHERE YOU VALIDATE DATA */
5569
6825
  if (username === undefined || username === null || username === '') {
5570
6826
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -5646,6 +6902,12 @@ tracker enabled.
5646
6902
  const origin = `${this.id}-${meth}`;
5647
6903
  log.trace(origin);
5648
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
+
5649
6911
  /* HERE IS WHERE YOU VALIDATE DATA */
5650
6912
  if (username === undefined || username === null || username === '') {
5651
6913
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -5721,6 +6983,12 @@ tracker enabled.
5721
6983
  const origin = `${this.id}-${meth}`;
5722
6984
  log.trace(origin);
5723
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
+
5724
6992
  /* HERE IS WHERE YOU VALIDATE DATA */
5725
6993
  if (username === undefined || username === null || username === '') {
5726
6994
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -5800,6 +7068,12 @@ tracker enabled.
5800
7068
  const origin = `${this.id}-${meth}`;
5801
7069
  log.trace(origin);
5802
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
+
5803
7077
  /* HERE IS WHERE YOU VALIDATE DATA */
5804
7078
  if (username === undefined || username === null || username === '') {
5805
7079
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -5879,6 +7153,12 @@ The authenticated user is used for the issue's `reporter` field.
5879
7153
  const origin = `${this.id}-${meth}`;
5880
7154
  log.trace(origin);
5881
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
+
5882
7162
  /* HERE IS WHERE YOU VALIDATE DATA */
5883
7163
  if (username === undefined || username === null || username === '') {
5884
7164
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -5960,6 +7240,12 @@ repository.
5960
7240
  const origin = `${this.id}-${meth}`;
5961
7241
  log.trace(origin);
5962
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
+
5963
7249
  /* HERE IS WHERE YOU VALIDATE DATA */
5964
7250
  if (username === undefined || username === null || username === '') {
5965
7251
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -6040,6 +7326,12 @@ repository.
6040
7326
  const origin = `${this.id}-${meth}`;
6041
7327
  log.trace(origin);
6042
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
+
6043
7335
  /* HERE IS WHERE YOU VALIDATE DATA */
6044
7336
  if (username === undefined || username === null || username === '') {
6045
7337
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -6123,6 +7415,12 @@ The files are always ordered by their upload date.
6123
7415
  const origin = `${this.id}-${meth}`;
6124
7416
  log.trace(origin);
6125
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
+
6126
7424
  /* HERE IS WHERE YOU VALIDATE DATA */
6127
7425
  if (username === undefined || username === null || username === '') {
6128
7426
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -6207,6 +7505,12 @@ then the existing file will be replaced.
6207
7505
  const origin = `${this.id}-${meth}`;
6208
7506
  log.trace(origin);
6209
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
+
6210
7514
  /* HERE IS WHERE YOU VALIDATE DATA */
6211
7515
  if (username === undefined || username === null || username === '') {
6212
7516
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -6288,6 +7592,12 @@ then the existing file will be replaced.
6288
7592
  const origin = `${this.id}-${meth}`;
6289
7593
  log.trace(origin);
6290
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
+
6291
7601
  /* HERE IS WHERE YOU VALIDATE DATA */
6292
7602
  if (username === undefined || username === null || username === '') {
6293
7603
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -6379,6 +7689,12 @@ As a result, the link should not be persisted, stored, or shared.
6379
7689
  const origin = `${this.id}-${meth}`;
6380
7690
  log.trace(origin);
6381
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
+
6382
7698
  /* HERE IS WHERE YOU VALIDATE DATA */
6383
7699
  if (username === undefined || username === null || username === '') {
6384
7700
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -6466,6 +7782,12 @@ the `sort` query parameter.
6466
7782
  const origin = `${this.id}-${meth}`;
6467
7783
  log.trace(origin);
6468
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
+
6469
7791
  /* HERE IS WHERE YOU VALIDATE DATA */
6470
7792
  if (username === undefined || username === null || username === '') {
6471
7793
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -6547,6 +7869,12 @@ the `sort` query parameter.
6547
7869
  const origin = `${this.id}-${meth}`;
6548
7870
  log.trace(origin);
6549
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
+
6550
7878
  /* HERE IS WHERE YOU VALIDATE DATA */
6551
7879
  if (username === undefined || username === null || username === '') {
6552
7880
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -6632,6 +7960,12 @@ the `sort` query parameter.
6632
7960
  const origin = `${this.id}-${meth}`;
6633
7961
  log.trace(origin);
6634
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
+
6635
7969
  /* HERE IS WHERE YOU VALIDATE DATA */
6636
7970
  if (username === undefined || username === null || username === '') {
6637
7971
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -6714,6 +8048,12 @@ implies they haven't.
6714
8048
  const origin = `${this.id}-${meth}`;
6715
8049
  log.trace(origin);
6716
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
+
6717
8057
  /* HERE IS WHERE YOU VALIDATE DATA */
6718
8058
  if (username === undefined || username === null || username === '') {
6719
8059
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -6796,6 +8136,12 @@ the operation was successful.
6796
8136
  const origin = `${this.id}-${meth}`;
6797
8137
  log.trace(origin);
6798
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
+
6799
8145
  /* HERE IS WHERE YOU VALIDATE DATA */
6800
8146
  if (username === undefined || username === null || username === '') {
6801
8147
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -6876,6 +8222,12 @@ the operation was successful.
6876
8222
  const origin = `${this.id}-${meth}`;
6877
8223
  log.trace(origin);
6878
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
+
6879
8231
  /* HERE IS WHERE YOU VALIDATE DATA */
6880
8232
  if (username === undefined || username === null || username === '') {
6881
8233
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -6957,6 +8309,12 @@ issue.
6957
8309
  const origin = `${this.id}-${meth}`;
6958
8310
  log.trace(origin);
6959
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
+
6960
8318
  /* HERE IS WHERE YOU VALIDATE DATA */
6961
8319
  if (username === undefined || username === null || username === '') {
6962
8320
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -7039,6 +8397,12 @@ indicates that the operation was successful.
7039
8397
  const origin = `${this.id}-${meth}`;
7040
8398
  log.trace(origin);
7041
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
+
7042
8406
  /* HERE IS WHERE YOU VALIDATE DATA */
7043
8407
  if (username === undefined || username === null || username === '') {
7044
8408
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -7120,6 +8484,12 @@ tracker enabled.
7120
8484
  const origin = `${this.id}-${meth}`;
7121
8485
  log.trace(origin);
7122
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
+
7123
8493
  /* HERE IS WHERE YOU VALIDATE DATA */
7124
8494
  if (username === undefined || username === null || username === '') {
7125
8495
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -7195,6 +8565,12 @@ tracker enabled.
7195
8565
  const origin = `${this.id}-${meth}`;
7196
8566
  log.trace(origin);
7197
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
+
7198
8574
  /* HERE IS WHERE YOU VALIDATE DATA */
7199
8575
  if (username === undefined || username === null || username === '') {
7200
8576
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -7276,6 +8652,12 @@ tracker enabled.
7276
8652
  const origin = `${this.id}-${meth}`;
7277
8653
  log.trace(origin);
7278
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
+
7279
8661
  /* HERE IS WHERE YOU VALIDATE DATA */
7280
8662
  if (username === undefined || username === null || username === '') {
7281
8663
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -7351,6 +8733,12 @@ tracker enabled.
7351
8733
  const origin = `${this.id}-${meth}`;
7352
8734
  log.trace(origin);
7353
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
+
7354
8742
  /* HERE IS WHERE YOU VALIDATE DATA */
7355
8743
  if (username === undefined || username === null || username === '') {
7356
8744
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -7432,6 +8820,12 @@ new pull request that is created.
7432
8820
  const origin = `${this.id}-${meth}`;
7433
8821
  log.trace(origin);
7434
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
+
7435
8829
  /* HERE IS WHERE YOU VALIDATE DATA */
7436
8830
  if (username === undefined || username === null || username === '') {
7437
8831
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -7507,6 +8901,12 @@ new pull request that is created.
7507
8901
  const origin = `${this.id}-${meth}`;
7508
8902
  log.trace(origin);
7509
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
+
7510
8910
  /* HERE IS WHERE YOU VALIDATE DATA */
7511
8911
  if (username === undefined || username === null || username === '') {
7512
8912
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -7590,6 +8990,12 @@ a default reviewer.
7590
8990
  const origin = `${this.id}-${meth}`;
7591
8991
  log.trace(origin);
7592
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
+
7593
8999
  /* HERE IS WHERE YOU VALIDATE DATA */
7594
9000
  if (username === undefined || username === null || username === '') {
7595
9001
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -7672,6 +9078,12 @@ This method is idempotent. Adding a user a second time has no effect.
7672
9078
  const origin = `${this.id}-${meth}`;
7673
9079
  log.trace(origin);
7674
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
+
7675
9087
  /* HERE IS WHERE YOU VALIDATE DATA */
7676
9088
  if (username === undefined || username === null || username === '') {
7677
9089
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -7760,6 +9172,12 @@ surrounded by curly-braces, for example: `{repository UUID}`.
7760
9172
  const origin = `${this.id}-${meth}`;
7761
9173
  log.trace(origin);
7762
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
+
7763
9181
  /* HERE IS WHERE YOU VALIDATE DATA */
7764
9182
  if (username === undefined || username === null || username === '') {
7765
9183
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -7838,6 +9256,12 @@ The request URL you POST to becomes the destination repository URL. For this rea
7838
9256
  const origin = `${this.id}-${meth}`;
7839
9257
  log.trace(origin);
7840
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
+
7841
9265
  /* HERE IS WHERE YOU VALIDATE DATA */
7842
9266
  if (username === undefined || username === null || username === '') {
7843
9267
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -7916,6 +9340,12 @@ surrounded by curly-braces, for example: `{repository UUID}`.
7916
9340
  const origin = `${this.id}-${meth}`;
7917
9341
  log.trace(origin);
7918
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
+
7919
9349
  /* HERE IS WHERE YOU VALIDATE DATA */
7920
9350
  if (username === undefined || username === null || username === '') {
7921
9351
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -7993,6 +9423,12 @@ surrounded by curly-braces, for example: `{repository UUID}`.
7993
9423
  const origin = `${this.id}-${meth}`;
7994
9424
  log.trace(origin);
7995
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
+
7996
9432
  /* HERE IS WHERE YOU VALIDATE DATA */
7997
9433
  if (username === undefined || username === null || username === '') {
7998
9434
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -8078,6 +9514,12 @@ surrounded by curly-braces, for example: `{repository UUID}`.
8078
9514
  const origin = `${this.id}-${meth}`;
8079
9515
  log.trace(origin);
8080
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
+
8081
9523
  /* HERE IS WHERE YOU VALIDATE DATA */
8082
9524
  if (username === undefined || username === null || username === '') {
8083
9525
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -8162,6 +9604,12 @@ surrounded by curly-braces, for example: `{repository UUID}`.
8162
9604
  const origin = `${this.id}-${meth}`;
8163
9605
  log.trace(origin);
8164
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
+
8165
9613
  /* HERE IS WHERE YOU VALIDATE DATA */
8166
9614
  if (username === undefined || username === null || username === '') {
8167
9615
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -8243,6 +9691,12 @@ request.
8243
9691
  const origin = `${this.id}-${meth}`;
8244
9692
  log.trace(origin);
8245
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
+
8246
9700
  /* HERE IS WHERE YOU VALIDATE DATA */
8247
9701
  if (username === undefined || username === null || username === '') {
8248
9702
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -8323,6 +9777,12 @@ request.
8323
9777
  const origin = `${this.id}-${meth}`;
8324
9778
  log.trace(origin);
8325
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
+
8326
9786
  /* HERE IS WHERE YOU VALIDATE DATA */
8327
9787
  if (username === undefined || username === null || username === '') {
8328
9788
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -8409,6 +9869,12 @@ details.
8409
9869
  const origin = `${this.id}-${meth}`;
8410
9870
  log.trace(origin);
8411
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
+
8412
9878
  /* HERE IS WHERE YOU VALIDATE DATA */
8413
9879
  if (username === undefined || username === null || username === '') {
8414
9880
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -8490,6 +9956,12 @@ details.
8490
9956
  const origin = `${this.id}-${meth}`;
8491
9957
  log.trace(origin);
8492
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
+
8493
9965
  /* HERE IS WHERE YOU VALIDATE DATA */
8494
9966
  if (username === undefined || username === null || username === '') {
8495
9967
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -8577,6 +10049,12 @@ branch when the pull requests gets accepted.
8577
10049
  const origin = `${this.id}-${meth}`;
8578
10050
  log.trace(origin);
8579
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
+
8580
10058
  /* HERE IS WHERE YOU VALIDATE DATA */
8581
10059
  if (username === undefined || username === null || username === '') {
8582
10060
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -8657,6 +10135,12 @@ branch when the pull requests gets accepted.
8657
10135
  const origin = `${this.id}-${meth}`;
8658
10136
  log.trace(origin);
8659
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
+
8660
10144
  /* HERE IS WHERE YOU VALIDATE DATA */
8661
10145
  if (username === undefined || username === null || username === '') {
8662
10146
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -8737,6 +10221,12 @@ branch when the pull requests gets accepted.
8737
10221
  const origin = `${this.id}-${meth}`;
8738
10222
  log.trace(origin);
8739
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
+
8740
10230
  /* HERE IS WHERE YOU VALIDATE DATA */
8741
10231
  if (username === undefined || username === null || username === '') {
8742
10232
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -8818,6 +10308,12 @@ branch when the pull requests gets accepted.
8818
10308
  const origin = `${this.id}-${meth}`;
8819
10309
  log.trace(origin);
8820
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
+
8821
10317
  /* HERE IS WHERE YOU VALIDATE DATA */
8822
10318
  if (username === undefined || username === null || username === '') {
8823
10319
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -8898,6 +10394,12 @@ branch when the pull requests gets accepted.
8898
10394
  const origin = `${this.id}-${meth}`;
8899
10395
  log.trace(origin);
8900
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
+
8901
10403
  /* HERE IS WHERE YOU VALIDATE DATA */
8902
10404
  if (username === undefined || username === null || username === '') {
8903
10405
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -8977,6 +10479,12 @@ branch when the pull requests gets accepted.
8977
10479
  const origin = `${this.id}-${meth}`;
8978
10480
  log.trace(origin);
8979
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
+
8980
10488
  /* HERE IS WHERE YOU VALIDATE DATA */
8981
10489
  if (username === undefined || username === null || username === '') {
8982
10490
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -9057,6 +10565,12 @@ then the existing file will be replaced.
9057
10565
  const origin = `${this.id}-${meth}`;
9058
10566
  log.trace(origin);
9059
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
+
9060
10574
  /* HERE IS WHERE YOU VALIDATE DATA */
9061
10575
  if (username === undefined || username === null || username === '') {
9062
10576
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -9132,6 +10646,12 @@ then the existing file will be replaced.
9132
10646
  const origin = `${this.id}-${meth}`;
9133
10647
  log.trace(origin);
9134
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
+
9135
10655
  /* HERE IS WHERE YOU VALIDATE DATA */
9136
10656
  if (username === undefined || username === null || username === '') {
9137
10657
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -9216,6 +10736,12 @@ metadata.
9216
10736
  const origin = `${this.id}-${meth}`;
9217
10737
  log.trace(origin);
9218
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
+
9219
10745
  /* HERE IS WHERE YOU VALIDATE DATA */
9220
10746
  if (username === undefined || username === null || username === '') {
9221
10747
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -9295,6 +10821,12 @@ metadata.
9295
10821
  const origin = `${this.id}-${meth}`;
9296
10822
  log.trace(origin);
9297
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
+
9298
10830
  /* HERE IS WHERE YOU VALIDATE DATA */
9299
10831
  if (username === undefined || username === null || username === '') {
9300
10832
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -9374,6 +10906,12 @@ The specified reference will be used to determine which pipeline definition from
9374
10906
  const origin = `${this.id}-${meth}`;
9375
10907
  log.trace(origin);
9376
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
+
9377
10915
  /* HERE IS WHERE YOU VALIDATE DATA */
9378
10916
  if (username === undefined || username === null || username === '') {
9379
10917
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -9454,6 +10992,12 @@ The specified reference will be used to determine which pipeline definition from
9454
10992
  const origin = `${this.id}-${meth}`;
9455
10993
  log.trace(origin);
9456
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
+
9457
11001
  /* HERE IS WHERE YOU VALIDATE DATA */
9458
11002
  if (username === undefined || username === null || username === '') {
9459
11003
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -9534,6 +11078,12 @@ The specified reference will be used to determine which pipeline definition from
9534
11078
  const origin = `${this.id}-${meth}`;
9535
11079
  log.trace(origin);
9536
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
+
9537
11087
  /* HERE IS WHERE YOU VALIDATE DATA */
9538
11088
  if (username === undefined || username === null || username === '') {
9539
11089
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -9615,6 +11165,12 @@ The specified reference will be used to determine which pipeline definition from
9615
11165
  const origin = `${this.id}-${meth}`;
9616
11166
  log.trace(origin);
9617
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
+
9618
11174
  /* HERE IS WHERE YOU VALIDATE DATA */
9619
11175
  if (username === undefined || username === null || username === '') {
9620
11176
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -9702,6 +11258,12 @@ This endpoint supports (and encourages!) the use of [HTTP Range requests](https:
9702
11258
  const origin = `${this.id}-${meth}`;
9703
11259
  log.trace(origin);
9704
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
+
9705
11267
  /* HERE IS WHERE YOU VALIDATE DATA */
9706
11268
  if (username === undefined || username === null || username === '') {
9707
11269
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -9787,6 +11349,12 @@ This endpoint supports (and encourages!) the use of [HTTP Range requests](https:
9787
11349
  const origin = `${this.id}-${meth}`;
9788
11350
  log.trace(origin);
9789
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
+
9790
11358
  /* HERE IS WHERE YOU VALIDATE DATA */
9791
11359
  if (username === undefined || username === null || username === '') {
9792
11360
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -9866,6 +11434,12 @@ This endpoint supports (and encourages!) the use of [HTTP Range requests](https:
9866
11434
  const origin = `${this.id}-${meth}`;
9867
11435
  log.trace(origin);
9868
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
+
9869
11443
  /* HERE IS WHERE YOU VALIDATE DATA */
9870
11444
  if (username === undefined || username === null || username === '') {
9871
11445
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -9941,6 +11515,12 @@ This endpoint supports (and encourages!) the use of [HTTP Range requests](https:
9941
11515
  const origin = `${this.id}-${meth}`;
9942
11516
  log.trace(origin);
9943
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
+
9944
11524
  /* HERE IS WHERE YOU VALIDATE DATA */
9945
11525
  if (username === undefined || username === null || username === '') {
9946
11526
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -10020,6 +11600,12 @@ This endpoint supports (and encourages!) the use of [HTTP Range requests](https:
10020
11600
  const origin = `${this.id}-${meth}`;
10021
11601
  log.trace(origin);
10022
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
+
10023
11609
  /* HERE IS WHERE YOU VALIDATE DATA */
10024
11610
  if (username === undefined || username === null || username === '') {
10025
11611
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -10094,6 +11680,12 @@ This endpoint supports (and encourages!) the use of [HTTP Range requests](https:
10094
11680
  const origin = `${this.id}-${meth}`;
10095
11681
  log.trace(origin);
10096
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
+
10097
11689
  /* HERE IS WHERE YOU VALIDATE DATA */
10098
11690
  if (username === undefined || username === null || username === '') {
10099
11691
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -10169,6 +11761,12 @@ This endpoint supports (and encourages!) the use of [HTTP Range requests](https:
10169
11761
  const origin = `${this.id}-${meth}`;
10170
11762
  log.trace(origin);
10171
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
+
10172
11770
  /* HERE IS WHERE YOU VALIDATE DATA */
10173
11771
  if (username === undefined || username === null || username === '') {
10174
11772
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -10248,6 +11846,12 @@ This endpoint supports (and encourages!) the use of [HTTP Range requests](https:
10248
11846
  const origin = `${this.id}-${meth}`;
10249
11847
  log.trace(origin);
10250
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
+
10251
11855
  /* HERE IS WHERE YOU VALIDATE DATA */
10252
11856
  if (username === undefined || username === null || username === '') {
10253
11857
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -10323,6 +11927,12 @@ This endpoint supports (and encourages!) the use of [HTTP Range requests](https:
10323
11927
  const origin = `${this.id}-${meth}`;
10324
11928
  log.trace(origin);
10325
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
+
10326
11936
  /* HERE IS WHERE YOU VALIDATE DATA */
10327
11937
  if (username === undefined || username === null || username === '') {
10328
11938
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -10403,6 +12013,12 @@ This endpoint supports (and encourages!) the use of [HTTP Range requests](https:
10403
12013
  const origin = `${this.id}-${meth}`;
10404
12014
  log.trace(origin);
10405
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
+
10406
12022
  /* HERE IS WHERE YOU VALIDATE DATA */
10407
12023
  if (username === undefined || username === null || username === '') {
10408
12024
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -10483,6 +12099,12 @@ This endpoint supports (and encourages!) the use of [HTTP Range requests](https:
10483
12099
  const origin = `${this.id}-${meth}`;
10484
12100
  log.trace(origin);
10485
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
+
10486
12108
  /* HERE IS WHERE YOU VALIDATE DATA */
10487
12109
  if (username === undefined || username === null || username === '') {
10488
12110
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -10564,6 +12186,12 @@ This endpoint supports (and encourages!) the use of [HTTP Range requests](https:
10564
12186
  const origin = `${this.id}-${meth}`;
10565
12187
  log.trace(origin);
10566
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
+
10567
12195
  /* HERE IS WHERE YOU VALIDATE DATA */
10568
12196
  if (username === undefined || username === null || username === '') {
10569
12197
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -10648,6 +12276,12 @@ This endpoint supports (and encourages!) the use of [HTTP Range requests](https:
10648
12276
  const origin = `${this.id}-${meth}`;
10649
12277
  log.trace(origin);
10650
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
+
10651
12285
  /* HERE IS WHERE YOU VALIDATE DATA */
10652
12286
  if (username === undefined || username === null || username === '') {
10653
12287
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -10723,6 +12357,12 @@ This endpoint supports (and encourages!) the use of [HTTP Range requests](https:
10723
12357
  const origin = `${this.id}-${meth}`;
10724
12358
  log.trace(origin);
10725
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
+
10726
12366
  /* HERE IS WHERE YOU VALIDATE DATA */
10727
12367
  if (username === undefined || username === null || username === '') {
10728
12368
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -10803,6 +12443,12 @@ This endpoint supports (and encourages!) the use of [HTTP Range requests](https:
10803
12443
  const origin = `${this.id}-${meth}`;
10804
12444
  log.trace(origin);
10805
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
+
10806
12452
  /* HERE IS WHERE YOU VALIDATE DATA */
10807
12453
  if (username === undefined || username === null || username === '') {
10808
12454
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -10883,6 +12529,12 @@ This endpoint supports (and encourages!) the use of [HTTP Range requests](https:
10883
12529
  const origin = `${this.id}-${meth}`;
10884
12530
  log.trace(origin);
10885
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
+
10886
12538
  /* HERE IS WHERE YOU VALIDATE DATA */
10887
12539
  if (username === undefined || username === null || username === '') {
10888
12540
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -10964,6 +12616,12 @@ This endpoint supports (and encourages!) the use of [HTTP Range requests](https:
10964
12616
  const origin = `${this.id}-${meth}`;
10965
12617
  log.trace(origin);
10966
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
+
10967
12625
  /* HERE IS WHERE YOU VALIDATE DATA */
10968
12626
  if (username === undefined || username === null || username === '') {
10969
12627
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -11047,6 +12705,12 @@ This endpoint supports (and encourages!) the use of [HTTP Range requests](https:
11047
12705
  const origin = `${this.id}-${meth}`;
11048
12706
  log.trace(origin);
11049
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
+
11050
12714
  /* HERE IS WHERE YOU VALIDATE DATA */
11051
12715
  if (username === undefined || username === null || username === '') {
11052
12716
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -11116,6 +12780,12 @@ This endpoint supports (and encourages!) the use of [HTTP Range requests](https:
11116
12780
  const origin = `${this.id}-${meth}`;
11117
12781
  log.trace(origin);
11118
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
+
11119
12789
  /* HERE IS WHERE YOU VALIDATE DATA */
11120
12790
  if (username === undefined || username === null || username === '') {
11121
12791
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -11185,6 +12855,12 @@ This endpoint supports (and encourages!) the use of [HTTP Range requests](https:
11185
12855
  const origin = `${this.id}-${meth}`;
11186
12856
  log.trace(origin);
11187
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
+
11188
12864
  /* HERE IS WHERE YOU VALIDATE DATA */
11189
12865
  if (username === undefined || username === null || username === '') {
11190
12866
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -11259,6 +12935,12 @@ This endpoint supports (and encourages!) the use of [HTTP Range requests](https:
11259
12935
  const origin = `${this.id}-${meth}`;
11260
12936
  log.trace(origin);
11261
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
+
11262
12944
  /* HERE IS WHERE YOU VALIDATE DATA */
11263
12945
  if (username === undefined || username === null || username === '') {
11264
12946
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -11334,6 +13016,12 @@ This endpoint supports (and encourages!) the use of [HTTP Range requests](https:
11334
13016
  const origin = `${this.id}-${meth}`;
11335
13017
  log.trace(origin);
11336
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
+
11337
13025
  /* HERE IS WHERE YOU VALIDATE DATA */
11338
13026
  if (username === undefined || username === null || username === '') {
11339
13027
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -11412,6 +13100,12 @@ This endpoint supports (and encourages!) the use of [HTTP Range requests](https:
11412
13100
  const origin = `${this.id}-${meth}`;
11413
13101
  log.trace(origin);
11414
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
+
11415
13109
  /* HERE IS WHERE YOU VALIDATE DATA */
11416
13110
  if (username === undefined || username === null || username === '') {
11417
13111
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -11481,6 +13175,12 @@ This endpoint supports (and encourages!) the use of [HTTP Range requests](https:
11481
13175
  const origin = `${this.id}-${meth}`;
11482
13176
  log.trace(origin);
11483
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
+
11484
13184
  /* HERE IS WHERE YOU VALIDATE DATA */
11485
13185
  if (username === undefined || username === null || username === '') {
11486
13186
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -11550,6 +13250,12 @@ This endpoint supports (and encourages!) the use of [HTTP Range requests](https:
11550
13250
  const origin = `${this.id}-${meth}`;
11551
13251
  log.trace(origin);
11552
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
+
11553
13259
  /* HERE IS WHERE YOU VALIDATE DATA */
11554
13260
  if (username === undefined || username === null || username === '') {
11555
13261
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -11624,6 +13330,12 @@ This endpoint supports (and encourages!) the use of [HTTP Range requests](https:
11624
13330
  const origin = `${this.id}-${meth}`;
11625
13331
  log.trace(origin);
11626
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
+
11627
13339
  /* HERE IS WHERE YOU VALIDATE DATA */
11628
13340
  if (username === undefined || username === null || username === '') {
11629
13341
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -11699,6 +13411,12 @@ This endpoint supports (and encourages!) the use of [HTTP Range requests](https:
11699
13411
  const origin = `${this.id}-${meth}`;
11700
13412
  log.trace(origin);
11701
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
+
11702
13420
  /* HERE IS WHERE YOU VALIDATE DATA */
11703
13421
  if (username === undefined || username === null || username === '') {
11704
13422
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -11778,6 +13496,12 @@ This endpoint supports (and encourages!) the use of [HTTP Range requests](https:
11778
13496
  const origin = `${this.id}-${meth}`;
11779
13497
  log.trace(origin);
11780
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
+
11781
13505
  /* HERE IS WHERE YOU VALIDATE DATA */
11782
13506
  if (username === undefined || username === null || username === '') {
11783
13507
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -11852,6 +13576,12 @@ This endpoint supports (and encourages!) the use of [HTTP Range requests](https:
11852
13576
  const origin = `${this.id}-${meth}`;
11853
13577
  log.trace(origin);
11854
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
+
11855
13585
  /* HERE IS WHERE YOU VALIDATE DATA */
11856
13586
  if (username === undefined || username === null || username === '') {
11857
13587
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -11927,6 +13657,12 @@ This endpoint supports (and encourages!) the use of [HTTP Range requests](https:
11927
13657
  const origin = `${this.id}-${meth}`;
11928
13658
  log.trace(origin);
11929
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
+
11930
13666
  /* HERE IS WHERE YOU VALIDATE DATA */
11931
13667
  if (username === undefined || username === null || username === '') {
11932
13668
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -12010,6 +13746,12 @@ curly-braces (`{}`))
12010
13746
  const origin = `${this.id}-${meth}`;
12011
13747
  log.trace(origin);
12012
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
+
12013
13755
  /* HERE IS WHERE YOU VALIDATE DATA */
12014
13756
  if (username === undefined || username === null || username === '') {
12015
13757
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -12102,6 +13844,12 @@ curly-braces (`{}`))
12102
13844
  const origin = `${this.id}-${meth}`;
12103
13845
  log.trace(origin);
12104
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
+
12105
13853
  /* HERE IS WHERE YOU VALIDATE DATA */
12106
13854
  if (username === undefined || username === null || username === '') {
12107
13855
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -12182,6 +13930,12 @@ curly-braces (`{}`))
12182
13930
  const origin = `${this.id}-${meth}`;
12183
13931
  log.trace(origin);
12184
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
+
12185
13939
  /* HERE IS WHERE YOU VALIDATE DATA */
12186
13940
  if (username === undefined || username === null || username === '') {
12187
13941
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -12267,6 +14021,12 @@ To limit the set of returned snippets, apply the
12267
14021
  const origin = `${this.id}-${meth}`;
12268
14022
  log.trace(origin);
12269
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
+
12270
14030
  /* HERE IS WHERE YOU VALIDATE DATA */
12271
14031
 
12272
14032
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
@@ -12338,6 +14098,12 @@ and `multipar...(description truncated)
12338
14098
  const origin = `${this.id}-${meth}`;
12339
14099
  log.trace(origin);
12340
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
+
12341
14107
  /* HERE IS WHERE YOU VALIDATE DATA */
12342
14108
  if (body === undefined || body === null || body === '') {
12343
14109
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['body'], null, null, null);
@@ -12409,6 +14175,12 @@ returned.
12409
14175
  const origin = `${this.id}-${meth}`;
12410
14176
  log.trace(origin);
12411
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
+
12412
14184
  /* HERE IS WHERE YOU VALIDATE DATA */
12413
14185
  if (username === undefined || username === null || username === '') {
12414
14186
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -12479,6 +14251,12 @@ created under the account specified in the path parameter `{username}`.
12479
14251
  const origin = `${this.id}-${meth}`;
12480
14252
  log.trace(origin);
12481
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
+
12482
14260
  /* HERE IS WHERE YOU VALIDATE DATA */
12483
14261
  if (username === undefined || username === null || username === '') {
12484
14262
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -12553,6 +14331,12 @@ created under the account specified in the path parameter `{username}`.
12553
14331
  const origin = `${this.id}-${meth}`;
12554
14332
  log.trace(origin);
12555
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
+
12556
14340
  /* HERE IS WHERE YOU VALIDATE DATA */
12557
14341
  if (username === undefined || username === null || username === '') {
12558
14342
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -12639,6 +14423,12 @@ requests need t...(description truncated)
12639
14423
  const origin = `${this.id}-${meth}`;
12640
14424
  log.trace(origin);
12641
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
+
12642
14432
  /* HERE IS WHERE YOU VALIDATE DATA */
12643
14433
  if (username === undefined || username === null || username === '') {
12644
14434
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -12722,6 +14512,12 @@ As in Git, explicit re...(description truncated)
12722
14512
  const origin = `${this.id}-${meth}`;
12723
14513
  log.trace(origin);
12724
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
+
12725
14521
  /* HERE IS WHERE YOU VALIDATE DATA */
12726
14522
  if (username === undefined || username === null || username === '') {
12727
14523
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -12800,6 +14596,12 @@ the `sort` query parameter.
12800
14596
  const origin = `${this.id}-${meth}`;
12801
14597
  log.trace(origin);
12802
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
+
12803
14605
  /* HERE IS WHERE YOU VALIDATE DATA */
12804
14606
  if (username === undefined || username === null || username === '') {
12805
14607
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -12877,6 +14679,12 @@ To create a threaded reply to an existing comment, include `parent.id`.
12877
14679
  const origin = `${this.id}-${meth}`;
12878
14680
  log.trace(origin);
12879
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
+
12880
14688
  /* HERE IS WHERE YOU VALIDATE DATA */
12881
14689
  if (username === undefined || username === null || username === '') {
12882
14690
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -12958,6 +14766,12 @@ Comments can only be removed by their author.
12958
14766
  const origin = `${this.id}-${meth}`;
12959
14767
  log.trace(origin);
12960
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
+
12961
14775
  /* HERE IS WHERE YOU VALIDATE DATA */
12962
14776
  if (username === undefined || username === null || username === '') {
12963
14777
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -13038,6 +14852,12 @@ Comments can only be removed by their author.
13038
14852
  const origin = `${this.id}-${meth}`;
13039
14853
  log.trace(origin);
13040
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
+
13041
14861
  /* HERE IS WHERE YOU VALIDATE DATA */
13042
14862
  if (username === undefined || username === null || username === '') {
13043
14863
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -13119,6 +14939,12 @@ Comments can only be updated by their author.
13119
14939
  const origin = `${this.id}-${meth}`;
13120
14940
  log.trace(origin);
13121
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
+
13122
14948
  /* HERE IS WHERE YOU VALIDATE DATA */
13123
14949
  if (username === undefined || username === null || username === '') {
13124
14950
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -13198,6 +15024,12 @@ Comments can only be updated by their author.
13198
15024
  const origin = `${this.id}-${meth}`;
13199
15025
  log.trace(origin);
13200
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
+
13201
15033
  /* HERE IS WHERE YOU VALIDATE DATA */
13202
15034
  if (username === undefined || username === null || username === '') {
13203
15035
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -13273,6 +15105,12 @@ Comments can only be updated by their author.
13273
15105
  const origin = `${this.id}-${meth}`;
13274
15106
  log.trace(origin);
13275
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
+
13276
15114
  /* HERE IS WHERE YOU VALIDATE DATA */
13277
15115
  if (username === undefined || username === null || username === '') {
13278
15116
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -13353,6 +15191,12 @@ to indicate success.
13353
15191
  const origin = `${this.id}-${meth}`;
13354
15192
  log.trace(origin);
13355
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
+
13356
15200
  /* HERE IS WHERE YOU VALIDATE DATA */
13357
15201
  if (username === undefined || username === null || username === '') {
13358
15202
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -13430,6 +15274,12 @@ Hitting this endpoint anonymously always returns a 404.
13430
15274
  const origin = `${this.id}-${meth}`;
13431
15275
  log.trace(origin);
13432
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
+
13433
15283
  /* HERE IS WHERE YOU VALIDATE DATA */
13434
15284
  if (username === undefined || username === null || username === '') {
13435
15285
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -13504,6 +15354,12 @@ Hitting this endpoint anonymously always returns a 404.
13504
15354
  const origin = `${this.id}-${meth}`;
13505
15355
  log.trace(origin);
13506
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
+
13507
15363
  /* HERE IS WHERE YOU VALIDATE DATA */
13508
15364
  if (username === undefined || username === null || username === '') {
13509
15365
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -13578,6 +15434,12 @@ Hitting this endpoint anonymously always returns a 404.
13578
15434
  const origin = `${this.id}-${meth}`;
13579
15435
  log.trace(origin);
13580
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
+
13581
15443
  /* HERE IS WHERE YOU VALIDATE DATA */
13582
15444
  if (username === undefined || username === null || username === '') {
13583
15445
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -13658,6 +15520,12 @@ are being made to it, use `DELETE /snippets/{encoded_id}` instead.
13658
15520
  const origin = `${this.id}-${meth}`;
13659
15521
  log.trace(origin);
13660
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
+
13661
15529
  /* HERE IS WHERE YOU VALIDATE DATA */
13662
15530
  if (username === undefined || username === null || username === '') {
13663
15531
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -13744,6 +15612,12 @@ Other than that, the two endpoints are identical in behavior.
13744
15612
  const origin = `${this.id}-${meth}`;
13745
15613
  log.trace(origin);
13746
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
+
13747
15621
  /* HERE IS WHERE YOU VALIDATE DATA */
13748
15622
  if (username === undefined || username === null || username === '') {
13749
15623
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -13832,6 +15706,12 @@ This can be considered a so...(description truncated)
13832
15706
  const origin = `${this.id}-${meth}`;
13833
15707
  log.trace(origin);
13834
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
+
13835
15715
  /* HERE IS WHERE YOU VALIDATE DATA */
13836
15716
  if (username === undefined || username === null || username === '') {
13837
15717
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -13919,6 +15799,12 @@ the content type.
13919
15799
  const origin = `${this.id}-${meth}`;
13920
15800
  log.trace(origin);
13921
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
+
13922
15808
  /* HERE IS WHERE YOU VALIDATE DATA */
13923
15809
  if (username === undefined || username === null || username === '') {
13924
15810
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -14013,6 +15899,12 @@ The differences between a diff and a patch are:
14013
15899
  const origin = `${this.id}-${meth}`;
14014
15900
  log.trace(origin);
14015
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
+
14016
15908
  /* HERE IS WHERE YOU VALIDATE DATA */
14017
15909
  if (username === undefined || username === null || username === '') {
14018
15910
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -14102,6 +15994,12 @@ The differences between a diff and a patch are:
14102
15994
  const origin = `${this.id}-${meth}`;
14103
15995
  log.trace(origin);
14104
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
+
14105
16003
  /* HERE IS WHERE YOU VALIDATE DATA */
14106
16004
  if (username === undefined || username === null || username === '') {
14107
16005
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['username'], null, null, null);
@@ -14181,6 +16079,12 @@ the team or the `UUID` of the team (surrounded by curly-braces (`{}`)).
14181
16079
  const origin = `${this.id}-${meth}`;
14182
16080
  log.trace(origin);
14183
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
+
14184
16088
  /* HERE IS WHERE YOU VALIDATE DATA */
14185
16089
  if (owner === undefined || owner === null || owner === '') {
14186
16090
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['owner'], null, null, null);
@@ -14269,6 +16173,12 @@ the team or the `UUID` of the team (surrounded by curly-braces (`{}`)).
14269
16173
  const origin = `${this.id}-${meth}`;
14270
16174
  log.trace(origin);
14271
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
+
14272
16182
  /* HERE IS WHERE YOU VALIDATE DATA */
14273
16183
  if (owner === undefined || owner === null || owner === '') {
14274
16184
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['owner'], null, null, null);
@@ -14345,6 +16255,12 @@ to the project or the `UUID` (surrounded by curly-braces (`{}`)).
14345
16255
  const origin = `${this.id}-${meth}`;
14346
16256
  log.trace(origin);
14347
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
+
14348
16264
  /* HERE IS WHERE YOU VALIDATE DATA */
14349
16265
  if (owner === undefined || owner === null || owner === '') {
14350
16266
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['owner'], null, null, null);
@@ -14421,6 +16337,12 @@ to the project or the `UUID` (surrounded by curly-braces (`{}`)).
14421
16337
  const origin = `${this.id}-${meth}`;
14422
16338
  log.trace(origin);
14423
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
+
14424
16346
  /* HERE IS WHERE YOU VALIDATE DATA */
14425
16347
  if (owner === undefined || owner === null || owner === '') {
14426
16348
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['owner'], null, null, null);
@@ -14509,6 +16431,12 @@ to the project or the `UUID` (surrounded by curly-braces (`{}`)).
14509
16431
  const origin = `${this.id}-${meth}`;
14510
16432
  log.trace(origin);
14511
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
+
14512
16440
  /* HERE IS WHERE YOU VALIDATE DATA */
14513
16441
  if (owner === undefined || owner === null || owner === '') {
14514
16442
  const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['owner'], null, null, null);