@aws-sdk/client-codeguru-reviewer 3.901.0 → 3.906.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.
Files changed (2) hide show
  1. package/dist-cjs/index.js +1271 -1419
  2. package/package.json +5 -5
package/dist-cjs/index.js CHANGED
@@ -1,1464 +1,1316 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
18
- };
19
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
-
21
- // src/index.ts
22
- var index_exports = {};
23
- __export(index_exports, {
24
- AccessDeniedException: () => AccessDeniedException,
25
- AnalysisType: () => AnalysisType,
26
- AssociateRepositoryCommand: () => AssociateRepositoryCommand,
27
- CodeGuruReviewer: () => CodeGuruReviewer,
28
- CodeGuruReviewerClient: () => CodeGuruReviewerClient,
29
- CodeGuruReviewerServiceException: () => CodeGuruReviewerServiceException,
30
- ConfigFileState: () => ConfigFileState,
31
- ConflictException: () => ConflictException,
32
- CreateCodeReviewCommand: () => CreateCodeReviewCommand,
33
- DescribeCodeReviewCommand: () => DescribeCodeReviewCommand,
34
- DescribeRecommendationFeedbackCommand: () => DescribeRecommendationFeedbackCommand,
35
- DescribeRepositoryAssociationCommand: () => DescribeRepositoryAssociationCommand,
36
- DisassociateRepositoryCommand: () => DisassociateRepositoryCommand,
37
- EncryptionOption: () => EncryptionOption,
38
- InternalServerException: () => InternalServerException,
39
- JobState: () => JobState,
40
- ListCodeReviewsCommand: () => ListCodeReviewsCommand,
41
- ListRecommendationFeedbackCommand: () => ListRecommendationFeedbackCommand,
42
- ListRecommendationsCommand: () => ListRecommendationsCommand,
43
- ListRepositoryAssociationsCommand: () => ListRepositoryAssociationsCommand,
44
- ListTagsForResourceCommand: () => ListTagsForResourceCommand,
45
- NotFoundException: () => NotFoundException,
46
- ProviderType: () => ProviderType,
47
- PutRecommendationFeedbackCommand: () => PutRecommendationFeedbackCommand,
48
- Reaction: () => Reaction,
49
- RecommendationCategory: () => RecommendationCategory,
50
- RepositoryAssociationState: () => RepositoryAssociationState,
51
- ResourceNotFoundException: () => ResourceNotFoundException,
52
- Severity: () => Severity,
53
- TagResourceCommand: () => TagResourceCommand,
54
- ThrottlingException: () => ThrottlingException,
55
- Type: () => Type,
56
- UntagResourceCommand: () => UntagResourceCommand,
57
- ValidationException: () => ValidationException,
58
- VendorName: () => VendorName,
59
- __Client: () => import_smithy_client.Client,
60
- paginateListCodeReviews: () => paginateListCodeReviews,
61
- paginateListRecommendationFeedback: () => paginateListRecommendationFeedback,
62
- paginateListRecommendations: () => paginateListRecommendations,
63
- paginateListRepositoryAssociations: () => paginateListRepositoryAssociations,
64
- waitForCodeReviewCompleted: () => waitForCodeReviewCompleted,
65
- waitForRepositoryAssociationSucceeded: () => waitForRepositoryAssociationSucceeded,
66
- waitUntilCodeReviewCompleted: () => waitUntilCodeReviewCompleted,
67
- waitUntilRepositoryAssociationSucceeded: () => waitUntilRepositoryAssociationSucceeded
68
- });
69
- module.exports = __toCommonJS(index_exports);
70
-
71
- // src/CodeGuruReviewerClient.ts
72
- var import_middleware_host_header = require("@aws-sdk/middleware-host-header");
73
- var import_middleware_logger = require("@aws-sdk/middleware-logger");
74
- var import_middleware_recursion_detection = require("@aws-sdk/middleware-recursion-detection");
75
- var import_middleware_user_agent = require("@aws-sdk/middleware-user-agent");
76
- var import_config_resolver = require("@smithy/config-resolver");
77
- var import_core = require("@smithy/core");
78
- var import_middleware_content_length = require("@smithy/middleware-content-length");
79
- var import_middleware_endpoint = require("@smithy/middleware-endpoint");
80
- var import_middleware_retry = require("@smithy/middleware-retry");
81
-
82
- var import_httpAuthSchemeProvider = require("./auth/httpAuthSchemeProvider");
83
-
84
- // src/endpoint/EndpointParameters.ts
85
- var resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => {
86
- return Object.assign(options, {
87
- useDualstackEndpoint: options.useDualstackEndpoint ?? false,
88
- useFipsEndpoint: options.useFipsEndpoint ?? false,
89
- defaultSigningName: "codeguru-reviewer"
90
- });
91
- }, "resolveClientEndpointParameters");
92
- var commonParams = {
93
- UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
94
- Endpoint: { type: "builtInParams", name: "endpoint" },
95
- Region: { type: "builtInParams", name: "region" },
96
- UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
1
+ 'use strict';
2
+
3
+ var middlewareHostHeader = require('@aws-sdk/middleware-host-header');
4
+ var middlewareLogger = require('@aws-sdk/middleware-logger');
5
+ var middlewareRecursionDetection = require('@aws-sdk/middleware-recursion-detection');
6
+ var middlewareUserAgent = require('@aws-sdk/middleware-user-agent');
7
+ var configResolver = require('@smithy/config-resolver');
8
+ var core = require('@smithy/core');
9
+ var middlewareContentLength = require('@smithy/middleware-content-length');
10
+ var middlewareEndpoint = require('@smithy/middleware-endpoint');
11
+ var middlewareRetry = require('@smithy/middleware-retry');
12
+ var smithyClient = require('@smithy/smithy-client');
13
+ var httpAuthSchemeProvider = require('./auth/httpAuthSchemeProvider');
14
+ var runtimeConfig = require('./runtimeConfig');
15
+ var regionConfigResolver = require('@aws-sdk/region-config-resolver');
16
+ var protocolHttp = require('@smithy/protocol-http');
17
+ var middlewareSerde = require('@smithy/middleware-serde');
18
+ var core$1 = require('@aws-sdk/core');
19
+ var uuid = require('@smithy/uuid');
20
+ var utilWaiter = require('@smithy/util-waiter');
21
+
22
+ const resolveClientEndpointParameters = (options) => {
23
+ return Object.assign(options, {
24
+ useDualstackEndpoint: options.useDualstackEndpoint ?? false,
25
+ useFipsEndpoint: options.useFipsEndpoint ?? false,
26
+ defaultSigningName: "codeguru-reviewer",
27
+ });
28
+ };
29
+ const commonParams = {
30
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
31
+ Endpoint: { type: "builtInParams", name: "endpoint" },
32
+ Region: { type: "builtInParams", name: "region" },
33
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
97
34
  };
98
35
 
99
- // src/CodeGuruReviewerClient.ts
100
- var import_runtimeConfig = require("././runtimeConfig");
36
+ const getHttpAuthExtensionConfiguration = (runtimeConfig) => {
37
+ const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
38
+ let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
39
+ let _credentials = runtimeConfig.credentials;
40
+ return {
41
+ setHttpAuthScheme(httpAuthScheme) {
42
+ const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
43
+ if (index === -1) {
44
+ _httpAuthSchemes.push(httpAuthScheme);
45
+ }
46
+ else {
47
+ _httpAuthSchemes.splice(index, 1, httpAuthScheme);
48
+ }
49
+ },
50
+ httpAuthSchemes() {
51
+ return _httpAuthSchemes;
52
+ },
53
+ setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
54
+ _httpAuthSchemeProvider = httpAuthSchemeProvider;
55
+ },
56
+ httpAuthSchemeProvider() {
57
+ return _httpAuthSchemeProvider;
58
+ },
59
+ setCredentials(credentials) {
60
+ _credentials = credentials;
61
+ },
62
+ credentials() {
63
+ return _credentials;
64
+ },
65
+ };
66
+ };
67
+ const resolveHttpAuthRuntimeConfig = (config) => {
68
+ return {
69
+ httpAuthSchemes: config.httpAuthSchemes(),
70
+ httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
71
+ credentials: config.credentials(),
72
+ };
73
+ };
101
74
 
102
- // src/runtimeExtensions.ts
103
- var import_region_config_resolver = require("@aws-sdk/region-config-resolver");
104
- var import_protocol_http = require("@smithy/protocol-http");
105
- var import_smithy_client = require("@smithy/smithy-client");
75
+ const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
76
+ const extensionConfiguration = Object.assign(regionConfigResolver.getAwsRegionExtensionConfiguration(runtimeConfig), smithyClient.getDefaultExtensionConfiguration(runtimeConfig), protocolHttp.getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
77
+ extensions.forEach((extension) => extension.configure(extensionConfiguration));
78
+ return Object.assign(runtimeConfig, regionConfigResolver.resolveAwsRegionExtensionConfiguration(extensionConfiguration), smithyClient.resolveDefaultRuntimeConfig(extensionConfiguration), protocolHttp.resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
79
+ };
106
80
 
107
- // src/auth/httpAuthExtensionConfiguration.ts
108
- var getHttpAuthExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {
109
- const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
110
- let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
111
- let _credentials = runtimeConfig.credentials;
112
- return {
113
- setHttpAuthScheme(httpAuthScheme) {
114
- const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
115
- if (index === -1) {
116
- _httpAuthSchemes.push(httpAuthScheme);
117
- } else {
118
- _httpAuthSchemes.splice(index, 1, httpAuthScheme);
119
- }
120
- },
121
- httpAuthSchemes() {
122
- return _httpAuthSchemes;
123
- },
124
- setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
125
- _httpAuthSchemeProvider = httpAuthSchemeProvider;
126
- },
127
- httpAuthSchemeProvider() {
128
- return _httpAuthSchemeProvider;
129
- },
130
- setCredentials(credentials) {
131
- _credentials = credentials;
132
- },
133
- credentials() {
134
- return _credentials;
81
+ class CodeGuruReviewerClient extends smithyClient.Client {
82
+ config;
83
+ constructor(...[configuration]) {
84
+ const _config_0 = runtimeConfig.getRuntimeConfig(configuration || {});
85
+ super(_config_0);
86
+ this.initConfig = _config_0;
87
+ const _config_1 = resolveClientEndpointParameters(_config_0);
88
+ const _config_2 = middlewareUserAgent.resolveUserAgentConfig(_config_1);
89
+ const _config_3 = middlewareRetry.resolveRetryConfig(_config_2);
90
+ const _config_4 = configResolver.resolveRegionConfig(_config_3);
91
+ const _config_5 = middlewareHostHeader.resolveHostHeaderConfig(_config_4);
92
+ const _config_6 = middlewareEndpoint.resolveEndpointConfig(_config_5);
93
+ const _config_7 = httpAuthSchemeProvider.resolveHttpAuthSchemeConfig(_config_6);
94
+ const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
95
+ this.config = _config_8;
96
+ this.middlewareStack.use(middlewareUserAgent.getUserAgentPlugin(this.config));
97
+ this.middlewareStack.use(middlewareRetry.getRetryPlugin(this.config));
98
+ this.middlewareStack.use(middlewareContentLength.getContentLengthPlugin(this.config));
99
+ this.middlewareStack.use(middlewareHostHeader.getHostHeaderPlugin(this.config));
100
+ this.middlewareStack.use(middlewareLogger.getLoggerPlugin(this.config));
101
+ this.middlewareStack.use(middlewareRecursionDetection.getRecursionDetectionPlugin(this.config));
102
+ this.middlewareStack.use(core.getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
103
+ httpAuthSchemeParametersProvider: httpAuthSchemeProvider.defaultCodeGuruReviewerHttpAuthSchemeParametersProvider,
104
+ identityProviderConfigProvider: async (config) => new core.DefaultIdentityProviderConfig({
105
+ "aws.auth#sigv4": config.credentials,
106
+ }),
107
+ }));
108
+ this.middlewareStack.use(core.getHttpSigningPlugin(this.config));
135
109
  }
136
- };
137
- }, "getHttpAuthExtensionConfiguration");
138
- var resolveHttpAuthRuntimeConfig = /* @__PURE__ */ __name((config) => {
139
- return {
140
- httpAuthSchemes: config.httpAuthSchemes(),
141
- httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
142
- credentials: config.credentials()
143
- };
144
- }, "resolveHttpAuthRuntimeConfig");
145
-
146
- // src/runtimeExtensions.ts
147
- var resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => {
148
- const extensionConfiguration = Object.assign(
149
- (0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig),
150
- (0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig),
151
- (0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig),
152
- getHttpAuthExtensionConfiguration(runtimeConfig)
153
- );
154
- extensions.forEach((extension) => extension.configure(extensionConfiguration));
155
- return Object.assign(
156
- runtimeConfig,
157
- (0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
158
- (0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration),
159
- (0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration),
160
- resolveHttpAuthRuntimeConfig(extensionConfiguration)
161
- );
162
- }, "resolveRuntimeExtensions");
110
+ destroy() {
111
+ super.destroy();
112
+ }
113
+ }
163
114
 
164
- // src/CodeGuruReviewerClient.ts
165
- var CodeGuruReviewerClient = class extends import_smithy_client.Client {
166
- static {
167
- __name(this, "CodeGuruReviewerClient");
168
- }
169
- /**
170
- * The resolved configuration of CodeGuruReviewerClient class. This is resolved and normalized from the {@link CodeGuruReviewerClientConfig | constructor configuration interface}.
171
- */
172
- config;
173
- constructor(...[configuration]) {
174
- const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {});
175
- super(_config_0);
176
- this.initConfig = _config_0;
177
- const _config_1 = resolveClientEndpointParameters(_config_0);
178
- const _config_2 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_1);
179
- const _config_3 = (0, import_middleware_retry.resolveRetryConfig)(_config_2);
180
- const _config_4 = (0, import_config_resolver.resolveRegionConfig)(_config_3);
181
- const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4);
182
- const _config_6 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_5);
183
- const _config_7 = (0, import_httpAuthSchemeProvider.resolveHttpAuthSchemeConfig)(_config_6);
184
- const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
185
- this.config = _config_8;
186
- this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config));
187
- this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config));
188
- this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config));
189
- this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config));
190
- this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config));
191
- this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config));
192
- this.middlewareStack.use(
193
- (0, import_core.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, {
194
- httpAuthSchemeParametersProvider: import_httpAuthSchemeProvider.defaultCodeGuruReviewerHttpAuthSchemeParametersProvider,
195
- identityProviderConfigProvider: /* @__PURE__ */ __name(async (config) => new import_core.DefaultIdentityProviderConfig({
196
- "aws.auth#sigv4": config.credentials
197
- }), "identityProviderConfigProvider")
198
- })
199
- );
200
- this.middlewareStack.use((0, import_core.getHttpSigningPlugin)(this.config));
201
- }
202
- /**
203
- * Destroy underlying resources, like sockets. It's usually not necessary to do this.
204
- * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
205
- * Otherwise, sockets might stay open for quite a long time before the server terminates them.
206
- */
207
- destroy() {
208
- super.destroy();
209
- }
115
+ class CodeGuruReviewerServiceException extends smithyClient.ServiceException {
116
+ constructor(options) {
117
+ super(options);
118
+ Object.setPrototypeOf(this, CodeGuruReviewerServiceException.prototype);
119
+ }
120
+ }
121
+
122
+ class AccessDeniedException extends CodeGuruReviewerServiceException {
123
+ name = "AccessDeniedException";
124
+ $fault = "client";
125
+ Message;
126
+ constructor(opts) {
127
+ super({
128
+ name: "AccessDeniedException",
129
+ $fault: "client",
130
+ ...opts,
131
+ });
132
+ Object.setPrototypeOf(this, AccessDeniedException.prototype);
133
+ this.Message = opts.Message;
134
+ }
135
+ }
136
+ const AnalysisType = {
137
+ CODE_QUALITY: "CodeQuality",
138
+ SECURITY: "Security",
210
139
  };
211
-
212
- // src/CodeGuruReviewer.ts
213
-
214
-
215
- // src/commands/AssociateRepositoryCommand.ts
216
-
217
- var import_middleware_serde = require("@smithy/middleware-serde");
218
-
219
-
220
- // src/protocols/Aws_restJson1.ts
221
- var import_core2 = require("@aws-sdk/core");
222
-
223
-
224
- var import_uuid = require("@smithy/uuid");
225
-
226
- // src/models/CodeGuruReviewerServiceException.ts
227
-
228
- var CodeGuruReviewerServiceException = class _CodeGuruReviewerServiceException extends import_smithy_client.ServiceException {
229
- static {
230
- __name(this, "CodeGuruReviewerServiceException");
231
- }
232
- /**
233
- * @internal
234
- */
235
- constructor(options) {
236
- super(options);
237
- Object.setPrototypeOf(this, _CodeGuruReviewerServiceException.prototype);
238
- }
140
+ const EncryptionOption = {
141
+ AoCmk: "AWS_OWNED_CMK",
142
+ CmCmk: "CUSTOMER_MANAGED_CMK",
143
+ };
144
+ const ProviderType = {
145
+ BITBUCKET: "Bitbucket",
146
+ CODE_COMMIT: "CodeCommit",
147
+ GIT_HUB: "GitHub",
148
+ GIT_HUB_ENTERPRISE_SERVER: "GitHubEnterpriseServer",
149
+ S3_BUCKET: "S3Bucket",
150
+ };
151
+ const RepositoryAssociationState = {
152
+ ASSOCIATED: "Associated",
153
+ ASSOCIATING: "Associating",
154
+ DISASSOCIATED: "Disassociated",
155
+ DISASSOCIATING: "Disassociating",
156
+ FAILED: "Failed",
157
+ };
158
+ class ConflictException extends CodeGuruReviewerServiceException {
159
+ name = "ConflictException";
160
+ $fault = "client";
161
+ Message;
162
+ constructor(opts) {
163
+ super({
164
+ name: "ConflictException",
165
+ $fault: "client",
166
+ ...opts,
167
+ });
168
+ Object.setPrototypeOf(this, ConflictException.prototype);
169
+ this.Message = opts.Message;
170
+ }
171
+ }
172
+ class InternalServerException extends CodeGuruReviewerServiceException {
173
+ name = "InternalServerException";
174
+ $fault = "server";
175
+ Message;
176
+ constructor(opts) {
177
+ super({
178
+ name: "InternalServerException",
179
+ $fault: "server",
180
+ ...opts,
181
+ });
182
+ Object.setPrototypeOf(this, InternalServerException.prototype);
183
+ this.Message = opts.Message;
184
+ }
185
+ }
186
+ class ThrottlingException extends CodeGuruReviewerServiceException {
187
+ name = "ThrottlingException";
188
+ $fault = "client";
189
+ Message;
190
+ constructor(opts) {
191
+ super({
192
+ name: "ThrottlingException",
193
+ $fault: "client",
194
+ ...opts,
195
+ });
196
+ Object.setPrototypeOf(this, ThrottlingException.prototype);
197
+ this.Message = opts.Message;
198
+ }
199
+ }
200
+ class ValidationException extends CodeGuruReviewerServiceException {
201
+ name = "ValidationException";
202
+ $fault = "client";
203
+ Message;
204
+ constructor(opts) {
205
+ super({
206
+ name: "ValidationException",
207
+ $fault: "client",
208
+ ...opts,
209
+ });
210
+ Object.setPrototypeOf(this, ValidationException.prototype);
211
+ this.Message = opts.Message;
212
+ }
213
+ }
214
+ const VendorName = {
215
+ GITHUB: "GitHub",
216
+ GITLAB: "GitLab",
217
+ NATIVE_S3: "NativeS3",
218
+ };
219
+ const ConfigFileState = {
220
+ ABSENT: "Absent",
221
+ PRESENT: "Present",
222
+ PRESENT_WITH_ERRORS: "PresentWithErrors",
223
+ };
224
+ const JobState = {
225
+ COMPLETED: "Completed",
226
+ DELETING: "Deleting",
227
+ FAILED: "Failed",
228
+ PENDING: "Pending",
229
+ };
230
+ const Type = {
231
+ PULL_REQUEST: "PullRequest",
232
+ REPOSITORY_ANALYSIS: "RepositoryAnalysis",
233
+ };
234
+ class ResourceNotFoundException extends CodeGuruReviewerServiceException {
235
+ name = "ResourceNotFoundException";
236
+ $fault = "client";
237
+ Message;
238
+ constructor(opts) {
239
+ super({
240
+ name: "ResourceNotFoundException",
241
+ $fault: "client",
242
+ ...opts,
243
+ });
244
+ Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
245
+ this.Message = opts.Message;
246
+ }
247
+ }
248
+ const Reaction = {
249
+ THUMBS_DOWN: "ThumbsDown",
250
+ THUMBS_UP: "ThumbsUp",
251
+ };
252
+ class NotFoundException extends CodeGuruReviewerServiceException {
253
+ name = "NotFoundException";
254
+ $fault = "client";
255
+ Message;
256
+ constructor(opts) {
257
+ super({
258
+ name: "NotFoundException",
259
+ $fault: "client",
260
+ ...opts,
261
+ });
262
+ Object.setPrototypeOf(this, NotFoundException.prototype);
263
+ this.Message = opts.Message;
264
+ }
265
+ }
266
+ const RecommendationCategory = {
267
+ AWS_BEST_PRACTICES: "AWSBestPractices",
268
+ AWS_CLOUDFORMATION_ISSUES: "AWSCloudFormationIssues",
269
+ CODE_INCONSISTENCIES: "CodeInconsistencies",
270
+ CODE_MAINTENANCE_ISSUES: "CodeMaintenanceIssues",
271
+ CONCURRENCY_ISSUES: "ConcurrencyIssues",
272
+ DUPLICATE_CODE: "DuplicateCode",
273
+ INPUT_VALIDATIONS: "InputValidations",
274
+ JAVA_BEST_PRACTICES: "JavaBestPractices",
275
+ PYTHON_BEST_PRACTICES: "PythonBestPractices",
276
+ RESOURCE_LEAKS: "ResourceLeaks",
277
+ SECURITY_ISSUES: "SecurityIssues",
278
+ };
279
+ const Severity = {
280
+ CRITICAL: "Critical",
281
+ HIGH: "High",
282
+ INFO: "Info",
283
+ LOW: "Low",
284
+ MEDIUM: "Medium",
239
285
  };
240
286
 
241
- // src/models/models_0.ts
242
- var AccessDeniedException = class _AccessDeniedException extends CodeGuruReviewerServiceException {
243
- static {
244
- __name(this, "AccessDeniedException");
245
- }
246
- name = "AccessDeniedException";
247
- $fault = "client";
248
- Message;
249
- /**
250
- * @internal
251
- */
252
- constructor(opts) {
253
- super({
254
- name: "AccessDeniedException",
255
- $fault: "client",
256
- ...opts
287
+ const se_AssociateRepositoryCommand = async (input, context) => {
288
+ const b = core.requestBuilder(input, context);
289
+ const headers = {
290
+ "content-type": "application/json",
291
+ };
292
+ b.bp("/associations");
293
+ let body;
294
+ body = JSON.stringify(smithyClient.take(input, {
295
+ ClientRequestToken: [true, (_) => _ ?? uuid.v4()],
296
+ KMSKeyDetails: (_) => smithyClient._json(_),
297
+ Repository: (_) => smithyClient._json(_),
298
+ Tags: (_) => smithyClient._json(_),
299
+ }));
300
+ b.m("POST").h(headers).b(body);
301
+ return b.build();
302
+ };
303
+ const se_CreateCodeReviewCommand = async (input, context) => {
304
+ const b = core.requestBuilder(input, context);
305
+ const headers = {
306
+ "content-type": "application/json",
307
+ };
308
+ b.bp("/codereviews");
309
+ let body;
310
+ body = JSON.stringify(smithyClient.take(input, {
311
+ ClientRequestToken: [true, (_) => _ ?? uuid.v4()],
312
+ Name: [],
313
+ RepositoryAssociationArn: [],
314
+ Type: (_) => smithyClient._json(_),
315
+ }));
316
+ b.m("POST").h(headers).b(body);
317
+ return b.build();
318
+ };
319
+ const se_DescribeCodeReviewCommand = async (input, context) => {
320
+ const b = core.requestBuilder(input, context);
321
+ const headers = {};
322
+ b.bp("/codereviews/{CodeReviewArn}");
323
+ b.p("CodeReviewArn", () => input.CodeReviewArn, "{CodeReviewArn}", false);
324
+ let body;
325
+ b.m("GET").h(headers).b(body);
326
+ return b.build();
327
+ };
328
+ const se_DescribeRecommendationFeedbackCommand = async (input, context) => {
329
+ const b = core.requestBuilder(input, context);
330
+ const headers = {};
331
+ b.bp("/feedback/{CodeReviewArn}");
332
+ b.p("CodeReviewArn", () => input.CodeReviewArn, "{CodeReviewArn}", false);
333
+ const query = smithyClient.map({
334
+ [_RI]: [, smithyClient.expectNonNull(input[_RI], `RecommendationId`)],
335
+ [_UI]: [, input[_UI]],
336
+ });
337
+ let body;
338
+ b.m("GET").h(headers).q(query).b(body);
339
+ return b.build();
340
+ };
341
+ const se_DescribeRepositoryAssociationCommand = async (input, context) => {
342
+ const b = core.requestBuilder(input, context);
343
+ const headers = {};
344
+ b.bp("/associations/{AssociationArn}");
345
+ b.p("AssociationArn", () => input.AssociationArn, "{AssociationArn}", false);
346
+ let body;
347
+ b.m("GET").h(headers).b(body);
348
+ return b.build();
349
+ };
350
+ const se_DisassociateRepositoryCommand = async (input, context) => {
351
+ const b = core.requestBuilder(input, context);
352
+ const headers = {};
353
+ b.bp("/associations/{AssociationArn}");
354
+ b.p("AssociationArn", () => input.AssociationArn, "{AssociationArn}", false);
355
+ let body;
356
+ b.m("DELETE").h(headers).b(body);
357
+ return b.build();
358
+ };
359
+ const se_ListCodeReviewsCommand = async (input, context) => {
360
+ const b = core.requestBuilder(input, context);
361
+ const headers = {};
362
+ b.bp("/codereviews");
363
+ const query = smithyClient.map({
364
+ [_PT]: [() => input.ProviderTypes !== void 0, () => input[_PT] || []],
365
+ [_S]: [() => input.States !== void 0, () => input[_S] || []],
366
+ [_RN]: [() => input.RepositoryNames !== void 0, () => input[_RN] || []],
367
+ [_T]: [, smithyClient.expectNonNull(input[_T], `Type`)],
368
+ [_MR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
369
+ [_NT]: [, input[_NT]],
257
370
  });
258
- Object.setPrototypeOf(this, _AccessDeniedException.prototype);
259
- this.Message = opts.Message;
260
- }
261
- };
262
- var AnalysisType = {
263
- CODE_QUALITY: "CodeQuality",
264
- SECURITY: "Security"
265
- };
266
- var EncryptionOption = {
267
- AoCmk: "AWS_OWNED_CMK",
268
- CmCmk: "CUSTOMER_MANAGED_CMK"
269
- };
270
- var ProviderType = {
271
- BITBUCKET: "Bitbucket",
272
- CODE_COMMIT: "CodeCommit",
273
- GIT_HUB: "GitHub",
274
- GIT_HUB_ENTERPRISE_SERVER: "GitHubEnterpriseServer",
275
- S3_BUCKET: "S3Bucket"
276
- };
277
- var RepositoryAssociationState = {
278
- ASSOCIATED: "Associated",
279
- ASSOCIATING: "Associating",
280
- DISASSOCIATED: "Disassociated",
281
- DISASSOCIATING: "Disassociating",
282
- FAILED: "Failed"
283
- };
284
- var ConflictException = class _ConflictException extends CodeGuruReviewerServiceException {
285
- static {
286
- __name(this, "ConflictException");
287
- }
288
- name = "ConflictException";
289
- $fault = "client";
290
- Message;
291
- /**
292
- * @internal
293
- */
294
- constructor(opts) {
295
- super({
296
- name: "ConflictException",
297
- $fault: "client",
298
- ...opts
371
+ let body;
372
+ b.m("GET").h(headers).q(query).b(body);
373
+ return b.build();
374
+ };
375
+ const se_ListRecommendationFeedbackCommand = async (input, context) => {
376
+ const b = core.requestBuilder(input, context);
377
+ const headers = {};
378
+ b.bp("/feedback/{CodeReviewArn}/RecommendationFeedback");
379
+ b.p("CodeReviewArn", () => input.CodeReviewArn, "{CodeReviewArn}", false);
380
+ const query = smithyClient.map({
381
+ [_NT]: [, input[_NT]],
382
+ [_MR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
383
+ [_UIs]: [() => input.UserIds !== void 0, () => input[_UIs] || []],
384
+ [_RIe]: [() => input.RecommendationIds !== void 0, () => input[_RIe] || []],
299
385
  });
300
- Object.setPrototypeOf(this, _ConflictException.prototype);
301
- this.Message = opts.Message;
302
- }
303
- };
304
- var InternalServerException = class _InternalServerException extends CodeGuruReviewerServiceException {
305
- static {
306
- __name(this, "InternalServerException");
307
- }
308
- name = "InternalServerException";
309
- $fault = "server";
310
- Message;
311
- /**
312
- * @internal
313
- */
314
- constructor(opts) {
315
- super({
316
- name: "InternalServerException",
317
- $fault: "server",
318
- ...opts
386
+ let body;
387
+ b.m("GET").h(headers).q(query).b(body);
388
+ return b.build();
389
+ };
390
+ const se_ListRecommendationsCommand = async (input, context) => {
391
+ const b = core.requestBuilder(input, context);
392
+ const headers = {};
393
+ b.bp("/codereviews/{CodeReviewArn}/Recommendations");
394
+ b.p("CodeReviewArn", () => input.CodeReviewArn, "{CodeReviewArn}", false);
395
+ const query = smithyClient.map({
396
+ [_NT]: [, input[_NT]],
397
+ [_MR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
319
398
  });
320
- Object.setPrototypeOf(this, _InternalServerException.prototype);
321
- this.Message = opts.Message;
322
- }
323
- };
324
- var ThrottlingException = class _ThrottlingException extends CodeGuruReviewerServiceException {
325
- static {
326
- __name(this, "ThrottlingException");
327
- }
328
- name = "ThrottlingException";
329
- $fault = "client";
330
- Message;
331
- /**
332
- * @internal
333
- */
334
- constructor(opts) {
335
- super({
336
- name: "ThrottlingException",
337
- $fault: "client",
338
- ...opts
399
+ let body;
400
+ b.m("GET").h(headers).q(query).b(body);
401
+ return b.build();
402
+ };
403
+ const se_ListRepositoryAssociationsCommand = async (input, context) => {
404
+ const b = core.requestBuilder(input, context);
405
+ const headers = {};
406
+ b.bp("/associations");
407
+ const query = smithyClient.map({
408
+ [_PTr]: [() => input.ProviderTypes !== void 0, () => input[_PT] || []],
409
+ [_St]: [() => input.States !== void 0, () => input[_S] || []],
410
+ [_Na]: [() => input.Names !== void 0, () => input[_N] || []],
411
+ [_Ow]: [() => input.Owners !== void 0, () => input[_O] || []],
412
+ [_MR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
413
+ [_NT]: [, input[_NT]],
339
414
  });
340
- Object.setPrototypeOf(this, _ThrottlingException.prototype);
341
- this.Message = opts.Message;
342
- }
343
- };
344
- var ValidationException = class _ValidationException extends CodeGuruReviewerServiceException {
345
- static {
346
- __name(this, "ValidationException");
347
- }
348
- name = "ValidationException";
349
- $fault = "client";
350
- Message;
351
- /**
352
- * @internal
353
- */
354
- constructor(opts) {
355
- super({
356
- name: "ValidationException",
357
- $fault: "client",
358
- ...opts
415
+ let body;
416
+ b.m("GET").h(headers).q(query).b(body);
417
+ return b.build();
418
+ };
419
+ const se_ListTagsForResourceCommand = async (input, context) => {
420
+ const b = core.requestBuilder(input, context);
421
+ const headers = {};
422
+ b.bp("/tags/{resourceArn}");
423
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
424
+ let body;
425
+ b.m("GET").h(headers).b(body);
426
+ return b.build();
427
+ };
428
+ const se_PutRecommendationFeedbackCommand = async (input, context) => {
429
+ const b = core.requestBuilder(input, context);
430
+ const headers = {
431
+ "content-type": "application/json",
432
+ };
433
+ b.bp("/feedback");
434
+ let body;
435
+ body = JSON.stringify(smithyClient.take(input, {
436
+ CodeReviewArn: [],
437
+ Reactions: (_) => smithyClient._json(_),
438
+ RecommendationId: [],
439
+ }));
440
+ b.m("PUT").h(headers).b(body);
441
+ return b.build();
442
+ };
443
+ const se_TagResourceCommand = async (input, context) => {
444
+ const b = core.requestBuilder(input, context);
445
+ const headers = {
446
+ "content-type": "application/json",
447
+ };
448
+ b.bp("/tags/{resourceArn}");
449
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
450
+ let body;
451
+ body = JSON.stringify(smithyClient.take(input, {
452
+ Tags: (_) => smithyClient._json(_),
453
+ }));
454
+ b.m("POST").h(headers).b(body);
455
+ return b.build();
456
+ };
457
+ const se_UntagResourceCommand = async (input, context) => {
458
+ const b = core.requestBuilder(input, context);
459
+ const headers = {};
460
+ b.bp("/tags/{resourceArn}");
461
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
462
+ const query = smithyClient.map({
463
+ [_tK]: [smithyClient.expectNonNull(input.TagKeys, `TagKeys`) != null, () => input[_TK] || []],
359
464
  });
360
- Object.setPrototypeOf(this, _ValidationException.prototype);
361
- this.Message = opts.Message;
362
- }
363
- };
364
- var VendorName = {
365
- GITHUB: "GitHub",
366
- GITLAB: "GitLab",
367
- NATIVE_S3: "NativeS3"
368
- };
369
- var ConfigFileState = {
370
- ABSENT: "Absent",
371
- PRESENT: "Present",
372
- PRESENT_WITH_ERRORS: "PresentWithErrors"
373
- };
374
- var JobState = {
375
- COMPLETED: "Completed",
376
- DELETING: "Deleting",
377
- FAILED: "Failed",
378
- PENDING: "Pending"
379
- };
380
- var Type = {
381
- PULL_REQUEST: "PullRequest",
382
- REPOSITORY_ANALYSIS: "RepositoryAnalysis"
383
- };
384
- var ResourceNotFoundException = class _ResourceNotFoundException extends CodeGuruReviewerServiceException {
385
- static {
386
- __name(this, "ResourceNotFoundException");
387
- }
388
- name = "ResourceNotFoundException";
389
- $fault = "client";
390
- Message;
391
- /**
392
- * @internal
393
- */
394
- constructor(opts) {
395
- super({
396
- name: "ResourceNotFoundException",
397
- $fault: "client",
398
- ...opts
465
+ let body;
466
+ b.m("DELETE").h(headers).q(query).b(body);
467
+ return b.build();
468
+ };
469
+ const de_AssociateRepositoryCommand = async (output, context) => {
470
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
471
+ return de_CommandError(output, context);
472
+ }
473
+ const contents = smithyClient.map({
474
+ $metadata: deserializeMetadata(output),
399
475
  });
400
- Object.setPrototypeOf(this, _ResourceNotFoundException.prototype);
401
- this.Message = opts.Message;
402
- }
403
- };
404
- var Reaction = {
405
- THUMBS_DOWN: "ThumbsDown",
406
- THUMBS_UP: "ThumbsUp"
407
- };
408
- var NotFoundException = class _NotFoundException extends CodeGuruReviewerServiceException {
409
- static {
410
- __name(this, "NotFoundException");
411
- }
412
- name = "NotFoundException";
413
- $fault = "client";
414
- Message;
415
- /**
416
- * @internal
417
- */
418
- constructor(opts) {
419
- super({
420
- name: "NotFoundException",
421
- $fault: "client",
422
- ...opts
476
+ const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
477
+ const doc = smithyClient.take(data, {
478
+ RepositoryAssociation: (_) => de_RepositoryAssociation(_),
479
+ Tags: smithyClient._json,
423
480
  });
424
- Object.setPrototypeOf(this, _NotFoundException.prototype);
425
- this.Message = opts.Message;
426
- }
427
- };
428
- var RecommendationCategory = {
429
- AWS_BEST_PRACTICES: "AWSBestPractices",
430
- AWS_CLOUDFORMATION_ISSUES: "AWSCloudFormationIssues",
431
- CODE_INCONSISTENCIES: "CodeInconsistencies",
432
- CODE_MAINTENANCE_ISSUES: "CodeMaintenanceIssues",
433
- CONCURRENCY_ISSUES: "ConcurrencyIssues",
434
- DUPLICATE_CODE: "DuplicateCode",
435
- INPUT_VALIDATIONS: "InputValidations",
436
- JAVA_BEST_PRACTICES: "JavaBestPractices",
437
- PYTHON_BEST_PRACTICES: "PythonBestPractices",
438
- RESOURCE_LEAKS: "ResourceLeaks",
439
- SECURITY_ISSUES: "SecurityIssues"
440
- };
441
- var Severity = {
442
- CRITICAL: "Critical",
443
- HIGH: "High",
444
- INFO: "Info",
445
- LOW: "Low",
446
- MEDIUM: "Medium"
481
+ Object.assign(contents, doc);
482
+ return contents;
447
483
  };
448
-
449
- // src/protocols/Aws_restJson1.ts
450
- var se_AssociateRepositoryCommand = /* @__PURE__ */ __name(async (input, context) => {
451
- const b = (0, import_core.requestBuilder)(input, context);
452
- const headers = {
453
- "content-type": "application/json"
454
- };
455
- b.bp("/associations");
456
- let body;
457
- body = JSON.stringify(
458
- (0, import_smithy_client.take)(input, {
459
- ClientRequestToken: [true, (_) => _ ?? (0, import_uuid.v4)()],
460
- KMSKeyDetails: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "KMSKeyDetails"),
461
- Repository: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "Repository"),
462
- Tags: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "Tags")
463
- })
464
- );
465
- b.m("POST").h(headers).b(body);
466
- return b.build();
467
- }, "se_AssociateRepositoryCommand");
468
- var se_CreateCodeReviewCommand = /* @__PURE__ */ __name(async (input, context) => {
469
- const b = (0, import_core.requestBuilder)(input, context);
470
- const headers = {
471
- "content-type": "application/json"
472
- };
473
- b.bp("/codereviews");
474
- let body;
475
- body = JSON.stringify(
476
- (0, import_smithy_client.take)(input, {
477
- ClientRequestToken: [true, (_) => _ ?? (0, import_uuid.v4)()],
478
- Name: [],
479
- RepositoryAssociationArn: [],
480
- Type: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "Type")
481
- })
482
- );
483
- b.m("POST").h(headers).b(body);
484
- return b.build();
485
- }, "se_CreateCodeReviewCommand");
486
- var se_DescribeCodeReviewCommand = /* @__PURE__ */ __name(async (input, context) => {
487
- const b = (0, import_core.requestBuilder)(input, context);
488
- const headers = {};
489
- b.bp("/codereviews/{CodeReviewArn}");
490
- b.p("CodeReviewArn", () => input.CodeReviewArn, "{CodeReviewArn}", false);
491
- let body;
492
- b.m("GET").h(headers).b(body);
493
- return b.build();
494
- }, "se_DescribeCodeReviewCommand");
495
- var se_DescribeRecommendationFeedbackCommand = /* @__PURE__ */ __name(async (input, context) => {
496
- const b = (0, import_core.requestBuilder)(input, context);
497
- const headers = {};
498
- b.bp("/feedback/{CodeReviewArn}");
499
- b.p("CodeReviewArn", () => input.CodeReviewArn, "{CodeReviewArn}", false);
500
- const query = (0, import_smithy_client.map)({
501
- [_RI]: [, (0, import_smithy_client.expectNonNull)(input[_RI], `RecommendationId`)],
502
- [_UI]: [, input[_UI]]
503
- });
504
- let body;
505
- b.m("GET").h(headers).q(query).b(body);
506
- return b.build();
507
- }, "se_DescribeRecommendationFeedbackCommand");
508
- var se_DescribeRepositoryAssociationCommand = /* @__PURE__ */ __name(async (input, context) => {
509
- const b = (0, import_core.requestBuilder)(input, context);
510
- const headers = {};
511
- b.bp("/associations/{AssociationArn}");
512
- b.p("AssociationArn", () => input.AssociationArn, "{AssociationArn}", false);
513
- let body;
514
- b.m("GET").h(headers).b(body);
515
- return b.build();
516
- }, "se_DescribeRepositoryAssociationCommand");
517
- var se_DisassociateRepositoryCommand = /* @__PURE__ */ __name(async (input, context) => {
518
- const b = (0, import_core.requestBuilder)(input, context);
519
- const headers = {};
520
- b.bp("/associations/{AssociationArn}");
521
- b.p("AssociationArn", () => input.AssociationArn, "{AssociationArn}", false);
522
- let body;
523
- b.m("DELETE").h(headers).b(body);
524
- return b.build();
525
- }, "se_DisassociateRepositoryCommand");
526
- var se_ListCodeReviewsCommand = /* @__PURE__ */ __name(async (input, context) => {
527
- const b = (0, import_core.requestBuilder)(input, context);
528
- const headers = {};
529
- b.bp("/codereviews");
530
- const query = (0, import_smithy_client.map)({
531
- [_PT]: [() => input.ProviderTypes !== void 0, () => input[_PT] || []],
532
- [_S]: [() => input.States !== void 0, () => input[_S] || []],
533
- [_RN]: [() => input.RepositoryNames !== void 0, () => input[_RN] || []],
534
- [_T]: [, (0, import_smithy_client.expectNonNull)(input[_T], `Type`)],
535
- [_MR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
536
- [_NT]: [, input[_NT]]
537
- });
538
- let body;
539
- b.m("GET").h(headers).q(query).b(body);
540
- return b.build();
541
- }, "se_ListCodeReviewsCommand");
542
- var se_ListRecommendationFeedbackCommand = /* @__PURE__ */ __name(async (input, context) => {
543
- const b = (0, import_core.requestBuilder)(input, context);
544
- const headers = {};
545
- b.bp("/feedback/{CodeReviewArn}/RecommendationFeedback");
546
- b.p("CodeReviewArn", () => input.CodeReviewArn, "{CodeReviewArn}", false);
547
- const query = (0, import_smithy_client.map)({
548
- [_NT]: [, input[_NT]],
549
- [_MR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
550
- [_UIs]: [() => input.UserIds !== void 0, () => input[_UIs] || []],
551
- [_RIe]: [() => input.RecommendationIds !== void 0, () => input[_RIe] || []]
552
- });
553
- let body;
554
- b.m("GET").h(headers).q(query).b(body);
555
- return b.build();
556
- }, "se_ListRecommendationFeedbackCommand");
557
- var se_ListRecommendationsCommand = /* @__PURE__ */ __name(async (input, context) => {
558
- const b = (0, import_core.requestBuilder)(input, context);
559
- const headers = {};
560
- b.bp("/codereviews/{CodeReviewArn}/Recommendations");
561
- b.p("CodeReviewArn", () => input.CodeReviewArn, "{CodeReviewArn}", false);
562
- const query = (0, import_smithy_client.map)({
563
- [_NT]: [, input[_NT]],
564
- [_MR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()]
565
- });
566
- let body;
567
- b.m("GET").h(headers).q(query).b(body);
568
- return b.build();
569
- }, "se_ListRecommendationsCommand");
570
- var se_ListRepositoryAssociationsCommand = /* @__PURE__ */ __name(async (input, context) => {
571
- const b = (0, import_core.requestBuilder)(input, context);
572
- const headers = {};
573
- b.bp("/associations");
574
- const query = (0, import_smithy_client.map)({
575
- [_PTr]: [() => input.ProviderTypes !== void 0, () => input[_PT] || []],
576
- [_St]: [() => input.States !== void 0, () => input[_S] || []],
577
- [_Na]: [() => input.Names !== void 0, () => input[_N] || []],
578
- [_Ow]: [() => input.Owners !== void 0, () => input[_O] || []],
579
- [_MR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
580
- [_NT]: [, input[_NT]]
581
- });
582
- let body;
583
- b.m("GET").h(headers).q(query).b(body);
584
- return b.build();
585
- }, "se_ListRepositoryAssociationsCommand");
586
- var se_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (input, context) => {
587
- const b = (0, import_core.requestBuilder)(input, context);
588
- const headers = {};
589
- b.bp("/tags/{resourceArn}");
590
- b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
591
- let body;
592
- b.m("GET").h(headers).b(body);
593
- return b.build();
594
- }, "se_ListTagsForResourceCommand");
595
- var se_PutRecommendationFeedbackCommand = /* @__PURE__ */ __name(async (input, context) => {
596
- const b = (0, import_core.requestBuilder)(input, context);
597
- const headers = {
598
- "content-type": "application/json"
599
- };
600
- b.bp("/feedback");
601
- let body;
602
- body = JSON.stringify(
603
- (0, import_smithy_client.take)(input, {
604
- CodeReviewArn: [],
605
- Reactions: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "Reactions"),
606
- RecommendationId: []
607
- })
608
- );
609
- b.m("PUT").h(headers).b(body);
610
- return b.build();
611
- }, "se_PutRecommendationFeedbackCommand");
612
- var se_TagResourceCommand = /* @__PURE__ */ __name(async (input, context) => {
613
- const b = (0, import_core.requestBuilder)(input, context);
614
- const headers = {
615
- "content-type": "application/json"
616
- };
617
- b.bp("/tags/{resourceArn}");
618
- b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
619
- let body;
620
- body = JSON.stringify(
621
- (0, import_smithy_client.take)(input, {
622
- Tags: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "Tags")
623
- })
624
- );
625
- b.m("POST").h(headers).b(body);
626
- return b.build();
627
- }, "se_TagResourceCommand");
628
- var se_UntagResourceCommand = /* @__PURE__ */ __name(async (input, context) => {
629
- const b = (0, import_core.requestBuilder)(input, context);
630
- const headers = {};
631
- b.bp("/tags/{resourceArn}");
632
- b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
633
- const query = (0, import_smithy_client.map)({
634
- [_tK]: [(0, import_smithy_client.expectNonNull)(input.TagKeys, `TagKeys`) != null, () => input[_TK] || []]
635
- });
636
- let body;
637
- b.m("DELETE").h(headers).q(query).b(body);
638
- return b.build();
639
- }, "se_UntagResourceCommand");
640
- var de_AssociateRepositoryCommand = /* @__PURE__ */ __name(async (output, context) => {
641
- if (output.statusCode !== 200 && output.statusCode >= 300) {
642
- return de_CommandError(output, context);
643
- }
644
- const contents = (0, import_smithy_client.map)({
645
- $metadata: deserializeMetadata(output)
646
- });
647
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
648
- const doc = (0, import_smithy_client.take)(data, {
649
- RepositoryAssociation: /* @__PURE__ */ __name((_) => de_RepositoryAssociation(_, context), "RepositoryAssociation"),
650
- Tags: import_smithy_client._json
651
- });
652
- Object.assign(contents, doc);
653
- return contents;
654
- }, "de_AssociateRepositoryCommand");
655
- var de_CreateCodeReviewCommand = /* @__PURE__ */ __name(async (output, context) => {
656
- if (output.statusCode !== 200 && output.statusCode >= 300) {
657
- return de_CommandError(output, context);
658
- }
659
- const contents = (0, import_smithy_client.map)({
660
- $metadata: deserializeMetadata(output)
661
- });
662
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
663
- const doc = (0, import_smithy_client.take)(data, {
664
- CodeReview: /* @__PURE__ */ __name((_) => de_CodeReview(_, context), "CodeReview")
665
- });
666
- Object.assign(contents, doc);
667
- return contents;
668
- }, "de_CreateCodeReviewCommand");
669
- var de_DescribeCodeReviewCommand = /* @__PURE__ */ __name(async (output, context) => {
670
- if (output.statusCode !== 200 && output.statusCode >= 300) {
671
- return de_CommandError(output, context);
672
- }
673
- const contents = (0, import_smithy_client.map)({
674
- $metadata: deserializeMetadata(output)
675
- });
676
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
677
- const doc = (0, import_smithy_client.take)(data, {
678
- CodeReview: /* @__PURE__ */ __name((_) => de_CodeReview(_, context), "CodeReview")
679
- });
680
- Object.assign(contents, doc);
681
- return contents;
682
- }, "de_DescribeCodeReviewCommand");
683
- var de_DescribeRecommendationFeedbackCommand = /* @__PURE__ */ __name(async (output, context) => {
684
- if (output.statusCode !== 200 && output.statusCode >= 300) {
685
- return de_CommandError(output, context);
686
- }
687
- const contents = (0, import_smithy_client.map)({
688
- $metadata: deserializeMetadata(output)
689
- });
690
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
691
- const doc = (0, import_smithy_client.take)(data, {
692
- RecommendationFeedback: /* @__PURE__ */ __name((_) => de_RecommendationFeedback(_, context), "RecommendationFeedback")
693
- });
694
- Object.assign(contents, doc);
695
- return contents;
696
- }, "de_DescribeRecommendationFeedbackCommand");
697
- var de_DescribeRepositoryAssociationCommand = /* @__PURE__ */ __name(async (output, context) => {
698
- if (output.statusCode !== 200 && output.statusCode >= 300) {
699
- return de_CommandError(output, context);
700
- }
701
- const contents = (0, import_smithy_client.map)({
702
- $metadata: deserializeMetadata(output)
703
- });
704
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
705
- const doc = (0, import_smithy_client.take)(data, {
706
- RepositoryAssociation: /* @__PURE__ */ __name((_) => de_RepositoryAssociation(_, context), "RepositoryAssociation"),
707
- Tags: import_smithy_client._json
708
- });
709
- Object.assign(contents, doc);
710
- return contents;
711
- }, "de_DescribeRepositoryAssociationCommand");
712
- var de_DisassociateRepositoryCommand = /* @__PURE__ */ __name(async (output, context) => {
713
- if (output.statusCode !== 200 && output.statusCode >= 300) {
714
- return de_CommandError(output, context);
715
- }
716
- const contents = (0, import_smithy_client.map)({
717
- $metadata: deserializeMetadata(output)
718
- });
719
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
720
- const doc = (0, import_smithy_client.take)(data, {
721
- RepositoryAssociation: /* @__PURE__ */ __name((_) => de_RepositoryAssociation(_, context), "RepositoryAssociation"),
722
- Tags: import_smithy_client._json
723
- });
724
- Object.assign(contents, doc);
725
- return contents;
726
- }, "de_DisassociateRepositoryCommand");
727
- var de_ListCodeReviewsCommand = /* @__PURE__ */ __name(async (output, context) => {
728
- if (output.statusCode !== 200 && output.statusCode >= 300) {
729
- return de_CommandError(output, context);
730
- }
731
- const contents = (0, import_smithy_client.map)({
732
- $metadata: deserializeMetadata(output)
733
- });
734
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
735
- const doc = (0, import_smithy_client.take)(data, {
736
- CodeReviewSummaries: /* @__PURE__ */ __name((_) => de_CodeReviewSummaries(_, context), "CodeReviewSummaries"),
737
- NextToken: import_smithy_client.expectString
738
- });
739
- Object.assign(contents, doc);
740
- return contents;
741
- }, "de_ListCodeReviewsCommand");
742
- var de_ListRecommendationFeedbackCommand = /* @__PURE__ */ __name(async (output, context) => {
743
- if (output.statusCode !== 200 && output.statusCode >= 300) {
744
- return de_CommandError(output, context);
745
- }
746
- const contents = (0, import_smithy_client.map)({
747
- $metadata: deserializeMetadata(output)
748
- });
749
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
750
- const doc = (0, import_smithy_client.take)(data, {
751
- NextToken: import_smithy_client.expectString,
752
- RecommendationFeedbackSummaries: import_smithy_client._json
753
- });
754
- Object.assign(contents, doc);
755
- return contents;
756
- }, "de_ListRecommendationFeedbackCommand");
757
- var de_ListRecommendationsCommand = /* @__PURE__ */ __name(async (output, context) => {
758
- if (output.statusCode !== 200 && output.statusCode >= 300) {
759
- return de_CommandError(output, context);
760
- }
761
- const contents = (0, import_smithy_client.map)({
762
- $metadata: deserializeMetadata(output)
763
- });
764
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
765
- const doc = (0, import_smithy_client.take)(data, {
766
- NextToken: import_smithy_client.expectString,
767
- RecommendationSummaries: import_smithy_client._json
768
- });
769
- Object.assign(contents, doc);
770
- return contents;
771
- }, "de_ListRecommendationsCommand");
772
- var de_ListRepositoryAssociationsCommand = /* @__PURE__ */ __name(async (output, context) => {
773
- if (output.statusCode !== 200 && output.statusCode >= 300) {
774
- return de_CommandError(output, context);
775
- }
776
- const contents = (0, import_smithy_client.map)({
777
- $metadata: deserializeMetadata(output)
778
- });
779
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
780
- const doc = (0, import_smithy_client.take)(data, {
781
- NextToken: import_smithy_client.expectString,
782
- RepositoryAssociationSummaries: /* @__PURE__ */ __name((_) => de_RepositoryAssociationSummaries(_, context), "RepositoryAssociationSummaries")
783
- });
784
- Object.assign(contents, doc);
785
- return contents;
786
- }, "de_ListRepositoryAssociationsCommand");
787
- var de_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
788
- if (output.statusCode !== 200 && output.statusCode >= 300) {
789
- return de_CommandError(output, context);
790
- }
791
- const contents = (0, import_smithy_client.map)({
792
- $metadata: deserializeMetadata(output)
793
- });
794
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
795
- const doc = (0, import_smithy_client.take)(data, {
796
- Tags: import_smithy_client._json
797
- });
798
- Object.assign(contents, doc);
799
- return contents;
800
- }, "de_ListTagsForResourceCommand");
801
- var de_PutRecommendationFeedbackCommand = /* @__PURE__ */ __name(async (output, context) => {
802
- if (output.statusCode !== 200 && output.statusCode >= 300) {
803
- return de_CommandError(output, context);
804
- }
805
- const contents = (0, import_smithy_client.map)({
806
- $metadata: deserializeMetadata(output)
807
- });
808
- await (0, import_smithy_client.collectBody)(output.body, context);
809
- return contents;
810
- }, "de_PutRecommendationFeedbackCommand");
811
- var de_TagResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
812
- if (output.statusCode !== 200 && output.statusCode >= 300) {
813
- return de_CommandError(output, context);
814
- }
815
- const contents = (0, import_smithy_client.map)({
816
- $metadata: deserializeMetadata(output)
817
- });
818
- await (0, import_smithy_client.collectBody)(output.body, context);
819
- return contents;
820
- }, "de_TagResourceCommand");
821
- var de_UntagResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
822
- if (output.statusCode !== 200 && output.statusCode >= 300) {
823
- return de_CommandError(output, context);
824
- }
825
- const contents = (0, import_smithy_client.map)({
826
- $metadata: deserializeMetadata(output)
827
- });
828
- await (0, import_smithy_client.collectBody)(output.body, context);
829
- return contents;
830
- }, "de_UntagResourceCommand");
831
- var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
832
- const parsedOutput = {
833
- ...output,
834
- body: await (0, import_core2.parseJsonErrorBody)(output.body, context)
835
- };
836
- const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body);
837
- switch (errorCode) {
838
- case "AccessDeniedException":
839
- case "com.amazonaws.codegurureviewer#AccessDeniedException":
840
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
841
- case "ConflictException":
842
- case "com.amazonaws.codegurureviewer#ConflictException":
843
- throw await de_ConflictExceptionRes(parsedOutput, context);
844
- case "InternalServerException":
845
- case "com.amazonaws.codegurureviewer#InternalServerException":
846
- throw await de_InternalServerExceptionRes(parsedOutput, context);
847
- case "ThrottlingException":
848
- case "com.amazonaws.codegurureviewer#ThrottlingException":
849
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
850
- case "ValidationException":
851
- case "com.amazonaws.codegurureviewer#ValidationException":
852
- throw await de_ValidationExceptionRes(parsedOutput, context);
853
- case "ResourceNotFoundException":
854
- case "com.amazonaws.codegurureviewer#ResourceNotFoundException":
855
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
856
- case "NotFoundException":
857
- case "com.amazonaws.codegurureviewer#NotFoundException":
858
- throw await de_NotFoundExceptionRes(parsedOutput, context);
859
- default:
860
- const parsedBody = parsedOutput.body;
861
- return throwDefaultError({
862
- output,
863
- parsedBody,
864
- errorCode
865
- });
866
- }
867
- }, "de_CommandError");
868
- var throwDefaultError = (0, import_smithy_client.withBaseException)(CodeGuruReviewerServiceException);
869
- var de_AccessDeniedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
870
- const contents = (0, import_smithy_client.map)({});
871
- const data = parsedOutput.body;
872
- const doc = (0, import_smithy_client.take)(data, {
873
- Message: import_smithy_client.expectString
874
- });
875
- Object.assign(contents, doc);
876
- const exception = new AccessDeniedException({
877
- $metadata: deserializeMetadata(parsedOutput),
878
- ...contents
879
- });
880
- return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
881
- }, "de_AccessDeniedExceptionRes");
882
- var de_ConflictExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
883
- const contents = (0, import_smithy_client.map)({});
884
- const data = parsedOutput.body;
885
- const doc = (0, import_smithy_client.take)(data, {
886
- Message: import_smithy_client.expectString
887
- });
888
- Object.assign(contents, doc);
889
- const exception = new ConflictException({
890
- $metadata: deserializeMetadata(parsedOutput),
891
- ...contents
892
- });
893
- return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
894
- }, "de_ConflictExceptionRes");
895
- var de_InternalServerExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
896
- const contents = (0, import_smithy_client.map)({});
897
- const data = parsedOutput.body;
898
- const doc = (0, import_smithy_client.take)(data, {
899
- Message: import_smithy_client.expectString
900
- });
901
- Object.assign(contents, doc);
902
- const exception = new InternalServerException({
903
- $metadata: deserializeMetadata(parsedOutput),
904
- ...contents
905
- });
906
- return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
907
- }, "de_InternalServerExceptionRes");
908
- var de_NotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
909
- const contents = (0, import_smithy_client.map)({});
910
- const data = parsedOutput.body;
911
- const doc = (0, import_smithy_client.take)(data, {
912
- Message: import_smithy_client.expectString
913
- });
914
- Object.assign(contents, doc);
915
- const exception = new NotFoundException({
916
- $metadata: deserializeMetadata(parsedOutput),
917
- ...contents
918
- });
919
- return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
920
- }, "de_NotFoundExceptionRes");
921
- var de_ResourceNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
922
- const contents = (0, import_smithy_client.map)({});
923
- const data = parsedOutput.body;
924
- const doc = (0, import_smithy_client.take)(data, {
925
- Message: import_smithy_client.expectString
926
- });
927
- Object.assign(contents, doc);
928
- const exception = new ResourceNotFoundException({
929
- $metadata: deserializeMetadata(parsedOutput),
930
- ...contents
931
- });
932
- return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
933
- }, "de_ResourceNotFoundExceptionRes");
934
- var de_ThrottlingExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
935
- const contents = (0, import_smithy_client.map)({});
936
- const data = parsedOutput.body;
937
- const doc = (0, import_smithy_client.take)(data, {
938
- Message: import_smithy_client.expectString
939
- });
940
- Object.assign(contents, doc);
941
- const exception = new ThrottlingException({
942
- $metadata: deserializeMetadata(parsedOutput),
943
- ...contents
944
- });
945
- return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
946
- }, "de_ThrottlingExceptionRes");
947
- var de_ValidationExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
948
- const contents = (0, import_smithy_client.map)({});
949
- const data = parsedOutput.body;
950
- const doc = (0, import_smithy_client.take)(data, {
951
- Message: import_smithy_client.expectString
952
- });
953
- Object.assign(contents, doc);
954
- const exception = new ValidationException({
955
- $metadata: deserializeMetadata(parsedOutput),
956
- ...contents
957
- });
958
- return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
959
- }, "de_ValidationExceptionRes");
960
- var de_CodeReview = /* @__PURE__ */ __name((output, context) => {
961
- return (0, import_smithy_client.take)(output, {
962
- AnalysisTypes: import_smithy_client._json,
963
- AssociationArn: import_smithy_client.expectString,
964
- CodeReviewArn: import_smithy_client.expectString,
965
- ConfigFileState: import_smithy_client.expectString,
966
- CreatedTimeStamp: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "CreatedTimeStamp"),
967
- LastUpdatedTimeStamp: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "LastUpdatedTimeStamp"),
968
- Metrics: import_smithy_client._json,
969
- Name: import_smithy_client.expectString,
970
- Owner: import_smithy_client.expectString,
971
- ProviderType: import_smithy_client.expectString,
972
- PullRequestId: import_smithy_client.expectString,
973
- RepositoryName: import_smithy_client.expectString,
974
- SourceCodeType: import_smithy_client._json,
975
- State: import_smithy_client.expectString,
976
- StateReason: import_smithy_client.expectString,
977
- Type: import_smithy_client.expectString
978
- });
979
- }, "de_CodeReview");
980
- var de_CodeReviewSummaries = /* @__PURE__ */ __name((output, context) => {
981
- const retVal = (output || []).filter((e) => e != null).map((entry) => {
982
- return de_CodeReviewSummary(entry, context);
983
- });
984
- return retVal;
985
- }, "de_CodeReviewSummaries");
986
- var de_CodeReviewSummary = /* @__PURE__ */ __name((output, context) => {
987
- return (0, import_smithy_client.take)(output, {
988
- CodeReviewArn: import_smithy_client.expectString,
989
- CreatedTimeStamp: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "CreatedTimeStamp"),
990
- LastUpdatedTimeStamp: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "LastUpdatedTimeStamp"),
991
- MetricsSummary: import_smithy_client._json,
992
- Name: import_smithy_client.expectString,
993
- Owner: import_smithy_client.expectString,
994
- ProviderType: import_smithy_client.expectString,
995
- PullRequestId: import_smithy_client.expectString,
996
- RepositoryName: import_smithy_client.expectString,
997
- SourceCodeType: import_smithy_client._json,
998
- State: import_smithy_client.expectString,
999
- Type: import_smithy_client.expectString
1000
- });
1001
- }, "de_CodeReviewSummary");
1002
- var de_RecommendationFeedback = /* @__PURE__ */ __name((output, context) => {
1003
- return (0, import_smithy_client.take)(output, {
1004
- CodeReviewArn: import_smithy_client.expectString,
1005
- CreatedTimeStamp: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "CreatedTimeStamp"),
1006
- LastUpdatedTimeStamp: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "LastUpdatedTimeStamp"),
1007
- Reactions: import_smithy_client._json,
1008
- RecommendationId: import_smithy_client.expectString,
1009
- UserId: import_smithy_client.expectString
1010
- });
1011
- }, "de_RecommendationFeedback");
1012
- var de_RepositoryAssociation = /* @__PURE__ */ __name((output, context) => {
1013
- return (0, import_smithy_client.take)(output, {
1014
- AssociationArn: import_smithy_client.expectString,
1015
- AssociationId: import_smithy_client.expectString,
1016
- ConnectionArn: import_smithy_client.expectString,
1017
- CreatedTimeStamp: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "CreatedTimeStamp"),
1018
- KMSKeyDetails: import_smithy_client._json,
1019
- LastUpdatedTimeStamp: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "LastUpdatedTimeStamp"),
1020
- Name: import_smithy_client.expectString,
1021
- Owner: import_smithy_client.expectString,
1022
- ProviderType: import_smithy_client.expectString,
1023
- S3RepositoryDetails: import_smithy_client._json,
1024
- State: import_smithy_client.expectString,
1025
- StateReason: import_smithy_client.expectString
1026
- });
1027
- }, "de_RepositoryAssociation");
1028
- var de_RepositoryAssociationSummaries = /* @__PURE__ */ __name((output, context) => {
1029
- const retVal = (output || []).filter((e) => e != null).map((entry) => {
1030
- return de_RepositoryAssociationSummary(entry, context);
1031
- });
1032
- return retVal;
1033
- }, "de_RepositoryAssociationSummaries");
1034
- var de_RepositoryAssociationSummary = /* @__PURE__ */ __name((output, context) => {
1035
- return (0, import_smithy_client.take)(output, {
1036
- AssociationArn: import_smithy_client.expectString,
1037
- AssociationId: import_smithy_client.expectString,
1038
- ConnectionArn: import_smithy_client.expectString,
1039
- LastUpdatedTimeStamp: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "LastUpdatedTimeStamp"),
1040
- Name: import_smithy_client.expectString,
1041
- Owner: import_smithy_client.expectString,
1042
- ProviderType: import_smithy_client.expectString,
1043
- State: import_smithy_client.expectString
1044
- });
1045
- }, "de_RepositoryAssociationSummary");
1046
- var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
1047
- httpStatusCode: output.statusCode,
1048
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
1049
- extendedRequestId: output.headers["x-amz-id-2"],
1050
- cfId: output.headers["x-amz-cf-id"]
1051
- }), "deserializeMetadata");
1052
- var _MR = "MaxResults";
1053
- var _N = "Names";
1054
- var _NT = "NextToken";
1055
- var _Na = "Name";
1056
- var _O = "Owners";
1057
- var _Ow = "Owner";
1058
- var _PT = "ProviderTypes";
1059
- var _PTr = "ProviderType";
1060
- var _RI = "RecommendationId";
1061
- var _RIe = "RecommendationIds";
1062
- var _RN = "RepositoryNames";
1063
- var _S = "States";
1064
- var _St = "State";
1065
- var _T = "Type";
1066
- var _TK = "TagKeys";
1067
- var _UI = "UserId";
1068
- var _UIs = "UserIds";
1069
- var _tK = "tagKeys";
1070
-
1071
- // src/commands/AssociateRepositoryCommand.ts
1072
- var AssociateRepositoryCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
1073
- return [
1074
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1075
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1076
- ];
1077
- }).s("AWSGuruFrontendService", "AssociateRepository", {}).n("CodeGuruReviewerClient", "AssociateRepositoryCommand").f(void 0, void 0).ser(se_AssociateRepositoryCommand).de(de_AssociateRepositoryCommand).build() {
1078
- static {
1079
- __name(this, "AssociateRepositoryCommand");
1080
- }
484
+ const de_CreateCodeReviewCommand = async (output, context) => {
485
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
486
+ return de_CommandError(output, context);
487
+ }
488
+ const contents = smithyClient.map({
489
+ $metadata: deserializeMetadata(output),
490
+ });
491
+ const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
492
+ const doc = smithyClient.take(data, {
493
+ CodeReview: (_) => de_CodeReview(_),
494
+ });
495
+ Object.assign(contents, doc);
496
+ return contents;
1081
497
  };
1082
-
1083
- // src/commands/CreateCodeReviewCommand.ts
1084
-
1085
-
1086
-
1087
- var CreateCodeReviewCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
1088
- return [
1089
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1090
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1091
- ];
1092
- }).s("AWSGuruFrontendService", "CreateCodeReview", {}).n("CodeGuruReviewerClient", "CreateCodeReviewCommand").f(void 0, void 0).ser(se_CreateCodeReviewCommand).de(de_CreateCodeReviewCommand).build() {
1093
- static {
1094
- __name(this, "CreateCodeReviewCommand");
1095
- }
498
+ const de_DescribeCodeReviewCommand = async (output, context) => {
499
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
500
+ return de_CommandError(output, context);
501
+ }
502
+ const contents = smithyClient.map({
503
+ $metadata: deserializeMetadata(output),
504
+ });
505
+ const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
506
+ const doc = smithyClient.take(data, {
507
+ CodeReview: (_) => de_CodeReview(_),
508
+ });
509
+ Object.assign(contents, doc);
510
+ return contents;
1096
511
  };
1097
-
1098
- // src/commands/DescribeCodeReviewCommand.ts
1099
-
1100
-
1101
-
1102
- var DescribeCodeReviewCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
1103
- return [
1104
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1105
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1106
- ];
1107
- }).s("AWSGuruFrontendService", "DescribeCodeReview", {}).n("CodeGuruReviewerClient", "DescribeCodeReviewCommand").f(void 0, void 0).ser(se_DescribeCodeReviewCommand).de(de_DescribeCodeReviewCommand).build() {
1108
- static {
1109
- __name(this, "DescribeCodeReviewCommand");
1110
- }
512
+ const de_DescribeRecommendationFeedbackCommand = async (output, context) => {
513
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
514
+ return de_CommandError(output, context);
515
+ }
516
+ const contents = smithyClient.map({
517
+ $metadata: deserializeMetadata(output),
518
+ });
519
+ const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
520
+ const doc = smithyClient.take(data, {
521
+ RecommendationFeedback: (_) => de_RecommendationFeedback(_),
522
+ });
523
+ Object.assign(contents, doc);
524
+ return contents;
1111
525
  };
1112
-
1113
- // src/commands/DescribeRecommendationFeedbackCommand.ts
1114
-
1115
-
1116
-
1117
- var DescribeRecommendationFeedbackCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
1118
- return [
1119
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1120
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1121
- ];
1122
- }).s("AWSGuruFrontendService", "DescribeRecommendationFeedback", {}).n("CodeGuruReviewerClient", "DescribeRecommendationFeedbackCommand").f(void 0, void 0).ser(se_DescribeRecommendationFeedbackCommand).de(de_DescribeRecommendationFeedbackCommand).build() {
1123
- static {
1124
- __name(this, "DescribeRecommendationFeedbackCommand");
1125
- }
526
+ const de_DescribeRepositoryAssociationCommand = async (output, context) => {
527
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
528
+ return de_CommandError(output, context);
529
+ }
530
+ const contents = smithyClient.map({
531
+ $metadata: deserializeMetadata(output),
532
+ });
533
+ const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
534
+ const doc = smithyClient.take(data, {
535
+ RepositoryAssociation: (_) => de_RepositoryAssociation(_),
536
+ Tags: smithyClient._json,
537
+ });
538
+ Object.assign(contents, doc);
539
+ return contents;
1126
540
  };
1127
-
1128
- // src/commands/DescribeRepositoryAssociationCommand.ts
1129
-
1130
-
1131
-
1132
- var DescribeRepositoryAssociationCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
1133
- return [
1134
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1135
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1136
- ];
1137
- }).s("AWSGuruFrontendService", "DescribeRepositoryAssociation", {}).n("CodeGuruReviewerClient", "DescribeRepositoryAssociationCommand").f(void 0, void 0).ser(se_DescribeRepositoryAssociationCommand).de(de_DescribeRepositoryAssociationCommand).build() {
1138
- static {
1139
- __name(this, "DescribeRepositoryAssociationCommand");
1140
- }
541
+ const de_DisassociateRepositoryCommand = async (output, context) => {
542
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
543
+ return de_CommandError(output, context);
544
+ }
545
+ const contents = smithyClient.map({
546
+ $metadata: deserializeMetadata(output),
547
+ });
548
+ const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
549
+ const doc = smithyClient.take(data, {
550
+ RepositoryAssociation: (_) => de_RepositoryAssociation(_),
551
+ Tags: smithyClient._json,
552
+ });
553
+ Object.assign(contents, doc);
554
+ return contents;
1141
555
  };
1142
-
1143
- // src/commands/DisassociateRepositoryCommand.ts
1144
-
1145
-
1146
-
1147
- var DisassociateRepositoryCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
1148
- return [
1149
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1150
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1151
- ];
1152
- }).s("AWSGuruFrontendService", "DisassociateRepository", {}).n("CodeGuruReviewerClient", "DisassociateRepositoryCommand").f(void 0, void 0).ser(se_DisassociateRepositoryCommand).de(de_DisassociateRepositoryCommand).build() {
1153
- static {
1154
- __name(this, "DisassociateRepositoryCommand");
1155
- }
556
+ const de_ListCodeReviewsCommand = async (output, context) => {
557
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
558
+ return de_CommandError(output, context);
559
+ }
560
+ const contents = smithyClient.map({
561
+ $metadata: deserializeMetadata(output),
562
+ });
563
+ const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
564
+ const doc = smithyClient.take(data, {
565
+ CodeReviewSummaries: (_) => de_CodeReviewSummaries(_),
566
+ NextToken: smithyClient.expectString,
567
+ });
568
+ Object.assign(contents, doc);
569
+ return contents;
1156
570
  };
1157
-
1158
- // src/commands/ListCodeReviewsCommand.ts
1159
-
1160
-
1161
-
1162
- var ListCodeReviewsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
1163
- return [
1164
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1165
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1166
- ];
1167
- }).s("AWSGuruFrontendService", "ListCodeReviews", {}).n("CodeGuruReviewerClient", "ListCodeReviewsCommand").f(void 0, void 0).ser(se_ListCodeReviewsCommand).de(de_ListCodeReviewsCommand).build() {
1168
- static {
1169
- __name(this, "ListCodeReviewsCommand");
1170
- }
571
+ const de_ListRecommendationFeedbackCommand = async (output, context) => {
572
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
573
+ return de_CommandError(output, context);
574
+ }
575
+ const contents = smithyClient.map({
576
+ $metadata: deserializeMetadata(output),
577
+ });
578
+ const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
579
+ const doc = smithyClient.take(data, {
580
+ NextToken: smithyClient.expectString,
581
+ RecommendationFeedbackSummaries: smithyClient._json,
582
+ });
583
+ Object.assign(contents, doc);
584
+ return contents;
1171
585
  };
1172
-
1173
- // src/commands/ListRecommendationFeedbackCommand.ts
1174
-
1175
-
1176
-
1177
- var ListRecommendationFeedbackCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
1178
- return [
1179
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1180
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1181
- ];
1182
- }).s("AWSGuruFrontendService", "ListRecommendationFeedback", {}).n("CodeGuruReviewerClient", "ListRecommendationFeedbackCommand").f(void 0, void 0).ser(se_ListRecommendationFeedbackCommand).de(de_ListRecommendationFeedbackCommand).build() {
1183
- static {
1184
- __name(this, "ListRecommendationFeedbackCommand");
1185
- }
586
+ const de_ListRecommendationsCommand = async (output, context) => {
587
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
588
+ return de_CommandError(output, context);
589
+ }
590
+ const contents = smithyClient.map({
591
+ $metadata: deserializeMetadata(output),
592
+ });
593
+ const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
594
+ const doc = smithyClient.take(data, {
595
+ NextToken: smithyClient.expectString,
596
+ RecommendationSummaries: smithyClient._json,
597
+ });
598
+ Object.assign(contents, doc);
599
+ return contents;
1186
600
  };
1187
-
1188
- // src/commands/ListRecommendationsCommand.ts
1189
-
1190
-
1191
-
1192
- var ListRecommendationsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
1193
- return [
1194
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1195
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1196
- ];
1197
- }).s("AWSGuruFrontendService", "ListRecommendations", {}).n("CodeGuruReviewerClient", "ListRecommendationsCommand").f(void 0, void 0).ser(se_ListRecommendationsCommand).de(de_ListRecommendationsCommand).build() {
1198
- static {
1199
- __name(this, "ListRecommendationsCommand");
1200
- }
601
+ const de_ListRepositoryAssociationsCommand = async (output, context) => {
602
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
603
+ return de_CommandError(output, context);
604
+ }
605
+ const contents = smithyClient.map({
606
+ $metadata: deserializeMetadata(output),
607
+ });
608
+ const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
609
+ const doc = smithyClient.take(data, {
610
+ NextToken: smithyClient.expectString,
611
+ RepositoryAssociationSummaries: (_) => de_RepositoryAssociationSummaries(_),
612
+ });
613
+ Object.assign(contents, doc);
614
+ return contents;
1201
615
  };
1202
-
1203
- // src/commands/ListRepositoryAssociationsCommand.ts
1204
-
1205
-
1206
-
1207
- var ListRepositoryAssociationsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
1208
- return [
1209
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1210
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1211
- ];
1212
- }).s("AWSGuruFrontendService", "ListRepositoryAssociations", {}).n("CodeGuruReviewerClient", "ListRepositoryAssociationsCommand").f(void 0, void 0).ser(se_ListRepositoryAssociationsCommand).de(de_ListRepositoryAssociationsCommand).build() {
1213
- static {
1214
- __name(this, "ListRepositoryAssociationsCommand");
1215
- }
616
+ const de_ListTagsForResourceCommand = async (output, context) => {
617
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
618
+ return de_CommandError(output, context);
619
+ }
620
+ const contents = smithyClient.map({
621
+ $metadata: deserializeMetadata(output),
622
+ });
623
+ const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
624
+ const doc = smithyClient.take(data, {
625
+ Tags: smithyClient._json,
626
+ });
627
+ Object.assign(contents, doc);
628
+ return contents;
1216
629
  };
1217
-
1218
- // src/commands/ListTagsForResourceCommand.ts
1219
-
1220
-
1221
-
1222
- var ListTagsForResourceCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
1223
- return [
1224
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1225
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1226
- ];
1227
- }).s("AWSGuruFrontendService", "ListTagsForResource", {}).n("CodeGuruReviewerClient", "ListTagsForResourceCommand").f(void 0, void 0).ser(se_ListTagsForResourceCommand).de(de_ListTagsForResourceCommand).build() {
1228
- static {
1229
- __name(this, "ListTagsForResourceCommand");
1230
- }
630
+ const de_PutRecommendationFeedbackCommand = async (output, context) => {
631
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
632
+ return de_CommandError(output, context);
633
+ }
634
+ const contents = smithyClient.map({
635
+ $metadata: deserializeMetadata(output),
636
+ });
637
+ await smithyClient.collectBody(output.body, context);
638
+ return contents;
1231
639
  };
1232
-
1233
- // src/commands/PutRecommendationFeedbackCommand.ts
1234
-
1235
-
1236
-
1237
- var PutRecommendationFeedbackCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
1238
- return [
1239
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1240
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1241
- ];
1242
- }).s("AWSGuruFrontendService", "PutRecommendationFeedback", {}).n("CodeGuruReviewerClient", "PutRecommendationFeedbackCommand").f(void 0, void 0).ser(se_PutRecommendationFeedbackCommand).de(de_PutRecommendationFeedbackCommand).build() {
1243
- static {
1244
- __name(this, "PutRecommendationFeedbackCommand");
1245
- }
640
+ const de_TagResourceCommand = async (output, context) => {
641
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
642
+ return de_CommandError(output, context);
643
+ }
644
+ const contents = smithyClient.map({
645
+ $metadata: deserializeMetadata(output),
646
+ });
647
+ await smithyClient.collectBody(output.body, context);
648
+ return contents;
1246
649
  };
1247
-
1248
- // src/commands/TagResourceCommand.ts
1249
-
1250
-
1251
-
1252
- var TagResourceCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
1253
- return [
1254
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1255
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1256
- ];
1257
- }).s("AWSGuruFrontendService", "TagResource", {}).n("CodeGuruReviewerClient", "TagResourceCommand").f(void 0, void 0).ser(se_TagResourceCommand).de(de_TagResourceCommand).build() {
1258
- static {
1259
- __name(this, "TagResourceCommand");
1260
- }
650
+ const de_UntagResourceCommand = async (output, context) => {
651
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
652
+ return de_CommandError(output, context);
653
+ }
654
+ const contents = smithyClient.map({
655
+ $metadata: deserializeMetadata(output),
656
+ });
657
+ await smithyClient.collectBody(output.body, context);
658
+ return contents;
1261
659
  };
1262
-
1263
- // src/commands/UntagResourceCommand.ts
1264
-
1265
-
1266
-
1267
- var UntagResourceCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
1268
- return [
1269
- (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1270
- (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1271
- ];
1272
- }).s("AWSGuruFrontendService", "UntagResource", {}).n("CodeGuruReviewerClient", "UntagResourceCommand").f(void 0, void 0).ser(se_UntagResourceCommand).de(de_UntagResourceCommand).build() {
1273
- static {
1274
- __name(this, "UntagResourceCommand");
1275
- }
660
+ const de_CommandError = async (output, context) => {
661
+ const parsedOutput = {
662
+ ...output,
663
+ body: await core$1.parseJsonErrorBody(output.body, context),
664
+ };
665
+ const errorCode = core$1.loadRestJsonErrorCode(output, parsedOutput.body);
666
+ switch (errorCode) {
667
+ case "AccessDeniedException":
668
+ case "com.amazonaws.codegurureviewer#AccessDeniedException":
669
+ throw await de_AccessDeniedExceptionRes(parsedOutput);
670
+ case "ConflictException":
671
+ case "com.amazonaws.codegurureviewer#ConflictException":
672
+ throw await de_ConflictExceptionRes(parsedOutput);
673
+ case "InternalServerException":
674
+ case "com.amazonaws.codegurureviewer#InternalServerException":
675
+ throw await de_InternalServerExceptionRes(parsedOutput);
676
+ case "ThrottlingException":
677
+ case "com.amazonaws.codegurureviewer#ThrottlingException":
678
+ throw await de_ThrottlingExceptionRes(parsedOutput);
679
+ case "ValidationException":
680
+ case "com.amazonaws.codegurureviewer#ValidationException":
681
+ throw await de_ValidationExceptionRes(parsedOutput);
682
+ case "ResourceNotFoundException":
683
+ case "com.amazonaws.codegurureviewer#ResourceNotFoundException":
684
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput);
685
+ case "NotFoundException":
686
+ case "com.amazonaws.codegurureviewer#NotFoundException":
687
+ throw await de_NotFoundExceptionRes(parsedOutput);
688
+ default:
689
+ const parsedBody = parsedOutput.body;
690
+ return throwDefaultError({
691
+ output,
692
+ parsedBody,
693
+ errorCode,
694
+ });
695
+ }
1276
696
  };
697
+ const throwDefaultError = smithyClient.withBaseException(CodeGuruReviewerServiceException);
698
+ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
699
+ const contents = smithyClient.map({});
700
+ const data = parsedOutput.body;
701
+ const doc = smithyClient.take(data, {
702
+ Message: smithyClient.expectString,
703
+ });
704
+ Object.assign(contents, doc);
705
+ const exception = new AccessDeniedException({
706
+ $metadata: deserializeMetadata(parsedOutput),
707
+ ...contents,
708
+ });
709
+ return smithyClient.decorateServiceException(exception, parsedOutput.body);
710
+ };
711
+ const de_ConflictExceptionRes = async (parsedOutput, context) => {
712
+ const contents = smithyClient.map({});
713
+ const data = parsedOutput.body;
714
+ const doc = smithyClient.take(data, {
715
+ Message: smithyClient.expectString,
716
+ });
717
+ Object.assign(contents, doc);
718
+ const exception = new ConflictException({
719
+ $metadata: deserializeMetadata(parsedOutput),
720
+ ...contents,
721
+ });
722
+ return smithyClient.decorateServiceException(exception, parsedOutput.body);
723
+ };
724
+ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
725
+ const contents = smithyClient.map({});
726
+ const data = parsedOutput.body;
727
+ const doc = smithyClient.take(data, {
728
+ Message: smithyClient.expectString,
729
+ });
730
+ Object.assign(contents, doc);
731
+ const exception = new InternalServerException({
732
+ $metadata: deserializeMetadata(parsedOutput),
733
+ ...contents,
734
+ });
735
+ return smithyClient.decorateServiceException(exception, parsedOutput.body);
736
+ };
737
+ const de_NotFoundExceptionRes = async (parsedOutput, context) => {
738
+ const contents = smithyClient.map({});
739
+ const data = parsedOutput.body;
740
+ const doc = smithyClient.take(data, {
741
+ Message: smithyClient.expectString,
742
+ });
743
+ Object.assign(contents, doc);
744
+ const exception = new NotFoundException({
745
+ $metadata: deserializeMetadata(parsedOutput),
746
+ ...contents,
747
+ });
748
+ return smithyClient.decorateServiceException(exception, parsedOutput.body);
749
+ };
750
+ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
751
+ const contents = smithyClient.map({});
752
+ const data = parsedOutput.body;
753
+ const doc = smithyClient.take(data, {
754
+ Message: smithyClient.expectString,
755
+ });
756
+ Object.assign(contents, doc);
757
+ const exception = new ResourceNotFoundException({
758
+ $metadata: deserializeMetadata(parsedOutput),
759
+ ...contents,
760
+ });
761
+ return smithyClient.decorateServiceException(exception, parsedOutput.body);
762
+ };
763
+ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
764
+ const contents = smithyClient.map({});
765
+ const data = parsedOutput.body;
766
+ const doc = smithyClient.take(data, {
767
+ Message: smithyClient.expectString,
768
+ });
769
+ Object.assign(contents, doc);
770
+ const exception = new ThrottlingException({
771
+ $metadata: deserializeMetadata(parsedOutput),
772
+ ...contents,
773
+ });
774
+ return smithyClient.decorateServiceException(exception, parsedOutput.body);
775
+ };
776
+ const de_ValidationExceptionRes = async (parsedOutput, context) => {
777
+ const contents = smithyClient.map({});
778
+ const data = parsedOutput.body;
779
+ const doc = smithyClient.take(data, {
780
+ Message: smithyClient.expectString,
781
+ });
782
+ Object.assign(contents, doc);
783
+ const exception = new ValidationException({
784
+ $metadata: deserializeMetadata(parsedOutput),
785
+ ...contents,
786
+ });
787
+ return smithyClient.decorateServiceException(exception, parsedOutput.body);
788
+ };
789
+ const de_CodeReview = (output, context) => {
790
+ return smithyClient.take(output, {
791
+ AnalysisTypes: smithyClient._json,
792
+ AssociationArn: smithyClient.expectString,
793
+ CodeReviewArn: smithyClient.expectString,
794
+ ConfigFileState: smithyClient.expectString,
795
+ CreatedTimeStamp: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))),
796
+ LastUpdatedTimeStamp: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))),
797
+ Metrics: smithyClient._json,
798
+ Name: smithyClient.expectString,
799
+ Owner: smithyClient.expectString,
800
+ ProviderType: smithyClient.expectString,
801
+ PullRequestId: smithyClient.expectString,
802
+ RepositoryName: smithyClient.expectString,
803
+ SourceCodeType: smithyClient._json,
804
+ State: smithyClient.expectString,
805
+ StateReason: smithyClient.expectString,
806
+ Type: smithyClient.expectString,
807
+ });
808
+ };
809
+ const de_CodeReviewSummaries = (output, context) => {
810
+ const retVal = (output || [])
811
+ .filter((e) => e != null)
812
+ .map((entry) => {
813
+ return de_CodeReviewSummary(entry);
814
+ });
815
+ return retVal;
816
+ };
817
+ const de_CodeReviewSummary = (output, context) => {
818
+ return smithyClient.take(output, {
819
+ CodeReviewArn: smithyClient.expectString,
820
+ CreatedTimeStamp: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))),
821
+ LastUpdatedTimeStamp: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))),
822
+ MetricsSummary: smithyClient._json,
823
+ Name: smithyClient.expectString,
824
+ Owner: smithyClient.expectString,
825
+ ProviderType: smithyClient.expectString,
826
+ PullRequestId: smithyClient.expectString,
827
+ RepositoryName: smithyClient.expectString,
828
+ SourceCodeType: smithyClient._json,
829
+ State: smithyClient.expectString,
830
+ Type: smithyClient.expectString,
831
+ });
832
+ };
833
+ const de_RecommendationFeedback = (output, context) => {
834
+ return smithyClient.take(output, {
835
+ CodeReviewArn: smithyClient.expectString,
836
+ CreatedTimeStamp: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))),
837
+ LastUpdatedTimeStamp: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))),
838
+ Reactions: smithyClient._json,
839
+ RecommendationId: smithyClient.expectString,
840
+ UserId: smithyClient.expectString,
841
+ });
842
+ };
843
+ const de_RepositoryAssociation = (output, context) => {
844
+ return smithyClient.take(output, {
845
+ AssociationArn: smithyClient.expectString,
846
+ AssociationId: smithyClient.expectString,
847
+ ConnectionArn: smithyClient.expectString,
848
+ CreatedTimeStamp: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))),
849
+ KMSKeyDetails: smithyClient._json,
850
+ LastUpdatedTimeStamp: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))),
851
+ Name: smithyClient.expectString,
852
+ Owner: smithyClient.expectString,
853
+ ProviderType: smithyClient.expectString,
854
+ S3RepositoryDetails: smithyClient._json,
855
+ State: smithyClient.expectString,
856
+ StateReason: smithyClient.expectString,
857
+ });
858
+ };
859
+ const de_RepositoryAssociationSummaries = (output, context) => {
860
+ const retVal = (output || [])
861
+ .filter((e) => e != null)
862
+ .map((entry) => {
863
+ return de_RepositoryAssociationSummary(entry);
864
+ });
865
+ return retVal;
866
+ };
867
+ const de_RepositoryAssociationSummary = (output, context) => {
868
+ return smithyClient.take(output, {
869
+ AssociationArn: smithyClient.expectString,
870
+ AssociationId: smithyClient.expectString,
871
+ ConnectionArn: smithyClient.expectString,
872
+ LastUpdatedTimeStamp: (_) => smithyClient.expectNonNull(smithyClient.parseEpochTimestamp(smithyClient.expectNumber(_))),
873
+ Name: smithyClient.expectString,
874
+ Owner: smithyClient.expectString,
875
+ ProviderType: smithyClient.expectString,
876
+ State: smithyClient.expectString,
877
+ });
878
+ };
879
+ const deserializeMetadata = (output) => ({
880
+ httpStatusCode: output.statusCode,
881
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
882
+ extendedRequestId: output.headers["x-amz-id-2"],
883
+ cfId: output.headers["x-amz-cf-id"],
884
+ });
885
+ const _MR = "MaxResults";
886
+ const _N = "Names";
887
+ const _NT = "NextToken";
888
+ const _Na = "Name";
889
+ const _O = "Owners";
890
+ const _Ow = "Owner";
891
+ const _PT = "ProviderTypes";
892
+ const _PTr = "ProviderType";
893
+ const _RI = "RecommendationId";
894
+ const _RIe = "RecommendationIds";
895
+ const _RN = "RepositoryNames";
896
+ const _S = "States";
897
+ const _St = "State";
898
+ const _T = "Type";
899
+ const _TK = "TagKeys";
900
+ const _UI = "UserId";
901
+ const _UIs = "UserIds";
902
+ const _tK = "tagKeys";
903
+
904
+ class AssociateRepositoryCommand extends smithyClient.Command
905
+ .classBuilder()
906
+ .ep(commonParams)
907
+ .m(function (Command, cs, config, o) {
908
+ return [
909
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
910
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
911
+ ];
912
+ })
913
+ .s("AWSGuruFrontendService", "AssociateRepository", {})
914
+ .n("CodeGuruReviewerClient", "AssociateRepositoryCommand")
915
+ .f(void 0, void 0)
916
+ .ser(se_AssociateRepositoryCommand)
917
+ .de(de_AssociateRepositoryCommand)
918
+ .build() {
919
+ }
920
+
921
+ class CreateCodeReviewCommand extends smithyClient.Command
922
+ .classBuilder()
923
+ .ep(commonParams)
924
+ .m(function (Command, cs, config, o) {
925
+ return [
926
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
927
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
928
+ ];
929
+ })
930
+ .s("AWSGuruFrontendService", "CreateCodeReview", {})
931
+ .n("CodeGuruReviewerClient", "CreateCodeReviewCommand")
932
+ .f(void 0, void 0)
933
+ .ser(se_CreateCodeReviewCommand)
934
+ .de(de_CreateCodeReviewCommand)
935
+ .build() {
936
+ }
937
+
938
+ class DescribeCodeReviewCommand extends smithyClient.Command
939
+ .classBuilder()
940
+ .ep(commonParams)
941
+ .m(function (Command, cs, config, o) {
942
+ return [
943
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
944
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
945
+ ];
946
+ })
947
+ .s("AWSGuruFrontendService", "DescribeCodeReview", {})
948
+ .n("CodeGuruReviewerClient", "DescribeCodeReviewCommand")
949
+ .f(void 0, void 0)
950
+ .ser(se_DescribeCodeReviewCommand)
951
+ .de(de_DescribeCodeReviewCommand)
952
+ .build() {
953
+ }
954
+
955
+ class DescribeRecommendationFeedbackCommand extends smithyClient.Command
956
+ .classBuilder()
957
+ .ep(commonParams)
958
+ .m(function (Command, cs, config, o) {
959
+ return [
960
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
961
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
962
+ ];
963
+ })
964
+ .s("AWSGuruFrontendService", "DescribeRecommendationFeedback", {})
965
+ .n("CodeGuruReviewerClient", "DescribeRecommendationFeedbackCommand")
966
+ .f(void 0, void 0)
967
+ .ser(se_DescribeRecommendationFeedbackCommand)
968
+ .de(de_DescribeRecommendationFeedbackCommand)
969
+ .build() {
970
+ }
971
+
972
+ class DescribeRepositoryAssociationCommand extends smithyClient.Command
973
+ .classBuilder()
974
+ .ep(commonParams)
975
+ .m(function (Command, cs, config, o) {
976
+ return [
977
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
978
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
979
+ ];
980
+ })
981
+ .s("AWSGuruFrontendService", "DescribeRepositoryAssociation", {})
982
+ .n("CodeGuruReviewerClient", "DescribeRepositoryAssociationCommand")
983
+ .f(void 0, void 0)
984
+ .ser(se_DescribeRepositoryAssociationCommand)
985
+ .de(de_DescribeRepositoryAssociationCommand)
986
+ .build() {
987
+ }
988
+
989
+ class DisassociateRepositoryCommand extends smithyClient.Command
990
+ .classBuilder()
991
+ .ep(commonParams)
992
+ .m(function (Command, cs, config, o) {
993
+ return [
994
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
995
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
996
+ ];
997
+ })
998
+ .s("AWSGuruFrontendService", "DisassociateRepository", {})
999
+ .n("CodeGuruReviewerClient", "DisassociateRepositoryCommand")
1000
+ .f(void 0, void 0)
1001
+ .ser(se_DisassociateRepositoryCommand)
1002
+ .de(de_DisassociateRepositoryCommand)
1003
+ .build() {
1004
+ }
1005
+
1006
+ class ListCodeReviewsCommand extends smithyClient.Command
1007
+ .classBuilder()
1008
+ .ep(commonParams)
1009
+ .m(function (Command, cs, config, o) {
1010
+ return [
1011
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
1012
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
1013
+ ];
1014
+ })
1015
+ .s("AWSGuruFrontendService", "ListCodeReviews", {})
1016
+ .n("CodeGuruReviewerClient", "ListCodeReviewsCommand")
1017
+ .f(void 0, void 0)
1018
+ .ser(se_ListCodeReviewsCommand)
1019
+ .de(de_ListCodeReviewsCommand)
1020
+ .build() {
1021
+ }
1022
+
1023
+ class ListRecommendationFeedbackCommand extends smithyClient.Command
1024
+ .classBuilder()
1025
+ .ep(commonParams)
1026
+ .m(function (Command, cs, config, o) {
1027
+ return [
1028
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
1029
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
1030
+ ];
1031
+ })
1032
+ .s("AWSGuruFrontendService", "ListRecommendationFeedback", {})
1033
+ .n("CodeGuruReviewerClient", "ListRecommendationFeedbackCommand")
1034
+ .f(void 0, void 0)
1035
+ .ser(se_ListRecommendationFeedbackCommand)
1036
+ .de(de_ListRecommendationFeedbackCommand)
1037
+ .build() {
1038
+ }
1039
+
1040
+ class ListRecommendationsCommand extends smithyClient.Command
1041
+ .classBuilder()
1042
+ .ep(commonParams)
1043
+ .m(function (Command, cs, config, o) {
1044
+ return [
1045
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
1046
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
1047
+ ];
1048
+ })
1049
+ .s("AWSGuruFrontendService", "ListRecommendations", {})
1050
+ .n("CodeGuruReviewerClient", "ListRecommendationsCommand")
1051
+ .f(void 0, void 0)
1052
+ .ser(se_ListRecommendationsCommand)
1053
+ .de(de_ListRecommendationsCommand)
1054
+ .build() {
1055
+ }
1056
+
1057
+ class ListRepositoryAssociationsCommand extends smithyClient.Command
1058
+ .classBuilder()
1059
+ .ep(commonParams)
1060
+ .m(function (Command, cs, config, o) {
1061
+ return [
1062
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
1063
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
1064
+ ];
1065
+ })
1066
+ .s("AWSGuruFrontendService", "ListRepositoryAssociations", {})
1067
+ .n("CodeGuruReviewerClient", "ListRepositoryAssociationsCommand")
1068
+ .f(void 0, void 0)
1069
+ .ser(se_ListRepositoryAssociationsCommand)
1070
+ .de(de_ListRepositoryAssociationsCommand)
1071
+ .build() {
1072
+ }
1073
+
1074
+ class ListTagsForResourceCommand extends smithyClient.Command
1075
+ .classBuilder()
1076
+ .ep(commonParams)
1077
+ .m(function (Command, cs, config, o) {
1078
+ return [
1079
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
1080
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
1081
+ ];
1082
+ })
1083
+ .s("AWSGuruFrontendService", "ListTagsForResource", {})
1084
+ .n("CodeGuruReviewerClient", "ListTagsForResourceCommand")
1085
+ .f(void 0, void 0)
1086
+ .ser(se_ListTagsForResourceCommand)
1087
+ .de(de_ListTagsForResourceCommand)
1088
+ .build() {
1089
+ }
1090
+
1091
+ class PutRecommendationFeedbackCommand extends smithyClient.Command
1092
+ .classBuilder()
1093
+ .ep(commonParams)
1094
+ .m(function (Command, cs, config, o) {
1095
+ return [
1096
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
1097
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
1098
+ ];
1099
+ })
1100
+ .s("AWSGuruFrontendService", "PutRecommendationFeedback", {})
1101
+ .n("CodeGuruReviewerClient", "PutRecommendationFeedbackCommand")
1102
+ .f(void 0, void 0)
1103
+ .ser(se_PutRecommendationFeedbackCommand)
1104
+ .de(de_PutRecommendationFeedbackCommand)
1105
+ .build() {
1106
+ }
1107
+
1108
+ class TagResourceCommand extends smithyClient.Command
1109
+ .classBuilder()
1110
+ .ep(commonParams)
1111
+ .m(function (Command, cs, config, o) {
1112
+ return [
1113
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
1114
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
1115
+ ];
1116
+ })
1117
+ .s("AWSGuruFrontendService", "TagResource", {})
1118
+ .n("CodeGuruReviewerClient", "TagResourceCommand")
1119
+ .f(void 0, void 0)
1120
+ .ser(se_TagResourceCommand)
1121
+ .de(de_TagResourceCommand)
1122
+ .build() {
1123
+ }
1124
+
1125
+ class UntagResourceCommand extends smithyClient.Command
1126
+ .classBuilder()
1127
+ .ep(commonParams)
1128
+ .m(function (Command, cs, config, o) {
1129
+ return [
1130
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
1131
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
1132
+ ];
1133
+ })
1134
+ .s("AWSGuruFrontendService", "UntagResource", {})
1135
+ .n("CodeGuruReviewerClient", "UntagResourceCommand")
1136
+ .f(void 0, void 0)
1137
+ .ser(se_UntagResourceCommand)
1138
+ .de(de_UntagResourceCommand)
1139
+ .build() {
1140
+ }
1141
+
1142
+ const commands = {
1143
+ AssociateRepositoryCommand,
1144
+ CreateCodeReviewCommand,
1145
+ DescribeCodeReviewCommand,
1146
+ DescribeRecommendationFeedbackCommand,
1147
+ DescribeRepositoryAssociationCommand,
1148
+ DisassociateRepositoryCommand,
1149
+ ListCodeReviewsCommand,
1150
+ ListRecommendationFeedbackCommand,
1151
+ ListRecommendationsCommand,
1152
+ ListRepositoryAssociationsCommand,
1153
+ ListTagsForResourceCommand,
1154
+ PutRecommendationFeedbackCommand,
1155
+ TagResourceCommand,
1156
+ UntagResourceCommand,
1157
+ };
1158
+ class CodeGuruReviewer extends CodeGuruReviewerClient {
1159
+ }
1160
+ smithyClient.createAggregatedClient(commands, CodeGuruReviewer);
1277
1161
 
1278
- // src/CodeGuruReviewer.ts
1279
- var commands = {
1280
- AssociateRepositoryCommand,
1281
- CreateCodeReviewCommand,
1282
- DescribeCodeReviewCommand,
1283
- DescribeRecommendationFeedbackCommand,
1284
- DescribeRepositoryAssociationCommand,
1285
- DisassociateRepositoryCommand,
1286
- ListCodeReviewsCommand,
1287
- ListRecommendationFeedbackCommand,
1288
- ListRecommendationsCommand,
1289
- ListRepositoryAssociationsCommand,
1290
- ListTagsForResourceCommand,
1291
- PutRecommendationFeedbackCommand,
1292
- TagResourceCommand,
1293
- UntagResourceCommand
1294
- };
1295
- var CodeGuruReviewer = class extends CodeGuruReviewerClient {
1296
- static {
1297
- __name(this, "CodeGuruReviewer");
1298
- }
1299
- };
1300
- (0, import_smithy_client.createAggregatedClient)(commands, CodeGuruReviewer);
1301
-
1302
- // src/pagination/ListCodeReviewsPaginator.ts
1303
-
1304
- var paginateListCodeReviews = (0, import_core.createPaginator)(CodeGuruReviewerClient, ListCodeReviewsCommand, "NextToken", "NextToken", "MaxResults");
1305
-
1306
- // src/pagination/ListRecommendationFeedbackPaginator.ts
1307
-
1308
- var paginateListRecommendationFeedback = (0, import_core.createPaginator)(CodeGuruReviewerClient, ListRecommendationFeedbackCommand, "NextToken", "NextToken", "MaxResults");
1309
-
1310
- // src/pagination/ListRecommendationsPaginator.ts
1162
+ const paginateListCodeReviews = core.createPaginator(CodeGuruReviewerClient, ListCodeReviewsCommand, "NextToken", "NextToken", "MaxResults");
1311
1163
 
1312
- var paginateListRecommendations = (0, import_core.createPaginator)(CodeGuruReviewerClient, ListRecommendationsCommand, "NextToken", "NextToken", "MaxResults");
1164
+ const paginateListRecommendationFeedback = core.createPaginator(CodeGuruReviewerClient, ListRecommendationFeedbackCommand, "NextToken", "NextToken", "MaxResults");
1313
1165
 
1314
- // src/pagination/ListRepositoryAssociationsPaginator.ts
1166
+ const paginateListRecommendations = core.createPaginator(CodeGuruReviewerClient, ListRecommendationsCommand, "NextToken", "NextToken", "MaxResults");
1315
1167
 
1316
- var paginateListRepositoryAssociations = (0, import_core.createPaginator)(CodeGuruReviewerClient, ListRepositoryAssociationsCommand, "NextToken", "NextToken", "MaxResults");
1168
+ const paginateListRepositoryAssociations = core.createPaginator(CodeGuruReviewerClient, ListRepositoryAssociationsCommand, "NextToken", "NextToken", "MaxResults");
1317
1169
 
1318
- // src/waiters/waitForCodeReviewCompleted.ts
1319
- var import_util_waiter = require("@smithy/util-waiter");
1320
- var checkState = /* @__PURE__ */ __name(async (client, input) => {
1321
- let reason;
1322
- try {
1323
- const result = await client.send(new DescribeCodeReviewCommand(input));
1324
- reason = result;
1170
+ const checkState$1 = async (client, input) => {
1171
+ let reason;
1325
1172
  try {
1326
- const returnComparator = /* @__PURE__ */ __name(() => {
1327
- return result.CodeReview.State;
1328
- }, "returnComparator");
1329
- if (returnComparator() === "Completed") {
1330
- return { state: import_util_waiter.WaiterState.SUCCESS, reason };
1331
- }
1332
- } catch (e) {
1173
+ const result = await client.send(new DescribeCodeReviewCommand(input));
1174
+ reason = result;
1175
+ try {
1176
+ const returnComparator = () => {
1177
+ return result.CodeReview.State;
1178
+ };
1179
+ if (returnComparator() === "Completed") {
1180
+ return { state: utilWaiter.WaiterState.SUCCESS, reason };
1181
+ }
1182
+ }
1183
+ catch (e) { }
1184
+ try {
1185
+ const returnComparator = () => {
1186
+ return result.CodeReview.State;
1187
+ };
1188
+ if (returnComparator() === "Failed") {
1189
+ return { state: utilWaiter.WaiterState.FAILURE, reason };
1190
+ }
1191
+ }
1192
+ catch (e) { }
1193
+ try {
1194
+ const returnComparator = () => {
1195
+ return result.CodeReview.State;
1196
+ };
1197
+ if (returnComparator() === "Pending") {
1198
+ return { state: utilWaiter.WaiterState.RETRY, reason };
1199
+ }
1200
+ }
1201
+ catch (e) { }
1333
1202
  }
1334
- try {
1335
- const returnComparator = /* @__PURE__ */ __name(() => {
1336
- return result.CodeReview.State;
1337
- }, "returnComparator");
1338
- if (returnComparator() === "Failed") {
1339
- return { state: import_util_waiter.WaiterState.FAILURE, reason };
1340
- }
1341
- } catch (e) {
1342
- }
1343
- try {
1344
- const returnComparator = /* @__PURE__ */ __name(() => {
1345
- return result.CodeReview.State;
1346
- }, "returnComparator");
1347
- if (returnComparator() === "Pending") {
1348
- return { state: import_util_waiter.WaiterState.RETRY, reason };
1349
- }
1350
- } catch (e) {
1203
+ catch (exception) {
1204
+ reason = exception;
1351
1205
  }
1352
- } catch (exception) {
1353
- reason = exception;
1354
- }
1355
- return { state: import_util_waiter.WaiterState.RETRY, reason };
1356
- }, "checkState");
1357
- var waitForCodeReviewCompleted = /* @__PURE__ */ __name(async (params, input) => {
1358
- const serviceDefaults = { minDelay: 10, maxDelay: 120 };
1359
- return (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState);
1360
- }, "waitForCodeReviewCompleted");
1361
- var waitUntilCodeReviewCompleted = /* @__PURE__ */ __name(async (params, input) => {
1362
- const serviceDefaults = { minDelay: 10, maxDelay: 120 };
1363
- const result = await (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState);
1364
- return (0, import_util_waiter.checkExceptions)(result);
1365
- }, "waitUntilCodeReviewCompleted");
1366
-
1367
- // src/waiters/waitForRepositoryAssociationSucceeded.ts
1206
+ return { state: utilWaiter.WaiterState.RETRY, reason };
1207
+ };
1208
+ const waitForCodeReviewCompleted = async (params, input) => {
1209
+ const serviceDefaults = { minDelay: 10, maxDelay: 120 };
1210
+ return utilWaiter.createWaiter({ ...serviceDefaults, ...params }, input, checkState$1);
1211
+ };
1212
+ const waitUntilCodeReviewCompleted = async (params, input) => {
1213
+ const serviceDefaults = { minDelay: 10, maxDelay: 120 };
1214
+ const result = await utilWaiter.createWaiter({ ...serviceDefaults, ...params }, input, checkState$1);
1215
+ return utilWaiter.checkExceptions(result);
1216
+ };
1368
1217
 
1369
- var checkState2 = /* @__PURE__ */ __name(async (client, input) => {
1370
- let reason;
1371
- try {
1372
- const result = await client.send(new DescribeRepositoryAssociationCommand(input));
1373
- reason = result;
1374
- try {
1375
- const returnComparator = /* @__PURE__ */ __name(() => {
1376
- return result.RepositoryAssociation.State;
1377
- }, "returnComparator");
1378
- if (returnComparator() === "Associated") {
1379
- return { state: import_util_waiter.WaiterState.SUCCESS, reason };
1380
- }
1381
- } catch (e) {
1382
- }
1218
+ const checkState = async (client, input) => {
1219
+ let reason;
1383
1220
  try {
1384
- const returnComparator = /* @__PURE__ */ __name(() => {
1385
- return result.RepositoryAssociation.State;
1386
- }, "returnComparator");
1387
- if (returnComparator() === "Failed") {
1388
- return { state: import_util_waiter.WaiterState.FAILURE, reason };
1389
- }
1390
- } catch (e) {
1221
+ const result = await client.send(new DescribeRepositoryAssociationCommand(input));
1222
+ reason = result;
1223
+ try {
1224
+ const returnComparator = () => {
1225
+ return result.RepositoryAssociation.State;
1226
+ };
1227
+ if (returnComparator() === "Associated") {
1228
+ return { state: utilWaiter.WaiterState.SUCCESS, reason };
1229
+ }
1230
+ }
1231
+ catch (e) { }
1232
+ try {
1233
+ const returnComparator = () => {
1234
+ return result.RepositoryAssociation.State;
1235
+ };
1236
+ if (returnComparator() === "Failed") {
1237
+ return { state: utilWaiter.WaiterState.FAILURE, reason };
1238
+ }
1239
+ }
1240
+ catch (e) { }
1241
+ try {
1242
+ const returnComparator = () => {
1243
+ return result.RepositoryAssociation.State;
1244
+ };
1245
+ if (returnComparator() === "Associating") {
1246
+ return { state: utilWaiter.WaiterState.RETRY, reason };
1247
+ }
1248
+ }
1249
+ catch (e) { }
1391
1250
  }
1392
- try {
1393
- const returnComparator = /* @__PURE__ */ __name(() => {
1394
- return result.RepositoryAssociation.State;
1395
- }, "returnComparator");
1396
- if (returnComparator() === "Associating") {
1397
- return { state: import_util_waiter.WaiterState.RETRY, reason };
1398
- }
1399
- } catch (e) {
1251
+ catch (exception) {
1252
+ reason = exception;
1400
1253
  }
1401
- } catch (exception) {
1402
- reason = exception;
1403
- }
1404
- return { state: import_util_waiter.WaiterState.RETRY, reason };
1405
- }, "checkState");
1406
- var waitForRepositoryAssociationSucceeded = /* @__PURE__ */ __name(async (params, input) => {
1407
- const serviceDefaults = { minDelay: 10, maxDelay: 120 };
1408
- return (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState2);
1409
- }, "waitForRepositoryAssociationSucceeded");
1410
- var waitUntilRepositoryAssociationSucceeded = /* @__PURE__ */ __name(async (params, input) => {
1411
- const serviceDefaults = { minDelay: 10, maxDelay: 120 };
1412
- const result = await (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState2);
1413
- return (0, import_util_waiter.checkExceptions)(result);
1414
- }, "waitUntilRepositoryAssociationSucceeded");
1415
- // Annotate the CommonJS export names for ESM import in node:
1254
+ return { state: utilWaiter.WaiterState.RETRY, reason };
1255
+ };
1256
+ const waitForRepositoryAssociationSucceeded = async (params, input) => {
1257
+ const serviceDefaults = { minDelay: 10, maxDelay: 120 };
1258
+ return utilWaiter.createWaiter({ ...serviceDefaults, ...params }, input, checkState);
1259
+ };
1260
+ const waitUntilRepositoryAssociationSucceeded = async (params, input) => {
1261
+ const serviceDefaults = { minDelay: 10, maxDelay: 120 };
1262
+ const result = await utilWaiter.createWaiter({ ...serviceDefaults, ...params }, input, checkState);
1263
+ return utilWaiter.checkExceptions(result);
1264
+ };
1416
1265
 
1417
- 0 && (module.exports = {
1418
- CodeGuruReviewerServiceException,
1419
- __Client,
1420
- CodeGuruReviewerClient,
1421
- CodeGuruReviewer,
1422
- $Command,
1423
- AssociateRepositoryCommand,
1424
- CreateCodeReviewCommand,
1425
- DescribeCodeReviewCommand,
1426
- DescribeRecommendationFeedbackCommand,
1427
- DescribeRepositoryAssociationCommand,
1428
- DisassociateRepositoryCommand,
1429
- ListCodeReviewsCommand,
1430
- ListRecommendationFeedbackCommand,
1431
- ListRecommendationsCommand,
1432
- ListRepositoryAssociationsCommand,
1433
- ListTagsForResourceCommand,
1434
- PutRecommendationFeedbackCommand,
1435
- TagResourceCommand,
1436
- UntagResourceCommand,
1437
- paginateListCodeReviews,
1438
- paginateListRecommendationFeedback,
1439
- paginateListRecommendations,
1440
- paginateListRepositoryAssociations,
1441
- waitForCodeReviewCompleted,
1442
- waitUntilCodeReviewCompleted,
1443
- waitForRepositoryAssociationSucceeded,
1444
- waitUntilRepositoryAssociationSucceeded,
1445
- AccessDeniedException,
1446
- AnalysisType,
1447
- EncryptionOption,
1448
- ProviderType,
1449
- RepositoryAssociationState,
1450
- ConflictException,
1451
- InternalServerException,
1452
- ThrottlingException,
1453
- ValidationException,
1454
- VendorName,
1455
- ConfigFileState,
1456
- JobState,
1457
- Type,
1458
- ResourceNotFoundException,
1459
- Reaction,
1460
- NotFoundException,
1461
- RecommendationCategory,
1462
- Severity
1266
+ Object.defineProperty(exports, "$Command", {
1267
+ enumerable: true,
1268
+ get: function () { return smithyClient.Command; }
1463
1269
  });
1464
-
1270
+ Object.defineProperty(exports, "__Client", {
1271
+ enumerable: true,
1272
+ get: function () { return smithyClient.Client; }
1273
+ });
1274
+ exports.AccessDeniedException = AccessDeniedException;
1275
+ exports.AnalysisType = AnalysisType;
1276
+ exports.AssociateRepositoryCommand = AssociateRepositoryCommand;
1277
+ exports.CodeGuruReviewer = CodeGuruReviewer;
1278
+ exports.CodeGuruReviewerClient = CodeGuruReviewerClient;
1279
+ exports.CodeGuruReviewerServiceException = CodeGuruReviewerServiceException;
1280
+ exports.ConfigFileState = ConfigFileState;
1281
+ exports.ConflictException = ConflictException;
1282
+ exports.CreateCodeReviewCommand = CreateCodeReviewCommand;
1283
+ exports.DescribeCodeReviewCommand = DescribeCodeReviewCommand;
1284
+ exports.DescribeRecommendationFeedbackCommand = DescribeRecommendationFeedbackCommand;
1285
+ exports.DescribeRepositoryAssociationCommand = DescribeRepositoryAssociationCommand;
1286
+ exports.DisassociateRepositoryCommand = DisassociateRepositoryCommand;
1287
+ exports.EncryptionOption = EncryptionOption;
1288
+ exports.InternalServerException = InternalServerException;
1289
+ exports.JobState = JobState;
1290
+ exports.ListCodeReviewsCommand = ListCodeReviewsCommand;
1291
+ exports.ListRecommendationFeedbackCommand = ListRecommendationFeedbackCommand;
1292
+ exports.ListRecommendationsCommand = ListRecommendationsCommand;
1293
+ exports.ListRepositoryAssociationsCommand = ListRepositoryAssociationsCommand;
1294
+ exports.ListTagsForResourceCommand = ListTagsForResourceCommand;
1295
+ exports.NotFoundException = NotFoundException;
1296
+ exports.ProviderType = ProviderType;
1297
+ exports.PutRecommendationFeedbackCommand = PutRecommendationFeedbackCommand;
1298
+ exports.Reaction = Reaction;
1299
+ exports.RecommendationCategory = RecommendationCategory;
1300
+ exports.RepositoryAssociationState = RepositoryAssociationState;
1301
+ exports.ResourceNotFoundException = ResourceNotFoundException;
1302
+ exports.Severity = Severity;
1303
+ exports.TagResourceCommand = TagResourceCommand;
1304
+ exports.ThrottlingException = ThrottlingException;
1305
+ exports.Type = Type;
1306
+ exports.UntagResourceCommand = UntagResourceCommand;
1307
+ exports.ValidationException = ValidationException;
1308
+ exports.VendorName = VendorName;
1309
+ exports.paginateListCodeReviews = paginateListCodeReviews;
1310
+ exports.paginateListRecommendationFeedback = paginateListRecommendationFeedback;
1311
+ exports.paginateListRecommendations = paginateListRecommendations;
1312
+ exports.paginateListRepositoryAssociations = paginateListRepositoryAssociations;
1313
+ exports.waitForCodeReviewCompleted = waitForCodeReviewCompleted;
1314
+ exports.waitForRepositoryAssociationSucceeded = waitForRepositoryAssociationSucceeded;
1315
+ exports.waitUntilCodeReviewCompleted = waitUntilCodeReviewCompleted;
1316
+ exports.waitUntilRepositoryAssociationSucceeded = waitUntilRepositoryAssociationSucceeded;