@keynetra/client 0.1.1

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 (72) hide show
  1. package/README.md +53 -0
  2. package/package.json +26 -0
  3. package/src/apis/AccessApi.ts +326 -0
  4. package/src/apis/AuthApi.ts +193 -0
  5. package/src/apis/DevApi.ts +168 -0
  6. package/src/apis/HealthApi.ts +216 -0
  7. package/src/apis/ManagementApi.ts +2641 -0
  8. package/src/apis/PlaygroundApi.ts +131 -0
  9. package/src/apis/index.ts +8 -0
  10. package/src/index.ts +6 -0
  11. package/src/keynetra-client.ts +35 -0
  12. package/src/models/ACLCreate.ts +111 -0
  13. package/src/models/ACLOut.ts +137 -0
  14. package/src/models/AccessDecisionResponse.ts +115 -0
  15. package/src/models/AccessRequest.ts +106 -0
  16. package/src/models/AdminLoginRequest.ts +75 -0
  17. package/src/models/AdminLoginResponse.ts +100 -0
  18. package/src/models/AuditRecordOut.ts +172 -0
  19. package/src/models/AuthModelCreate.ts +66 -0
  20. package/src/models/AuthModelOut.ts +102 -0
  21. package/src/models/BatchAccessItem.ts +74 -0
  22. package/src/models/BatchAccessRequest.ts +98 -0
  23. package/src/models/BatchAccessResponse.ts +82 -0
  24. package/src/models/BatchAccessResult.ts +83 -0
  25. package/src/models/DataValue.ts +46 -0
  26. package/src/models/HTTPValidationError.ts +73 -0
  27. package/src/models/ImpactAnalysisRequest.ts +66 -0
  28. package/src/models/ImpactAnalysisResponse.ts +73 -0
  29. package/src/models/LocationInner.ts +46 -0
  30. package/src/models/MetaBody.ts +89 -0
  31. package/src/models/PermissionCreate.ts +66 -0
  32. package/src/models/PermissionOut.ts +75 -0
  33. package/src/models/PermissionUpdate.ts +66 -0
  34. package/src/models/PlaygroundEvaluateRequest.ts +90 -0
  35. package/src/models/PlaygroundInput.ts +89 -0
  36. package/src/models/PlaygroundPolicy.ts +98 -0
  37. package/src/models/PolicyCreate.ts +98 -0
  38. package/src/models/PolicyOut.ts +110 -0
  39. package/src/models/PolicySimulationInput.ts +81 -0
  40. package/src/models/PolicySimulationRequest.ts +81 -0
  41. package/src/models/PolicySimulationResponse.ts +75 -0
  42. package/src/models/RelationshipCreate.ts +102 -0
  43. package/src/models/RelationshipOut.ts +111 -0
  44. package/src/models/RoleCreate.ts +66 -0
  45. package/src/models/RoleOut.ts +75 -0
  46. package/src/models/RoleUpdate.ts +66 -0
  47. package/src/models/SimulationResponse.ts +115 -0
  48. package/src/models/SuccessResponseACLOut.ts +97 -0
  49. package/src/models/SuccessResponseAccessDecisionResponse.ts +97 -0
  50. package/src/models/SuccessResponseAdminLoginResponse.ts +97 -0
  51. package/src/models/SuccessResponseAuthModelOut.ts +97 -0
  52. package/src/models/SuccessResponseBatchAccessResponse.ts +97 -0
  53. package/src/models/SuccessResponseDictStrAny.ts +90 -0
  54. package/src/models/SuccessResponseDictStrInt.ts +90 -0
  55. package/src/models/SuccessResponseDictStrObject.ts +90 -0
  56. package/src/models/SuccessResponseDictStrStr.ts +90 -0
  57. package/src/models/SuccessResponseDictStrUnionIntStr.ts +97 -0
  58. package/src/models/SuccessResponseImpactAnalysisResponse.ts +97 -0
  59. package/src/models/SuccessResponseListACLOut.ts +97 -0
  60. package/src/models/SuccessResponseListAuditRecordOut.ts +97 -0
  61. package/src/models/SuccessResponseListDictStrStr.ts +90 -0
  62. package/src/models/SuccessResponseListPermissionOut.ts +97 -0
  63. package/src/models/SuccessResponseListPolicyOut.ts +97 -0
  64. package/src/models/SuccessResponseListRoleOut.ts +97 -0
  65. package/src/models/SuccessResponsePermissionOut.ts +97 -0
  66. package/src/models/SuccessResponsePolicyOut.ts +97 -0
  67. package/src/models/SuccessResponsePolicySimulationResponse.ts +97 -0
  68. package/src/models/SuccessResponseRelationshipOut.ts +97 -0
  69. package/src/models/SuccessResponseSimulationResponse.ts +97 -0
  70. package/src/models/ValidationError.ts +108 -0
  71. package/src/models/index.ts +61 -0
  72. package/src/runtime.ts +450 -0
@@ -0,0 +1,81 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * KeyNetra
5
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
+ *
7
+ * The version of the OpenAPI document: 0.1.1
8
+ *
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 { mapValues } from '../runtime';
16
+ import type { PolicySimulationInput } from './PolicySimulationInput';
17
+ import {
18
+ PolicySimulationInputFromJSON,
19
+ PolicySimulationInputFromJSONTyped,
20
+ PolicySimulationInputToJSON,
21
+ PolicySimulationInputToJSONTyped,
22
+ } from './PolicySimulationInput';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface PolicySimulationRequest
28
+ */
29
+ export interface PolicySimulationRequest {
30
+ /**
31
+ *
32
+ * @type {PolicySimulationInput}
33
+ * @memberof PolicySimulationRequest
34
+ */
35
+ simulate?: PolicySimulationInput;
36
+ /**
37
+ *
38
+ * @type {{ [key: string]: any; }}
39
+ * @memberof PolicySimulationRequest
40
+ */
41
+ request?: { [key: string]: any; };
42
+ }
43
+
44
+ /**
45
+ * Check if a given object implements the PolicySimulationRequest interface.
46
+ */
47
+ export function instanceOfPolicySimulationRequest(value: object): value is PolicySimulationRequest {
48
+ return true;
49
+ }
50
+
51
+ export function PolicySimulationRequestFromJSON(json: any): PolicySimulationRequest {
52
+ return PolicySimulationRequestFromJSONTyped(json, false);
53
+ }
54
+
55
+ export function PolicySimulationRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PolicySimulationRequest {
56
+ if (json == null) {
57
+ return json;
58
+ }
59
+ return {
60
+
61
+ 'simulate': json['simulate'] == null ? undefined : PolicySimulationInputFromJSON(json['simulate']),
62
+ 'request': json['request'] == null ? undefined : json['request'],
63
+ };
64
+ }
65
+
66
+ export function PolicySimulationRequestToJSON(json: any): PolicySimulationRequest {
67
+ return PolicySimulationRequestToJSONTyped(json, false);
68
+ }
69
+
70
+ export function PolicySimulationRequestToJSONTyped(value?: PolicySimulationRequest | null, ignoreDiscriminator: boolean = false): any {
71
+ if (value == null) {
72
+ return value;
73
+ }
74
+
75
+ return {
76
+
77
+ 'simulate': PolicySimulationInputToJSON(value['simulate']),
78
+ 'request': value['request'],
79
+ };
80
+ }
81
+
@@ -0,0 +1,75 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * KeyNetra
5
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
+ *
7
+ * The version of the OpenAPI document: 0.1.1
8
+ *
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 { mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface PolicySimulationResponse
20
+ */
21
+ export interface PolicySimulationResponse {
22
+ /**
23
+ *
24
+ * @type {{ [key: string]: any; }}
25
+ * @memberof PolicySimulationResponse
26
+ */
27
+ decisionBefore: { [key: string]: any; };
28
+ /**
29
+ *
30
+ * @type {{ [key: string]: any; }}
31
+ * @memberof PolicySimulationResponse
32
+ */
33
+ decisionAfter: { [key: string]: any; };
34
+ }
35
+
36
+ /**
37
+ * Check if a given object implements the PolicySimulationResponse interface.
38
+ */
39
+ export function instanceOfPolicySimulationResponse(value: object): value is PolicySimulationResponse {
40
+ if (!('decisionBefore' in value) || value['decisionBefore'] === undefined) return false;
41
+ if (!('decisionAfter' in value) || value['decisionAfter'] === undefined) return false;
42
+ return true;
43
+ }
44
+
45
+ export function PolicySimulationResponseFromJSON(json: any): PolicySimulationResponse {
46
+ return PolicySimulationResponseFromJSONTyped(json, false);
47
+ }
48
+
49
+ export function PolicySimulationResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): PolicySimulationResponse {
50
+ if (json == null) {
51
+ return json;
52
+ }
53
+ return {
54
+
55
+ 'decisionBefore': json['decision_before'],
56
+ 'decisionAfter': json['decision_after'],
57
+ };
58
+ }
59
+
60
+ export function PolicySimulationResponseToJSON(json: any): PolicySimulationResponse {
61
+ return PolicySimulationResponseToJSONTyped(json, false);
62
+ }
63
+
64
+ export function PolicySimulationResponseToJSONTyped(value?: PolicySimulationResponse | null, ignoreDiscriminator: boolean = false): any {
65
+ if (value == null) {
66
+ return value;
67
+ }
68
+
69
+ return {
70
+
71
+ 'decision_before': value['decisionBefore'],
72
+ 'decision_after': value['decisionAfter'],
73
+ };
74
+ }
75
+
@@ -0,0 +1,102 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * KeyNetra
5
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
+ *
7
+ * The version of the OpenAPI document: 0.1.1
8
+ *
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 { mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface RelationshipCreate
20
+ */
21
+ export interface RelationshipCreate {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof RelationshipCreate
26
+ */
27
+ subjectType: string;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof RelationshipCreate
32
+ */
33
+ subjectId: string;
34
+ /**
35
+ *
36
+ * @type {string}
37
+ * @memberof RelationshipCreate
38
+ */
39
+ relation: string;
40
+ /**
41
+ *
42
+ * @type {string}
43
+ * @memberof RelationshipCreate
44
+ */
45
+ objectType: string;
46
+ /**
47
+ *
48
+ * @type {string}
49
+ * @memberof RelationshipCreate
50
+ */
51
+ objectId: string;
52
+ }
53
+
54
+ /**
55
+ * Check if a given object implements the RelationshipCreate interface.
56
+ */
57
+ export function instanceOfRelationshipCreate(value: object): value is RelationshipCreate {
58
+ if (!('subjectType' in value) || value['subjectType'] === undefined) return false;
59
+ if (!('subjectId' in value) || value['subjectId'] === undefined) return false;
60
+ if (!('relation' in value) || value['relation'] === undefined) return false;
61
+ if (!('objectType' in value) || value['objectType'] === undefined) return false;
62
+ if (!('objectId' in value) || value['objectId'] === undefined) return false;
63
+ return true;
64
+ }
65
+
66
+ export function RelationshipCreateFromJSON(json: any): RelationshipCreate {
67
+ return RelationshipCreateFromJSONTyped(json, false);
68
+ }
69
+
70
+ export function RelationshipCreateFromJSONTyped(json: any, ignoreDiscriminator: boolean): RelationshipCreate {
71
+ if (json == null) {
72
+ return json;
73
+ }
74
+ return {
75
+
76
+ 'subjectType': json['subject_type'],
77
+ 'subjectId': json['subject_id'],
78
+ 'relation': json['relation'],
79
+ 'objectType': json['object_type'],
80
+ 'objectId': json['object_id'],
81
+ };
82
+ }
83
+
84
+ export function RelationshipCreateToJSON(json: any): RelationshipCreate {
85
+ return RelationshipCreateToJSONTyped(json, false);
86
+ }
87
+
88
+ export function RelationshipCreateToJSONTyped(value?: RelationshipCreate | null, ignoreDiscriminator: boolean = false): any {
89
+ if (value == null) {
90
+ return value;
91
+ }
92
+
93
+ return {
94
+
95
+ 'subject_type': value['subjectType'],
96
+ 'subject_id': value['subjectId'],
97
+ 'relation': value['relation'],
98
+ 'object_type': value['objectType'],
99
+ 'object_id': value['objectId'],
100
+ };
101
+ }
102
+
@@ -0,0 +1,111 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * KeyNetra
5
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
+ *
7
+ * The version of the OpenAPI document: 0.1.1
8
+ *
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 { mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface RelationshipOut
20
+ */
21
+ export interface RelationshipOut {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof RelationshipOut
26
+ */
27
+ subjectType: string;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof RelationshipOut
32
+ */
33
+ subjectId: string;
34
+ /**
35
+ *
36
+ * @type {string}
37
+ * @memberof RelationshipOut
38
+ */
39
+ relation: string;
40
+ /**
41
+ *
42
+ * @type {string}
43
+ * @memberof RelationshipOut
44
+ */
45
+ objectType: string;
46
+ /**
47
+ *
48
+ * @type {string}
49
+ * @memberof RelationshipOut
50
+ */
51
+ objectId: string;
52
+ /**
53
+ *
54
+ * @type {number}
55
+ * @memberof RelationshipOut
56
+ */
57
+ id: number;
58
+ }
59
+
60
+ /**
61
+ * Check if a given object implements the RelationshipOut interface.
62
+ */
63
+ export function instanceOfRelationshipOut(value: object): value is RelationshipOut {
64
+ if (!('subjectType' in value) || value['subjectType'] === undefined) return false;
65
+ if (!('subjectId' in value) || value['subjectId'] === undefined) return false;
66
+ if (!('relation' in value) || value['relation'] === undefined) return false;
67
+ if (!('objectType' in value) || value['objectType'] === undefined) return false;
68
+ if (!('objectId' in value) || value['objectId'] === undefined) return false;
69
+ if (!('id' in value) || value['id'] === undefined) return false;
70
+ return true;
71
+ }
72
+
73
+ export function RelationshipOutFromJSON(json: any): RelationshipOut {
74
+ return RelationshipOutFromJSONTyped(json, false);
75
+ }
76
+
77
+ export function RelationshipOutFromJSONTyped(json: any, ignoreDiscriminator: boolean): RelationshipOut {
78
+ if (json == null) {
79
+ return json;
80
+ }
81
+ return {
82
+
83
+ 'subjectType': json['subject_type'],
84
+ 'subjectId': json['subject_id'],
85
+ 'relation': json['relation'],
86
+ 'objectType': json['object_type'],
87
+ 'objectId': json['object_id'],
88
+ 'id': json['id'],
89
+ };
90
+ }
91
+
92
+ export function RelationshipOutToJSON(json: any): RelationshipOut {
93
+ return RelationshipOutToJSONTyped(json, false);
94
+ }
95
+
96
+ export function RelationshipOutToJSONTyped(value?: RelationshipOut | null, ignoreDiscriminator: boolean = false): any {
97
+ if (value == null) {
98
+ return value;
99
+ }
100
+
101
+ return {
102
+
103
+ 'subject_type': value['subjectType'],
104
+ 'subject_id': value['subjectId'],
105
+ 'relation': value['relation'],
106
+ 'object_type': value['objectType'],
107
+ 'object_id': value['objectId'],
108
+ 'id': value['id'],
109
+ };
110
+ }
111
+
@@ -0,0 +1,66 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * KeyNetra
5
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
+ *
7
+ * The version of the OpenAPI document: 0.1.1
8
+ *
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 { mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface RoleCreate
20
+ */
21
+ export interface RoleCreate {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof RoleCreate
26
+ */
27
+ name: string;
28
+ }
29
+
30
+ /**
31
+ * Check if a given object implements the RoleCreate interface.
32
+ */
33
+ export function instanceOfRoleCreate(value: object): value is RoleCreate {
34
+ if (!('name' in value) || value['name'] === undefined) return false;
35
+ return true;
36
+ }
37
+
38
+ export function RoleCreateFromJSON(json: any): RoleCreate {
39
+ return RoleCreateFromJSONTyped(json, false);
40
+ }
41
+
42
+ export function RoleCreateFromJSONTyped(json: any, ignoreDiscriminator: boolean): RoleCreate {
43
+ if (json == null) {
44
+ return json;
45
+ }
46
+ return {
47
+
48
+ 'name': json['name'],
49
+ };
50
+ }
51
+
52
+ export function RoleCreateToJSON(json: any): RoleCreate {
53
+ return RoleCreateToJSONTyped(json, false);
54
+ }
55
+
56
+ export function RoleCreateToJSONTyped(value?: RoleCreate | null, ignoreDiscriminator: boolean = false): any {
57
+ if (value == null) {
58
+ return value;
59
+ }
60
+
61
+ return {
62
+
63
+ 'name': value['name'],
64
+ };
65
+ }
66
+
@@ -0,0 +1,75 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * KeyNetra
5
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
+ *
7
+ * The version of the OpenAPI document: 0.1.1
8
+ *
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 { mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface RoleOut
20
+ */
21
+ export interface RoleOut {
22
+ /**
23
+ *
24
+ * @type {number}
25
+ * @memberof RoleOut
26
+ */
27
+ id: number;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof RoleOut
32
+ */
33
+ name: string;
34
+ }
35
+
36
+ /**
37
+ * Check if a given object implements the RoleOut interface.
38
+ */
39
+ export function instanceOfRoleOut(value: object): value is RoleOut {
40
+ if (!('id' in value) || value['id'] === undefined) return false;
41
+ if (!('name' in value) || value['name'] === undefined) return false;
42
+ return true;
43
+ }
44
+
45
+ export function RoleOutFromJSON(json: any): RoleOut {
46
+ return RoleOutFromJSONTyped(json, false);
47
+ }
48
+
49
+ export function RoleOutFromJSONTyped(json: any, ignoreDiscriminator: boolean): RoleOut {
50
+ if (json == null) {
51
+ return json;
52
+ }
53
+ return {
54
+
55
+ 'id': json['id'],
56
+ 'name': json['name'],
57
+ };
58
+ }
59
+
60
+ export function RoleOutToJSON(json: any): RoleOut {
61
+ return RoleOutToJSONTyped(json, false);
62
+ }
63
+
64
+ export function RoleOutToJSONTyped(value?: RoleOut | null, ignoreDiscriminator: boolean = false): any {
65
+ if (value == null) {
66
+ return value;
67
+ }
68
+
69
+ return {
70
+
71
+ 'id': value['id'],
72
+ 'name': value['name'],
73
+ };
74
+ }
75
+
@@ -0,0 +1,66 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * KeyNetra
5
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
+ *
7
+ * The version of the OpenAPI document: 0.1.1
8
+ *
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 { mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface RoleUpdate
20
+ */
21
+ export interface RoleUpdate {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof RoleUpdate
26
+ */
27
+ name: string;
28
+ }
29
+
30
+ /**
31
+ * Check if a given object implements the RoleUpdate interface.
32
+ */
33
+ export function instanceOfRoleUpdate(value: object): value is RoleUpdate {
34
+ if (!('name' in value) || value['name'] === undefined) return false;
35
+ return true;
36
+ }
37
+
38
+ export function RoleUpdateFromJSON(json: any): RoleUpdate {
39
+ return RoleUpdateFromJSONTyped(json, false);
40
+ }
41
+
42
+ export function RoleUpdateFromJSONTyped(json: any, ignoreDiscriminator: boolean): RoleUpdate {
43
+ if (json == null) {
44
+ return json;
45
+ }
46
+ return {
47
+
48
+ 'name': json['name'],
49
+ };
50
+ }
51
+
52
+ export function RoleUpdateToJSON(json: any): RoleUpdate {
53
+ return RoleUpdateToJSONTyped(json, false);
54
+ }
55
+
56
+ export function RoleUpdateToJSONTyped(value?: RoleUpdate | null, ignoreDiscriminator: boolean = false): any {
57
+ if (value == null) {
58
+ return value;
59
+ }
60
+
61
+ return {
62
+
63
+ 'name': value['name'],
64
+ };
65
+ }
66
+
@@ -0,0 +1,115 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * KeyNetra
5
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
+ *
7
+ * The version of the OpenAPI document: 0.1.1
8
+ *
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 { mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface SimulationResponse
20
+ */
21
+ export interface SimulationResponse {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof SimulationResponse
26
+ */
27
+ decision: string;
28
+ /**
29
+ *
30
+ * @type {Array<string>}
31
+ * @memberof SimulationResponse
32
+ */
33
+ matchedPolicies: Array<string>;
34
+ /**
35
+ *
36
+ * @type {string}
37
+ * @memberof SimulationResponse
38
+ */
39
+ reason?: string | null;
40
+ /**
41
+ *
42
+ * @type {string}
43
+ * @memberof SimulationResponse
44
+ */
45
+ policyId?: string | null;
46
+ /**
47
+ *
48
+ * @type {Array<{ [key: string]: any; }>}
49
+ * @memberof SimulationResponse
50
+ */
51
+ explainTrace?: Array<{ [key: string]: any; }>;
52
+ /**
53
+ *
54
+ * @type {Array<string>}
55
+ * @memberof SimulationResponse
56
+ */
57
+ failedConditions?: Array<string>;
58
+ /**
59
+ *
60
+ * @type {number}
61
+ * @memberof SimulationResponse
62
+ */
63
+ revision?: number | null;
64
+ }
65
+
66
+ /**
67
+ * Check if a given object implements the SimulationResponse interface.
68
+ */
69
+ export function instanceOfSimulationResponse(value: object): value is SimulationResponse {
70
+ if (!('decision' in value) || value['decision'] === undefined) return false;
71
+ if (!('matchedPolicies' in value) || value['matchedPolicies'] === undefined) return false;
72
+ return true;
73
+ }
74
+
75
+ export function SimulationResponseFromJSON(json: any): SimulationResponse {
76
+ return SimulationResponseFromJSONTyped(json, false);
77
+ }
78
+
79
+ export function SimulationResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): SimulationResponse {
80
+ if (json == null) {
81
+ return json;
82
+ }
83
+ return {
84
+
85
+ 'decision': json['decision'],
86
+ 'matchedPolicies': json['matched_policies'],
87
+ 'reason': json['reason'] == null ? undefined : json['reason'],
88
+ 'policyId': json['policy_id'] == null ? undefined : json['policy_id'],
89
+ 'explainTrace': json['explain_trace'] == null ? undefined : json['explain_trace'],
90
+ 'failedConditions': json['failed_conditions'] == null ? undefined : json['failed_conditions'],
91
+ 'revision': json['revision'] == null ? undefined : json['revision'],
92
+ };
93
+ }
94
+
95
+ export function SimulationResponseToJSON(json: any): SimulationResponse {
96
+ return SimulationResponseToJSONTyped(json, false);
97
+ }
98
+
99
+ export function SimulationResponseToJSONTyped(value?: SimulationResponse | null, ignoreDiscriminator: boolean = false): any {
100
+ if (value == null) {
101
+ return value;
102
+ }
103
+
104
+ return {
105
+
106
+ 'decision': value['decision'],
107
+ 'matched_policies': value['matchedPolicies'],
108
+ 'reason': value['reason'],
109
+ 'policy_id': value['policyId'],
110
+ 'explain_trace': value['explainTrace'],
111
+ 'failed_conditions': value['failedConditions'],
112
+ 'revision': value['revision'],
113
+ };
114
+ }
115
+