eiagov-typescript-fetch-client 1.0.0

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 (76) hide show
  1. package/.openapi-generator/FILES +73 -0
  2. package/.openapi-generator/VERSION +1 -0
  3. package/.openapi-generator-ignore +23 -0
  4. package/apis/AEOApi.ts +415 -0
  5. package/apis/COALApi.ts +3645 -0
  6. package/apis/CRUDIMPORTSApi.ts +322 -0
  7. package/apis/DBFApi.ts +2260 -0
  8. package/apis/ELECApi.ts +1180 -0
  9. package/apis/EMISSApi.ts +640 -0
  10. package/apis/IEOApi.ts +415 -0
  11. package/apis/INTLApi.ts +322 -0
  12. package/apis/NGApi.ts +511 -0
  13. package/apis/NUCSTATUSApi.ts +910 -0
  14. package/apis/RTOApi.ts +2260 -0
  15. package/apis/RootApi.ts +66 -0
  16. package/apis/SEDSApi.ts +322 -0
  17. package/apis/SEPApi.ts +1990 -0
  18. package/apis/STEOApi.ts +322 -0
  19. package/apis/TOTALApi.ts +322 -0
  20. package/apis/index.ts +18 -0
  21. package/docs/AEOApi.md +456 -0
  22. package/docs/COALApi.md +4847 -0
  23. package/docs/CRUDIMPORTSApi.md +371 -0
  24. package/docs/DBFApi.md +2976 -0
  25. package/docs/DataParams.md +48 -0
  26. package/docs/DataResponse.md +42 -0
  27. package/docs/DataResponseContainer.md +38 -0
  28. package/docs/ELECApi.md +1524 -0
  29. package/docs/EMISSApi.md +798 -0
  30. package/docs/Facet.md +38 -0
  31. package/docs/FacetDetails.md +36 -0
  32. package/docs/FacetDetailsContainer.md +38 -0
  33. package/docs/FacetMetaData.md +36 -0
  34. package/docs/FacetOptionList.md +36 -0
  35. package/docs/FacetOptionListContainer.md +38 -0
  36. package/docs/FinalRoute.md +52 -0
  37. package/docs/FinalRouteResponse.md +36 -0
  38. package/docs/FinalRouteResponseContainer.md +38 -0
  39. package/docs/Frequency.md +40 -0
  40. package/docs/IEOApi.md +456 -0
  41. package/docs/INTLApi.md +371 -0
  42. package/docs/NGApi.md +541 -0
  43. package/docs/NUCSTATUSApi.md +1161 -0
  44. package/docs/RTOApi.md +2976 -0
  45. package/docs/RootApi.md +70 -0
  46. package/docs/RouteRequest.md +36 -0
  47. package/docs/RouteResponse.md +36 -0
  48. package/docs/RouteResponseContainer.md +38 -0
  49. package/docs/Routes.md +40 -0
  50. package/docs/SEDSApi.md +372 -0
  51. package/docs/SEPApi.md +2613 -0
  52. package/docs/STEOApi.md +371 -0
  53. package/docs/Sort.md +36 -0
  54. package/docs/TOTALApi.md +371 -0
  55. package/index.ts +5 -0
  56. package/models/DataParams.ts +129 -0
  57. package/models/DataResponse.ts +97 -0
  58. package/models/DataResponseContainer.ts +96 -0
  59. package/models/Facet.ts +81 -0
  60. package/models/FacetDetails.ts +81 -0
  61. package/models/FacetDetailsContainer.ts +96 -0
  62. package/models/FacetMetaData.ts +73 -0
  63. package/models/FacetOptionList.ts +73 -0
  64. package/models/FacetOptionListContainer.ts +96 -0
  65. package/models/FinalRoute.ts +152 -0
  66. package/models/FinalRouteResponse.ts +88 -0
  67. package/models/FinalRouteResponseContainer.ts +96 -0
  68. package/models/Frequency.ts +89 -0
  69. package/models/RouteRequest.ts +73 -0
  70. package/models/RouteResponse.ts +88 -0
  71. package/models/RouteResponseContainer.ts +96 -0
  72. package/models/Routes.ts +89 -0
  73. package/models/Sort.ts +73 -0
  74. package/models/index.ts +20 -0
  75. package/package.json +15 -0
  76. package/runtime.ts +449 -0
@@ -0,0 +1,371 @@
1
+ # TOTALApi
2
+
3
+ All URIs are relative to *https://api.eia.gov*
4
+
5
+ | Method | HTTP request | Description |
6
+ |------------- | ------------- | -------------|
7
+ | [**v2TotalEnergyDataGet**](TOTALApi.md#v2totalenergydataget) | **GET** /v2/total-energy/data | |
8
+ | [**v2TotalEnergyDataPost**](TOTALApi.md#v2totalenergydatapost) | **POST** /v2/total-energy/data | Return Total Energy Data |
9
+ | [**v2TotalEnergyFacetFacetIdGet**](TOTALApi.md#v2totalenergyfacetfacetidget) | **GET** /v2/total-energy/facet/{facet_id} | |
10
+ | [**v2TotalEnergyFacetGet**](TOTALApi.md#v2totalenergyfacetget) | **GET** /v2/total-energy/facet | |
11
+ | [**v2TotalEnergyGet**](TOTALApi.md#v2totalenergyget) | **GET** /v2/total-energy | |
12
+
13
+
14
+
15
+ ## v2TotalEnergyDataGet
16
+
17
+ > DataResponseContainer v2TotalEnergyDataGet(data, facets, frequency, start, end, sort, length, offset)
18
+
19
+
20
+
21
+ API data with query params
22
+
23
+ ### Example
24
+
25
+ ```ts
26
+ import {
27
+ Configuration,
28
+ TOTALApi,
29
+ } from '';
30
+ import type { V2TotalEnergyDataGetRequest } from '';
31
+
32
+ async function example() {
33
+ console.log("🚀 Testing SDK...");
34
+ const config = new Configuration({
35
+ // To configure API key authorization: api_key
36
+ apiKey: "YOUR API KEY",
37
+ });
38
+ const api = new TOTALApi(config);
39
+
40
+ const body = {
41
+ // Array<string> | Data columns to filter by (optional)
42
+ data: ...,
43
+ // object | Facets to filter by (optional)
44
+ facets: Object,
45
+ // string | Frequency to filter by (optional)
46
+ frequency: frequency_example,
47
+ // string | Start date to filter by (optional)
48
+ start: start_example,
49
+ // string | End date to filter by (optional)
50
+ end: end_example,
51
+ // Sort | How to sort returned data (optional)
52
+ sort: ...,
53
+ // number | Max length of returned data (optional)
54
+ length: 56,
55
+ // number | Offset of returned data (optional)
56
+ offset: 56,
57
+ } satisfies V2TotalEnergyDataGetRequest;
58
+
59
+ try {
60
+ const data = await api.v2TotalEnergyDataGet(body);
61
+ console.log(data);
62
+ } catch (error) {
63
+ console.error(error);
64
+ }
65
+ }
66
+
67
+ // Run the test
68
+ example().catch(console.error);
69
+ ```
70
+
71
+ ### Parameters
72
+
73
+
74
+ | Name | Type | Description | Notes |
75
+ |------------- | ------------- | ------------- | -------------|
76
+ | **data** | `Array<string>` | Data columns to filter by | [Optional] |
77
+ | **facets** | `object` | Facets to filter by | [Optional] [Defaults to `undefined`] |
78
+ | **frequency** | `string` | Frequency to filter by | [Optional] [Defaults to `undefined`] |
79
+ | **start** | `string` | Start date to filter by | [Optional] [Defaults to `undefined`] |
80
+ | **end** | `string` | End date to filter by | [Optional] [Defaults to `undefined`] |
81
+ | **sort** | [](.md) | How to sort returned data | [Optional] [Defaults to `undefined`] |
82
+ | **length** | `number` | Max length of returned data | [Optional] [Defaults to `undefined`] |
83
+ | **offset** | `number` | Offset of returned data | [Optional] [Defaults to `undefined`] |
84
+
85
+ ### Return type
86
+
87
+ [**DataResponseContainer**](DataResponseContainer.md)
88
+
89
+ ### Authorization
90
+
91
+ [api_key](../README.md#api_key)
92
+
93
+ ### HTTP request headers
94
+
95
+ - **Content-Type**: Not defined
96
+ - **Accept**: `application/json`
97
+
98
+
99
+ ### HTTP response details
100
+ | Status code | Description | Response headers |
101
+ |-------------|-------------|------------------|
102
+ | **400** | Invalid input | - |
103
+ | **200** | API Data | - |
104
+
105
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
106
+
107
+
108
+ ## v2TotalEnergyDataPost
109
+
110
+ > DataResponseContainer v2TotalEnergyDataPost(dataParams)
111
+
112
+ Return Total Energy Data
113
+
114
+ Class TotalEnergyController Total Energy controller.
115
+
116
+ ### Example
117
+
118
+ ```ts
119
+ import {
120
+ Configuration,
121
+ TOTALApi,
122
+ } from '';
123
+ import type { V2TotalEnergyDataPostRequest } from '';
124
+
125
+ async function example() {
126
+ console.log("🚀 Testing SDK...");
127
+ const config = new Configuration({
128
+ // To configure API key authorization: api_key
129
+ apiKey: "YOUR API KEY",
130
+ });
131
+ const api = new TOTALApi(config);
132
+
133
+ const body = {
134
+ // DataParams | Parameters for data call
135
+ dataParams: ...,
136
+ } satisfies V2TotalEnergyDataPostRequest;
137
+
138
+ try {
139
+ const data = await api.v2TotalEnergyDataPost(body);
140
+ console.log(data);
141
+ } catch (error) {
142
+ console.error(error);
143
+ }
144
+ }
145
+
146
+ // Run the test
147
+ example().catch(console.error);
148
+ ```
149
+
150
+ ### Parameters
151
+
152
+
153
+ | Name | Type | Description | Notes |
154
+ |------------- | ------------- | ------------- | -------------|
155
+ | **dataParams** | [DataParams](DataParams.md) | Parameters for data call | |
156
+
157
+ ### Return type
158
+
159
+ [**DataResponseContainer**](DataResponseContainer.md)
160
+
161
+ ### Authorization
162
+
163
+ [api_key](../README.md#api_key)
164
+
165
+ ### HTTP request headers
166
+
167
+ - **Content-Type**: `application/json`
168
+ - **Accept**: `application/json`
169
+
170
+
171
+ ### HTTP response details
172
+ | Status code | Description | Response headers |
173
+ |-------------|-------------|------------------|
174
+ | **400** | Invalid input | - |
175
+ | **200** | API Data | - |
176
+
177
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
178
+
179
+
180
+ ## v2TotalEnergyFacetFacetIdGet
181
+
182
+ > FacetDetailsContainer v2TotalEnergyFacetFacetIdGet(facetId)
183
+
184
+
185
+
186
+ ### Example
187
+
188
+ ```ts
189
+ import {
190
+ Configuration,
191
+ TOTALApi,
192
+ } from '';
193
+ import type { V2TotalEnergyFacetFacetIdGetRequest } from '';
194
+
195
+ async function example() {
196
+ console.log("🚀 Testing SDK...");
197
+ const config = new Configuration({
198
+ // To configure API key authorization: api_key
199
+ apiKey: "YOUR API KEY",
200
+ });
201
+ const api = new TOTALApi(config);
202
+
203
+ const body = {
204
+ // string | Facet ID
205
+ facetId: facetId_example,
206
+ } satisfies V2TotalEnergyFacetFacetIdGetRequest;
207
+
208
+ try {
209
+ const data = await api.v2TotalEnergyFacetFacetIdGet(body);
210
+ console.log(data);
211
+ } catch (error) {
212
+ console.error(error);
213
+ }
214
+ }
215
+
216
+ // Run the test
217
+ example().catch(console.error);
218
+ ```
219
+
220
+ ### Parameters
221
+
222
+
223
+ | Name | Type | Description | Notes |
224
+ |------------- | ------------- | ------------- | -------------|
225
+ | **facetId** | `string` | Facet ID | [Defaults to `undefined`] |
226
+
227
+ ### Return type
228
+
229
+ [**FacetDetailsContainer**](FacetDetailsContainer.md)
230
+
231
+ ### Authorization
232
+
233
+ [api_key](../README.md#api_key)
234
+
235
+ ### HTTP request headers
236
+
237
+ - **Content-Type**: Not defined
238
+ - **Accept**: `application/json`
239
+
240
+
241
+ ### HTTP response details
242
+ | Status code | Description | Response headers |
243
+ |-------------|-------------|------------------|
244
+ | **400** | Invalid input | - |
245
+ | **200** | Facet details | - |
246
+
247
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
248
+
249
+
250
+ ## v2TotalEnergyFacetGet
251
+
252
+ > FacetOptionListContainer v2TotalEnergyFacetGet()
253
+
254
+
255
+
256
+ ### Example
257
+
258
+ ```ts
259
+ import {
260
+ Configuration,
261
+ TOTALApi,
262
+ } from '';
263
+ import type { V2TotalEnergyFacetGetRequest } from '';
264
+
265
+ async function example() {
266
+ console.log("🚀 Testing SDK...");
267
+ const config = new Configuration({
268
+ // To configure API key authorization: api_key
269
+ apiKey: "YOUR API KEY",
270
+ });
271
+ const api = new TOTALApi(config);
272
+
273
+ try {
274
+ const data = await api.v2TotalEnergyFacetGet();
275
+ console.log(data);
276
+ } catch (error) {
277
+ console.error(error);
278
+ }
279
+ }
280
+
281
+ // Run the test
282
+ example().catch(console.error);
283
+ ```
284
+
285
+ ### Parameters
286
+
287
+ This endpoint does not need any parameter.
288
+
289
+ ### Return type
290
+
291
+ [**FacetOptionListContainer**](FacetOptionListContainer.md)
292
+
293
+ ### Authorization
294
+
295
+ [api_key](../README.md#api_key)
296
+
297
+ ### HTTP request headers
298
+
299
+ - **Content-Type**: Not defined
300
+ - **Accept**: `application/json`
301
+
302
+
303
+ ### HTTP response details
304
+ | Status code | Description | Response headers |
305
+ |-------------|-------------|------------------|
306
+ | **400** | Invalid input | - |
307
+ | **200** | List of facet options | - |
308
+
309
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
310
+
311
+
312
+ ## v2TotalEnergyGet
313
+
314
+ > FinalRouteResponseContainer v2TotalEnergyGet()
315
+
316
+
317
+
318
+ ### Example
319
+
320
+ ```ts
321
+ import {
322
+ Configuration,
323
+ TOTALApi,
324
+ } from '';
325
+ import type { V2TotalEnergyGetRequest } from '';
326
+
327
+ async function example() {
328
+ console.log("🚀 Testing SDK...");
329
+ const config = new Configuration({
330
+ // To configure API key authorization: api_key
331
+ apiKey: "YOUR API KEY",
332
+ });
333
+ const api = new TOTALApi(config);
334
+
335
+ try {
336
+ const data = await api.v2TotalEnergyGet();
337
+ console.log(data);
338
+ } catch (error) {
339
+ console.error(error);
340
+ }
341
+ }
342
+
343
+ // Run the test
344
+ example().catch(console.error);
345
+ ```
346
+
347
+ ### Parameters
348
+
349
+ This endpoint does not need any parameter.
350
+
351
+ ### Return type
352
+
353
+ [**FinalRouteResponseContainer**](FinalRouteResponseContainer.md)
354
+
355
+ ### Authorization
356
+
357
+ [api_key](../README.md#api_key)
358
+
359
+ ### HTTP request headers
360
+
361
+ - **Content-Type**: Not defined
362
+ - **Accept**: `application/json`
363
+
364
+
365
+ ### HTTP response details
366
+ | Status code | Description | Response headers |
367
+ |-------------|-------------|------------------|
368
+ | **200** | List of API data sets | - |
369
+
370
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
371
+
package/index.ts ADDED
@@ -0,0 +1,5 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ export * from './runtime';
4
+ export * from './apis/index';
5
+ export * from './models/index';
@@ -0,0 +1,129 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * EIA APIv2
5
+ * Swagger UI interface for EIA\'s APIv2. You can also explore EIA\'s API using the [Opendata Query Browser](https://www.eia.gov/opendata/browser/). For this UI, you must use your EIA `api key` to apply filters and return data. You can register for an API Key at [https://www.eia.gov/opendata/](https://www.eia.gov/opendata/)
6
+ *
7
+ * The version of the OpenAPI document: 2.1.0
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 { Sort } from './Sort';
17
+ import {
18
+ SortFromJSON,
19
+ SortFromJSONTyped,
20
+ SortToJSON,
21
+ SortToJSONTyped,
22
+ } from './Sort';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface DataParams
28
+ */
29
+ export interface DataParams {
30
+ /**
31
+ *
32
+ * @type {Array<string>}
33
+ * @memberof DataParams
34
+ */
35
+ data?: Array<string>;
36
+ /**
37
+ *
38
+ * @type {object}
39
+ * @memberof DataParams
40
+ */
41
+ facets?: object;
42
+ /**
43
+ *
44
+ * @type {string}
45
+ * @memberof DataParams
46
+ */
47
+ frequency?: string;
48
+ /**
49
+ *
50
+ * @type {string}
51
+ * @memberof DataParams
52
+ */
53
+ start?: string;
54
+ /**
55
+ *
56
+ * @type {string}
57
+ * @memberof DataParams
58
+ */
59
+ end?: string;
60
+ /**
61
+ *
62
+ * @type {Array<Sort>}
63
+ * @memberof DataParams
64
+ */
65
+ sort?: Array<Sort>;
66
+ /**
67
+ *
68
+ * @type {number}
69
+ * @memberof DataParams
70
+ */
71
+ length?: number;
72
+ /**
73
+ *
74
+ * @type {number}
75
+ * @memberof DataParams
76
+ */
77
+ offset?: number;
78
+ }
79
+
80
+ /**
81
+ * Check if a given object implements the DataParams interface.
82
+ */
83
+ export function instanceOfDataParams(value: object): value is DataParams {
84
+ return true;
85
+ }
86
+
87
+ export function DataParamsFromJSON(json: any): DataParams {
88
+ return DataParamsFromJSONTyped(json, false);
89
+ }
90
+
91
+ export function DataParamsFromJSONTyped(json: any, ignoreDiscriminator: boolean): DataParams {
92
+ if (json == null) {
93
+ return json;
94
+ }
95
+ return {
96
+
97
+ 'data': json['data'] == null ? undefined : json['data'],
98
+ 'facets': json['facets'] == null ? undefined : json['facets'],
99
+ 'frequency': json['frequency'] == null ? undefined : json['frequency'],
100
+ 'start': json['start'] == null ? undefined : json['start'],
101
+ 'end': json['end'] == null ? undefined : json['end'],
102
+ 'sort': json['sort'] == null ? undefined : ((json['sort'] as Array<any>).map(SortFromJSON)),
103
+ 'length': json['length'] == null ? undefined : json['length'],
104
+ 'offset': json['offset'] == null ? undefined : json['offset'],
105
+ };
106
+ }
107
+
108
+ export function DataParamsToJSON(json: any): DataParams {
109
+ return DataParamsToJSONTyped(json, false);
110
+ }
111
+
112
+ export function DataParamsToJSONTyped(value?: DataParams | null, ignoreDiscriminator: boolean = false): any {
113
+ if (value == null) {
114
+ return value;
115
+ }
116
+
117
+ return {
118
+
119
+ 'data': value['data'],
120
+ 'facets': value['facets'],
121
+ 'frequency': value['frequency'],
122
+ 'start': value['start'],
123
+ 'end': value['end'],
124
+ 'sort': value['sort'] == null ? undefined : ((value['sort'] as Array<any>).map(SortToJSON)),
125
+ 'length': value['length'],
126
+ 'offset': value['offset'],
127
+ };
128
+ }
129
+
@@ -0,0 +1,97 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * EIA APIv2
5
+ * Swagger UI interface for EIA\'s APIv2. You can also explore EIA\'s API using the [Opendata Query Browser](https://www.eia.gov/opendata/browser/). For this UI, you must use your EIA `api key` to apply filters and return data. You can register for an API Key at [https://www.eia.gov/opendata/](https://www.eia.gov/opendata/)
6
+ *
7
+ * The version of the OpenAPI document: 2.1.0
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 DataResponse
20
+ */
21
+ export interface DataResponse {
22
+ /**
23
+ *
24
+ * @type {any}
25
+ * @memberof DataResponse
26
+ */
27
+ data?: any | null;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof DataResponse
32
+ */
33
+ dateFormat?: string;
34
+ /**
35
+ *
36
+ * @type {string}
37
+ * @memberof DataResponse
38
+ */
39
+ description?: string;
40
+ /**
41
+ *
42
+ * @type {string}
43
+ * @memberof DataResponse
44
+ */
45
+ frequency?: string;
46
+ /**
47
+ *
48
+ * @type {number}
49
+ * @memberof DataResponse
50
+ */
51
+ total?: number;
52
+ }
53
+
54
+ /**
55
+ * Check if a given object implements the DataResponse interface.
56
+ */
57
+ export function instanceOfDataResponse(value: object): value is DataResponse {
58
+ return true;
59
+ }
60
+
61
+ export function DataResponseFromJSON(json: any): DataResponse {
62
+ return DataResponseFromJSONTyped(json, false);
63
+ }
64
+
65
+ export function DataResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): DataResponse {
66
+ if (json == null) {
67
+ return json;
68
+ }
69
+ return {
70
+
71
+ 'data': json['data'] == null ? undefined : json['data'],
72
+ 'dateFormat': json['dateFormat'] == null ? undefined : json['dateFormat'],
73
+ 'description': json['description'] == null ? undefined : json['description'],
74
+ 'frequency': json['frequency'] == null ? undefined : json['frequency'],
75
+ 'total': json['total'] == null ? undefined : json['total'],
76
+ };
77
+ }
78
+
79
+ export function DataResponseToJSON(json: any): DataResponse {
80
+ return DataResponseToJSONTyped(json, false);
81
+ }
82
+
83
+ export function DataResponseToJSONTyped(value?: DataResponse | null, ignoreDiscriminator: boolean = false): any {
84
+ if (value == null) {
85
+ return value;
86
+ }
87
+
88
+ return {
89
+
90
+ 'data': value['data'],
91
+ 'dateFormat': value['dateFormat'],
92
+ 'description': value['description'],
93
+ 'frequency': value['frequency'],
94
+ 'total': value['total'],
95
+ };
96
+ }
97
+
@@ -0,0 +1,96 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * EIA APIv2
5
+ * Swagger UI interface for EIA\'s APIv2. You can also explore EIA\'s API using the [Opendata Query Browser](https://www.eia.gov/opendata/browser/). For this UI, you must use your EIA `api key` to apply filters and return data. You can register for an API Key at [https://www.eia.gov/opendata/](https://www.eia.gov/opendata/)
6
+ *
7
+ * The version of the OpenAPI document: 2.1.0
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 { DataResponse } from './DataResponse';
17
+ import {
18
+ DataResponseFromJSON,
19
+ DataResponseFromJSONTyped,
20
+ DataResponseToJSON,
21
+ DataResponseToJSONTyped,
22
+ } from './DataResponse';
23
+ import type { RouteRequest } from './RouteRequest';
24
+ import {
25
+ RouteRequestFromJSON,
26
+ RouteRequestFromJSONTyped,
27
+ RouteRequestToJSON,
28
+ RouteRequestToJSONTyped,
29
+ } from './RouteRequest';
30
+
31
+ /**
32
+ *
33
+ * @export
34
+ * @interface DataResponseContainer
35
+ */
36
+ export interface DataResponseContainer {
37
+ /**
38
+ *
39
+ * @type {string}
40
+ * @memberof DataResponseContainer
41
+ */
42
+ apiVersion?: string;
43
+ /**
44
+ *
45
+ * @type {RouteRequest}
46
+ * @memberof DataResponseContainer
47
+ */
48
+ request?: RouteRequest;
49
+ /**
50
+ *
51
+ * @type {DataResponse}
52
+ * @memberof DataResponseContainer
53
+ */
54
+ response?: DataResponse;
55
+ }
56
+
57
+ /**
58
+ * Check if a given object implements the DataResponseContainer interface.
59
+ */
60
+ export function instanceOfDataResponseContainer(value: object): value is DataResponseContainer {
61
+ return true;
62
+ }
63
+
64
+ export function DataResponseContainerFromJSON(json: any): DataResponseContainer {
65
+ return DataResponseContainerFromJSONTyped(json, false);
66
+ }
67
+
68
+ export function DataResponseContainerFromJSONTyped(json: any, ignoreDiscriminator: boolean): DataResponseContainer {
69
+ if (json == null) {
70
+ return json;
71
+ }
72
+ return {
73
+
74
+ 'apiVersion': json['apiVersion'] == null ? undefined : json['apiVersion'],
75
+ 'request': json['request'] == null ? undefined : RouteRequestFromJSON(json['request']),
76
+ 'response': json['response'] == null ? undefined : DataResponseFromJSON(json['response']),
77
+ };
78
+ }
79
+
80
+ export function DataResponseContainerToJSON(json: any): DataResponseContainer {
81
+ return DataResponseContainerToJSONTyped(json, false);
82
+ }
83
+
84
+ export function DataResponseContainerToJSONTyped(value?: DataResponseContainer | null, ignoreDiscriminator: boolean = false): any {
85
+ if (value == null) {
86
+ return value;
87
+ }
88
+
89
+ return {
90
+
91
+ 'apiVersion': value['apiVersion'],
92
+ 'request': RouteRequestToJSON(value['request']),
93
+ 'response': DataResponseToJSON(value['response']),
94
+ };
95
+ }
96
+