@cirrobio/api-client 0.0.6-alpha → 0.0.8-alpha

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/.openapi-generator/FILES +2 -0
  2. package/README.md +1 -1
  3. package/dist/apis/MetricsApi.d.ts +10 -0
  4. package/dist/apis/MetricsApi.js +52 -0
  5. package/dist/apis/ProjectsApi.d.ts +14 -1
  6. package/dist/apis/ProjectsApi.js +55 -0
  7. package/dist/models/BillingMethod.d.ts +6 -6
  8. package/dist/models/BillingMethod.js +7 -5
  9. package/dist/models/BudgetPeriod.d.ts +6 -6
  10. package/dist/models/BudgetPeriod.js +7 -5
  11. package/dist/models/CustomerType.d.ts +7 -7
  12. package/dist/models/CustomerType.js +8 -6
  13. package/dist/models/DatasetType.d.ts +5 -5
  14. package/dist/models/DatasetType.js +6 -4
  15. package/dist/models/Executor.d.ts +6 -6
  16. package/dist/models/Executor.js +7 -5
  17. package/dist/models/MetricRecord.d.ts +45 -0
  18. package/dist/models/MetricRecord.js +56 -0
  19. package/dist/models/ProjectMetrics.d.ts +5 -10
  20. package/dist/models/ProjectMetrics.js +5 -4
  21. package/dist/models/ProjectRequest.d.ts +2 -2
  22. package/dist/models/ProjectRequest.js +2 -2
  23. package/dist/models/ProjectRole.d.ts +7 -7
  24. package/dist/models/ProjectRole.js +8 -6
  25. package/dist/models/ProjectUser.d.ts +62 -0
  26. package/dist/models/ProjectUser.js +66 -0
  27. package/dist/models/Tag.d.ts +6 -0
  28. package/dist/models/Tag.js +3 -0
  29. package/dist/models/index.d.ts +2 -0
  30. package/dist/models/index.js +2 -0
  31. package/package.json +1 -1
  32. package/src/apis/MetricsApi.ts +36 -0
  33. package/src/apis/ProjectsApi.ts +47 -0
  34. package/src/models/BillingMethod.ts +6 -7
  35. package/src/models/BudgetPeriod.ts +6 -7
  36. package/src/models/CustomerType.ts +7 -8
  37. package/src/models/DatasetType.ts +5 -6
  38. package/src/models/Executor.ts +6 -7
  39. package/src/models/MetricRecord.ts +83 -0
  40. package/src/models/ProjectMetrics.ts +15 -8
  41. package/src/models/ProjectRequest.ts +4 -4
  42. package/src/models/ProjectRole.ts +7 -8
  43. package/src/models/ProjectUser.ts +118 -0
  44. package/src/models/Tag.ts +9 -0
  45. package/src/models/index.ts +2 -0
@@ -0,0 +1,62 @@
1
+ /**
2
+ * Cirro Data
3
+ * Cirro Data Platform service API
4
+ *
5
+ * The version of the OpenAPI document: latest
6
+ * Contact: support@cirro.bio
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { ProjectRole } from './ProjectRole';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface ProjectUser
17
+ */
18
+ export interface ProjectUser {
19
+ /**
20
+ *
21
+ * @type {string}
22
+ * @memberof ProjectUser
23
+ */
24
+ name: string;
25
+ /**
26
+ *
27
+ * @type {string}
28
+ * @memberof ProjectUser
29
+ */
30
+ username: string;
31
+ /**
32
+ *
33
+ * @type {string}
34
+ * @memberof ProjectUser
35
+ */
36
+ organization: string;
37
+ /**
38
+ *
39
+ * @type {string}
40
+ * @memberof ProjectUser
41
+ */
42
+ department: string;
43
+ /**
44
+ *
45
+ * @type {string}
46
+ * @memberof ProjectUser
47
+ */
48
+ email: string;
49
+ /**
50
+ *
51
+ * @type {ProjectRole}
52
+ * @memberof ProjectUser
53
+ */
54
+ role: ProjectRole;
55
+ }
56
+ /**
57
+ * Check if a given object implements the ProjectUser interface.
58
+ */
59
+ export declare function instanceOfProjectUser(value: object): boolean;
60
+ export declare function ProjectUserFromJSON(json: any): ProjectUser;
61
+ export declare function ProjectUserFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProjectUser;
62
+ export declare function ProjectUserToJSON(value?: ProjectUser | null): any;
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Cirro Data
6
+ * Cirro Data Platform service API
7
+ *
8
+ * The version of the OpenAPI document: latest
9
+ * Contact: support@cirro.bio
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.ProjectUserToJSON = exports.ProjectUserFromJSONTyped = exports.ProjectUserFromJSON = exports.instanceOfProjectUser = void 0;
17
+ var ProjectRole_1 = require("./ProjectRole");
18
+ /**
19
+ * Check if a given object implements the ProjectUser interface.
20
+ */
21
+ function instanceOfProjectUser(value) {
22
+ var isInstance = true;
23
+ isInstance = isInstance && "name" in value;
24
+ isInstance = isInstance && "username" in value;
25
+ isInstance = isInstance && "organization" in value;
26
+ isInstance = isInstance && "department" in value;
27
+ isInstance = isInstance && "email" in value;
28
+ isInstance = isInstance && "role" in value;
29
+ return isInstance;
30
+ }
31
+ exports.instanceOfProjectUser = instanceOfProjectUser;
32
+ function ProjectUserFromJSON(json) {
33
+ return ProjectUserFromJSONTyped(json, false);
34
+ }
35
+ exports.ProjectUserFromJSON = ProjectUserFromJSON;
36
+ function ProjectUserFromJSONTyped(json, ignoreDiscriminator) {
37
+ if ((json === undefined) || (json === null)) {
38
+ return json;
39
+ }
40
+ return {
41
+ 'name': json['name'],
42
+ 'username': json['username'],
43
+ 'organization': json['organization'],
44
+ 'department': json['department'],
45
+ 'email': json['email'],
46
+ 'role': (0, ProjectRole_1.ProjectRoleFromJSON)(json['role']),
47
+ };
48
+ }
49
+ exports.ProjectUserFromJSONTyped = ProjectUserFromJSONTyped;
50
+ function ProjectUserToJSON(value) {
51
+ if (value === undefined) {
52
+ return undefined;
53
+ }
54
+ if (value === null) {
55
+ return null;
56
+ }
57
+ return {
58
+ 'name': value.name,
59
+ 'username': value.username,
60
+ 'organization': value.organization,
61
+ 'department': value.department,
62
+ 'email': value.email,
63
+ 'role': (0, ProjectRole_1.ProjectRoleToJSON)(value.role),
64
+ };
65
+ }
66
+ exports.ProjectUserToJSON = ProjectUserToJSON;
@@ -27,6 +27,12 @@ export interface Tag {
27
27
  * @memberof Tag
28
28
  */
29
29
  value: string;
30
+ /**
31
+ *
32
+ * @type {boolean}
33
+ * @memberof Tag
34
+ */
35
+ editable: boolean;
30
36
  }
31
37
  /**
32
38
  * Check if a given object implements the Tag interface.
@@ -21,6 +21,7 @@ function instanceOfTag(value) {
21
21
  var isInstance = true;
22
22
  isInstance = isInstance && "key" in value;
23
23
  isInstance = isInstance && "value" in value;
24
+ isInstance = isInstance && "editable" in value;
24
25
  return isInstance;
25
26
  }
26
27
  exports.instanceOfTag = instanceOfTag;
@@ -35,6 +36,7 @@ function TagFromJSONTyped(json, ignoreDiscriminator) {
35
36
  return {
36
37
  'key': json['key'],
37
38
  'value': json['value'],
39
+ 'editable': json['editable'],
38
40
  };
39
41
  }
40
42
  exports.TagFromJSONTyped = TagFromJSONTyped;
@@ -48,6 +50,7 @@ function TagToJSON(value) {
48
50
  return {
49
51
  'key': value.key,
50
52
  'value': value.value,
53
+ 'editable': value.editable,
51
54
  };
52
55
  }
53
56
  exports.TagToJSON = TagToJSON;
@@ -14,6 +14,7 @@ export * from './Executor';
14
14
  export * from './FormSchema';
15
15
  export * from './GetExecutionLogsResponse';
16
16
  export * from './LogEntry';
17
+ export * from './MetricRecord';
17
18
  export * from './NotebookInstance';
18
19
  export * from './OpenNotebookInstanceResponse';
19
20
  export * from './Process';
@@ -24,6 +25,7 @@ export * from './ProjectMetrics';
24
25
  export * from './ProjectRequest';
25
26
  export * from './ProjectRole';
26
27
  export * from './ProjectSettings';
28
+ export * from './ProjectUser';
27
29
  export * from './Reference';
28
30
  export * from './ReferenceType';
29
31
  export * from './Region';
@@ -32,6 +32,7 @@ __exportStar(require("./Executor"), exports);
32
32
  __exportStar(require("./FormSchema"), exports);
33
33
  __exportStar(require("./GetExecutionLogsResponse"), exports);
34
34
  __exportStar(require("./LogEntry"), exports);
35
+ __exportStar(require("./MetricRecord"), exports);
35
36
  __exportStar(require("./NotebookInstance"), exports);
36
37
  __exportStar(require("./OpenNotebookInstanceResponse"), exports);
37
38
  __exportStar(require("./Process"), exports);
@@ -42,6 +43,7 @@ __exportStar(require("./ProjectMetrics"), exports);
42
43
  __exportStar(require("./ProjectRequest"), exports);
43
44
  __exportStar(require("./ProjectRole"), exports);
44
45
  __exportStar(require("./ProjectSettings"), exports);
46
+ __exportStar(require("./ProjectUser"), exports);
45
47
  __exportStar(require("./Reference"), exports);
46
48
  __exportStar(require("./ReferenceType"), exports);
47
49
  __exportStar(require("./Region"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cirrobio/api-client",
3
- "version": "0.0.6-alpha",
3
+ "version": "0.0.8-alpha",
4
4
  "description": "API client for Cirro",
5
5
  "author": "CirroBio",
6
6
  "repository": {
@@ -31,6 +31,42 @@ export interface GetProjectMetricsRequest {
31
31
  */
32
32
  export class MetricsApi extends runtime.BaseAPI {
33
33
 
34
+ /**
35
+ * Retrieves metrics for all projects.
36
+ * Get all project metrics
37
+ */
38
+ async getAllMetricsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<ProjectMetrics>>> {
39
+ const queryParameters: any = {};
40
+
41
+ const headerParameters: runtime.HTTPHeaders = {};
42
+
43
+ if (this.configuration && this.configuration.accessToken) {
44
+ const token = this.configuration.accessToken;
45
+ const tokenString = await token("accessToken", []);
46
+
47
+ if (tokenString) {
48
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
49
+ }
50
+ }
51
+ const response = await this.request({
52
+ path: `/metrics`,
53
+ method: 'GET',
54
+ headers: headerParameters,
55
+ query: queryParameters,
56
+ }, initOverrides);
57
+
58
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ProjectMetricsFromJSON));
59
+ }
60
+
61
+ /**
62
+ * Retrieves metrics for all projects.
63
+ * Get all project metrics
64
+ */
65
+ async getAllMetrics(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ProjectMetrics>> {
66
+ const response = await this.getAllMetricsRaw(initOverrides);
67
+ return await response.value();
68
+ }
69
+
34
70
  /**
35
71
  * Retrieves metrics about a project.
36
72
  * Get project metrics
@@ -19,6 +19,7 @@ import type {
19
19
  Project,
20
20
  ProjectDetail,
21
21
  ProjectRequest,
22
+ ProjectUser,
22
23
  SetUserProjectRoleRequest,
23
24
  Tag,
24
25
  } from '../models/index';
@@ -31,6 +32,8 @@ import {
31
32
  ProjectDetailToJSON,
32
33
  ProjectRequestFromJSON,
33
34
  ProjectRequestToJSON,
35
+ ProjectUserFromJSON,
36
+ ProjectUserToJSON,
34
37
  SetUserProjectRoleRequestFromJSON,
35
38
  SetUserProjectRoleRequestToJSON,
36
39
  TagFromJSON,
@@ -45,6 +48,10 @@ export interface GetProjectRequest {
45
48
  projectId: string;
46
49
  }
47
50
 
51
+ export interface GetProjectUsersRequest {
52
+ projectId: string;
53
+ }
54
+
48
55
  export interface SetUserProjectRoleOperationRequest {
49
56
  projectId: string;
50
57
  username: string;
@@ -149,6 +156,46 @@ export class ProjectsApi extends runtime.BaseAPI {
149
156
  return await response.value();
150
157
  }
151
158
 
159
+ /**
160
+ * Gets users who have access to the project
161
+ * Get project permissions
162
+ */
163
+ async getProjectUsersRaw(requestParameters: GetProjectUsersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<ProjectUser>>> {
164
+ if (requestParameters.projectId === null || requestParameters.projectId === undefined) {
165
+ throw new runtime.RequiredError('projectId','Required parameter requestParameters.projectId was null or undefined when calling getProjectUsers.');
166
+ }
167
+
168
+ const queryParameters: any = {};
169
+
170
+ const headerParameters: runtime.HTTPHeaders = {};
171
+
172
+ if (this.configuration && this.configuration.accessToken) {
173
+ const token = this.configuration.accessToken;
174
+ const tokenString = await token("accessToken", []);
175
+
176
+ if (tokenString) {
177
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
178
+ }
179
+ }
180
+ const response = await this.request({
181
+ path: `/projects/{projectId}/permissions`.replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters.projectId))),
182
+ method: 'GET',
183
+ headers: headerParameters,
184
+ query: queryParameters,
185
+ }, initOverrides);
186
+
187
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ProjectUserFromJSON));
188
+ }
189
+
190
+ /**
191
+ * Gets users who have access to the project
192
+ * Get project permissions
193
+ */
194
+ async getProjectUsers(requestParameters: GetProjectUsersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ProjectUser>> {
195
+ const response = await this.getProjectUsersRaw(requestParameters, initOverrides);
196
+ return await response.value();
197
+ }
198
+
152
199
  /**
153
200
  * Retrieve a list of projects
154
201
  * Get projects
@@ -12,17 +12,16 @@
12
12
  * Do not edit the class manually.
13
13
  */
14
14
 
15
-
16
15
  /**
17
16
  *
18
17
  * @export
18
+ * @enum {string}
19
19
  */
20
- export const BillingMethod = {
21
- BudgetNumber: 'BUDGET_NUMBER',
22
- PurchaseOrder: 'PURCHASE_ORDER',
23
- Credit: 'CREDIT'
24
- } as const;
25
- export type BillingMethod = typeof BillingMethod[keyof typeof BillingMethod];
20
+ export enum BillingMethod {
21
+ BudgetNumber = 'BUDGET_NUMBER',
22
+ PurchaseOrder = 'PURCHASE_ORDER',
23
+ Credit = 'CREDIT'
24
+ }
26
25
 
27
26
 
28
27
  export function BillingMethodFromJSON(json: any): BillingMethod {
@@ -12,17 +12,16 @@
12
12
  * Do not edit the class manually.
13
13
  */
14
14
 
15
-
16
15
  /**
17
16
  *
18
17
  * @export
18
+ * @enum {string}
19
19
  */
20
- export const BudgetPeriod = {
21
- Annually: 'ANNUALLY',
22
- Quarterly: 'QUARTERLY',
23
- Monthly: 'MONTHLY'
24
- } as const;
25
- export type BudgetPeriod = typeof BudgetPeriod[keyof typeof BudgetPeriod];
20
+ export enum BudgetPeriod {
21
+ Annually = 'ANNUALLY',
22
+ Quarterly = 'QUARTERLY',
23
+ Monthly = 'MONTHLY'
24
+ }
26
25
 
27
26
 
28
27
  export function BudgetPeriodFromJSON(json: any): BudgetPeriod {
@@ -12,18 +12,17 @@
12
12
  * Do not edit the class manually.
13
13
  */
14
14
 
15
-
16
15
  /**
17
16
  *
18
17
  * @export
18
+ * @enum {string}
19
19
  */
20
- export const CustomerType = {
21
- Free: 'FREE',
22
- Usage: 'USAGE',
23
- Marketplace: 'MARKETPLACE',
24
- Contract: 'CONTRACT'
25
- } as const;
26
- export type CustomerType = typeof CustomerType[keyof typeof CustomerType];
20
+ export enum CustomerType {
21
+ Free = 'FREE',
22
+ Usage = 'USAGE',
23
+ Marketplace = 'MARKETPLACE',
24
+ Contract = 'CONTRACT'
25
+ }
27
26
 
28
27
 
29
28
  export function CustomerTypeFromJSON(json: any): CustomerType {
@@ -12,16 +12,15 @@
12
12
  * Do not edit the class manually.
13
13
  */
14
14
 
15
-
16
15
  /**
17
16
  *
18
17
  * @export
18
+ * @enum {string}
19
19
  */
20
- export const DatasetType = {
21
- Upload: 'UPLOAD',
22
- Public: 'PUBLIC'
23
- } as const;
24
- export type DatasetType = typeof DatasetType[keyof typeof DatasetType];
20
+ export enum DatasetType {
21
+ Upload = 'UPLOAD',
22
+ Public = 'PUBLIC'
23
+ }
25
24
 
26
25
 
27
26
  export function DatasetTypeFromJSON(json: any): DatasetType {
@@ -12,17 +12,16 @@
12
12
  * Do not edit the class manually.
13
13
  */
14
14
 
15
-
16
15
  /**
17
16
  * Process executor
18
17
  * @export
18
+ * @enum {string}
19
19
  */
20
- export const Executor = {
21
- Ingest: 'INGEST',
22
- Nextflow: 'NEXTFLOW',
23
- Cromwell: 'CROMWELL'
24
- } as const;
25
- export type Executor = typeof Executor[keyof typeof Executor];
20
+ export enum Executor {
21
+ Ingest = 'INGEST',
22
+ Nextflow = 'NEXTFLOW',
23
+ Cromwell = 'CROMWELL'
24
+ }
26
25
 
27
26
 
28
27
  export function ExecutorFromJSON(json: any): Executor {
@@ -0,0 +1,83 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Cirro Data
5
+ * Cirro Data Platform service API
6
+ *
7
+ * The version of the OpenAPI document: latest
8
+ * Contact: support@cirro.bio
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { exists, mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface MetricRecord
20
+ */
21
+ export interface MetricRecord {
22
+ /**
23
+ *
24
+ * @type {Date}
25
+ * @memberof MetricRecord
26
+ */
27
+ date: Date;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof MetricRecord
32
+ */
33
+ unit: string;
34
+ /**
35
+ * Map of service names to metric value
36
+ * @type {{ [key: string]: number; }}
37
+ * @memberof MetricRecord
38
+ */
39
+ services?: { [key: string]: number; };
40
+ }
41
+
42
+ /**
43
+ * Check if a given object implements the MetricRecord interface.
44
+ */
45
+ export function instanceOfMetricRecord(value: object): boolean {
46
+ let isInstance = true;
47
+ isInstance = isInstance && "date" in value;
48
+ isInstance = isInstance && "unit" in value;
49
+
50
+ return isInstance;
51
+ }
52
+
53
+ export function MetricRecordFromJSON(json: any): MetricRecord {
54
+ return MetricRecordFromJSONTyped(json, false);
55
+ }
56
+
57
+ export function MetricRecordFromJSONTyped(json: any, ignoreDiscriminator: boolean): MetricRecord {
58
+ if ((json === undefined) || (json === null)) {
59
+ return json;
60
+ }
61
+ return {
62
+
63
+ 'date': (new Date(json['date'])),
64
+ 'unit': json['unit'],
65
+ 'services': !exists(json, 'services') ? undefined : json['services'],
66
+ };
67
+ }
68
+
69
+ export function MetricRecordToJSON(value?: MetricRecord | null): any {
70
+ if (value === undefined) {
71
+ return undefined;
72
+ }
73
+ if (value === null) {
74
+ return null;
75
+ }
76
+ return {
77
+
78
+ 'date': (value.date.toISOString().substring(0,10)),
79
+ 'unit': value.unit,
80
+ 'services': value.services,
81
+ };
82
+ }
83
+
@@ -13,6 +13,13 @@
13
13
  */
14
14
 
15
15
  import { exists, mapValues } from '../runtime';
16
+ import type { MetricRecord } from './MetricRecord';
17
+ import {
18
+ MetricRecordFromJSON,
19
+ MetricRecordFromJSONTyped,
20
+ MetricRecordToJSON,
21
+ } from './MetricRecord';
22
+
16
23
  /**
17
24
  *
18
25
  * @export
@@ -27,16 +34,16 @@ export interface ProjectMetrics {
27
34
  projectId: string;
28
35
  /**
29
36
  * Costs by service by month
30
- * @type {{ [key: string]: { [key: string]: number; }; }}
37
+ * @type {Array<MetricRecord>}
31
38
  * @memberof ProjectMetrics
32
39
  */
33
- costs?: { [key: string]: { [key: string]: number; }; };
40
+ costs?: Array<MetricRecord>;
34
41
  /**
35
42
  * Storage usage by tier by day
36
- * @type {{ [key: string]: any; }}
43
+ * @type {Array<MetricRecord>}
37
44
  * @memberof ProjectMetrics
38
45
  */
39
- storageMetrics?: { [key: string]: any; };
46
+ storageMetrics?: Array<MetricRecord>;
40
47
  }
41
48
 
42
49
  /**
@@ -60,8 +67,8 @@ export function ProjectMetricsFromJSONTyped(json: any, ignoreDiscriminator: bool
60
67
  return {
61
68
 
62
69
  'projectId': json['projectId'],
63
- 'costs': !exists(json, 'costs') ? undefined : json['costs'],
64
- 'storageMetrics': !exists(json, 'storageMetrics') ? undefined : json['storageMetrics'],
70
+ 'costs': !exists(json, 'costs') ? undefined : ((json['costs'] as Array<any>).map(MetricRecordFromJSON)),
71
+ 'storageMetrics': !exists(json, 'storageMetrics') ? undefined : ((json['storageMetrics'] as Array<any>).map(MetricRecordFromJSON)),
65
72
  };
66
73
  }
67
74
 
@@ -75,8 +82,8 @@ export function ProjectMetricsToJSON(value?: ProjectMetrics | null): any {
75
82
  return {
76
83
 
77
84
  'projectId': value.projectId,
78
- 'costs': value.costs,
79
- 'storageMetrics': value.storageMetrics,
85
+ 'costs': value.costs === undefined ? undefined : ((value.costs as Array<any>).map(MetricRecordToJSON)),
86
+ 'storageMetrics': value.storageMetrics === undefined ? undefined : ((value.storageMetrics as Array<any>).map(MetricRecordToJSON)),
80
87
  };
81
88
  }
82
89
 
@@ -79,13 +79,13 @@ export interface ProjectRequest {
79
79
  * @type {CloudAccount}
80
80
  * @memberof ProjectRequest
81
81
  */
82
- account: CloudAccount;
82
+ account: CloudAccount | null;
83
83
  /**
84
84
  *
85
85
  * @type {Array<Tag>}
86
86
  * @memberof ProjectRequest
87
87
  */
88
- tags: Array<Tag>;
88
+ tags: Array<Tag> | null;
89
89
  }
90
90
 
91
91
  /**
@@ -120,7 +120,7 @@ export function ProjectRequestFromJSONTyped(json: any, ignoreDiscriminator: bool
120
120
  'settings': ProjectSettingsFromJSON(json['settings']),
121
121
  'contacts': ((json['contacts'] as Array<any>).map(ContactFromJSON)),
122
122
  'account': CloudAccountFromJSON(json['account']),
123
- 'tags': ((json['tags'] as Array<any>).map(TagFromJSON)),
123
+ 'tags': (json['tags'] === null ? null : (json['tags'] as Array<any>).map(TagFromJSON)),
124
124
  };
125
125
  }
126
126
 
@@ -139,7 +139,7 @@ export function ProjectRequestToJSON(value?: ProjectRequest | null): any {
139
139
  'settings': ProjectSettingsToJSON(value.settings),
140
140
  'contacts': ((value.contacts as Array<any>).map(ContactToJSON)),
141
141
  'account': CloudAccountToJSON(value.account),
142
- 'tags': ((value.tags as Array<any>).map(TagToJSON)),
142
+ 'tags': (value.tags === null ? null : (value.tags as Array<any>).map(TagToJSON)),
143
143
  };
144
144
  }
145
145
 
@@ -12,18 +12,17 @@
12
12
  * Do not edit the class manually.
13
13
  */
14
14
 
15
-
16
15
  /**
17
16
  *
18
17
  * @export
18
+ * @enum {string}
19
19
  */
20
- export const ProjectRole = {
21
- Admin: 'ADMIN',
22
- Contributor: 'CONTRIBUTOR',
23
- Collaborator: 'COLLABORATOR',
24
- None: 'NONE'
25
- } as const;
26
- export type ProjectRole = typeof ProjectRole[keyof typeof ProjectRole];
20
+ export enum ProjectRole {
21
+ Admin = 'ADMIN',
22
+ Contributor = 'CONTRIBUTOR',
23
+ Collaborator = 'COLLABORATOR',
24
+ None = 'NONE'
25
+ }
27
26
 
28
27
 
29
28
  export function ProjectRoleFromJSON(json: any): ProjectRole {