@aws-sdk/client-mediastore-data 3.183.0 → 3.185.0

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.
@@ -1,56 +1,57 @@
1
+ import { __assign, __extends } from "tslib";
1
2
  import { MediaStoreDataServiceException as __BaseException } from "./MediaStoreDataServiceException";
2
- export class ContainerNotFoundException extends __BaseException {
3
- constructor(opts) {
4
- super({
5
- name: "ContainerNotFoundException",
6
- $fault: "client",
7
- ...opts,
8
- });
9
- this.name = "ContainerNotFoundException";
10
- this.$fault = "client";
11
- Object.setPrototypeOf(this, ContainerNotFoundException.prototype);
12
- this.Message = opts.Message;
3
+ var ContainerNotFoundException = (function (_super) {
4
+ __extends(ContainerNotFoundException, _super);
5
+ function ContainerNotFoundException(opts) {
6
+ var _this = _super.call(this, __assign({ name: "ContainerNotFoundException", $fault: "client" }, opts)) || this;
7
+ _this.name = "ContainerNotFoundException";
8
+ _this.$fault = "client";
9
+ Object.setPrototypeOf(_this, ContainerNotFoundException.prototype);
10
+ _this.Message = opts.Message;
11
+ return _this;
13
12
  }
14
- }
15
- export class InternalServerError extends __BaseException {
16
- constructor(opts) {
17
- super({
18
- name: "InternalServerError",
19
- $fault: "server",
20
- ...opts,
21
- });
22
- this.name = "InternalServerError";
23
- this.$fault = "server";
24
- Object.setPrototypeOf(this, InternalServerError.prototype);
25
- this.Message = opts.Message;
13
+ return ContainerNotFoundException;
14
+ }(__BaseException));
15
+ export { ContainerNotFoundException };
16
+ var InternalServerError = (function (_super) {
17
+ __extends(InternalServerError, _super);
18
+ function InternalServerError(opts) {
19
+ var _this = _super.call(this, __assign({ name: "InternalServerError", $fault: "server" }, opts)) || this;
20
+ _this.name = "InternalServerError";
21
+ _this.$fault = "server";
22
+ Object.setPrototypeOf(_this, InternalServerError.prototype);
23
+ _this.Message = opts.Message;
24
+ return _this;
26
25
  }
27
- }
28
- export class ObjectNotFoundException extends __BaseException {
29
- constructor(opts) {
30
- super({
31
- name: "ObjectNotFoundException",
32
- $fault: "client",
33
- ...opts,
34
- });
35
- this.name = "ObjectNotFoundException";
36
- this.$fault = "client";
37
- Object.setPrototypeOf(this, ObjectNotFoundException.prototype);
38
- this.Message = opts.Message;
26
+ return InternalServerError;
27
+ }(__BaseException));
28
+ export { InternalServerError };
29
+ var ObjectNotFoundException = (function (_super) {
30
+ __extends(ObjectNotFoundException, _super);
31
+ function ObjectNotFoundException(opts) {
32
+ var _this = _super.call(this, __assign({ name: "ObjectNotFoundException", $fault: "client" }, opts)) || this;
33
+ _this.name = "ObjectNotFoundException";
34
+ _this.$fault = "client";
35
+ Object.setPrototypeOf(_this, ObjectNotFoundException.prototype);
36
+ _this.Message = opts.Message;
37
+ return _this;
39
38
  }
40
- }
41
- export class RequestedRangeNotSatisfiableException extends __BaseException {
42
- constructor(opts) {
43
- super({
44
- name: "RequestedRangeNotSatisfiableException",
45
- $fault: "client",
46
- ...opts,
47
- });
48
- this.name = "RequestedRangeNotSatisfiableException";
49
- this.$fault = "client";
50
- Object.setPrototypeOf(this, RequestedRangeNotSatisfiableException.prototype);
51
- this.Message = opts.Message;
39
+ return ObjectNotFoundException;
40
+ }(__BaseException));
41
+ export { ObjectNotFoundException };
42
+ var RequestedRangeNotSatisfiableException = (function (_super) {
43
+ __extends(RequestedRangeNotSatisfiableException, _super);
44
+ function RequestedRangeNotSatisfiableException(opts) {
45
+ var _this = _super.call(this, __assign({ name: "RequestedRangeNotSatisfiableException", $fault: "client" }, opts)) || this;
46
+ _this.name = "RequestedRangeNotSatisfiableException";
47
+ _this.$fault = "client";
48
+ Object.setPrototypeOf(_this, RequestedRangeNotSatisfiableException.prototype);
49
+ _this.Message = opts.Message;
50
+ return _this;
52
51
  }
53
- }
52
+ return RequestedRangeNotSatisfiableException;
53
+ }(__BaseException));
54
+ export { RequestedRangeNotSatisfiableException };
54
55
  export var ItemType;
55
56
  (function (ItemType) {
56
57
  ItemType["FOLDER"] = "FOLDER";
@@ -65,36 +66,14 @@ export var UploadAvailability;
65
66
  UploadAvailability["STANDARD"] = "STANDARD";
66
67
  UploadAvailability["STREAMING"] = "STREAMING";
67
68
  })(UploadAvailability || (UploadAvailability = {}));
68
- export const DeleteObjectRequestFilterSensitiveLog = (obj) => ({
69
- ...obj,
70
- });
71
- export const DeleteObjectResponseFilterSensitiveLog = (obj) => ({
72
- ...obj,
73
- });
74
- export const DescribeObjectRequestFilterSensitiveLog = (obj) => ({
75
- ...obj,
76
- });
77
- export const DescribeObjectResponseFilterSensitiveLog = (obj) => ({
78
- ...obj,
79
- });
80
- export const GetObjectRequestFilterSensitiveLog = (obj) => ({
81
- ...obj,
82
- });
83
- export const GetObjectResponseFilterSensitiveLog = (obj) => ({
84
- ...obj,
85
- });
86
- export const ItemFilterSensitiveLog = (obj) => ({
87
- ...obj,
88
- });
89
- export const ListItemsRequestFilterSensitiveLog = (obj) => ({
90
- ...obj,
91
- });
92
- export const ListItemsResponseFilterSensitiveLog = (obj) => ({
93
- ...obj,
94
- });
95
- export const PutObjectRequestFilterSensitiveLog = (obj) => ({
96
- ...obj,
97
- });
98
- export const PutObjectResponseFilterSensitiveLog = (obj) => ({
99
- ...obj,
100
- });
69
+ export var DeleteObjectRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
70
+ export var DeleteObjectResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
71
+ export var DescribeObjectRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
72
+ export var DescribeObjectResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
73
+ export var GetObjectRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
74
+ export var GetObjectResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
75
+ export var ItemFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
76
+ export var ListItemsRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
77
+ export var ListItemsResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
78
+ export var PutObjectRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
79
+ export var PutObjectResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -1,32 +1,75 @@
1
+ import { __asyncGenerator, __await, __awaiter, __generator, __read, __spreadArray } from "tslib";
1
2
  import { ListItemsCommand } from "../commands/ListItemsCommand";
2
3
  import { MediaStoreData } from "../MediaStoreData";
3
4
  import { MediaStoreDataClient } from "../MediaStoreDataClient";
4
- const makePagedClientRequest = async (client, input, ...args) => {
5
- return await client.send(new ListItemsCommand(input), ...args);
5
+ var makePagedClientRequest = function (client, input) {
6
+ var args = [];
7
+ for (var _i = 2; _i < arguments.length; _i++) {
8
+ args[_i - 2] = arguments[_i];
9
+ }
10
+ return __awaiter(void 0, void 0, void 0, function () {
11
+ return __generator(this, function (_a) {
12
+ switch (_a.label) {
13
+ case 0: return [4, client.send.apply(client, __spreadArray([new ListItemsCommand(input)], __read(args), false))];
14
+ case 1: return [2, _a.sent()];
15
+ }
16
+ });
17
+ });
6
18
  };
7
- const makePagedRequest = async (client, input, ...args) => {
8
- return await client.listItems(input, ...args);
19
+ var makePagedRequest = function (client, input) {
20
+ var args = [];
21
+ for (var _i = 2; _i < arguments.length; _i++) {
22
+ args[_i - 2] = arguments[_i];
23
+ }
24
+ return __awaiter(void 0, void 0, void 0, function () {
25
+ return __generator(this, function (_a) {
26
+ switch (_a.label) {
27
+ case 0: return [4, client.listItems.apply(client, __spreadArray([input], __read(args), false))];
28
+ case 1: return [2, _a.sent()];
29
+ }
30
+ });
31
+ });
9
32
  };
10
- export async function* paginateListItems(config, input, ...additionalArguments) {
11
- let token = config.startingToken || undefined;
12
- let hasNext = true;
13
- let page;
14
- while (hasNext) {
15
- input.NextToken = token;
16
- input["MaxResults"] = config.pageSize;
17
- if (config.client instanceof MediaStoreData) {
18
- page = await makePagedRequest(config.client, input, ...additionalArguments);
19
- }
20
- else if (config.client instanceof MediaStoreDataClient) {
21
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
22
- }
23
- else {
24
- throw new Error("Invalid client, expected MediaStoreData | MediaStoreDataClient");
25
- }
26
- yield page;
27
- const prevToken = token;
28
- token = page.NextToken;
29
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
33
+ export function paginateListItems(config, input) {
34
+ var additionalArguments = [];
35
+ for (var _i = 2; _i < arguments.length; _i++) {
36
+ additionalArguments[_i - 2] = arguments[_i];
30
37
  }
31
- return undefined;
38
+ return __asyncGenerator(this, arguments, function paginateListItems_1() {
39
+ var token, hasNext, page, prevToken;
40
+ return __generator(this, function (_a) {
41
+ switch (_a.label) {
42
+ case 0:
43
+ token = config.startingToken || undefined;
44
+ hasNext = true;
45
+ _a.label = 1;
46
+ case 1:
47
+ if (!hasNext) return [3, 9];
48
+ input.NextToken = token;
49
+ input["MaxResults"] = config.pageSize;
50
+ if (!(config.client instanceof MediaStoreData)) return [3, 3];
51
+ return [4, __await(makePagedRequest.apply(void 0, __spreadArray([config.client, input], __read(additionalArguments), false)))];
52
+ case 2:
53
+ page = _a.sent();
54
+ return [3, 6];
55
+ case 3:
56
+ if (!(config.client instanceof MediaStoreDataClient)) return [3, 5];
57
+ return [4, __await(makePagedClientRequest.apply(void 0, __spreadArray([config.client, input], __read(additionalArguments), false)))];
58
+ case 4:
59
+ page = _a.sent();
60
+ return [3, 6];
61
+ case 5: throw new Error("Invalid client, expected MediaStoreData | MediaStoreDataClient");
62
+ case 6: return [4, __await(page)];
63
+ case 7: return [4, _a.sent()];
64
+ case 8:
65
+ _a.sent();
66
+ prevToken = token;
67
+ token = page.NextToken;
68
+ hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
69
+ return [3, 1];
70
+ case 9: return [4, __await(undefined)];
71
+ case 10: return [2, _a.sent()];
72
+ }
73
+ });
74
+ });
32
75
  }