-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathApiClient.gen.cs
683 lines (637 loc) · 37.5 KB
/
ApiClient.gen.cs
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
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
/*
* Forge SDK
*
* The Forge Platform contains an expanding collection of web service components that can be used with Autodesk cloud-based products or your own technologies. Take advantage of Autodesk’s expertise in design and engineering.
*
* Design Automation
*
* Generated by [Forge Swagger Codegen](https://git.autodesk.com/forge-ozone/forge-rsdk-codegen)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
using Autodesk.Forge.Core;
using Microsoft.Extensions.Options;
using Autodesk.Forge.DesignAutomation.Http;
using Autodesk.Forge.DesignAutomation.Model;
namespace Autodesk.Forge.DesignAutomation
{
public partial class DesignAutomationClient
{
public IActivitiesApi ActivitiesApi { get; }
public IAppBundlesApi AppBundlesApi { get; }
public IEnginesApi EnginesApi { get; }
public IForgeAppsApi ForgeAppsApi { get; }
public IHealthApi HealthApi { get; }
public IServiceLimitsApi ServiceLimitsApi { get; }
public ISharesApi SharesApi { get; }
public IWorkItemsApi WorkItemsApi { get; }
/// <summary>
/// Gets or sets the ForgeService object
/// </summary>
/// <value>An instance of the ForgeService</value>
public ForgeService Service { get; set; }
/// <summary>
/// Gets the configuration object.
/// </summary>
public Configuration Configuration { get; }
public DesignAutomationClient(ForgeService service = null, IOptions<Configuration> configuration = null, IActivitiesApi activities = null, IAppBundlesApi appBundles = null, IEnginesApi engines = null, IForgeAppsApi forgeApps = null, IHealthApi health = null, IServiceLimitsApi serviceLimits = null, ISharesApi shares = null, IWorkItemsApi workItems = null)
{
this.Configuration = configuration?.Value ?? new Configuration();
this.Service = service ?? ForgeService.CreateDefault();
// set BaseAddress from configuration
this.Service.Client.BaseAddress = Configuration.BaseAddress;
this.ActivitiesApi = activities ?? new ActivitiesApi(service, configuration);
this.AppBundlesApi = appBundles ?? new AppBundlesApi(service, configuration);
this.EnginesApi = engines ?? new EnginesApi(service, configuration);
this.ForgeAppsApi = forgeApps ?? new ForgeAppsApi(service, configuration);
this.HealthApi = health ?? new HealthApi(service, configuration);
this.ServiceLimitsApi = serviceLimits ?? new ServiceLimitsApi(service, configuration);
this.SharesApi = shares ?? new SharesApi(service, configuration);
this.WorkItemsApi = workItems ?? new WorkItemsApi(service, configuration);
}
/// <summary>
/// Creates a new Activity.
/// </summary>
/// <remarks>
/// Creates a new Activity. Limits (varies by Engine): 1. Number of Activities that can be created.
/// </remarks>
/// <exception cref="HttpRequestException">Thrown when fails to make API call</exception>
/// <param name="item"></param>
/// <returns>Task of Activity</returns>
public async System.Threading.Tasks.Task<Activity> CreateActivityAsync (Activity item)
{
var response = await this.ActivitiesApi.CreateActivityAsync(item);
return response.Content;
}
/// <summary>
/// Creates a new alias for this Activity.
/// </summary>
/// <remarks>
/// Creates a new alias for this Activity. Limit: 1. Number of aliases (LimitAliases).
/// </remarks>
/// <exception cref="HttpRequestException">Thrown when fails to make API call</exception>
/// <param name="id">Name of Activity (unqualified).</param>
/// <param name="alias">{ id : {anyname}, version : {version number}, receiver : [{id of other Forge app},...] }.</param>
/// <returns>Task of Alias</returns>
public async System.Threading.Tasks.Task<Alias> CreateActivityAliasAsync (string id, Alias alias)
{
var response = await this.ActivitiesApi.CreateActivityAliasAsync(id, alias);
return response.Content;
}
/// <summary>
/// Creates a new version of the Activity.
/// </summary>
/// <remarks>
/// Creates a new version of the Activity. Limit: 1. Number of versions (LimitVersions).
/// </remarks>
/// <exception cref="HttpRequestException">Thrown when fails to make API call</exception>
/// <param name="id">Name of Activity (unqualified).</param>
/// <param name="item"></param>
/// <returns>Task of Activity</returns>
public async System.Threading.Tasks.Task<Activity> CreateActivityVersionAsync (string id, Activity item)
{
var response = await this.ActivitiesApi.CreateActivityVersionAsync(id, item);
return response.Content;
}
/// <summary>
/// Deletes the specified Activity.
/// </summary>
/// <remarks>
/// Deletes the specified Activity, including all versions and aliases.
/// </remarks>
/// <exception cref="HttpRequestException">Thrown when fails to make API call</exception>
/// <param name="id">Name of Activity (unqualified).</param>
/// <returns>Task of void</returns>
public async System.Threading.Tasks.Task DeleteActivityAsync (string id)
{
await this.ActivitiesApi.DeleteActivityAsync(id);
}
/// <summary>
/// Deletes the alias.
/// </summary>
/// <remarks>
/// Deletes the alias.
/// </remarks>
/// <exception cref="HttpRequestException">Thrown when fails to make API call</exception>
/// <param name="id">Name of Activity (unqualified).</param>
/// <param name="aliasId">Name of alias to delete.</param>
/// <returns>Task of void</returns>
public async System.Threading.Tasks.Task DeleteActivityAliasAsync (string id, string aliasId)
{
await this.ActivitiesApi.DeleteActivityAliasAsync(id, aliasId);
}
/// <summary>
/// Deletes the specified version of the Activity.
/// </summary>
/// <remarks>
/// Deletes the specified version of the Activity.
/// </remarks>
/// <exception cref="HttpRequestException">Thrown when fails to make API call</exception>
/// <param name="id">Name of Activity (unqualified).</param>
/// <param name="version">Version to delete (integer).</param>
/// <returns>Task of void</returns>
public async System.Threading.Tasks.Task DeleteActivityVersionAsync (string id, int version)
{
await this.ActivitiesApi.DeleteActivityVersionAsync(id, version);
}
/// <summary>
/// Gets the details of the specified version of the Activity.
/// </summary>
/// <remarks>
/// Gets the details of the specified version of the Activity.
/// </remarks>
/// <exception cref="HttpRequestException">Thrown when fails to make API call</exception>
/// <param name="id">Name of Activity (unqualified).</param>
/// <param name="version">Version to retrieve (integer).</param>
/// <returns>Task of Activity</returns>
[Obsolete("This method is obsolete. Call GetActivityVersionAsync instead.", false)]
public async System.Threading.Tasks.Task<Activity> GeActivityVersionAsync (string id, int version)
{
return await this.GetActivityVersionAsync(id, version);
}
/// <summary>
/// Gets the details of the specified version of the Activity.
/// </summary>
/// <remarks>
/// Gets the details of the specified version of the Activity.
/// </remarks>
/// <exception cref="HttpRequestException">Thrown when fails to make API call</exception>
/// <param name="id">Name of Activity (unqualified).</param>
/// <param name="version">Version to retrieve (integer).</param>
/// <returns>Task of Activity</returns>
public async System.Threading.Tasks.Task<Activity> GetActivityVersionAsync(string id, int version)
{
var response = await this.ActivitiesApi.GetActivityVersionAsync(id, version);
return response.Content;
}
/// <summary>
/// Lists all available Activities.
/// </summary>
/// <remarks>
/// Lists all available Activities, including Activities shared with this Forge app.
/// </remarks>
/// <exception cref="HttpRequestException">Thrown when fails to make API call</exception>
/// <param name="page">Access an additional 'page' of data when necessary, based on the 'paginationToken' returned from a previous invocation. (optional)</param>
/// <returns>Task of Page<string></returns>
public async System.Threading.Tasks.Task<Page<string>> GetActivitiesAsync (string page = null)
{
var response = await this.ActivitiesApi.GetActivitiesAsync(page);
return response.Content;
}
/// <summary>
/// Gets the details of the specified Activity.
/// </summary>
/// <remarks>
/// Gets the details of the specified Activity. Note that the {id} parameter must be a QualifiedId (owner.name+label).
/// </remarks>
/// <exception cref="HttpRequestException">Thrown when fails to make API call</exception>
/// <param name="id">Full qualified id of the Activity (owner.name+label).</param>
/// <returns>Task of Activity</returns>
public async System.Threading.Tasks.Task<Activity> GetActivityAsync (string id)
{
var response = await this.ActivitiesApi.GetActivityAsync(id);
return response.Content;
}
/// <summary>
/// Gets alias details.
/// </summary>
/// <remarks>
/// Gets alias details.
/// </remarks>
/// <exception cref="HttpRequestException">Thrown when fails to make API call</exception>
/// <param name="id">Name of Activity (unqualified).</param>
/// <param name="aliasId">Name of alias.</param>
/// <returns>Task of Alias</returns>
public async System.Threading.Tasks.Task<Alias> GetActivityAliasAsync (string id, string aliasId)
{
var response = await this.ActivitiesApi.GetActivityAliasAsync(id, aliasId);
return response.Content;
}
/// <summary>
/// Lists all aliases for the specified Activity.
/// </summary>
/// <remarks>
/// Lists all aliases for the specified Activity.
/// </remarks>
/// <exception cref="HttpRequestException">Thrown when fails to make API call</exception>
/// <param name="id">Name of Activity (unqualified).</param>
/// <param name="page">Access an additional 'page' of data when necessary, based on the 'paginationToken' returned from a previous invocation. (optional)</param>
/// <returns>Task of Page<Alias></returns>
public async System.Threading.Tasks.Task<Page<Alias>> GetActivityAliasesAsync (string id, string page = null)
{
var response = await this.ActivitiesApi.GetActivityAliasesAsync(id, page);
return response.Content;
}
/// <summary>
/// Lists all versions of the specified Activity.
/// </summary>
/// <remarks>
/// Lists all versions of the specified Activity.
/// </remarks>
/// <exception cref="HttpRequestException">Thrown when fails to make API call</exception>
/// <param name="id">Name of Activity (unqualified).</param>
/// <param name="page">Access an additional 'page' of data when necessary, based on the 'paginationToken' returned from a previous invocation. (optional)</param>
/// <returns>Task of Page<int></returns>
public async System.Threading.Tasks.Task<Page<int>> GetActivityVersionsAsync (string id, string page = null)
{
var response = await this.ActivitiesApi.GetActivityVersionsAsync(id, page);
return response.Content;
}
/// <summary>
/// Modifies alias details.
/// </summary>
/// <remarks>
/// Modifies alias details.
/// </remarks>
/// <exception cref="HttpRequestException">Thrown when fails to make API call</exception>
/// <param name="id">Name of Activity (unqualified).</param>
/// <param name="aliasId">Name of alias.</param>
/// <param name="alias">Alias details to be modified.</param>
/// <returns>Task of Alias</returns>
public async System.Threading.Tasks.Task<Alias> ModifyActivityAliasAsync (string id, string aliasId, AliasPatch alias)
{
var response = await this.ActivitiesApi.ModifyActivityAliasAsync(id, aliasId, alias);
return response.Content;
}
/// <summary>
/// Creates a new AppBundle.
/// </summary>
/// <remarks>
/// Creates a new AppBundle. | Limits: (varies by Engine) | 1. Number of AppBundle that can be created. | 2. Size of AppBundle. | This method creates new AppBundle returned in response value. | POST upload is required to limit upload size. | | After this request, you need to upload the AppBundle zip. | To upload the AppBundle package, create a multipart/form-data request using data received in reponse uploadParameters: | - endpointURL is the URL to make the upload package request against, | - formData are the parameters that need to be put into the upload package request body. | They must be followed by an extra 'file' parameter indicating the location of the package file. | An example: | | curl https://bucketname.s3.amazonaws.com/ | -F key = apps/myApp/myfile.zip | -F content-type = application/octet-stream | -F policy = eyJleHBpcmF0aW9uIjoiMjAxOC0wNi0yMVQxMzo...(trimmed) | -F x-amz-signature = 800e52d73579387757e1c1cd88762...(trimmed) | -F x-amz-credential = AKIAIOSFODNN7EXAMPLE/20180621/us-west-2/s3/aws4_request/ | -F x-amz-algorithm = AWS4-HMAC-SHA256 | -F x-amz-date = 20180621T091656Z | -F file=@E:\\myfile.zip The 'file' field must be at the end, all fields after 'file' will be ignored.
/// </remarks>
/// <exception cref="HttpRequestException">Thrown when fails to make API call</exception>
/// <param name="item"></param>
/// <returns>Task of AppBundle</returns>
public async System.Threading.Tasks.Task<AppBundle> CreateAppBundleAsync (AppBundle item)
{
var response = await this.AppBundlesApi.CreateAppBundleAsync(item);
return response.Content;
}
/// <summary>
/// Creates a new alias for this AppBundle.
/// </summary>
/// <remarks>
/// Creates a new alias for this AppBundle. Limit: 1. Number of aliases (LimitAliases).
/// </remarks>
/// <exception cref="HttpRequestException">Thrown when fails to make API call</exception>
/// <param name="id">Name of AppBundle (unqualified).</param>
/// <param name="alias"></param>
/// <returns>Task of Alias</returns>
public async System.Threading.Tasks.Task<Alias> CreateAppBundleAliasAsync (string id, Alias alias)
{
var response = await this.AppBundlesApi.CreateAppBundleAliasAsync(id, alias);
return response.Content;
}
/// <summary>
/// Creates a new version of the AppBundle.
/// </summary>
/// <remarks>
/// Creates a new version of the AppBundle. | Limit: | 1. Number of versions (LimitVersions). | 2. Size of AppBundle. | This method creates new AppBundle returned in response value. | POST upload is required to limit upload size. The endpoint url and all form fields are retrieved in AppBundle.UploadParameters. | | After this request, you need to upload the AppBundle zip. | Use data received in the response to create multipart/form-data request. An example: | | curl https://bucketname.s3.amazonaws.com/ | -F key = apps/myApp/myfile.zip | -F content-type = application/octet-stream | -F policy = eyJleHBpcmF0aW9uIjoiMjAxOC0wNi0yMVQxMzo...(trimmed) | -F x-amz-signature = 800e52d73579387757e1c1cd88762...(trimmed) | -F x-amz-credential = AKIAIOSFODNN7EXAMPLE/20180621/us-west-2/s3/aws4_request/ | -F x-amz-algorithm = AWS4-HMAC-SHA256 | -F x-amz-date = 20180621T091656Z | -F file=@E:\\myfile.zip The 'file' field must be at the end, all fields after 'file' will be ignored.
/// </remarks>
/// <exception cref="HttpRequestException">Thrown when fails to make API call</exception>
/// <param name="id">Name of AppBundle (unqualified).</param>
/// <param name="item"></param>
/// <returns>Task of AppBundle</returns>
public async System.Threading.Tasks.Task<AppBundle> CreateAppBundleVersionAsync (string id, AppBundle item)
{
var response = await this.AppBundlesApi.CreateAppBundleVersionAsync(id, item);
return response.Content;
}
/// <summary>
/// Deletes the specified AppBundle.
/// </summary>
/// <remarks>
/// Deletes the specified AppBundle, including all versions and aliases.
/// </remarks>
/// <exception cref="HttpRequestException">Thrown when fails to make API call</exception>
/// <param name="id">Name of AppBundle (unqualified).</param>
/// <returns>Task of void</returns>
public async System.Threading.Tasks.Task DeleteAppBundleAsync (string id)
{
await this.AppBundlesApi.DeleteAppBundleAsync(id);
}
/// <summary>
/// Deletes the alias.
/// </summary>
/// <remarks>
/// Deletes the alias.
/// </remarks>
/// <exception cref="HttpRequestException">Thrown when fails to make API call</exception>
/// <param name="id">Name of AppBundle (unqualified).</param>
/// <param name="aliasId">Name of alias to delete.</param>
/// <returns>Task of void</returns>
public async System.Threading.Tasks.Task DeleteAppBundleAliasAsync (string id, string aliasId)
{
await this.AppBundlesApi.DeleteAppBundleAliasAsync(id, aliasId);
}
/// <summary>
/// Deletes the specified version of the AppBundle.
/// </summary>
/// <remarks>
/// Deletes the specified version of the AppBundle.
/// </remarks>
/// <exception cref="HttpRequestException">Thrown when fails to make API call</exception>
/// <param name="id">Name of AppBundle (unqualified).</param>
/// <param name="version">Version to delete (as integer).</param>
/// <returns>Task of void</returns>
public async System.Threading.Tasks.Task DeleteAppBundleVersionAsync (string id, int version)
{
await this.AppBundlesApi.DeleteAppBundleVersionAsync(id, version);
}
/// <summary>
/// Gets the details of the specified AppBundle.
/// </summary>
/// <remarks>
/// Gets the details of the specified AppBundle. Note that the {id} parameter must be a QualifiedId (owner.name+label).
/// </remarks>
/// <exception cref="HttpRequestException">Thrown when fails to make API call</exception>
/// <param name="id">Full qualified id of the AppBundle (owner.name+label).</param>
/// <returns>Task of AppBundle</returns>
public async System.Threading.Tasks.Task<AppBundle> GetAppBundleAsync (string id)
{
var response = await this.AppBundlesApi.GetAppBundleAsync(id);
return response.Content;
}
/// <summary>
/// Get alias details.
/// </summary>
/// <remarks>
/// Get alias details.
/// </remarks>
/// <exception cref="HttpRequestException">Thrown when fails to make API call</exception>
/// <param name="id">Name of AppBundle (unqualified).</param>
/// <param name="aliasId">Name of alias.</param>
/// <returns>Task of Alias</returns>
public async System.Threading.Tasks.Task<Alias> GetAppBundleAliasAsync (string id, string aliasId)
{
var response = await this.AppBundlesApi.GetAppBundleAliasAsync(id, aliasId);
return response.Content;
}
/// <summary>
/// Lists all aliases for the specified AppBundle.
/// </summary>
/// <remarks>
/// Lists all aliases for the specified AppBundle.
/// </remarks>
/// <exception cref="HttpRequestException">Thrown when fails to make API call</exception>
/// <param name="id">Name of AppBundle (unqualified).</param>
/// <param name="page">Access an additional 'page' of data when necessary, based on the 'paginationToken' returned from a previous invocation. (optional)</param>
/// <returns>Task of Page<Alias></returns>
public async System.Threading.Tasks.Task<Page<Alias>> GetAppBundleAliasesAsync (string id, string page = null)
{
var response = await this.AppBundlesApi.GetAppBundleAliasesAsync(id, page);
return response.Content;
}
/// <summary>
/// Gets the details of the specified version of the AppBundle.
/// </summary>
/// <remarks>
/// Gets the details of the specified version of the AppBundle.
/// </remarks>
/// <exception cref="HttpRequestException">Thrown when fails to make API call</exception>
/// <param name="id">Name of AppBundle (unqualified).</param>
/// <param name="version">Version to retrieve (as integer).</param>
/// <returns>Task of AppBundle</returns>
public async System.Threading.Tasks.Task<AppBundle> GetAppBundleVersionAsync (string id, int version)
{
var response = await this.AppBundlesApi.GetAppBundleVersionAsync(id, version);
return response.Content;
}
/// <summary>
/// Lists all versions of the specified AppBundle.
/// </summary>
/// <remarks>
/// Lists all versions of the specified AppBundle.
/// </remarks>
/// <exception cref="HttpRequestException">Thrown when fails to make API call</exception>
/// <param name="id">Name of AppBundle (unqualified).</param>
/// <param name="page">Access an additional 'page' of data when necessary, based on the 'paginationToken' returned from a previous invocation. (optional)</param>
/// <returns>Task of Page<int></returns>
public async System.Threading.Tasks.Task<Page<int>> GetAppBundleVersionsAsync (string id, string page = null)
{
var response = await this.AppBundlesApi.GetAppBundleVersionsAsync(id, page);
return response.Content;
}
/// <summary>
/// Lists all available AppBundles.
/// </summary>
/// <remarks>
/// Lists all available AppBundles, including AppBundles shared with this Forge app.
/// </remarks>
/// <exception cref="HttpRequestException">Thrown when fails to make API call</exception>
/// <param name="page">Access an additional 'page' of data when necessary, based on the 'paginationToken' returned from a previous invocation. (optional)</param>
/// <returns>Task of Page<string></returns>
public async System.Threading.Tasks.Task<Page<string>> GetAppBundlesAsync (string page = null)
{
var response = await this.AppBundlesApi.GetAppBundlesAsync(page);
return response.Content;
}
/// <summary>
/// Modify alias details.
/// </summary>
/// <remarks>
/// Modify alias details.
/// </remarks>
/// <exception cref="HttpRequestException">Thrown when fails to make API call</exception>
/// <param name="id">Name of AppBundle (unqualified).</param>
/// <param name="aliasId">Name of alias.</param>
/// <param name="alias">Alias details to be modified.</param>
/// <returns>Task of Alias</returns>
public async System.Threading.Tasks.Task<Alias> ModifyAppBundleAliasAsync (string id, string aliasId, AliasPatch alias)
{
var response = await this.AppBundlesApi.ModifyAppBundleAliasAsync(id, aliasId, alias);
return response.Content;
}
/// <summary>
/// Gets the details of the specified Engine.
/// </summary>
/// <remarks>
/// Gets the details of the specified Engine. Note that the {id} parameter must be a QualifiedId (owner.name+label).
/// </remarks>
/// <exception cref="HttpRequestException">Thrown when fails to make API call</exception>
/// <param name="id">Full qualified id of the Engine (owner.name+label).</param>
/// <returns>Task of Engine</returns>
public async System.Threading.Tasks.Task<Engine> GetEngineAsync (string id)
{
var response = await this.EnginesApi.GetEngineAsync(id);
return response.Content;
}
/// <summary>
/// Lists all available Engines.
/// </summary>
/// <remarks>
/// Lists all available Engines.
/// </remarks>
/// <exception cref="HttpRequestException">Thrown when fails to make API call</exception>
/// <param name="page">Access an additional 'page' of data when necessary, based on the 'paginationToken' returned from a previous invocation. (optional)</param>
/// <returns>Task of Page<string></returns>
public async System.Threading.Tasks.Task<Page<string>> GetEnginesAsync (string page = null)
{
var response = await this.EnginesApi.GetEnginesAsync(page);
return response.Content;
}
/// <summary>
/// Creates/updates the nickname for the current Forge app.
/// </summary>
/// <remarks>
/// Creates/updates the nickname for the current Forge app. The nickname is used as a clearer alternative name when identifying AppBundles and Activities, as compared to using the Forge app ID. Once you have defined a nickname, it MUST be used instead of the Forge app ID. The new nickname cannot be in use by any other Forge app. The Forge app cannot have any data when this endpoint is invoked. Use the 'DELETE /forgeapps/me' endpoint (cautiously!!!) to remove all data from this Forge app. 'DELETE /forgeapps/me' is also the only way to remove the nickname. Note the nickname is supplied in the body, not as a query-parameter.
/// </remarks>
/// <exception cref="HttpRequestException">Thrown when fails to make API call</exception>
/// <param name="id">Must be \"me\" for the call to succeed.</param>
/// <param name="nicknameRecord">new nickname (public key is for internal use only).</param>
/// <returns>Task of void</returns>
public async System.Threading.Tasks.Task CreateNicknameAsync (string id, NicknameRecord nicknameRecord)
{
await this.ForgeAppsApi.CreateNicknameAsync(id, nicknameRecord);
}
/// <summary>
/// Delete all data associated with this Forge app.
/// </summary>
/// <remarks>
/// Delete all data associated with the given Forge app. ALL Design Automation appbundles and activities are DELETED. This may take up to 2 minutes. During this time the app will not be able to make successful requests.
/// </remarks>
/// <exception cref="HttpRequestException">Thrown when fails to make API call</exception>
/// <param name="id">Must be \"me\" for the call to succeed.</param>
/// <returns>Task of void</returns>
public async System.Threading.Tasks.Task DeleteForgeAppAsync (string id)
{
await this.ForgeAppsApi.DeleteForgeAppAsync(id);
}
/// <summary>
/// Returns the user's (app) nickname.
/// </summary>
/// <remarks>
/// Return the given Forge app's nickname. If the app has no nickname, this route will return its id.
/// </remarks>
/// <exception cref="HttpRequestException">Thrown when fails to make API call</exception>
/// <param name="id">Must be \"me\" for the call to succeed.</param>
/// <returns>Task of string</returns>
public async System.Threading.Tasks.Task<string> GetNicknameAsync (string id)
{
var response = await this.ForgeAppsApi.GetNicknameAsync(id);
return response.Content;
}
/// <summary>
///
/// </summary>
/// <remarks>
/// Gets the health status by Engine or for all Engines (Inventor, AutoCAD ...).
/// </remarks>
/// <exception cref="HttpRequestException">Thrown when fails to make API call</exception>
/// <param name="engine"></param>
/// <returns>Task of string</returns>
public async System.Threading.Tasks.Task<string> HealthStatusAsync (string engine)
{
var response = await this.HealthApi.HealthStatusAsync(engine);
return response.Content;
}
/// <summary>
/// Get the service limit configuration.
/// </summary>
/// <remarks>
/// Gets a user's service limit configuration.
/// </remarks>
/// <exception cref="HttpRequestException">Thrown when fails to make API call</exception>
/// <param name="owner">The user to fetch the service limit configuration for.</param>
/// <returns>Task of ServiceLimit</returns>
public async System.Threading.Tasks.Task<ServiceLimit> GetServiceLimitAsync (string owner)
{
var response = await this.ServiceLimitsApi.GetServiceLimitAsync(owner);
return response.Content;
}
/// <summary>
/// Creates a new service limits configuration or updates an exiting one.
/// </summary>
/// <remarks>
/// User can only update the following 2 properties: - frontendLimits.limitMonthlyProcessingTimeInHours - backendLimits[/engine/].limitProcessingTimeSec LimitProcessingTimeSec cannot be set greater than the maximum processing time limit specified by the engine.
/// </remarks>
/// <exception cref="HttpRequestException">Thrown when fails to make API call</exception>
/// <param name="owner">The user to associate the configuration to.</param>
/// <param name="item"></param>
/// <returns>Task of ServiceLimit</returns>
public async System.Threading.Tasks.Task<ServiceLimit> ModifyServiceLimitsAsync (string owner, ServiceLimit item)
{
var response = await this.ServiceLimitsApi.ModifyServiceLimitsAsync(owner, item);
return response.Content;
}
/// <summary>
/// Gets all Shares (AppBundles and Activities) shared by this Forge app.
/// </summary>
/// <remarks>
/// Gets all Shares (AppBundles and Activities) shared by this Forge app (shared to other Forge apps for them to use). Sharing of AppBundles and Activities is controlled via the use of 'aliases'.
/// </remarks>
/// <exception cref="HttpRequestException">Thrown when fails to make API call</exception>
/// <param name="page">Used to get subsequent 'pages' of data. (optional)</param>
/// <returns>Task of Page<Share></returns>
public async System.Threading.Tasks.Task<Page<Share>> GetSharesAsync (string page = null)
{
var response = await this.SharesApi.GetSharesAsync(page);
return response.Content;
}
/// <summary>
/// Creates a new WorkItem and queues it for processing.
/// </summary>
/// <remarks>
/// The new WorkItem is always placed on a queue and later picked up by an engine. The following limits apply: Per-engine. These limits are enforced when the engine processes the workitem. 1. Number of downloads (LimitDownloads) 2. Number of uploads (LimitUploads) 3. Total download size (LimitDownloadSize) 4. Total upload size (LimitUploadSize) 5. Processing time (LimitProcessingTime) 6. Total size of uncompressed bits for all referenced appbundles (LimitTotalUncompressedAppsSizePerActivity). Service wide. These limits are enforced during workitem submission. 7. Total processing time per month (LimitMonthlyProcessingTimeInHours).
/// </remarks>
/// <exception cref="HttpRequestException">Thrown when fails to make API call</exception>
/// <param name="workItem"></param>
/// <returns>Task of WorkItemStatus</returns>
public async System.Threading.Tasks.Task<WorkItemStatus> CreateWorkItemAsync (WorkItem workItem)
{
var response = await this.WorkItemsApi.CreateWorkItemAsync(workItem);
return response.Content;
}
/// <summary>
/// Creates new WorkItems and queues them for processing.
/// </summary>
/// <remarks>
/// The new WorkItems are always placed on the queue and later picked up by an engine. The following limits apply: Per-engine. These limits are enforced when the engine processes the workitem. 1. Number of downloads (LimitDownloads) 2. Number of uploads (LimitUploads) 3. Total download size (LimitDownloadSize) 4. Total upload size (LimitUploadSize) 5. Processing time (LimitProcessingTime) 6. Total size of uncompressed bits for all referenced appbundles (LimitTotalUncompressedAppsSizePerActivity). Service wide. These limits are enforced during workitem submission. 7. Total processing time per month (LimitMonthlyProcessingTimeInHours).
/// </remarks>
/// <exception cref="HttpRequestException">Thrown when fails to make API call</exception>
/// <param name="workItems"></param>
/// <returns>Task of List<WorkItemStatus></returns>
public async System.Threading.Tasks.Task<List<WorkItemStatus>> CreateWorkItemsBatchAsync (List<WorkItem> workItems)
{
var response = await this.WorkItemsApi.CreateWorkItemsBatchAsync(workItems);
return response.Content;
}
/// <summary>
/// Cancels a specific WorkItem.
/// </summary>
/// <remarks>
/// Cancels a specific WorkItem. If the WorkItem is on the queue, it is removed from the queue and not processed. If the WorkItem is already being processed, then it may or may not be interrupted and cancelled. If the WorkItem has already finished processing, then it has no effect on the processing or results.
/// </remarks>
/// <exception cref="HttpRequestException">Thrown when fails to make API call</exception>
/// <param name="id"></param>
/// <returns>Task of void</returns>
public async System.Threading.Tasks.Task DeleteWorkItemAsync (string id)
{
await this.WorkItemsApi.DeleteWorkItemAsync(id);
}
/// <summary>
/// Gets the status of a specific WorkItem.
/// </summary>
/// <remarks>
/// Gets the status of a specific WorkItem. Typically used to 'poll' for the completion of a WorkItem, but see the use of the 'onComplete' argument for an alternative that does not require 'polling'. WorkItem status is retained for a limited period of time after the WorkItem completes. Limits: 1. Retention period (LimitWorkItemRetentionPeriod).
/// </remarks>
/// <exception cref="HttpRequestException">Thrown when fails to make API call</exception>
/// <param name="id"></param>
/// <returns>Task of WorkItemStatus</returns>
public async System.Threading.Tasks.Task<WorkItemStatus> GetWorkitemStatusAsync (string id)
{
var response = await this.WorkItemsApi.GetWorkitemStatusAsync(id);
return response.Content;
}
}
}