1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 | export interface ModelOptionsBase {
|
21 | displayName?: string;
|
22 | tags?: string[];
|
23 | }
|
24 | export interface GcsTfliteModelOptions extends ModelOptionsBase {
|
25 | tfliteModel: {
|
26 | gcsTfliteUri: string;
|
27 | };
|
28 | }
|
29 | export type ModelOptions = ModelOptionsBase | GcsTfliteModelOptions;
|
30 |
|
31 |
|
32 |
|
33 | export interface ListModelsOptions {
|
34 | |
35 |
|
36 |
|
37 |
|
38 |
|
39 |
|
40 |
|
41 |
|
42 |
|
43 |
|
44 |
|
45 |
|
46 |
|
47 |
|
48 | filter?: string;
|
49 |
|
50 | pageSize?: number;
|
51 |
|
52 | pageToken?: string;
|
53 | }
|
54 | export interface StatusErrorResponse {
|
55 | readonly code: number;
|
56 | readonly message: string;
|
57 | }
|
58 | export type ModelUpdateOptions = ModelOptions & {
|
59 | state?: {
|
60 | published?: boolean;
|
61 | };
|
62 | };
|
63 | export declare function isGcsTfliteModelOptions(options: ModelOptions): options is GcsTfliteModelOptions;
|
64 | export interface ModelContent {
|
65 | readonly displayName?: string;
|
66 | readonly tags?: string[];
|
67 | readonly state?: {
|
68 | readonly validationError?: StatusErrorResponse;
|
69 | readonly published?: boolean;
|
70 | };
|
71 | readonly tfliteModel?: {
|
72 | readonly gcsTfliteUri?: string;
|
73 | readonly sizeBytes: number;
|
74 | };
|
75 | }
|
76 | export interface ModelResponse extends ModelContent {
|
77 | readonly name: string;
|
78 | readonly createTime: string;
|
79 | readonly updateTime: string;
|
80 | readonly etag: string;
|
81 | readonly modelHash?: string;
|
82 | readonly activeOperations?: OperationResponse[];
|
83 | }
|
84 | export interface ListModelsResponse {
|
85 | readonly models?: ModelResponse[];
|
86 | readonly nextPageToken?: string;
|
87 | }
|
88 | export interface OperationResponse {
|
89 | readonly name?: string;
|
90 | readonly metadata?: {
|
91 | [key: string]: any;
|
92 | };
|
93 | readonly done: boolean;
|
94 | readonly error?: StatusErrorResponse;
|
95 | readonly response?: ModelResponse;
|
96 | }
|