/
index.ts
459 lines (402 loc) · 20.9 KB
/
index.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
import * as coreClient from "@azure/core-client";
/** Request to start a conversion */
export interface CreateConversionSettings {
/** Conversion settings describe the origin of input files and destination of output files. */
settings: AssetConversionSettings;
}
/** Conversion settings describe the origin of input files and destination of output files. */
export interface AssetConversionSettings {
/** Conversion input settings describe the origin of conversion input. */
inputSettings: AssetConversionInputSettings;
/** Conversion output settings describe the destination of conversion output. */
outputSettings: AssetConversionOutputSettings;
}
/** Conversion input settings describe the origin of conversion input. */
export interface AssetConversionInputSettings {
/** The URI of the Azure blob storage container containing the input model. */
storageContainerUrl: string;
/** An Azure blob storage container shared access signature giving read and list access to the storage container. Optional. If not provided, the Azure Remote Rendering account needs to be linked with the storage account containing the blob container. See https://docs.microsoft.com/azure/remote-rendering/how-tos/create-an-account#link-storage-accounts for details. For security purposes this field will never be filled out in responses bodies. */
storageContainerReadListSas?: string;
/** Only Blobs starting with this prefix will be downloaded to perform the conversion. Optional. If not provided, all Blobs from the container will be downloaded. */
blobPrefix?: string;
/** The relative path starting at blobPrefix (or at the container root if blobPrefix is not provided) to the input model. Must point to a file with a supported file format ending. See https://docs.microsoft.com/azure/remote-rendering/how-tos/conversion/model-conversion for details. */
relativeInputAssetPath: string;
}
/** Conversion output settings describe the destination of conversion output. */
export interface AssetConversionOutputSettings {
/** The URI of the Azure blob storage container where the result of the conversion should be written to. */
storageContainerUrl: string;
/** An Azure blob storage container shared access signature giving write access to the storage container. Optional. If not provided, the Azure Remote Rendering account needs to be linked with the storage account containing the blob container. See https://docs.microsoft.com/azure/remote-rendering/how-tos/create-an-account#link-storage-accounts for details. For security purposes this field will never be filled out in responses bodies. */
storageContainerWriteSas?: string;
/** A prefix which gets prepended in front of all files produced by the conversion process. Will be treated as a virtual folder. Optional. If not provided, output files will be stored at the container root. */
blobPrefix?: string;
/** The file name of the output asset. Must end in '.arrAsset'. Optional. If not provided, file name will the same name as the input asset, with '.arrAsset' extension */
outputAssetFilename?: string;
}
/** The properties of the conversion. */
export interface Conversion {
/** The ID of the conversion supplied when the conversion was created. */
conversionId: string;
/** Conversion settings describe the origin of input files and destination of output files. */
settings: AssetConversionSettings;
/**
* Information about the output of a successful conversion. Only present when the status of the conversion is 'Succeeded'.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly output?: AssetConversionOutput;
/** The error object containing details about the conversion failure. */
error: RemoteRenderingServiceErrorInternal | null;
/** The status of the conversion. Terminal states are 'Cancelled', 'Failed', and 'Succeeded'. */
status: AssetConversionStatus;
/** The time when the conversion was created. Date and time in ISO 8601 format. */
createdOn: Date;
}
/** Information about the output of a successful conversion. Only present when the status of the conversion is 'Succeeded'. */
export interface AssetConversionOutput {
/**
* URI of the asset generated by the conversion process.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly outputAssetUrl?: string;
}
/** The error object containing details of why the request failed. */
export interface RemoteRenderingServiceErrorInternal {
/** Error code. */
code: string;
/** A human-readable representation of the error. */
message: string;
/**
* An array of details about specific errors that led to this reported error.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly details?: RemoteRenderingServiceErrorInternal[];
/**
* The target of the particular error (e.g., the name of the property in error).
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly target?: string;
/**
* An object containing more specific information than the current object about the error.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly innerError?: RemoteRenderingServiceErrorInternal;
}
/** The error response containing details of why the request failed. */
export interface ErrorResponse {
/** The error object containing details of why the request failed. */
error: RemoteRenderingServiceErrorInternal;
}
/** List of conversions. */
export interface ConversionList {
/** The list of conversions. */
conversions: Conversion[];
/**
* If more conversions are available this field will contain a URL where the next batch of conversions can be requested. This URL will need the same authentication as all calls to the Azure Remote Rendering API.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly nextLink?: string;
}
/** Settings of the session to be created. */
export interface RenderingSessionSettings {
/** The time in minutes the session will run after reaching the 'Ready' state. It has to be between 0 and 1440. */
maxLeaseTimeInMinutes: number;
/** The size of the server used for the rendering session. The size impacts the number of polygons the server can render. Refer to https://docs.microsoft.com/azure/remote-rendering/reference/vm-sizes for details. */
size: RenderingServerSize;
}
/** The properties of a rendering session. */
export interface SessionProperties {
/** The ID of the session supplied when the session was created. */
sessionId: string;
/**
* The TCP port at which the Azure Remote Rendering Inspector tool is hosted.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly arrInspectorPort?: number;
/**
* The TCP port used for the handshake when establishing a connection.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly handshakePort?: number;
/**
* Amount of time in minutes the session is or was in the 'Ready' state. Time is rounded down to a full minute.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly elapsedTimeInMinutes?: number;
/**
* The hostname under which the rendering session is reachable.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly host?: string;
/**
* The time in minutes the session will run after reaching the 'Ready' state.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly maxLeaseTimeInMinutes?: number;
/** The size of the server used for the rendering session. The size impacts the number of polygons the server can render. Refer to https://docs.microsoft.com/azure/remote-rendering/reference/vm-sizes for details. */
size: RenderingServerSize;
/** The status of the rendering session. Terminal states are 'Error', 'Expired', and 'Stopped'. */
status: RenderingSessionStatus;
/**
* The computational power of the rendering session GPU measured in teraflops.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly teraflops?: number;
/**
* The error object containing details about the rendering session startup failure.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly error?: RemoteRenderingServiceErrorInternal;
/**
* The time when the rendering session was created. Date and time in ISO 8601 format.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly createdOn?: Date;
}
/** Settings used to update the session. */
export interface UpdateSessionSettings {
/** Update to the time the session will run after it reached the 'Ready' state. It has to be larger than the current value of maxLeaseTimeMinutes and less than 1440. */
maxLeaseTimeInMinutes: number;
}
/** The result of a list sessions request. */
export interface SessionsList {
/** The list of rendering sessions. Does not include sessions in 'Stopped' state. */
sessions: SessionProperties[];
/**
* If more rendering sessions are available this field will contain a URL where the next batch of sessions can be requested. This URL will need the same authentication as all calls to the Azure Remote Rendering API.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly nextLink?: string;
}
/** Defines headers for RemoteRendering_createConversion operation. */
export interface RemoteRenderingCreateConversionHeaders {
/** Microsoft Correlation Vector. Include this value when reporting issues. */
mscv?: string;
}
/** Defines headers for RemoteRendering_createConversion operation. */
export interface RemoteRenderingCreateConversionExceptionHeaders {
/** Microsoft Correlation Vector. Include this value when reporting issues. */
mscv?: string;
}
/** Defines headers for RemoteRendering_getConversion operation. */
export interface RemoteRenderingGetConversionHeaders {
/** Microsoft Correlation Vector. Include this value when reporting issues. */
mscv?: string;
/** Time in seconds when the status of this conversion should be polled again */
retryAfter?: number;
}
/** Defines headers for RemoteRendering_getConversion operation. */
export interface RemoteRenderingGetConversionExceptionHeaders {
/** Microsoft Correlation Vector. Include this value when reporting issues. */
mscv?: string;
/** Describes the error encountered while trying to authenticate the resource. */
wWWAuthenticate?: string;
}
/** Defines headers for RemoteRendering_listConversions operation. */
export interface RemoteRenderingListConversionsHeaders {
/** Microsoft Correlation Vector. Include this value when reporting issues. */
mscv?: string;
}
/** Defines headers for RemoteRendering_listConversions operation. */
export interface RemoteRenderingListConversionsExceptionHeaders {
/** Microsoft Correlation Vector. Include this value when reporting errors to the Azure Remote Rendering team. */
mscv?: string;
/** Describes the error encountered while trying to authenticate the resource. */
wWWAuthenticate?: string;
}
/** Defines headers for RemoteRendering_createSession operation. */
export interface RemoteRenderingCreateSessionHeaders {
/** Microsoft Correlation Vector. Include this value when reporting issues. */
mscv?: string;
}
/** Defines headers for RemoteRendering_createSession operation. */
export interface RemoteRenderingCreateSessionExceptionHeaders {
/** Microsoft Correlation Vector. Include this value when reporting issues. */
mscv?: string;
}
/** Defines headers for RemoteRendering_getSession operation. */
export interface RemoteRenderingGetSessionExceptionHeaders {
/** Microsoft Correlation Vector. Include this value when reporting issues. */
mscv?: string;
/** Describes the error encountered while trying to authenticate the resource. */
wWWAuthenticate?: string;
}
/** Defines headers for RemoteRendering_updateSession operation. */
export interface RemoteRenderingUpdateSessionExceptionHeaders {
/** Microsoft Correlation Vector. Include this value when reporting issues. */
mscv?: string;
/** Describes the error encountered while trying to authenticate the resource. */
wWWAuthenticate?: string;
}
/** Defines headers for RemoteRendering_stopSession operation. */
export interface RemoteRenderingStopSessionHeaders {
/** Microsoft Correlation Vector. Include this value when reporting issues. */
mscv?: string;
}
/** Defines headers for RemoteRendering_stopSession operation. */
export interface RemoteRenderingStopSessionExceptionHeaders {
/** Microsoft Correlation Vector. Include this value when reporting issues. */
mscv?: string;
/** Describes the error encountered while trying to authenticate the resource. */
wWWAuthenticate?: string;
}
/** Defines headers for RemoteRendering_listSessions operation. */
export interface RemoteRenderingListSessionsExceptionHeaders {
/** Microsoft Correlation Vector. Include this value when reporting issues. */
mscv?: string;
/** Describes the error encountered while trying to authenticate the resource. */
wWWAuthenticate?: string;
}
/** Defines headers for RemoteRendering_listConversionsNext operation. */
export interface RemoteRenderingListConversionsNextHeaders {
/** Microsoft Correlation Vector. Include this value when reporting issues. */
mscv?: string;
}
/** Defines headers for RemoteRendering_listConversionsNext operation. */
export interface RemoteRenderingListConversionsNextExceptionHeaders {
/** Microsoft Correlation Vector. Include this value when reporting errors to the Azure Remote Rendering team. */
mscv?: string;
/** Describes the error encountered while trying to authenticate the resource. */
wWWAuthenticate?: string;
}
/** Defines headers for RemoteRendering_listSessionsNext operation. */
export interface RemoteRenderingListSessionsNextExceptionHeaders {
/** Microsoft Correlation Vector. Include this value when reporting issues. */
mscv?: string;
/** Describes the error encountered while trying to authenticate the resource. */
wWWAuthenticate?: string;
}
/** Known values of {@link AssetConversionStatus} that the service accepts. */
export enum KnownAssetConversionStatus {
/** The conversion was created but hasn't started. */
NotStarted = "NotStarted",
/** The conversion is running. */
Running = "Running",
/** The conversion was cancelled. This is a terminal state. */
Cancelled = "Cancelled",
/** The conversion has failed. Check the 'error' field for more details. This is a terminal state. */
Failed = "Failed",
/** The conversion has succeeded. Check the 'output' field for output asset location. This is a terminal state. */
Succeeded = "Succeeded"
}
/**
* Defines values for AssetConversionStatus. \
* {@link KnownAssetConversionStatus} can be used interchangeably with AssetConversionStatus,
* this enum contains the known values that the service supports.
* ### Known values supported by the service
* **NotStarted**: The conversion was created but hasn't started. \
* **Running**: The conversion is running. \
* **Cancelled**: The conversion was cancelled. This is a terminal state. \
* **Failed**: The conversion has failed. Check the 'error' field for more details. This is a terminal state. \
* **Succeeded**: The conversion has succeeded. Check the 'output' field for output asset location. This is a terminal state.
*/
export type AssetConversionStatus = string;
/** Known values of {@link RenderingServerSize} that the service accepts. */
export enum KnownRenderingServerSize {
/** Standard rendering session size. */
Standard = "Standard",
/** Premium rendering session size. */
Premium = "Premium"
}
/**
* Defines values for RenderingServerSize. \
* {@link KnownRenderingServerSize} can be used interchangeably with RenderingServerSize,
* this enum contains the known values that the service supports.
* ### Known values supported by the service
* **Standard**: Standard rendering session size. \
* **Premium**: Premium rendering session size.
*/
export type RenderingServerSize = string;
/** Known values of {@link RenderingSessionStatus} that the service accepts. */
export enum KnownRenderingSessionStatus {
/** The rendering session has encountered an error, and is unusable. This is a terminal state. */
Error = "Error",
/** The rendering session enters the 'Expired' state when it has been in the 'Ready' state longer than its lease time. This is a terminal state. */
Expired = "Expired",
/** The rendering session is starting, but not accepting incoming connections yet. */
Starting = "Starting",
/** The rendering session is ready for incoming connections. */
Ready = "Ready",
/** The rendering session has been stopped with the 'Stop Session' operation. This is a terminal state. */
Stopped = "Stopped"
}
/**
* Defines values for RenderingSessionStatus. \
* {@link KnownRenderingSessionStatus} can be used interchangeably with RenderingSessionStatus,
* this enum contains the known values that the service supports.
* ### Known values supported by the service
* **Error**: The rendering session has encountered an error, and is unusable. This is a terminal state. \
* **Expired**: The rendering session enters the 'Expired' state when it has been in the 'Ready' state longer than its lease time. This is a terminal state. \
* **Starting**: The rendering session is starting, but not accepting incoming connections yet. \
* **Ready**: The rendering session is ready for incoming connections. \
* **Stopped**: The rendering session has been stopped with the 'Stop Session' operation. This is a terminal state.
*/
export type RenderingSessionStatus = string;
/** Optional parameters. */
export interface RemoteRenderingCreateConversionOptionalParams
extends coreClient.OperationOptions {}
/** Contains response data for the createConversion operation. */
export type RemoteRenderingCreateConversionResponse = RemoteRenderingCreateConversionHeaders &
Conversion;
/** Optional parameters. */
export interface RemoteRenderingGetConversionOptionalParams
extends coreClient.OperationOptions {}
/** Contains response data for the getConversion operation. */
export type RemoteRenderingGetConversionResponse = RemoteRenderingGetConversionHeaders &
Conversion;
/** Optional parameters. */
export interface RemoteRenderingListConversionsOptionalParams
extends coreClient.OperationOptions {}
/** Contains response data for the listConversions operation. */
export type RemoteRenderingListConversionsResponse = RemoteRenderingListConversionsHeaders &
ConversionList;
/** Optional parameters. */
export interface RemoteRenderingCreateSessionOptionalParams
extends coreClient.OperationOptions {}
/** Contains response data for the createSession operation. */
export type RemoteRenderingCreateSessionResponse = SessionProperties;
/** Optional parameters. */
export interface RemoteRenderingGetSessionOptionalParams
extends coreClient.OperationOptions {}
/** Contains response data for the getSession operation. */
export type RemoteRenderingGetSessionResponse = SessionProperties;
/** Optional parameters. */
export interface RemoteRenderingUpdateSessionOptionalParams
extends coreClient.OperationOptions {}
/** Contains response data for the updateSession operation. */
export type RemoteRenderingUpdateSessionResponse = SessionProperties;
/** Optional parameters. */
export interface RemoteRenderingStopSessionOptionalParams
extends coreClient.OperationOptions {}
/** Contains response data for the stopSession operation. */
export type RemoteRenderingStopSessionResponse = RemoteRenderingStopSessionHeaders;
/** Optional parameters. */
export interface RemoteRenderingListSessionsOptionalParams
extends coreClient.OperationOptions {}
/** Contains response data for the listSessions operation. */
export type RemoteRenderingListSessionsResponse = SessionsList;
/** Optional parameters. */
export interface RemoteRenderingListConversionsNextOptionalParams
extends coreClient.OperationOptions {}
/** Contains response data for the listConversionsNext operation. */
export type RemoteRenderingListConversionsNextResponse = RemoteRenderingListConversionsNextHeaders &
ConversionList;
/** Optional parameters. */
export interface RemoteRenderingListSessionsNextOptionalParams
extends coreClient.OperationOptions {}
/** Contains response data for the listSessionsNext operation. */
export type RemoteRenderingListSessionsNextResponse = SessionsList;
/** Optional parameters. */
export interface RemoteRenderingRestClientOptionalParams
extends coreClient.ServiceClientOptions {
/** Api Version */
apiVersion?: string;
/** Overrides client endpoint. */
endpoint?: string;
}