files.com 1.0.227 → 1.0.229

Sign up to get free protection for your applications and to get access to all the features.
@@ -289,6 +289,24 @@ var RemoteServer = /*#__PURE__*/(0, _createClass2.default)(function RemoteServer
289
289
  (0, _defineProperty2.default)(this, "setEnableDedicatedIps", function (value) {
290
290
  _this.attributes.enable_dedicated_ips = value;
291
291
  });
292
+ (0, _defineProperty2.default)(this, "getFilesAgentPermissionSet", function () {
293
+ return _this.attributes.files_agent_permission_set;
294
+ });
295
+ (0, _defineProperty2.default)(this, "setFilesAgentPermissionSet", function (value) {
296
+ _this.attributes.files_agent_permission_set = value;
297
+ });
298
+ (0, _defineProperty2.default)(this, "getFilesAgentRoot", function () {
299
+ return _this.attributes.files_agent_root;
300
+ });
301
+ (0, _defineProperty2.default)(this, "setFilesAgentRoot", function (value) {
302
+ _this.attributes.files_agent_root = value;
303
+ });
304
+ (0, _defineProperty2.default)(this, "getFilesAgentApiToken", function () {
305
+ return _this.attributes.files_agent_api_token;
306
+ });
307
+ (0, _defineProperty2.default)(this, "setFilesAgentApiToken", function (value) {
308
+ _this.attributes.files_agent_api_token = value;
309
+ });
292
310
  (0, _defineProperty2.default)(this, "getAwsSecretKey", function () {
293
311
  return _this.attributes.aws_secret_key;
294
312
  });
@@ -373,7 +391,7 @@ var RemoteServer = /*#__PURE__*/(0, _createClass2.default)(function RemoteServer
373
391
  (0, _defineProperty2.default)(this, "setS3CompatibleSecretKey", function (value) {
374
392
  _this.attributes.s3_compatible_secret_key = value;
375
393
  });
376
- (0, _defineProperty2.default)(this, "update", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
394
+ (0, _defineProperty2.default)(this, "configurationFile", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
377
395
  var params,
378
396
  response,
379
397
  _args = arguments;
@@ -401,361 +419,481 @@ var RemoteServer = /*#__PURE__*/(0, _createClass2.default)(function RemoteServer
401
419
  }
402
420
  throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(id)));
403
421
  case 8:
404
- if (!(params['aws_access_key'] && !(0, _utils.isString)(params['aws_access_key']))) {
422
+ if (!(params['api_token'] && !(0, _utils.isString)(params['api_token']))) {
405
423
  _context.next = 10;
406
424
  break;
407
425
  }
426
+ throw new errors.InvalidParameterError("Bad parameter: api_token must be of type String, received ".concat((0, _utils.getType)(api_token)));
427
+ case 10:
428
+ if (!(params['permission_set'] && !(0, _utils.isString)(params['permission_set']))) {
429
+ _context.next = 12;
430
+ break;
431
+ }
432
+ throw new errors.InvalidParameterError("Bad parameter: permission_set must be of type String, received ".concat((0, _utils.getType)(permission_set)));
433
+ case 12:
434
+ if (!(params['root'] && !(0, _utils.isString)(params['root']))) {
435
+ _context.next = 14;
436
+ break;
437
+ }
438
+ throw new errors.InvalidParameterError("Bad parameter: root must be of type String, received ".concat((0, _utils.getType)(root)));
439
+ case 14:
440
+ if (!(params['hostname'] && !(0, _utils.isString)(params['hostname']))) {
441
+ _context.next = 16;
442
+ break;
443
+ }
444
+ throw new errors.InvalidParameterError("Bad parameter: hostname must be of type String, received ".concat((0, _utils.getType)(hostname)));
445
+ case 16:
446
+ if (!(params['port'] && !(0, _utils.isInt)(params['port']))) {
447
+ _context.next = 18;
448
+ break;
449
+ }
450
+ throw new errors.InvalidParameterError("Bad parameter: port must be of type Int, received ".concat((0, _utils.getType)(port)));
451
+ case 18:
452
+ if (!(params['status'] && !(0, _utils.isString)(params['status']))) {
453
+ _context.next = 20;
454
+ break;
455
+ }
456
+ throw new errors.InvalidParameterError("Bad parameter: status must be of type String, received ".concat((0, _utils.getType)(status)));
457
+ case 20:
458
+ if (!(params['config_version'] && !(0, _utils.isString)(params['config_version']))) {
459
+ _context.next = 22;
460
+ break;
461
+ }
462
+ throw new errors.InvalidParameterError("Bad parameter: config_version must be of type String, received ".concat((0, _utils.getType)(config_version)));
463
+ case 22:
464
+ if (!(params['private_key'] && !(0, _utils.isString)(params['private_key']))) {
465
+ _context.next = 24;
466
+ break;
467
+ }
468
+ throw new errors.InvalidParameterError("Bad parameter: private_key must be of type String, received ".concat((0, _utils.getType)(private_key)));
469
+ case 24:
470
+ if (!(params['public_key'] && !(0, _utils.isString)(params['public_key']))) {
471
+ _context.next = 26;
472
+ break;
473
+ }
474
+ throw new errors.InvalidParameterError("Bad parameter: public_key must be of type String, received ".concat((0, _utils.getType)(public_key)));
475
+ case 26:
476
+ if (params['id']) {
477
+ _context.next = 32;
478
+ break;
479
+ }
480
+ if (!_this.attributes.id) {
481
+ _context.next = 31;
482
+ break;
483
+ }
484
+ params['id'] = _this.id;
485
+ _context.next = 32;
486
+ break;
487
+ case 31:
488
+ throw new errors.MissingParameterError('Parameter missing: id');
489
+ case 32:
490
+ _context.next = 34;
491
+ return _Api.default.sendRequest("/remote_servers/".concat(encodeURIComponent(params['id']), "/configuration_file"), 'POST', params, _this.options);
492
+ case 34:
493
+ response = _context.sent;
494
+ return _context.abrupt("return", new RemoteServerConfigurationFile(response === null || response === void 0 ? void 0 : response.data, _this.options));
495
+ case 36:
496
+ case "end":
497
+ return _context.stop();
498
+ }
499
+ }
500
+ }, _callee);
501
+ })));
502
+ (0, _defineProperty2.default)(this, "update", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
503
+ var params,
504
+ response,
505
+ _args2 = arguments;
506
+ return _regenerator.default.wrap(function _callee2$(_context2) {
507
+ while (1) {
508
+ switch (_context2.prev = _context2.next) {
509
+ case 0:
510
+ params = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
511
+ if (_this.attributes.id) {
512
+ _context2.next = 3;
513
+ break;
514
+ }
515
+ throw new errors.EmptyPropertyError('Current object has no id');
516
+ case 3:
517
+ if ((0, _utils.isObject)(params)) {
518
+ _context2.next = 5;
519
+ break;
520
+ }
521
+ throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
522
+ case 5:
523
+ params.id = _this.attributes.id;
524
+ if (!(params['id'] && !(0, _utils.isInt)(params['id']))) {
525
+ _context2.next = 8;
526
+ break;
527
+ }
528
+ throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(id)));
529
+ case 8:
530
+ if (!(params['aws_access_key'] && !(0, _utils.isString)(params['aws_access_key']))) {
531
+ _context2.next = 10;
532
+ break;
533
+ }
408
534
  throw new errors.InvalidParameterError("Bad parameter: aws_access_key must be of type String, received ".concat((0, _utils.getType)(aws_access_key)));
409
535
  case 10:
410
536
  if (!(params['aws_secret_key'] && !(0, _utils.isString)(params['aws_secret_key']))) {
411
- _context.next = 12;
537
+ _context2.next = 12;
412
538
  break;
413
539
  }
414
540
  throw new errors.InvalidParameterError("Bad parameter: aws_secret_key must be of type String, received ".concat((0, _utils.getType)(aws_secret_key)));
415
541
  case 12:
416
542
  if (!(params['password'] && !(0, _utils.isString)(params['password']))) {
417
- _context.next = 14;
543
+ _context2.next = 14;
418
544
  break;
419
545
  }
420
546
  throw new errors.InvalidParameterError("Bad parameter: password must be of type String, received ".concat((0, _utils.getType)(password)));
421
547
  case 14:
422
548
  if (!(params['private_key'] && !(0, _utils.isString)(params['private_key']))) {
423
- _context.next = 16;
549
+ _context2.next = 16;
424
550
  break;
425
551
  }
426
552
  throw new errors.InvalidParameterError("Bad parameter: private_key must be of type String, received ".concat((0, _utils.getType)(private_key)));
427
553
  case 16:
428
554
  if (!(params['private_key_passphrase'] && !(0, _utils.isString)(params['private_key_passphrase']))) {
429
- _context.next = 18;
555
+ _context2.next = 18;
430
556
  break;
431
557
  }
432
558
  throw new errors.InvalidParameterError("Bad parameter: private_key_passphrase must be of type String, received ".concat((0, _utils.getType)(private_key_passphrase)));
433
559
  case 18:
434
560
  if (!(params['ssl_certificate'] && !(0, _utils.isString)(params['ssl_certificate']))) {
435
- _context.next = 20;
561
+ _context2.next = 20;
436
562
  break;
437
563
  }
438
564
  throw new errors.InvalidParameterError("Bad parameter: ssl_certificate must be of type String, received ".concat((0, _utils.getType)(ssl_certificate)));
439
565
  case 20:
440
566
  if (!(params['google_cloud_storage_credentials_json'] && !(0, _utils.isString)(params['google_cloud_storage_credentials_json']))) {
441
- _context.next = 22;
567
+ _context2.next = 22;
442
568
  break;
443
569
  }
444
570
  throw new errors.InvalidParameterError("Bad parameter: google_cloud_storage_credentials_json must be of type String, received ".concat((0, _utils.getType)(google_cloud_storage_credentials_json)));
445
571
  case 22:
446
572
  if (!(params['wasabi_access_key'] && !(0, _utils.isString)(params['wasabi_access_key']))) {
447
- _context.next = 24;
573
+ _context2.next = 24;
448
574
  break;
449
575
  }
450
576
  throw new errors.InvalidParameterError("Bad parameter: wasabi_access_key must be of type String, received ".concat((0, _utils.getType)(wasabi_access_key)));
451
577
  case 24:
452
578
  if (!(params['wasabi_secret_key'] && !(0, _utils.isString)(params['wasabi_secret_key']))) {
453
- _context.next = 26;
579
+ _context2.next = 26;
454
580
  break;
455
581
  }
456
582
  throw new errors.InvalidParameterError("Bad parameter: wasabi_secret_key must be of type String, received ".concat((0, _utils.getType)(wasabi_secret_key)));
457
583
  case 26:
458
584
  if (!(params['backblaze_b2_key_id'] && !(0, _utils.isString)(params['backblaze_b2_key_id']))) {
459
- _context.next = 28;
585
+ _context2.next = 28;
460
586
  break;
461
587
  }
462
588
  throw new errors.InvalidParameterError("Bad parameter: backblaze_b2_key_id must be of type String, received ".concat((0, _utils.getType)(backblaze_b2_key_id)));
463
589
  case 28:
464
590
  if (!(params['backblaze_b2_application_key'] && !(0, _utils.isString)(params['backblaze_b2_application_key']))) {
465
- _context.next = 30;
591
+ _context2.next = 30;
466
592
  break;
467
593
  }
468
594
  throw new errors.InvalidParameterError("Bad parameter: backblaze_b2_application_key must be of type String, received ".concat((0, _utils.getType)(backblaze_b2_application_key)));
469
595
  case 30:
470
596
  if (!(params['rackspace_api_key'] && !(0, _utils.isString)(params['rackspace_api_key']))) {
471
- _context.next = 32;
597
+ _context2.next = 32;
472
598
  break;
473
599
  }
474
600
  throw new errors.InvalidParameterError("Bad parameter: rackspace_api_key must be of type String, received ".concat((0, _utils.getType)(rackspace_api_key)));
475
601
  case 32:
476
602
  if (!(params['azure_blob_storage_access_key'] && !(0, _utils.isString)(params['azure_blob_storage_access_key']))) {
477
- _context.next = 34;
603
+ _context2.next = 34;
478
604
  break;
479
605
  }
480
606
  throw new errors.InvalidParameterError("Bad parameter: azure_blob_storage_access_key must be of type String, received ".concat((0, _utils.getType)(azure_blob_storage_access_key)));
481
607
  case 34:
482
608
  if (!(params['azure_files_storage_access_key'] && !(0, _utils.isString)(params['azure_files_storage_access_key']))) {
483
- _context.next = 36;
609
+ _context2.next = 36;
484
610
  break;
485
611
  }
486
612
  throw new errors.InvalidParameterError("Bad parameter: azure_files_storage_access_key must be of type String, received ".concat((0, _utils.getType)(azure_files_storage_access_key)));
487
613
  case 36:
488
614
  if (!(params['hostname'] && !(0, _utils.isString)(params['hostname']))) {
489
- _context.next = 38;
615
+ _context2.next = 38;
490
616
  break;
491
617
  }
492
618
  throw new errors.InvalidParameterError("Bad parameter: hostname must be of type String, received ".concat((0, _utils.getType)(hostname)));
493
619
  case 38:
494
620
  if (!(params['name'] && !(0, _utils.isString)(params['name']))) {
495
- _context.next = 40;
621
+ _context2.next = 40;
496
622
  break;
497
623
  }
498
624
  throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(name)));
499
625
  case 40:
500
626
  if (!(params['max_connections'] && !(0, _utils.isInt)(params['max_connections']))) {
501
- _context.next = 42;
627
+ _context2.next = 42;
502
628
  break;
503
629
  }
504
630
  throw new errors.InvalidParameterError("Bad parameter: max_connections must be of type Int, received ".concat((0, _utils.getType)(max_connections)));
505
631
  case 42:
506
632
  if (!(params['port'] && !(0, _utils.isInt)(params['port']))) {
507
- _context.next = 44;
633
+ _context2.next = 44;
508
634
  break;
509
635
  }
510
636
  throw new errors.InvalidParameterError("Bad parameter: port must be of type Int, received ".concat((0, _utils.getType)(port)));
511
637
  case 44:
512
638
  if (!(params['s3_bucket'] && !(0, _utils.isString)(params['s3_bucket']))) {
513
- _context.next = 46;
639
+ _context2.next = 46;
514
640
  break;
515
641
  }
516
642
  throw new errors.InvalidParameterError("Bad parameter: s3_bucket must be of type String, received ".concat((0, _utils.getType)(s3_bucket)));
517
643
  case 46:
518
644
  if (!(params['s3_region'] && !(0, _utils.isString)(params['s3_region']))) {
519
- _context.next = 48;
645
+ _context2.next = 48;
520
646
  break;
521
647
  }
522
648
  throw new errors.InvalidParameterError("Bad parameter: s3_region must be of type String, received ".concat((0, _utils.getType)(s3_region)));
523
649
  case 48:
524
650
  if (!(params['server_certificate'] && !(0, _utils.isString)(params['server_certificate']))) {
525
- _context.next = 50;
651
+ _context2.next = 50;
526
652
  break;
527
653
  }
528
654
  throw new errors.InvalidParameterError("Bad parameter: server_certificate must be of type String, received ".concat((0, _utils.getType)(server_certificate)));
529
655
  case 50:
530
656
  if (!(params['server_host_key'] && !(0, _utils.isString)(params['server_host_key']))) {
531
- _context.next = 52;
657
+ _context2.next = 52;
532
658
  break;
533
659
  }
534
660
  throw new errors.InvalidParameterError("Bad parameter: server_host_key must be of type String, received ".concat((0, _utils.getType)(server_host_key)));
535
661
  case 52:
536
662
  if (!(params['server_type'] && !(0, _utils.isString)(params['server_type']))) {
537
- _context.next = 54;
663
+ _context2.next = 54;
538
664
  break;
539
665
  }
540
666
  throw new errors.InvalidParameterError("Bad parameter: server_type must be of type String, received ".concat((0, _utils.getType)(server_type)));
541
667
  case 54:
542
668
  if (!(params['ssl'] && !(0, _utils.isString)(params['ssl']))) {
543
- _context.next = 56;
669
+ _context2.next = 56;
544
670
  break;
545
671
  }
546
672
  throw new errors.InvalidParameterError("Bad parameter: ssl must be of type String, received ".concat((0, _utils.getType)(ssl)));
547
673
  case 56:
548
674
  if (!(params['username'] && !(0, _utils.isString)(params['username']))) {
549
- _context.next = 58;
675
+ _context2.next = 58;
550
676
  break;
551
677
  }
552
678
  throw new errors.InvalidParameterError("Bad parameter: username must be of type String, received ".concat((0, _utils.getType)(username)));
553
679
  case 58:
554
680
  if (!(params['google_cloud_storage_bucket'] && !(0, _utils.isString)(params['google_cloud_storage_bucket']))) {
555
- _context.next = 60;
681
+ _context2.next = 60;
556
682
  break;
557
683
  }
558
684
  throw new errors.InvalidParameterError("Bad parameter: google_cloud_storage_bucket must be of type String, received ".concat((0, _utils.getType)(google_cloud_storage_bucket)));
559
685
  case 60:
560
686
  if (!(params['google_cloud_storage_project_id'] && !(0, _utils.isString)(params['google_cloud_storage_project_id']))) {
561
- _context.next = 62;
687
+ _context2.next = 62;
562
688
  break;
563
689
  }
564
690
  throw new errors.InvalidParameterError("Bad parameter: google_cloud_storage_project_id must be of type String, received ".concat((0, _utils.getType)(google_cloud_storage_project_id)));
565
691
  case 62:
566
692
  if (!(params['backblaze_b2_bucket'] && !(0, _utils.isString)(params['backblaze_b2_bucket']))) {
567
- _context.next = 64;
693
+ _context2.next = 64;
568
694
  break;
569
695
  }
570
696
  throw new errors.InvalidParameterError("Bad parameter: backblaze_b2_bucket must be of type String, received ".concat((0, _utils.getType)(backblaze_b2_bucket)));
571
697
  case 64:
572
698
  if (!(params['backblaze_b2_s3_endpoint'] && !(0, _utils.isString)(params['backblaze_b2_s3_endpoint']))) {
573
- _context.next = 66;
699
+ _context2.next = 66;
574
700
  break;
575
701
  }
576
702
  throw new errors.InvalidParameterError("Bad parameter: backblaze_b2_s3_endpoint must be of type String, received ".concat((0, _utils.getType)(backblaze_b2_s3_endpoint)));
577
703
  case 66:
578
704
  if (!(params['wasabi_bucket'] && !(0, _utils.isString)(params['wasabi_bucket']))) {
579
- _context.next = 68;
705
+ _context2.next = 68;
580
706
  break;
581
707
  }
582
708
  throw new errors.InvalidParameterError("Bad parameter: wasabi_bucket must be of type String, received ".concat((0, _utils.getType)(wasabi_bucket)));
583
709
  case 68:
584
710
  if (!(params['wasabi_region'] && !(0, _utils.isString)(params['wasabi_region']))) {
585
- _context.next = 70;
711
+ _context2.next = 70;
586
712
  break;
587
713
  }
588
714
  throw new errors.InvalidParameterError("Bad parameter: wasabi_region must be of type String, received ".concat((0, _utils.getType)(wasabi_region)));
589
715
  case 70:
590
716
  if (!(params['rackspace_username'] && !(0, _utils.isString)(params['rackspace_username']))) {
591
- _context.next = 72;
717
+ _context2.next = 72;
592
718
  break;
593
719
  }
594
720
  throw new errors.InvalidParameterError("Bad parameter: rackspace_username must be of type String, received ".concat((0, _utils.getType)(rackspace_username)));
595
721
  case 72:
596
722
  if (!(params['rackspace_region'] && !(0, _utils.isString)(params['rackspace_region']))) {
597
- _context.next = 74;
723
+ _context2.next = 74;
598
724
  break;
599
725
  }
600
726
  throw new errors.InvalidParameterError("Bad parameter: rackspace_region must be of type String, received ".concat((0, _utils.getType)(rackspace_region)));
601
727
  case 74:
602
728
  if (!(params['rackspace_container'] && !(0, _utils.isString)(params['rackspace_container']))) {
603
- _context.next = 76;
729
+ _context2.next = 76;
604
730
  break;
605
731
  }
606
732
  throw new errors.InvalidParameterError("Bad parameter: rackspace_container must be of type String, received ".concat((0, _utils.getType)(rackspace_container)));
607
733
  case 76:
608
734
  if (!(params['one_drive_account_type'] && !(0, _utils.isString)(params['one_drive_account_type']))) {
609
- _context.next = 78;
735
+ _context2.next = 78;
610
736
  break;
611
737
  }
612
738
  throw new errors.InvalidParameterError("Bad parameter: one_drive_account_type must be of type String, received ".concat((0, _utils.getType)(one_drive_account_type)));
613
739
  case 78:
614
740
  if (!(params['azure_blob_storage_account'] && !(0, _utils.isString)(params['azure_blob_storage_account']))) {
615
- _context.next = 80;
741
+ _context2.next = 80;
616
742
  break;
617
743
  }
618
744
  throw new errors.InvalidParameterError("Bad parameter: azure_blob_storage_account must be of type String, received ".concat((0, _utils.getType)(azure_blob_storage_account)));
619
745
  case 80:
620
746
  if (!(params['azure_blob_storage_container'] && !(0, _utils.isString)(params['azure_blob_storage_container']))) {
621
- _context.next = 82;
747
+ _context2.next = 82;
622
748
  break;
623
749
  }
624
750
  throw new errors.InvalidParameterError("Bad parameter: azure_blob_storage_container must be of type String, received ".concat((0, _utils.getType)(azure_blob_storage_container)));
625
751
  case 82:
626
752
  if (!(params['azure_blob_storage_sas_token'] && !(0, _utils.isString)(params['azure_blob_storage_sas_token']))) {
627
- _context.next = 84;
753
+ _context2.next = 84;
628
754
  break;
629
755
  }
630
756
  throw new errors.InvalidParameterError("Bad parameter: azure_blob_storage_sas_token must be of type String, received ".concat((0, _utils.getType)(azure_blob_storage_sas_token)));
631
757
  case 84:
632
758
  if (!(params['azure_files_storage_account'] && !(0, _utils.isString)(params['azure_files_storage_account']))) {
633
- _context.next = 86;
759
+ _context2.next = 86;
634
760
  break;
635
761
  }
636
762
  throw new errors.InvalidParameterError("Bad parameter: azure_files_storage_account must be of type String, received ".concat((0, _utils.getType)(azure_files_storage_account)));
637
763
  case 86:
638
764
  if (!(params['azure_files_storage_share_name'] && !(0, _utils.isString)(params['azure_files_storage_share_name']))) {
639
- _context.next = 88;
765
+ _context2.next = 88;
640
766
  break;
641
767
  }
642
768
  throw new errors.InvalidParameterError("Bad parameter: azure_files_storage_share_name must be of type String, received ".concat((0, _utils.getType)(azure_files_storage_share_name)));
643
769
  case 88:
644
770
  if (!(params['azure_files_storage_sas_token'] && !(0, _utils.isString)(params['azure_files_storage_sas_token']))) {
645
- _context.next = 90;
771
+ _context2.next = 90;
646
772
  break;
647
773
  }
648
774
  throw new errors.InvalidParameterError("Bad parameter: azure_files_storage_sas_token must be of type String, received ".concat((0, _utils.getType)(azure_files_storage_sas_token)));
649
775
  case 90:
650
776
  if (!(params['s3_compatible_bucket'] && !(0, _utils.isString)(params['s3_compatible_bucket']))) {
651
- _context.next = 92;
777
+ _context2.next = 92;
652
778
  break;
653
779
  }
654
780
  throw new errors.InvalidParameterError("Bad parameter: s3_compatible_bucket must be of type String, received ".concat((0, _utils.getType)(s3_compatible_bucket)));
655
781
  case 92:
656
782
  if (!(params['s3_compatible_endpoint'] && !(0, _utils.isString)(params['s3_compatible_endpoint']))) {
657
- _context.next = 94;
783
+ _context2.next = 94;
658
784
  break;
659
785
  }
660
786
  throw new errors.InvalidParameterError("Bad parameter: s3_compatible_endpoint must be of type String, received ".concat((0, _utils.getType)(s3_compatible_endpoint)));
661
787
  case 94:
662
788
  if (!(params['s3_compatible_region'] && !(0, _utils.isString)(params['s3_compatible_region']))) {
663
- _context.next = 96;
789
+ _context2.next = 96;
664
790
  break;
665
791
  }
666
792
  throw new errors.InvalidParameterError("Bad parameter: s3_compatible_region must be of type String, received ".concat((0, _utils.getType)(s3_compatible_region)));
667
793
  case 96:
668
794
  if (!(params['s3_compatible_access_key'] && !(0, _utils.isString)(params['s3_compatible_access_key']))) {
669
- _context.next = 98;
795
+ _context2.next = 98;
670
796
  break;
671
797
  }
672
798
  throw new errors.InvalidParameterError("Bad parameter: s3_compatible_access_key must be of type String, received ".concat((0, _utils.getType)(s3_compatible_access_key)));
673
799
  case 98:
674
800
  if (!(params['s3_compatible_secret_key'] && !(0, _utils.isString)(params['s3_compatible_secret_key']))) {
675
- _context.next = 100;
801
+ _context2.next = 100;
676
802
  break;
677
803
  }
678
804
  throw new errors.InvalidParameterError("Bad parameter: s3_compatible_secret_key must be of type String, received ".concat((0, _utils.getType)(s3_compatible_secret_key)));
679
805
  case 100:
806
+ if (!(params['files_agent_root'] && !(0, _utils.isString)(params['files_agent_root']))) {
807
+ _context2.next = 102;
808
+ break;
809
+ }
810
+ throw new errors.InvalidParameterError("Bad parameter: files_agent_root must be of type String, received ".concat((0, _utils.getType)(files_agent_root)));
811
+ case 102:
812
+ if (!(params['files_agent_permission_set'] && !(0, _utils.isString)(params['files_agent_permission_set']))) {
813
+ _context2.next = 104;
814
+ break;
815
+ }
816
+ throw new errors.InvalidParameterError("Bad parameter: files_agent_permission_set must be of type String, received ".concat((0, _utils.getType)(files_agent_permission_set)));
817
+ case 104:
680
818
  if (params['id']) {
681
- _context.next = 106;
819
+ _context2.next = 110;
682
820
  break;
683
821
  }
684
822
  if (!_this.attributes.id) {
685
- _context.next = 105;
823
+ _context2.next = 109;
686
824
  break;
687
825
  }
688
826
  params['id'] = _this.id;
689
- _context.next = 106;
827
+ _context2.next = 110;
690
828
  break;
691
- case 105:
829
+ case 109:
692
830
  throw new errors.MissingParameterError('Parameter missing: id');
693
- case 106:
694
- _context.next = 108;
695
- return _Api.default.sendRequest("/remote_servers/".concat(encodeURIComponent(params['id'])), 'PATCH', params, _this.options);
696
- case 108:
697
- response = _context.sent;
698
- return _context.abrupt("return", new RemoteServer(response === null || response === void 0 ? void 0 : response.data, _this.options));
699
831
  case 110:
832
+ _context2.next = 112;
833
+ return _Api.default.sendRequest("/remote_servers/".concat(encodeURIComponent(params['id'])), 'PATCH', params, _this.options);
834
+ case 112:
835
+ response = _context2.sent;
836
+ return _context2.abrupt("return", new RemoteServer(response === null || response === void 0 ? void 0 : response.data, _this.options));
837
+ case 114:
700
838
  case "end":
701
- return _context.stop();
839
+ return _context2.stop();
702
840
  }
703
841
  }
704
- }, _callee);
842
+ }, _callee2);
705
843
  })));
706
- (0, _defineProperty2.default)(this, "delete", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
844
+ (0, _defineProperty2.default)(this, "delete", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
707
845
  var params,
708
846
  response,
709
- _args2 = arguments;
710
- return _regenerator.default.wrap(function _callee2$(_context2) {
847
+ _args3 = arguments;
848
+ return _regenerator.default.wrap(function _callee3$(_context3) {
711
849
  while (1) {
712
- switch (_context2.prev = _context2.next) {
850
+ switch (_context3.prev = _context3.next) {
713
851
  case 0:
714
- params = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
852
+ params = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {};
715
853
  if (_this.attributes.id) {
716
- _context2.next = 3;
854
+ _context3.next = 3;
717
855
  break;
718
856
  }
719
857
  throw new errors.EmptyPropertyError('Current object has no id');
720
858
  case 3:
721
859
  if ((0, _utils.isObject)(params)) {
722
- _context2.next = 5;
860
+ _context3.next = 5;
723
861
  break;
724
862
  }
725
863
  throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
726
864
  case 5:
727
865
  params.id = _this.attributes.id;
728
866
  if (!(params['id'] && !(0, _utils.isInt)(params['id']))) {
729
- _context2.next = 8;
867
+ _context3.next = 8;
730
868
  break;
731
869
  }
732
870
  throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(id)));
733
871
  case 8:
734
872
  if (params['id']) {
735
- _context2.next = 14;
873
+ _context3.next = 14;
736
874
  break;
737
875
  }
738
876
  if (!_this.attributes.id) {
739
- _context2.next = 13;
877
+ _context3.next = 13;
740
878
  break;
741
879
  }
742
880
  params['id'] = _this.id;
743
- _context2.next = 14;
881
+ _context3.next = 14;
744
882
  break;
745
883
  case 13:
746
884
  throw new errors.MissingParameterError('Parameter missing: id');
747
885
  case 14:
748
- _context2.next = 16;
886
+ _context3.next = 16;
749
887
  return _Api.default.sendRequest("/remote_servers/".concat(encodeURIComponent(params['id'])), 'DELETE', params, _this.options);
750
888
  case 16:
751
- response = _context2.sent;
752
- return _context2.abrupt("return", response === null || response === void 0 ? void 0 : response.data);
889
+ response = _context3.sent;
890
+ return _context3.abrupt("return", response === null || response === void 0 ? void 0 : response.data);
753
891
  case 18:
754
892
  case "end":
755
- return _context2.stop();
893
+ return _context3.stop();
756
894
  }
757
895
  }
758
- }, _callee2);
896
+ }, _callee3);
759
897
  })));
760
898
  (0, _defineProperty2.default)(this, "destroy", function () {
761
899
  var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
@@ -770,10 +908,10 @@ var RemoteServer = /*#__PURE__*/(0, _createClass2.default)(function RemoteServer
770
908
  return true;
771
909
  }
772
910
  });
773
- Object.entries(attributes).forEach(function (_ref3) {
774
- var _ref4 = (0, _slicedToArray2.default)(_ref3, 2),
775
- key = _ref4[0],
776
- value = _ref4[1];
911
+ Object.entries(attributes).forEach(function (_ref4) {
912
+ var _ref5 = (0, _slicedToArray2.default)(_ref4, 2),
913
+ key = _ref5[0],
914
+ value = _ref5[1];
777
915
  var normalizedKey = key.replace('?', '');
778
916
  _this.attributes[normalizedKey] = value;
779
917
  Object.defineProperty(_this, normalizedKey, {
@@ -783,43 +921,43 @@ var RemoteServer = /*#__PURE__*/(0, _createClass2.default)(function RemoteServer
783
921
  });
784
922
  this.options = _objectSpread({}, options);
785
923
  });
786
- (0, _defineProperty2.default)(RemoteServer, "list", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
924
+ (0, _defineProperty2.default)(RemoteServer, "list", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4() {
787
925
  var _response$data;
788
926
  var params,
789
927
  options,
790
928
  response,
791
- _args3 = arguments;
792
- return _regenerator.default.wrap(function _callee3$(_context3) {
929
+ _args4 = arguments;
930
+ return _regenerator.default.wrap(function _callee4$(_context4) {
793
931
  while (1) {
794
- switch (_context3.prev = _context3.next) {
932
+ switch (_context4.prev = _context4.next) {
795
933
  case 0:
796
- params = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {};
797
- options = _args3.length > 1 && _args3[1] !== undefined ? _args3[1] : {};
934
+ params = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : {};
935
+ options = _args4.length > 1 && _args4[1] !== undefined ? _args4[1] : {};
798
936
  if (!(params['cursor'] && !(0, _utils.isString)(params['cursor']))) {
799
- _context3.next = 4;
937
+ _context4.next = 4;
800
938
  break;
801
939
  }
802
940
  throw new errors.InvalidParameterError("Bad parameter: cursor must be of type String, received ".concat((0, _utils.getType)(params['cursor'])));
803
941
  case 4:
804
942
  if (!(params['per_page'] && !(0, _utils.isInt)(params['per_page']))) {
805
- _context3.next = 6;
943
+ _context4.next = 6;
806
944
  break;
807
945
  }
808
946
  throw new errors.InvalidParameterError("Bad parameter: per_page must be of type Int, received ".concat((0, _utils.getType)(params['per_page'])));
809
947
  case 6:
810
- _context3.next = 8;
948
+ _context4.next = 8;
811
949
  return _Api.default.sendRequest("/remote_servers", 'GET', params, options);
812
950
  case 8:
813
- response = _context3.sent;
814
- return _context3.abrupt("return", (response === null || response === void 0 ? void 0 : (_response$data = response.data) === null || _response$data === void 0 ? void 0 : _response$data.map(function (obj) {
951
+ response = _context4.sent;
952
+ return _context4.abrupt("return", (response === null || response === void 0 ? void 0 : (_response$data = response.data) === null || _response$data === void 0 ? void 0 : _response$data.map(function (obj) {
815
953
  return new RemoteServer(obj, options);
816
954
  })) || []);
817
955
  case 10:
818
956
  case "end":
819
- return _context3.stop();
957
+ return _context4.stop();
820
958
  }
821
959
  }
822
- }, _callee3);
960
+ }, _callee4);
823
961
  })));
824
962
  (0, _defineProperty2.default)(RemoteServer, "all", function () {
825
963
  var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
@@ -827,50 +965,50 @@ var RemoteServer = /*#__PURE__*/(0, _createClass2.default)(function RemoteServer
827
965
  return RemoteServer.list(params, options);
828
966
  });
829
967
  (0, _defineProperty2.default)(RemoteServer, "find", /*#__PURE__*/function () {
830
- var _ref6 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(id) {
968
+ var _ref7 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5(id) {
831
969
  var params,
832
970
  options,
833
971
  response,
834
- _args4 = arguments;
835
- return _regenerator.default.wrap(function _callee4$(_context4) {
972
+ _args5 = arguments;
973
+ return _regenerator.default.wrap(function _callee5$(_context5) {
836
974
  while (1) {
837
- switch (_context4.prev = _context4.next) {
975
+ switch (_context5.prev = _context5.next) {
838
976
  case 0:
839
- params = _args4.length > 1 && _args4[1] !== undefined ? _args4[1] : {};
840
- options = _args4.length > 2 && _args4[2] !== undefined ? _args4[2] : {};
977
+ params = _args5.length > 1 && _args5[1] !== undefined ? _args5[1] : {};
978
+ options = _args5.length > 2 && _args5[2] !== undefined ? _args5[2] : {};
841
979
  if ((0, _utils.isObject)(params)) {
842
- _context4.next = 4;
980
+ _context5.next = 4;
843
981
  break;
844
982
  }
845
983
  throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
846
984
  case 4:
847
985
  params['id'] = id;
848
986
  if (params['id']) {
849
- _context4.next = 7;
987
+ _context5.next = 7;
850
988
  break;
851
989
  }
852
990
  throw new errors.MissingParameterError('Parameter missing: id');
853
991
  case 7:
854
992
  if (!(params['id'] && !(0, _utils.isInt)(params['id']))) {
855
- _context4.next = 9;
993
+ _context5.next = 9;
856
994
  break;
857
995
  }
858
996
  throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params['id'])));
859
997
  case 9:
860
- _context4.next = 11;
998
+ _context5.next = 11;
861
999
  return _Api.default.sendRequest("/remote_servers/".concat(encodeURIComponent(params['id'])), 'GET', params, options);
862
1000
  case 11:
863
- response = _context4.sent;
864
- return _context4.abrupt("return", new RemoteServer(response === null || response === void 0 ? void 0 : response.data, options));
1001
+ response = _context5.sent;
1002
+ return _context5.abrupt("return", new RemoteServer(response === null || response === void 0 ? void 0 : response.data, options));
865
1003
  case 13:
866
1004
  case "end":
867
- return _context4.stop();
1005
+ return _context5.stop();
868
1006
  }
869
1007
  }
870
- }, _callee4);
1008
+ }, _callee5);
871
1009
  }));
872
1010
  return function (_x) {
873
- return _ref6.apply(this, arguments);
1011
+ return _ref7.apply(this, arguments);
874
1012
  };
875
1013
  }());
876
1014
  (0, _defineProperty2.default)(RemoteServer, "get", function (id) {
@@ -878,304 +1016,363 @@ var RemoteServer = /*#__PURE__*/(0, _createClass2.default)(function RemoteServer
878
1016
  var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
879
1017
  return RemoteServer.find(id, params, options);
880
1018
  });
881
- (0, _defineProperty2.default)(RemoteServer, "create", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5() {
1019
+ (0, _defineProperty2.default)(RemoteServer, "findConfigurationFile", /*#__PURE__*/function () {
1020
+ var _ref8 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6(id) {
1021
+ var params,
1022
+ options,
1023
+ response,
1024
+ _args6 = arguments;
1025
+ return _regenerator.default.wrap(function _callee6$(_context6) {
1026
+ while (1) {
1027
+ switch (_context6.prev = _context6.next) {
1028
+ case 0:
1029
+ params = _args6.length > 1 && _args6[1] !== undefined ? _args6[1] : {};
1030
+ options = _args6.length > 2 && _args6[2] !== undefined ? _args6[2] : {};
1031
+ if ((0, _utils.isObject)(params)) {
1032
+ _context6.next = 4;
1033
+ break;
1034
+ }
1035
+ throw new errors.InvalidParameterError("Bad parameter: params must be of type object, received ".concat((0, _utils.getType)(params)));
1036
+ case 4:
1037
+ params['id'] = id;
1038
+ if (params['id']) {
1039
+ _context6.next = 7;
1040
+ break;
1041
+ }
1042
+ throw new errors.MissingParameterError('Parameter missing: id');
1043
+ case 7:
1044
+ if (!(params['id'] && !(0, _utils.isInt)(params['id']))) {
1045
+ _context6.next = 9;
1046
+ break;
1047
+ }
1048
+ throw new errors.InvalidParameterError("Bad parameter: id must be of type Int, received ".concat((0, _utils.getType)(params['id'])));
1049
+ case 9:
1050
+ _context6.next = 11;
1051
+ return _Api.default.sendRequest("/remote_servers/".concat(encodeURIComponent(params['id']), "/configuration_file"), 'GET', params, options);
1052
+ case 11:
1053
+ response = _context6.sent;
1054
+ return _context6.abrupt("return", new RemoteServerConfigurationFile(response === null || response === void 0 ? void 0 : response.data, options));
1055
+ case 13:
1056
+ case "end":
1057
+ return _context6.stop();
1058
+ }
1059
+ }
1060
+ }, _callee6);
1061
+ }));
1062
+ return function (_x2) {
1063
+ return _ref8.apply(this, arguments);
1064
+ };
1065
+ }());
1066
+ (0, _defineProperty2.default)(RemoteServer, "create", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7() {
882
1067
  var params,
883
1068
  options,
884
1069
  response,
885
- _args5 = arguments;
886
- return _regenerator.default.wrap(function _callee5$(_context5) {
1070
+ _args7 = arguments;
1071
+ return _regenerator.default.wrap(function _callee7$(_context7) {
887
1072
  while (1) {
888
- switch (_context5.prev = _context5.next) {
1073
+ switch (_context7.prev = _context7.next) {
889
1074
  case 0:
890
- params = _args5.length > 0 && _args5[0] !== undefined ? _args5[0] : {};
891
- options = _args5.length > 1 && _args5[1] !== undefined ? _args5[1] : {};
1075
+ params = _args7.length > 0 && _args7[0] !== undefined ? _args7[0] : {};
1076
+ options = _args7.length > 1 && _args7[1] !== undefined ? _args7[1] : {};
892
1077
  if (!(params['aws_access_key'] && !(0, _utils.isString)(params['aws_access_key']))) {
893
- _context5.next = 4;
1078
+ _context7.next = 4;
894
1079
  break;
895
1080
  }
896
1081
  throw new errors.InvalidParameterError("Bad parameter: aws_access_key must be of type String, received ".concat((0, _utils.getType)(params['aws_access_key'])));
897
1082
  case 4:
898
1083
  if (!(params['aws_secret_key'] && !(0, _utils.isString)(params['aws_secret_key']))) {
899
- _context5.next = 6;
1084
+ _context7.next = 6;
900
1085
  break;
901
1086
  }
902
1087
  throw new errors.InvalidParameterError("Bad parameter: aws_secret_key must be of type String, received ".concat((0, _utils.getType)(params['aws_secret_key'])));
903
1088
  case 6:
904
1089
  if (!(params['password'] && !(0, _utils.isString)(params['password']))) {
905
- _context5.next = 8;
1090
+ _context7.next = 8;
906
1091
  break;
907
1092
  }
908
1093
  throw new errors.InvalidParameterError("Bad parameter: password must be of type String, received ".concat((0, _utils.getType)(params['password'])));
909
1094
  case 8:
910
1095
  if (!(params['private_key'] && !(0, _utils.isString)(params['private_key']))) {
911
- _context5.next = 10;
1096
+ _context7.next = 10;
912
1097
  break;
913
1098
  }
914
1099
  throw new errors.InvalidParameterError("Bad parameter: private_key must be of type String, received ".concat((0, _utils.getType)(params['private_key'])));
915
1100
  case 10:
916
1101
  if (!(params['private_key_passphrase'] && !(0, _utils.isString)(params['private_key_passphrase']))) {
917
- _context5.next = 12;
1102
+ _context7.next = 12;
918
1103
  break;
919
1104
  }
920
1105
  throw new errors.InvalidParameterError("Bad parameter: private_key_passphrase must be of type String, received ".concat((0, _utils.getType)(params['private_key_passphrase'])));
921
1106
  case 12:
922
1107
  if (!(params['ssl_certificate'] && !(0, _utils.isString)(params['ssl_certificate']))) {
923
- _context5.next = 14;
1108
+ _context7.next = 14;
924
1109
  break;
925
1110
  }
926
1111
  throw new errors.InvalidParameterError("Bad parameter: ssl_certificate must be of type String, received ".concat((0, _utils.getType)(params['ssl_certificate'])));
927
1112
  case 14:
928
1113
  if (!(params['google_cloud_storage_credentials_json'] && !(0, _utils.isString)(params['google_cloud_storage_credentials_json']))) {
929
- _context5.next = 16;
1114
+ _context7.next = 16;
930
1115
  break;
931
1116
  }
932
1117
  throw new errors.InvalidParameterError("Bad parameter: google_cloud_storage_credentials_json must be of type String, received ".concat((0, _utils.getType)(params['google_cloud_storage_credentials_json'])));
933
1118
  case 16:
934
1119
  if (!(params['wasabi_access_key'] && !(0, _utils.isString)(params['wasabi_access_key']))) {
935
- _context5.next = 18;
1120
+ _context7.next = 18;
936
1121
  break;
937
1122
  }
938
1123
  throw new errors.InvalidParameterError("Bad parameter: wasabi_access_key must be of type String, received ".concat((0, _utils.getType)(params['wasabi_access_key'])));
939
1124
  case 18:
940
1125
  if (!(params['wasabi_secret_key'] && !(0, _utils.isString)(params['wasabi_secret_key']))) {
941
- _context5.next = 20;
1126
+ _context7.next = 20;
942
1127
  break;
943
1128
  }
944
1129
  throw new errors.InvalidParameterError("Bad parameter: wasabi_secret_key must be of type String, received ".concat((0, _utils.getType)(params['wasabi_secret_key'])));
945
1130
  case 20:
946
1131
  if (!(params['backblaze_b2_key_id'] && !(0, _utils.isString)(params['backblaze_b2_key_id']))) {
947
- _context5.next = 22;
1132
+ _context7.next = 22;
948
1133
  break;
949
1134
  }
950
1135
  throw new errors.InvalidParameterError("Bad parameter: backblaze_b2_key_id must be of type String, received ".concat((0, _utils.getType)(params['backblaze_b2_key_id'])));
951
1136
  case 22:
952
1137
  if (!(params['backblaze_b2_application_key'] && !(0, _utils.isString)(params['backblaze_b2_application_key']))) {
953
- _context5.next = 24;
1138
+ _context7.next = 24;
954
1139
  break;
955
1140
  }
956
1141
  throw new errors.InvalidParameterError("Bad parameter: backblaze_b2_application_key must be of type String, received ".concat((0, _utils.getType)(params['backblaze_b2_application_key'])));
957
1142
  case 24:
958
1143
  if (!(params['rackspace_api_key'] && !(0, _utils.isString)(params['rackspace_api_key']))) {
959
- _context5.next = 26;
1144
+ _context7.next = 26;
960
1145
  break;
961
1146
  }
962
1147
  throw new errors.InvalidParameterError("Bad parameter: rackspace_api_key must be of type String, received ".concat((0, _utils.getType)(params['rackspace_api_key'])));
963
1148
  case 26:
964
1149
  if (!(params['azure_blob_storage_access_key'] && !(0, _utils.isString)(params['azure_blob_storage_access_key']))) {
965
- _context5.next = 28;
1150
+ _context7.next = 28;
966
1151
  break;
967
1152
  }
968
1153
  throw new errors.InvalidParameterError("Bad parameter: azure_blob_storage_access_key must be of type String, received ".concat((0, _utils.getType)(params['azure_blob_storage_access_key'])));
969
1154
  case 28:
970
1155
  if (!(params['azure_files_storage_access_key'] && !(0, _utils.isString)(params['azure_files_storage_access_key']))) {
971
- _context5.next = 30;
1156
+ _context7.next = 30;
972
1157
  break;
973
1158
  }
974
1159
  throw new errors.InvalidParameterError("Bad parameter: azure_files_storage_access_key must be of type String, received ".concat((0, _utils.getType)(params['azure_files_storage_access_key'])));
975
1160
  case 30:
976
1161
  if (!(params['hostname'] && !(0, _utils.isString)(params['hostname']))) {
977
- _context5.next = 32;
1162
+ _context7.next = 32;
978
1163
  break;
979
1164
  }
980
1165
  throw new errors.InvalidParameterError("Bad parameter: hostname must be of type String, received ".concat((0, _utils.getType)(params['hostname'])));
981
1166
  case 32:
982
1167
  if (!(params['name'] && !(0, _utils.isString)(params['name']))) {
983
- _context5.next = 34;
1168
+ _context7.next = 34;
984
1169
  break;
985
1170
  }
986
1171
  throw new errors.InvalidParameterError("Bad parameter: name must be of type String, received ".concat((0, _utils.getType)(params['name'])));
987
1172
  case 34:
988
1173
  if (!(params['max_connections'] && !(0, _utils.isInt)(params['max_connections']))) {
989
- _context5.next = 36;
1174
+ _context7.next = 36;
990
1175
  break;
991
1176
  }
992
1177
  throw new errors.InvalidParameterError("Bad parameter: max_connections must be of type Int, received ".concat((0, _utils.getType)(params['max_connections'])));
993
1178
  case 36:
994
1179
  if (!(params['port'] && !(0, _utils.isInt)(params['port']))) {
995
- _context5.next = 38;
1180
+ _context7.next = 38;
996
1181
  break;
997
1182
  }
998
1183
  throw new errors.InvalidParameterError("Bad parameter: port must be of type Int, received ".concat((0, _utils.getType)(params['port'])));
999
1184
  case 38:
1000
1185
  if (!(params['s3_bucket'] && !(0, _utils.isString)(params['s3_bucket']))) {
1001
- _context5.next = 40;
1186
+ _context7.next = 40;
1002
1187
  break;
1003
1188
  }
1004
1189
  throw new errors.InvalidParameterError("Bad parameter: s3_bucket must be of type String, received ".concat((0, _utils.getType)(params['s3_bucket'])));
1005
1190
  case 40:
1006
1191
  if (!(params['s3_region'] && !(0, _utils.isString)(params['s3_region']))) {
1007
- _context5.next = 42;
1192
+ _context7.next = 42;
1008
1193
  break;
1009
1194
  }
1010
1195
  throw new errors.InvalidParameterError("Bad parameter: s3_region must be of type String, received ".concat((0, _utils.getType)(params['s3_region'])));
1011
1196
  case 42:
1012
1197
  if (!(params['server_certificate'] && !(0, _utils.isString)(params['server_certificate']))) {
1013
- _context5.next = 44;
1198
+ _context7.next = 44;
1014
1199
  break;
1015
1200
  }
1016
1201
  throw new errors.InvalidParameterError("Bad parameter: server_certificate must be of type String, received ".concat((0, _utils.getType)(params['server_certificate'])));
1017
1202
  case 44:
1018
1203
  if (!(params['server_host_key'] && !(0, _utils.isString)(params['server_host_key']))) {
1019
- _context5.next = 46;
1204
+ _context7.next = 46;
1020
1205
  break;
1021
1206
  }
1022
1207
  throw new errors.InvalidParameterError("Bad parameter: server_host_key must be of type String, received ".concat((0, _utils.getType)(params['server_host_key'])));
1023
1208
  case 46:
1024
1209
  if (!(params['server_type'] && !(0, _utils.isString)(params['server_type']))) {
1025
- _context5.next = 48;
1210
+ _context7.next = 48;
1026
1211
  break;
1027
1212
  }
1028
1213
  throw new errors.InvalidParameterError("Bad parameter: server_type must be of type String, received ".concat((0, _utils.getType)(params['server_type'])));
1029
1214
  case 48:
1030
1215
  if (!(params['ssl'] && !(0, _utils.isString)(params['ssl']))) {
1031
- _context5.next = 50;
1216
+ _context7.next = 50;
1032
1217
  break;
1033
1218
  }
1034
1219
  throw new errors.InvalidParameterError("Bad parameter: ssl must be of type String, received ".concat((0, _utils.getType)(params['ssl'])));
1035
1220
  case 50:
1036
1221
  if (!(params['username'] && !(0, _utils.isString)(params['username']))) {
1037
- _context5.next = 52;
1222
+ _context7.next = 52;
1038
1223
  break;
1039
1224
  }
1040
1225
  throw new errors.InvalidParameterError("Bad parameter: username must be of type String, received ".concat((0, _utils.getType)(params['username'])));
1041
1226
  case 52:
1042
1227
  if (!(params['google_cloud_storage_bucket'] && !(0, _utils.isString)(params['google_cloud_storage_bucket']))) {
1043
- _context5.next = 54;
1228
+ _context7.next = 54;
1044
1229
  break;
1045
1230
  }
1046
1231
  throw new errors.InvalidParameterError("Bad parameter: google_cloud_storage_bucket must be of type String, received ".concat((0, _utils.getType)(params['google_cloud_storage_bucket'])));
1047
1232
  case 54:
1048
1233
  if (!(params['google_cloud_storage_project_id'] && !(0, _utils.isString)(params['google_cloud_storage_project_id']))) {
1049
- _context5.next = 56;
1234
+ _context7.next = 56;
1050
1235
  break;
1051
1236
  }
1052
1237
  throw new errors.InvalidParameterError("Bad parameter: google_cloud_storage_project_id must be of type String, received ".concat((0, _utils.getType)(params['google_cloud_storage_project_id'])));
1053
1238
  case 56:
1054
1239
  if (!(params['backblaze_b2_bucket'] && !(0, _utils.isString)(params['backblaze_b2_bucket']))) {
1055
- _context5.next = 58;
1240
+ _context7.next = 58;
1056
1241
  break;
1057
1242
  }
1058
1243
  throw new errors.InvalidParameterError("Bad parameter: backblaze_b2_bucket must be of type String, received ".concat((0, _utils.getType)(params['backblaze_b2_bucket'])));
1059
1244
  case 58:
1060
1245
  if (!(params['backblaze_b2_s3_endpoint'] && !(0, _utils.isString)(params['backblaze_b2_s3_endpoint']))) {
1061
- _context5.next = 60;
1246
+ _context7.next = 60;
1062
1247
  break;
1063
1248
  }
1064
1249
  throw new errors.InvalidParameterError("Bad parameter: backblaze_b2_s3_endpoint must be of type String, received ".concat((0, _utils.getType)(params['backblaze_b2_s3_endpoint'])));
1065
1250
  case 60:
1066
1251
  if (!(params['wasabi_bucket'] && !(0, _utils.isString)(params['wasabi_bucket']))) {
1067
- _context5.next = 62;
1252
+ _context7.next = 62;
1068
1253
  break;
1069
1254
  }
1070
1255
  throw new errors.InvalidParameterError("Bad parameter: wasabi_bucket must be of type String, received ".concat((0, _utils.getType)(params['wasabi_bucket'])));
1071
1256
  case 62:
1072
1257
  if (!(params['wasabi_region'] && !(0, _utils.isString)(params['wasabi_region']))) {
1073
- _context5.next = 64;
1258
+ _context7.next = 64;
1074
1259
  break;
1075
1260
  }
1076
1261
  throw new errors.InvalidParameterError("Bad parameter: wasabi_region must be of type String, received ".concat((0, _utils.getType)(params['wasabi_region'])));
1077
1262
  case 64:
1078
1263
  if (!(params['rackspace_username'] && !(0, _utils.isString)(params['rackspace_username']))) {
1079
- _context5.next = 66;
1264
+ _context7.next = 66;
1080
1265
  break;
1081
1266
  }
1082
1267
  throw new errors.InvalidParameterError("Bad parameter: rackspace_username must be of type String, received ".concat((0, _utils.getType)(params['rackspace_username'])));
1083
1268
  case 66:
1084
1269
  if (!(params['rackspace_region'] && !(0, _utils.isString)(params['rackspace_region']))) {
1085
- _context5.next = 68;
1270
+ _context7.next = 68;
1086
1271
  break;
1087
1272
  }
1088
1273
  throw new errors.InvalidParameterError("Bad parameter: rackspace_region must be of type String, received ".concat((0, _utils.getType)(params['rackspace_region'])));
1089
1274
  case 68:
1090
1275
  if (!(params['rackspace_container'] && !(0, _utils.isString)(params['rackspace_container']))) {
1091
- _context5.next = 70;
1276
+ _context7.next = 70;
1092
1277
  break;
1093
1278
  }
1094
1279
  throw new errors.InvalidParameterError("Bad parameter: rackspace_container must be of type String, received ".concat((0, _utils.getType)(params['rackspace_container'])));
1095
1280
  case 70:
1096
1281
  if (!(params['one_drive_account_type'] && !(0, _utils.isString)(params['one_drive_account_type']))) {
1097
- _context5.next = 72;
1282
+ _context7.next = 72;
1098
1283
  break;
1099
1284
  }
1100
1285
  throw new errors.InvalidParameterError("Bad parameter: one_drive_account_type must be of type String, received ".concat((0, _utils.getType)(params['one_drive_account_type'])));
1101
1286
  case 72:
1102
1287
  if (!(params['azure_blob_storage_account'] && !(0, _utils.isString)(params['azure_blob_storage_account']))) {
1103
- _context5.next = 74;
1288
+ _context7.next = 74;
1104
1289
  break;
1105
1290
  }
1106
1291
  throw new errors.InvalidParameterError("Bad parameter: azure_blob_storage_account must be of type String, received ".concat((0, _utils.getType)(params['azure_blob_storage_account'])));
1107
1292
  case 74:
1108
1293
  if (!(params['azure_blob_storage_container'] && !(0, _utils.isString)(params['azure_blob_storage_container']))) {
1109
- _context5.next = 76;
1294
+ _context7.next = 76;
1110
1295
  break;
1111
1296
  }
1112
1297
  throw new errors.InvalidParameterError("Bad parameter: azure_blob_storage_container must be of type String, received ".concat((0, _utils.getType)(params['azure_blob_storage_container'])));
1113
1298
  case 76:
1114
1299
  if (!(params['azure_blob_storage_sas_token'] && !(0, _utils.isString)(params['azure_blob_storage_sas_token']))) {
1115
- _context5.next = 78;
1300
+ _context7.next = 78;
1116
1301
  break;
1117
1302
  }
1118
1303
  throw new errors.InvalidParameterError("Bad parameter: azure_blob_storage_sas_token must be of type String, received ".concat((0, _utils.getType)(params['azure_blob_storage_sas_token'])));
1119
1304
  case 78:
1120
1305
  if (!(params['azure_files_storage_account'] && !(0, _utils.isString)(params['azure_files_storage_account']))) {
1121
- _context5.next = 80;
1306
+ _context7.next = 80;
1122
1307
  break;
1123
1308
  }
1124
1309
  throw new errors.InvalidParameterError("Bad parameter: azure_files_storage_account must be of type String, received ".concat((0, _utils.getType)(params['azure_files_storage_account'])));
1125
1310
  case 80:
1126
1311
  if (!(params['azure_files_storage_share_name'] && !(0, _utils.isString)(params['azure_files_storage_share_name']))) {
1127
- _context5.next = 82;
1312
+ _context7.next = 82;
1128
1313
  break;
1129
1314
  }
1130
1315
  throw new errors.InvalidParameterError("Bad parameter: azure_files_storage_share_name must be of type String, received ".concat((0, _utils.getType)(params['azure_files_storage_share_name'])));
1131
1316
  case 82:
1132
1317
  if (!(params['azure_files_storage_sas_token'] && !(0, _utils.isString)(params['azure_files_storage_sas_token']))) {
1133
- _context5.next = 84;
1318
+ _context7.next = 84;
1134
1319
  break;
1135
1320
  }
1136
1321
  throw new errors.InvalidParameterError("Bad parameter: azure_files_storage_sas_token must be of type String, received ".concat((0, _utils.getType)(params['azure_files_storage_sas_token'])));
1137
1322
  case 84:
1138
1323
  if (!(params['s3_compatible_bucket'] && !(0, _utils.isString)(params['s3_compatible_bucket']))) {
1139
- _context5.next = 86;
1324
+ _context7.next = 86;
1140
1325
  break;
1141
1326
  }
1142
1327
  throw new errors.InvalidParameterError("Bad parameter: s3_compatible_bucket must be of type String, received ".concat((0, _utils.getType)(params['s3_compatible_bucket'])));
1143
1328
  case 86:
1144
1329
  if (!(params['s3_compatible_endpoint'] && !(0, _utils.isString)(params['s3_compatible_endpoint']))) {
1145
- _context5.next = 88;
1330
+ _context7.next = 88;
1146
1331
  break;
1147
1332
  }
1148
1333
  throw new errors.InvalidParameterError("Bad parameter: s3_compatible_endpoint must be of type String, received ".concat((0, _utils.getType)(params['s3_compatible_endpoint'])));
1149
1334
  case 88:
1150
1335
  if (!(params['s3_compatible_region'] && !(0, _utils.isString)(params['s3_compatible_region']))) {
1151
- _context5.next = 90;
1336
+ _context7.next = 90;
1152
1337
  break;
1153
1338
  }
1154
1339
  throw new errors.InvalidParameterError("Bad parameter: s3_compatible_region must be of type String, received ".concat((0, _utils.getType)(params['s3_compatible_region'])));
1155
1340
  case 90:
1156
1341
  if (!(params['s3_compatible_access_key'] && !(0, _utils.isString)(params['s3_compatible_access_key']))) {
1157
- _context5.next = 92;
1342
+ _context7.next = 92;
1158
1343
  break;
1159
1344
  }
1160
1345
  throw new errors.InvalidParameterError("Bad parameter: s3_compatible_access_key must be of type String, received ".concat((0, _utils.getType)(params['s3_compatible_access_key'])));
1161
1346
  case 92:
1162
1347
  if (!(params['s3_compatible_secret_key'] && !(0, _utils.isString)(params['s3_compatible_secret_key']))) {
1163
- _context5.next = 94;
1348
+ _context7.next = 94;
1164
1349
  break;
1165
1350
  }
1166
1351
  throw new errors.InvalidParameterError("Bad parameter: s3_compatible_secret_key must be of type String, received ".concat((0, _utils.getType)(params['s3_compatible_secret_key'])));
1167
1352
  case 94:
1168
- _context5.next = 96;
1169
- return _Api.default.sendRequest("/remote_servers", 'POST', params, options);
1353
+ if (!(params['files_agent_root'] && !(0, _utils.isString)(params['files_agent_root']))) {
1354
+ _context7.next = 96;
1355
+ break;
1356
+ }
1357
+ throw new errors.InvalidParameterError("Bad parameter: files_agent_root must be of type String, received ".concat((0, _utils.getType)(params['files_agent_root'])));
1170
1358
  case 96:
1171
- response = _context5.sent;
1172
- return _context5.abrupt("return", new RemoteServer(response === null || response === void 0 ? void 0 : response.data, options));
1359
+ if (!(params['files_agent_permission_set'] && !(0, _utils.isString)(params['files_agent_permission_set']))) {
1360
+ _context7.next = 98;
1361
+ break;
1362
+ }
1363
+ throw new errors.InvalidParameterError("Bad parameter: files_agent_permission_set must be of type String, received ".concat((0, _utils.getType)(params['files_agent_permission_set'])));
1173
1364
  case 98:
1365
+ _context7.next = 100;
1366
+ return _Api.default.sendRequest("/remote_servers", 'POST', params, options);
1367
+ case 100:
1368
+ response = _context7.sent;
1369
+ return _context7.abrupt("return", new RemoteServer(response === null || response === void 0 ? void 0 : response.data, options));
1370
+ case 102:
1174
1371
  case "end":
1175
- return _context5.stop();
1372
+ return _context7.stop();
1176
1373
  }
1177
1374
  }
1178
- }, _callee5);
1375
+ }, _callee7);
1179
1376
  })));
1180
1377
  var _default = RemoteServer;
1181
1378
  exports.default = _default;