Skip to content

Commit 6f7f964

Browse files
committed
chore: update to ts3.7; update rds model#3
1 parent 9c20ebc commit 6f7f964

File tree

5 files changed

+98
-71
lines changed

5 files changed

+98
-71
lines changed

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

Lines changed: 89 additions & 67 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,30 +28,27 @@ 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 {
4842
readonly message?: string;
49-
constructor(args: { $service: string; message?: string }) {
43+
constructor(args: {
44+
$service: string;
45+
message?: string;
46+
}) {
5047
super({
5148
id: "com.amazon.rdsdataservice#BadRequestException",
5249
name: "BadRequestException",
5350
fault: "client",
54-
service: args.$service
51+
service: args.$service,
5552
});
5653
this.message = args.message;
5754
}
@@ -88,7 +85,9 @@ export class BatchExecuteStatementRequest implements $SmithyStructure {
8885
export class BatchExecuteStatementResponse implements $SmithyStructure {
8986
readonly $id = "com.amazon.rdsdataservice#BatchExecuteStatementResponse";
9087
readonly updateResults?: Array<UpdateResult>;
91-
constructor(args: { updateResults?: Array<UpdateResult> }) {
88+
constructor(args: {
89+
updateResults?: Array<UpdateResult>;
90+
}) {
9291
this.updateResults = args.updateResults;
9392
}
9493
}
@@ -115,7 +114,9 @@ export class BeginTransactionRequest implements $SmithyStructure {
115114
export class BeginTransactionResponse implements $SmithyStructure {
116115
readonly $id = "com.amazon.rdsdataservice#BeginTransactionResponse";
117116
readonly transactionId?: string;
118-
constructor(args: { transactionId?: string }) {
117+
constructor(args: {
118+
transactionId?: string;
119+
}) {
119120
this.transactionId = args.transactionId;
120121
}
121122
}
@@ -188,15 +189,17 @@ export class CommitTransactionRequest implements $SmithyStructure {
188189
export class CommitTransactionResponse implements $SmithyStructure {
189190
readonly $id = "com.amazon.rdsdataservice#CommitTransactionResponse";
190191
readonly transactionStatus?: string;
191-
constructor(args: { transactionStatus?: string }) {
192+
constructor(args: {
193+
transactionStatus?: string;
194+
}) {
192195
this.transactionStatus = args.transactionStatus;
193196
}
194197
}
195198

196199
export enum DecimalReturnType {
197200
STRING = "STRING",
198-
DOUBLE_OR_LONG = "DOUBLE_OR_LONG"
199-
}
201+
DOUBLE_OR_LONG = "DOUBLE_OR_LONG",
202+
};
200203

201204
export class ExecuteSqlRequest implements $SmithyStructure {
202205
readonly $id = "com.amazon.rdsdataservice#ExecuteSqlRequest";
@@ -223,7 +226,9 @@ export class ExecuteSqlRequest implements $SmithyStructure {
223226
export class ExecuteSqlResponse implements $SmithyStructure {
224227
readonly $id = "com.amazon.rdsdataservice#ExecuteSqlResponse";
225228
readonly sqlStatementResults?: Array<SqlStatementResult>;
226-
constructor(args: { sqlStatementResults?: Array<SqlStatementResult> }) {
229+
constructor(args: {
230+
sqlStatementResults?: Array<SqlStatementResult>;
231+
}) {
227232
this.sqlStatementResults = args.sqlStatementResults;
228233
}
229234
}
@@ -308,58 +313,63 @@ namespace Field {
308313
_: (name: string, value: any) => T;
309314
}
310315

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);
316+
export function visit<T>(
317+
value: Field,
318+
visitor: FieldVisitor<T>
319+
): T {
320+
if (value.blobValue !== undefined) return visitor.blobValue(value.blobValue);
321+
if (value.booleanValue !== undefined) return visitor.booleanValue(value.booleanValue);
322+
if (value.arrayValue !== undefined) return visitor.arrayValue(value.arrayValue);
323+
if (value.structValue !== undefined) return visitor.structValue(value.structValue);
324+
if (value.longValue !== undefined) return visitor.longValue(value.longValue);
322325
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);
326+
if (value.doubleValue !== undefined) return visitor.doubleValue(value.doubleValue);
327+
if (value.stringValue !== undefined) return visitor.stringValue(value.stringValue);
327328
return visitor._(value.$unknown[0], value.$unknown[1]);
328329
}
329330
}
330331

331332
export class ForbiddenException extends $SmithyException {
332333
readonly message?: string;
333-
constructor(args: { $service: string; message?: string }) {
334+
constructor(args: {
335+
$service: string;
336+
message?: string;
337+
}) {
334338
super({
335339
id: "com.amazon.rdsdataservice#ForbiddenException",
336340
name: "ForbiddenException",
337341
fault: "client",
338-
service: args.$service
342+
service: args.$service,
339343
});
340344
this.message = args.message;
341345
}
342346
}
343347

344348
export class InternalServerErrorException extends $SmithyException {
345-
constructor(args: { $service: string; message?: string }) {
349+
constructor(args: {
350+
$service: string;
351+
message?: string;
352+
}) {
346353
super({
347354
id: "com.amazon.rdsdataservice#InternalServerErrorException",
348355
name: "InternalServerErrorException",
349356
fault: "server",
350-
service: args.$service
357+
service: args.$service,
351358
});
352359
}
353360
}
354361

355362
export class NotFoundException extends $SmithyException {
356363
readonly message?: string;
357-
constructor(args: { $service: string; message?: string }) {
364+
constructor(args: {
365+
$service: string;
366+
message?: string;
367+
}) {
358368
super({
359369
id: "com.amazon.rdsdataservice#NotFoundException",
360370
name: "NotFoundException",
361371
fault: "client",
362-
service: args.$service
372+
service: args.$service,
363373
});
364374
this.message = args.message;
365375
}
@@ -368,7 +378,9 @@ export class NotFoundException extends $SmithyException {
368378
export class _Record implements $SmithyStructure {
369379
readonly $id = "com.amazon.rdsdataservice#Record";
370380
readonly values?: Array<Value>;
371-
constructor(args: { values?: Array<Value> }) {
381+
constructor(args: {
382+
values?: Array<Value>;
383+
}) {
372384
this.values = args.values;
373385
}
374386
}
@@ -402,7 +414,9 @@ export class ResultSetMetadata implements $SmithyStructure {
402414
export class ResultSetOptions implements $SmithyStructure {
403415
readonly $id = "com.amazon.rdsdataservice#ResultSetOptions";
404416
readonly decimalReturnType?: DecimalReturnType | string;
405-
constructor(args: { decimalReturnType?: DecimalReturnType | string }) {
417+
constructor(args: {
418+
decimalReturnType?: DecimalReturnType | string;
419+
}) {
406420
this.decimalReturnType = args.decimalReturnType;
407421
}
408422
}
@@ -426,18 +440,23 @@ export class RollbackTransactionRequest implements $SmithyStructure {
426440
export class RollbackTransactionResponse implements $SmithyStructure {
427441
readonly $id = "com.amazon.rdsdataservice#RollbackTransactionResponse";
428442
readonly transactionStatus?: string;
429-
constructor(args: { transactionStatus?: string }) {
443+
constructor(args: {
444+
transactionStatus?: string;
445+
}) {
430446
this.transactionStatus = args.transactionStatus;
431447
}
432448
}
433449

434450
export class ServiceUnavailableError extends $SmithyException {
435-
constructor(args: { $service: string; message?: string }) {
451+
constructor(args: {
452+
$service: string;
453+
message?: string;
454+
}) {
436455
super({
437456
id: "com.amazon.rdsdataservice#ServiceUnavailableError",
438457
name: "ServiceUnavailableError",
439458
fault: "server",
440-
service: args.$service
459+
service: args.$service,
441460
});
442461
}
443462
}
@@ -446,7 +465,10 @@ export class SqlParameter implements $SmithyStructure {
446465
readonly $id = "com.amazon.rdsdataservice#SqlParameter";
447466
readonly name?: string;
448467
readonly value?: Field;
449-
constructor(args: { name?: string; value?: Field }) {
468+
constructor(args: {
469+
name?: string;
470+
value?: Field;
471+
}) {
450472
this.name = args.name;
451473
this.value = args.value;
452474
}
@@ -477,7 +499,7 @@ export class StatementTimeoutException extends $SmithyException {
477499
id: "com.amazon.rdsdataservice#StatementTimeoutException",
478500
name: "StatementTimeoutException",
479501
fault: "client",
480-
service: args.$service
502+
service: args.$service,
481503
});
482504
this.message = args.message;
483505
this.dbConnectionId = args.dbConnectionId;
@@ -487,15 +509,19 @@ export class StatementTimeoutException extends $SmithyException {
487509
export class StructValue implements $SmithyStructure {
488510
readonly $id = "com.amazon.rdsdataservice#StructValue";
489511
readonly attributes?: Array<Value>;
490-
constructor(args: { attributes?: Array<Value> }) {
512+
constructor(args: {
513+
attributes?: Array<Value>;
514+
}) {
491515
this.attributes = args.attributes;
492516
}
493517
}
494518

495519
export class UpdateResult implements $SmithyStructure {
496520
readonly $id = "com.amazon.rdsdataservice#UpdateResult";
497521
readonly generatedFields?: Array<Field>;
498-
constructor(args: { generatedFields?: Array<Field> }) {
522+
constructor(args: {
523+
generatedFields?: Array<Field>;
524+
}) {
499525
this.generatedFields = args.generatedFields;
500526
}
501527
}
@@ -528,24 +554,20 @@ namespace Value {
528554
_: (name: string, value: any) => T;
529555
}
530556

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);
557+
export function visit<T>(
558+
value: Value,
559+
visitor: ValueVisitor<T>
560+
): T {
561+
if (value.blobValue !== undefined) return visitor.blobValue(value.blobValue);
562+
if (value.realValue !== undefined) return visitor.realValue(value.realValue);
563+
if (value.bigIntValue !== undefined) return visitor.bigIntValue(value.bigIntValue);
538564
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);
565+
if (value.stringValue !== undefined) return visitor.stringValue(value.stringValue);
566+
if (value.arrayValues !== undefined) return visitor.arrayValues(value.arrayValues);
567+
if (value.doubleValue !== undefined) return visitor.doubleValue(value.doubleValue);
545568
if (value.isNull !== undefined) return visitor.isNull(value.isNull);
546-
if (value.structValue !== undefined)
547-
return visitor.structValue(value.structValue);
569+
if (value.structValue !== undefined) return visitor.structValue(value.structValue);
548570
if (value.bitValue !== undefined) return visitor.bitValue(value.bitValue);
549571
return visitor._(value.$unknown[0], value.$unknown[1]);
550572
}
551-
}
573+
}

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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export namespace DocumentType {
4747
export type Value = Scalar | Structure | List;
4848
export type Scalar = string | number | boolean | null | Uint8Array | Date;
4949
export type Structure = { [member: string]: Value };
50-
export interface List extends Array<Value> { }
50+
export interface List extends Array<Value> {}
5151
}
5252

5353
/**
@@ -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": [

yarn.lock

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8755,6 +8755,11 @@ [email protected]:
87558755
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.2.4.tgz#c585cb952912263d915b462726ce244ba510ef3d"
87568756
integrity sha512-0RNDbSdEokBeEAkgNbxJ+BLwSManFy9TeXz8uW+48j/xhEXv1ePME60olyzw2XzUqUBNAYFeJadIqAgNqIACwg==
87578757

8758+
[email protected], typescript@^3.7.0-dev.20190926:
8759+
version "3.7.0-dev.20190926"
8760+
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.7.0-dev.20190926.tgz#2e90fa4e56fad0fddb87e4d837cd33c7e4a55e7c"
8761+
integrity sha512-uOQij3UHJnzxY/8Kv1kdmvWTjghgbCD0kBOgVGbY7Rni8ER51O8iPMmI4YpanZmaiZbPK6zUaS60b04/2C91bA==
8762+
87588763
typescript@~3.4.0:
87598764
version "3.4.5"
87608765
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.4.5.tgz#2d2618d10bb566572b8d7aad5180d84257d70a99"

0 commit comments

Comments
 (0)