Skip to content

Commit a8ddf0a

Browse files
authored
Merge pull request #74 from adamviktora/lint-fix-nmstate
Fix lint errors in nmstate directory
2 parents ac7d3fe + 1556569 commit a8ddf0a

28 files changed

+1889
-1699
lines changed

nmstate/models/V1NMState.ts

Lines changed: 70 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -1,117 +1,106 @@
11
/* tslint:disable */
22
/* eslint-disable */
33
/**
4-
*
4+
*
55
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
66
*
77
* The version of the OpenAPI document: 1.0.0
8-
*
8+
*
99
*
1010
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
1111
* https://openapi-generator.tech
1212
* Do not edit the class manually.
1313
*/
1414

15-
import { exists, mapValues } from '../runtime';
15+
import { exists } from '../runtime';
1616
import type { V1NMStateSpec } from './V1NMStateSpec';
17-
import {
18-
V1NMStateSpecFromJSON,
19-
V1NMStateSpecFromJSONTyped,
20-
V1NMStateSpecToJSON,
21-
} from './V1NMStateSpec';
17+
import { V1NMStateSpecFromJSON, V1NMStateSpecToJSON } from './V1NMStateSpec';
2218
import type { V1NMStateStatus } from './V1NMStateStatus';
23-
import {
24-
V1NMStateStatusFromJSON,
25-
V1NMStateStatusFromJSONTyped,
26-
V1NMStateStatusToJSON,
27-
} from './V1NMStateStatus';
19+
import { V1NMStateStatusFromJSON, V1NMStateStatusToJSON } from './V1NMStateStatus';
2820

2921
/**
3022
* NMState is the Schema for the nmstates API
3123
* @export
3224
* @interface V1NMState
3325
*/
3426
export interface V1NMState {
35-
/**
36-
* APIVersion defines the versioned schema of this representation of an object.
37-
* Servers should convert recognized schemas to the latest internal value, and
38-
* may reject unrecognized values.
39-
* More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
40-
* @type {any}
41-
* @memberof V1NMState
42-
*/
43-
apiVersion?: any | null;
44-
/**
45-
* Kind is a string value representing the REST resource this object represents.
46-
* Servers may infer this from the endpoint the client submits requests to.
47-
* Cannot be updated.
48-
* In CamelCase.
49-
* More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
50-
* @type {any}
51-
* @memberof V1NMState
52-
*/
53-
kind?: any | null;
54-
/**
55-
*
56-
* @type {any}
57-
* @memberof V1NMState
58-
*/
59-
metadata?: any | null;
60-
/**
61-
*
62-
* @type {V1NMStateSpec}
63-
* @memberof V1NMState
64-
*/
65-
spec?: V1NMStateSpec;
66-
/**
67-
*
68-
* @type {V1NMStateStatus}
69-
* @memberof V1NMState
70-
*/
71-
status?: V1NMStateStatus;
27+
/**
28+
* APIVersion defines the versioned schema of this representation of an object.
29+
* Servers should convert recognized schemas to the latest internal value, and
30+
* may reject unrecognized values.
31+
* More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
32+
* @type {any}
33+
* @memberof V1NMState
34+
*/
35+
apiVersion?: any | null;
36+
/**
37+
* Kind is a string value representing the REST resource this object represents.
38+
* Servers may infer this from the endpoint the client submits requests to.
39+
* Cannot be updated.
40+
* In CamelCase.
41+
* More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
42+
* @type {any}
43+
* @memberof V1NMState
44+
*/
45+
kind?: any | null;
46+
/**
47+
*
48+
* @type {any}
49+
* @memberof V1NMState
50+
*/
51+
metadata?: any | null;
52+
/**
53+
*
54+
* @type {V1NMStateSpec}
55+
* @memberof V1NMState
56+
*/
57+
spec?: V1NMStateSpec;
58+
/**
59+
*
60+
* @type {V1NMStateStatus}
61+
* @memberof V1NMState
62+
*/
63+
status?: V1NMStateStatus;
7264
}
7365

7466
/**
7567
* Check if a given object implements the V1NMState interface.
7668
*/
77-
export function instanceOfV1NMState(value: object): boolean {
78-
let isInstance = true;
69+
export function instanceOfV1NMState(_value: object): boolean {
70+
const isInstance = true;
7971

80-
return isInstance;
72+
return isInstance;
8173
}
8274

8375
export function V1NMStateFromJSON(json: any): V1NMState {
84-
return V1NMStateFromJSONTyped(json, false);
76+
return V1NMStateFromJSONTyped(json, false);
8577
}
8678

87-
export function V1NMStateFromJSONTyped(json: any, ignoreDiscriminator: boolean): V1NMState {
88-
if ((json === undefined) || (json === null)) {
89-
return json;
90-
}
91-
return {
92-
93-
'apiVersion': !exists(json, 'apiVersion') ? undefined : json['apiVersion'],
94-
'kind': !exists(json, 'kind') ? undefined : json['kind'],
95-
'metadata': !exists(json, 'metadata') ? undefined : json['metadata'],
96-
'spec': !exists(json, 'spec') ? undefined : V1NMStateSpecFromJSON(json['spec']),
97-
'status': !exists(json, 'status') ? undefined : V1NMStateStatusFromJSON(json['status']),
98-
};
79+
export function V1NMStateFromJSONTyped(json: any, _ignoreDiscriminator: boolean): V1NMState {
80+
if (json === undefined || json === null) {
81+
return json;
82+
}
83+
return {
84+
apiVersion: !exists(json, 'apiVersion') ? undefined : json['apiVersion'],
85+
kind: !exists(json, 'kind') ? undefined : json['kind'],
86+
metadata: !exists(json, 'metadata') ? undefined : json['metadata'],
87+
spec: !exists(json, 'spec') ? undefined : V1NMStateSpecFromJSON(json['spec']),
88+
status: !exists(json, 'status') ? undefined : V1NMStateStatusFromJSON(json['status']),
89+
};
9990
}
10091

10192
export function V1NMStateToJSON(value?: V1NMState | null): any {
102-
if (value === undefined) {
103-
return undefined;
104-
}
105-
if (value === null) {
106-
return null;
107-
}
108-
return {
109-
110-
'apiVersion': value.apiVersion,
111-
'kind': value.kind,
112-
'metadata': value.metadata,
113-
'spec': V1NMStateSpecToJSON(value.spec),
114-
'status': V1NMStateStatusToJSON(value.status),
115-
};
93+
if (value === undefined) {
94+
return undefined;
95+
}
96+
if (value === null) {
97+
return null;
98+
}
99+
return {
100+
apiVersion: value.apiVersion,
101+
kind: value.kind,
102+
metadata: value.metadata,
103+
spec: V1NMStateSpecToJSON(value.spec),
104+
status: V1NMStateStatusToJSON(value.status),
105+
};
116106
}
117-

0 commit comments

Comments
 (0)