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 interface AutoMLTfliteModelOptions extends ModelOptionsBase {
|
30 | tfliteModel: {
|
31 | automlModel: string;
|
32 | };
|
33 | }
|
34 | export declare type ModelOptions = ModelOptionsBase | GcsTfliteModelOptions | AutoMLTfliteModelOptions;
|
35 |
|
36 |
|
37 |
|
38 | export interface ListModelsOptions {
|
39 | |
40 |
|
41 |
|
42 |
|
43 |
|
44 |
|
45 |
|
46 |
|
47 |
|
48 |
|
49 |
|
50 |
|
51 |
|
52 |
|
53 | filter?: string;
|
54 |
|
55 | pageSize?: number;
|
56 |
|
57 | pageToken?: string;
|
58 | }
|
59 | export interface StatusErrorResponse {
|
60 | readonly code: number;
|
61 | readonly message: string;
|
62 | }
|
63 | export declare type ModelUpdateOptions = ModelOptions & {
|
64 | state?: {
|
65 | published?: boolean;
|
66 | };
|
67 | };
|
68 | export declare function isGcsTfliteModelOptions(options: ModelOptions): options is GcsTfliteModelOptions;
|
69 | export interface ModelContent {
|
70 | readonly displayName?: string;
|
71 | readonly tags?: string[];
|
72 | readonly state?: {
|
73 | readonly validationError?: StatusErrorResponse;
|
74 | readonly published?: boolean;
|
75 | };
|
76 | readonly tfliteModel?: {
|
77 | readonly gcsTfliteUri?: string;
|
78 | readonly automlModel?: string;
|
79 | readonly sizeBytes: number;
|
80 | };
|
81 | }
|
82 | export interface ModelResponse extends ModelContent {
|
83 | readonly name: string;
|
84 | readonly createTime: string;
|
85 | readonly updateTime: string;
|
86 | readonly etag: string;
|
87 | readonly modelHash?: string;
|
88 | readonly activeOperations?: OperationResponse[];
|
89 | }
|
90 | export interface ListModelsResponse {
|
91 | readonly models?: ModelResponse[];
|
92 | readonly nextPageToken?: string;
|
93 | }
|
94 | export interface OperationResponse {
|
95 | readonly name?: string;
|
96 | readonly metadata?: {
|
97 | [key: string]: any;
|
98 | };
|
99 | readonly done: boolean;
|
100 | readonly error?: StatusErrorResponse;
|
101 | readonly response?: ModelResponse;
|
102 | }
|