Skip to content

Commit 96bb132

Browse files
committed
chore: update to ts3.7; update rds model#3
* smithy-typescript: ddd6257c956381a8a16fe224d3a9de8286e7ed5f * smithy: 17df2312a0fd9bde2e4c5c0c61c5602cd20bc27f
1 parent 9c20ebc commit 96bb132

File tree

5 files changed

+107
-82
lines changed

5 files changed

+107
-82
lines changed

clients/node/client-rds-data-node/models/com/amazon/rdsdataservice.ts

Lines changed: 97 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {
22
SmithyException as $SmithyException,
33
SmithyStructure as $SmithyStructure,
4-
TaggedUnion
4+
TaggedUnion,
55
} from "../../../shared/shapeTypes";
66

77
export type ArrayValue = TaggedUnion<{
@@ -28,32 +28,28 @@ namespace ArrayValue {
2828
value: ArrayValue,
2929
visitor: ArrayValueVisitor<T>
3030
): T {
31-
if (value.stringValues !== undefined)
32-
return visitor.stringValues(value.stringValues);
33-
if (value.booleanValues !== undefined)
34-
return visitor.booleanValues(value.booleanValues);
35-
if (value.arrayValues !== undefined)
36-
return visitor.arrayValues(value.arrayValues);
37-
if (value.blobValues !== undefined)
38-
return visitor.blobValues(value.blobValues);
39-
if (value.doubleValues !== undefined)
40-
return visitor.doubleValues(value.doubleValues);
41-
if (value.longValues !== undefined)
42-
return visitor.longValues(value.longValues);
31+
if (value.stringValues !== undefined) return visitor.stringValues(value.stringValues);
32+
if (value.booleanValues !== undefined) return visitor.booleanValues(value.booleanValues);
33+
if (value.arrayValues !== undefined) return visitor.arrayValues(value.arrayValues);
34+
if (value.blobValues !== undefined) return visitor.blobValues(value.blobValues);
35+
if (value.doubleValues !== undefined) return visitor.doubleValues(value.doubleValues);
36+
if (value.longValues !== undefined) return visitor.longValues(value.longValues);
4337
return visitor._(value.$unknown[0], value.$unknown[1]);
4438
}
4539
}
4640

4741
export class BadRequestException extends $SmithyException {
48-
readonly message?: string;
49-
constructor(args: { $service: string; message?: string }) {
42+
constructor(args: {
43+
$service: string;
44+
message?: string;
45+
}) {
5046
super({
47+
message: args.message || "",
5148
id: "com.amazon.rdsdataservice#BadRequestException",
5249
name: "BadRequestException",
5350
fault: "client",
54-
service: args.$service
51+
service: args.$service,
5552
});
56-
this.message = args.message;
5753
}
5854
}
5955

@@ -88,7 +84,9 @@ export class BatchExecuteStatementRequest implements $SmithyStructure {
8884
export class BatchExecuteStatementResponse implements $SmithyStructure {
8985
readonly $id = "com.amazon.rdsdataservice#BatchExecuteStatementResponse";
9086
readonly updateResults?: Array<UpdateResult>;
91-
constructor(args: { updateResults?: Array<UpdateResult> }) {
87+
constructor(args: {
88+
updateResults?: Array<UpdateResult>;
89+
}) {
9290
this.updateResults = args.updateResults;
9391
}
9492
}
@@ -115,7 +113,9 @@ export class BeginTransactionRequest implements $SmithyStructure {
115113
export class BeginTransactionResponse implements $SmithyStructure {
116114
readonly $id = "com.amazon.rdsdataservice#BeginTransactionResponse";
117115
readonly transactionId?: string;
118-
constructor(args: { transactionId?: string }) {
116+
constructor(args: {
117+
transactionId?: string;
118+
}) {
119119
this.transactionId = args.transactionId;
120120
}
121121
}
@@ -188,15 +188,17 @@ export class CommitTransactionRequest implements $SmithyStructure {
188188
export class CommitTransactionResponse implements $SmithyStructure {
189189
readonly $id = "com.amazon.rdsdataservice#CommitTransactionResponse";
190190
readonly transactionStatus?: string;
191-
constructor(args: { transactionStatus?: string }) {
191+
constructor(args: {
192+
transactionStatus?: string;
193+
}) {
192194
this.transactionStatus = args.transactionStatus;
193195
}
194196
}
195197

196198
export enum DecimalReturnType {
197199
STRING = "STRING",
198-
DOUBLE_OR_LONG = "DOUBLE_OR_LONG"
199-
}
200+
DOUBLE_OR_LONG = "DOUBLE_OR_LONG",
201+
};
200202

201203
export class ExecuteSqlRequest implements $SmithyStructure {
202204
readonly $id = "com.amazon.rdsdataservice#ExecuteSqlRequest";
@@ -223,7 +225,9 @@ export class ExecuteSqlRequest implements $SmithyStructure {
223225
export class ExecuteSqlResponse implements $SmithyStructure {
224226
readonly $id = "com.amazon.rdsdataservice#ExecuteSqlResponse";
225227
readonly sqlStatementResults?: Array<SqlStatementResult>;
226-
constructor(args: { sqlStatementResults?: Array<SqlStatementResult> }) {
228+
constructor(args: {
229+
sqlStatementResults?: Array<SqlStatementResult>;
230+
}) {
227231
this.sqlStatementResults = args.sqlStatementResults;
228232
}
229233
}
@@ -308,77 +312,83 @@ namespace Field {
308312
_: (name: string, value: any) => T;
309313
}
310314

311-
export function visit<T>(value: Field, visitor: FieldVisitor<T>): T {
312-
if (value.blobValue !== undefined)
313-
return visitor.blobValue(value.blobValue);
314-
if (value.booleanValue !== undefined)
315-
return visitor.booleanValue(value.booleanValue);
316-
if (value.arrayValue !== undefined)
317-
return visitor.arrayValue(value.arrayValue);
318-
if (value.structValue !== undefined)
319-
return visitor.structValue(value.structValue);
320-
if (value.longValue !== undefined)
321-
return visitor.longValue(value.longValue);
315+
export function visit<T>(
316+
value: Field,
317+
visitor: FieldVisitor<T>
318+
): T {
319+
if (value.blobValue !== undefined) return visitor.blobValue(value.blobValue);
320+
if (value.booleanValue !== undefined) return visitor.booleanValue(value.booleanValue);
321+
if (value.arrayValue !== undefined) return visitor.arrayValue(value.arrayValue);
322+
if (value.structValue !== undefined) return visitor.structValue(value.structValue);
323+
if (value.longValue !== undefined) return visitor.longValue(value.longValue);
322324
if (value.isNull !== undefined) return visitor.isNull(value.isNull);
323-
if (value.doubleValue !== undefined)
324-
return visitor.doubleValue(value.doubleValue);
325-
if (value.stringValue !== undefined)
326-
return visitor.stringValue(value.stringValue);
325+
if (value.doubleValue !== undefined) return visitor.doubleValue(value.doubleValue);
326+
if (value.stringValue !== undefined) return visitor.stringValue(value.stringValue);
327327
return visitor._(value.$unknown[0], value.$unknown[1]);
328328
}
329329
}
330330

331331
export class ForbiddenException extends $SmithyException {
332-
readonly message?: string;
333-
constructor(args: { $service: string; message?: string }) {
332+
constructor(args: {
333+
$service: string;
334+
message?: string;
335+
}) {
334336
super({
337+
message: args.message || "",
335338
id: "com.amazon.rdsdataservice#ForbiddenException",
336339
name: "ForbiddenException",
337340
fault: "client",
338-
service: args.$service
341+
service: args.$service,
339342
});
340-
this.message = args.message;
341343
}
342344
}
343345

344346
export class InternalServerErrorException extends $SmithyException {
345-
constructor(args: { $service: string; message?: string }) {
347+
constructor(args: {
348+
$service: string;
349+
message?: string;
350+
}) {
346351
super({
352+
message: args.message || "",
347353
id: "com.amazon.rdsdataservice#InternalServerErrorException",
348354
name: "InternalServerErrorException",
349355
fault: "server",
350-
service: args.$service
356+
service: args.$service,
351357
});
352358
}
353359
}
354360

355361
export class NotFoundException extends $SmithyException {
356-
readonly message?: string;
357-
constructor(args: { $service: string; message?: string }) {
362+
constructor(args: {
363+
$service: string;
364+
message?: string;
365+
}) {
358366
super({
367+
message: args.message || "",
359368
id: "com.amazon.rdsdataservice#NotFoundException",
360369
name: "NotFoundException",
361370
fault: "client",
362-
service: args.$service
371+
service: args.$service,
363372
});
364-
this.message = args.message;
365373
}
366374
}
367375

368376
export class _Record implements $SmithyStructure {
369377
readonly $id = "com.amazon.rdsdataservice#Record";
370378
readonly values?: Array<Value>;
371-
constructor(args: { values?: Array<Value> }) {
379+
constructor(args: {
380+
values?: Array<Value>;
381+
}) {
372382
this.values = args.values;
373383
}
374384
}
375385

376386
export class ResultFrame implements $SmithyStructure {
377387
readonly $id = "com.amazon.rdsdataservice#ResultFrame";
378-
readonly records?: Array<Record>;
388+
readonly records?: Array<_Record>;
379389
readonly resultSetMetadata?: ResultSetMetadata;
380390
constructor(args: {
381-
records?: Array<Record>;
391+
records?: Array<_Record>;
382392
resultSetMetadata?: ResultSetMetadata;
383393
}) {
384394
this.records = args.records;
@@ -402,7 +412,9 @@ export class ResultSetMetadata implements $SmithyStructure {
402412
export class ResultSetOptions implements $SmithyStructure {
403413
readonly $id = "com.amazon.rdsdataservice#ResultSetOptions";
404414
readonly decimalReturnType?: DecimalReturnType | string;
405-
constructor(args: { decimalReturnType?: DecimalReturnType | string }) {
415+
constructor(args: {
416+
decimalReturnType?: DecimalReturnType | string;
417+
}) {
406418
this.decimalReturnType = args.decimalReturnType;
407419
}
408420
}
@@ -426,18 +438,24 @@ export class RollbackTransactionRequest implements $SmithyStructure {
426438
export class RollbackTransactionResponse implements $SmithyStructure {
427439
readonly $id = "com.amazon.rdsdataservice#RollbackTransactionResponse";
428440
readonly transactionStatus?: string;
429-
constructor(args: { transactionStatus?: string }) {
441+
constructor(args: {
442+
transactionStatus?: string;
443+
}) {
430444
this.transactionStatus = args.transactionStatus;
431445
}
432446
}
433447

434448
export class ServiceUnavailableError extends $SmithyException {
435-
constructor(args: { $service: string; message?: string }) {
449+
constructor(args: {
450+
$service: string;
451+
message?: string;
452+
}) {
436453
super({
454+
message: args.message || "",
437455
id: "com.amazon.rdsdataservice#ServiceUnavailableError",
438456
name: "ServiceUnavailableError",
439457
fault: "server",
440-
service: args.$service
458+
service: args.$service,
441459
});
442460
}
443461
}
@@ -446,7 +464,10 @@ export class SqlParameter implements $SmithyStructure {
446464
readonly $id = "com.amazon.rdsdataservice#SqlParameter";
447465
readonly name?: string;
448466
readonly value?: Field;
449-
constructor(args: { name?: string; value?: Field }) {
467+
constructor(args: {
468+
name?: string;
469+
value?: Field;
470+
}) {
450471
this.name = args.name;
451472
this.value = args.value;
452473
}
@@ -466,36 +487,39 @@ export class SqlStatementResult implements $SmithyStructure {
466487
}
467488

468489
export class StatementTimeoutException extends $SmithyException {
469-
readonly message?: string;
470490
readonly dbConnectionId?: number;
471491
constructor(args: {
472492
$service: string;
473493
message?: string;
474494
dbConnectionId?: number;
475495
}) {
476496
super({
497+
message: args.message || "",
477498
id: "com.amazon.rdsdataservice#StatementTimeoutException",
478499
name: "StatementTimeoutException",
479500
fault: "client",
480-
service: args.$service
501+
service: args.$service,
481502
});
482-
this.message = args.message;
483503
this.dbConnectionId = args.dbConnectionId;
484504
}
485505
}
486506

487507
export class StructValue implements $SmithyStructure {
488508
readonly $id = "com.amazon.rdsdataservice#StructValue";
489509
readonly attributes?: Array<Value>;
490-
constructor(args: { attributes?: Array<Value> }) {
510+
constructor(args: {
511+
attributes?: Array<Value>;
512+
}) {
491513
this.attributes = args.attributes;
492514
}
493515
}
494516

495517
export class UpdateResult implements $SmithyStructure {
496518
readonly $id = "com.amazon.rdsdataservice#UpdateResult";
497519
readonly generatedFields?: Array<Field>;
498-
constructor(args: { generatedFields?: Array<Field> }) {
520+
constructor(args: {
521+
generatedFields?: Array<Field>;
522+
}) {
499523
this.generatedFields = args.generatedFields;
500524
}
501525
}
@@ -528,24 +552,20 @@ namespace Value {
528552
_: (name: string, value: any) => T;
529553
}
530554

531-
export function visit<T>(value: Value, visitor: ValueVisitor<T>): T {
532-
if (value.blobValue !== undefined)
533-
return visitor.blobValue(value.blobValue);
534-
if (value.realValue !== undefined)
535-
return visitor.realValue(value.realValue);
536-
if (value.bigIntValue !== undefined)
537-
return visitor.bigIntValue(value.bigIntValue);
555+
export function visit<T>(
556+
value: Value,
557+
visitor: ValueVisitor<T>
558+
): T {
559+
if (value.blobValue !== undefined) return visitor.blobValue(value.blobValue);
560+
if (value.realValue !== undefined) return visitor.realValue(value.realValue);
561+
if (value.bigIntValue !== undefined) return visitor.bigIntValue(value.bigIntValue);
538562
if (value.intValue !== undefined) return visitor.intValue(value.intValue);
539-
if (value.stringValue !== undefined)
540-
return visitor.stringValue(value.stringValue);
541-
if (value.arrayValues !== undefined)
542-
return visitor.arrayValues(value.arrayValues);
543-
if (value.doubleValue !== undefined)
544-
return visitor.doubleValue(value.doubleValue);
563+
if (value.stringValue !== undefined) return visitor.stringValue(value.stringValue);
564+
if (value.arrayValues !== undefined) return visitor.arrayValues(value.arrayValues);
565+
if (value.doubleValue !== undefined) return visitor.doubleValue(value.doubleValue);
545566
if (value.isNull !== undefined) return visitor.isNull(value.isNull);
546-
if (value.structValue !== undefined)
547-
return visitor.structValue(value.structValue);
567+
if (value.structValue !== undefined) return visitor.structValue(value.structValue);
548568
if (value.bitValue !== undefined) return visitor.bitValue(value.bitValue);
549569
return visitor._(value.$unknown[0], value.$unknown[1]);
550570
}
551-
}
571+
}

clients/node/client-rds-data-node/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,6 @@
6868
"rollup-plugin-replace": "^2.2.0",
6969
"rollup-plugin-sourcemaps": "^0.4.2",
7070
"typedoc": "^0.14.2",
71-
"typescript": "^3.6.3"
71+
"typescript": "^3.7.0-dev.20190926"
7272
}
7373
}

clients/node/client-rds-data-node/shared/shapeTypes.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ export class SmithyException extends Error implements SmithyStructure {
3030
name: string;
3131
service: string;
3232
fault: "client" | "server";
33-
message?: string;
33+
message?: string | undefined;
3434
}) {
35-
super(args.message);
35+
super(args.message || "");
3636
this.$id = args.id;
3737
this.name = args.name;
3838
this.$service = args.service;
@@ -79,4 +79,4 @@ type TaggedUnionHelper<_T, T = UnknownVariant & _T> =
7979

8080
type ExactlyOne<T, K extends keyof T> =
8181
Required<Pick<T, K>>
82-
& Partial<Record<Exclude<keyof T, K>, undefined>>;
82+
& Partial<Record<Exclude<keyof T, K>, undefined>>;

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"lerna": "3.16.4",
4444
"lint-staged": "^9.0.0",
4545
"prettier": "1.18.2",
46-
"typescript": "~3.4.0",
46+
"typescript": "3.7.0-dev.20190926",
4747
"yarn": "1.17.3"
4848
},
4949
"workspaces": [

0 commit comments

Comments
 (0)