cwmsjs
Version:
CWMS Data API Library for JavaScript/TypeScript created with OpenAPI generator for use with browser webapps
92 lines (83 loc) • 2.36 kB
text/typescript
/* tslint:disable */
/* eslint-disable */
/**
* CWMS Data API
* CWMS REST API for Data Retrieval
*
* The version of the OpenAPI document: 2.4.0-2026.3.16
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { exists, mapValues } from '../runtime';
import {
Blob,
BlobFromJSON,
BlobFromJSONTyped,
BlobToJSON,
} from './Blob';
/**
*
* @export
* @interface Blobs
*/
export interface Blobs {
/**
* List of retrieved blobs
* @type {Array<Blob>}
* @memberof Blobs
*/
blobs?: Array<Blob>;
/**
* The cursor to the next page of data; null if there is no more data
* @type {string}
* @memberof Blobs
*/
readonly nextPage?: string;
/**
* The cursor to the current page of data
* @type {string}
* @memberof Blobs
*/
readonly page?: string;
/**
* The number of records fetched per-page; this may be larger than the number of records actually retrieved
* @type {number}
* @memberof Blobs
*/
readonly pageSize?: number;
/**
* The total number of records retrieved; null or not present if not supported or unknown
* @type {number}
* @memberof Blobs
*/
readonly total?: number;
}
export function BlobsFromJSON(json: any): Blobs {
return BlobsFromJSONTyped(json, false);
}
export function BlobsFromJSONTyped(json: any, ignoreDiscriminator: boolean): Blobs {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'blobs': !exists(json, 'blobs') ? undefined : ((json['blobs'] as Array<any>).map(BlobFromJSON)),
'nextPage': !exists(json, 'next-page') ? undefined : json['next-page'],
'page': !exists(json, 'page') ? undefined : json['page'],
'pageSize': !exists(json, 'page-size') ? undefined : json['page-size'],
'total': !exists(json, 'total') ? undefined : json['total'],
};
}
export function BlobsToJSON(value?: Blobs | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'blobs': value.blobs === undefined ? undefined : ((value.blobs as Array<any>).map(BlobToJSON)),
};
}