Skip to content

Commit 8081286

Browse files
author
Chase Coalwell
committed
chore: update rds model#4
1 parent c60241b commit 8081286

File tree

4 files changed

+865
-653
lines changed

4 files changed

+865
-653
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
export const TYPE = "__type";
2+
3+
/**
4+
* Checks if the given value is a Smithy structure of the given type.
5+
*/
6+
export function isa<T>(o: any, ...ids: string[]): o is T {
7+
return typeof o === "object" && TYPE in o && ids.indexOf(o[TYPE]) > -1;
8+
}
9+
10+
/**
11+
* Type that is implemented by all Smithy shapes marked with the
12+
* error trait.
13+
*/
14+
export interface SmithyException {
15+
/**
16+
* The shape ID of the exception.
17+
*/
18+
readonly __type: string;
19+
20+
/**
21+
* Whether the client or server are at fault.
22+
*/
23+
readonly $fault: "client" | "server";
24+
25+
/**
26+
* The name of the error.
27+
*/
28+
readonly $name: string;
29+
30+
/**
31+
* The service that encountered the exception.
32+
*/
33+
readonly $service?: string;
34+
}
35+
36+
/**
37+
* Smithy document type values.
38+
*/
39+
export namespace DocumentType {
40+
export type Value = Scalar | Structure | List;
41+
export type Scalar = string | number | boolean | null | Uint8Array | Date;
42+
export type Structure = { [member: string]: Value };
43+
export interface List extends Array<Value> {}
44+
}

0 commit comments

Comments
 (0)