/* tslint:disable */ /* eslint-disable */ /** * Sonatype Guide API * REST API into [Sonatype Guide](https://guide.sonatype.com). * * The version of the OpenAPI document: 202607 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import { mapValues } from '../runtime'; import type { ComponentDocument } from './ComponentDocument'; import { ComponentDocumentFromJSON, ComponentDocumentFromJSONTyped, ComponentDocumentToJSON, ComponentDocumentToJSONTyped, } from './ComponentDocument'; /** * * @export * @interface ApiSearchResponseComponentDocument */ export interface ApiSearchResponseComponentDocument { /** * * @type {{ [key: string]: { [key: string]: number; }; }} * @memberof ApiSearchResponseComponentDocument */ aggregations?: { [key: string]: { [key: string]: number; }; }; /** * * @type {Array} * @memberof ApiSearchResponseComponentDocument */ hits?: Array; /** * * @type {number} * @memberof ApiSearchResponseComponentDocument */ limit?: number; /** * * @type {number} * @memberof ApiSearchResponseComponentDocument */ offset?: number; /** * * @type {number} * @memberof ApiSearchResponseComponentDocument */ total?: number; } /** * Check if a given object implements the ApiSearchResponseComponentDocument interface. */ export function instanceOfApiSearchResponseComponentDocument(value: object): value is ApiSearchResponseComponentDocument { return true; } export function ApiSearchResponseComponentDocumentFromJSON(json: any): ApiSearchResponseComponentDocument { return ApiSearchResponseComponentDocumentFromJSONTyped(json, false); } export function ApiSearchResponseComponentDocumentFromJSONTyped(json: any, ignoreDiscriminator: boolean): ApiSearchResponseComponentDocument { if (json == null) { return json; } return { 'aggregations': json['aggregations'] == null ? undefined : json['aggregations'], 'hits': json['hits'] == null ? undefined : ((json['hits'] as Array).map(ComponentDocumentFromJSON)), 'limit': json['limit'] == null ? undefined : json['limit'], 'offset': json['offset'] == null ? undefined : json['offset'], 'total': json['total'] == null ? undefined : json['total'], }; } export function ApiSearchResponseComponentDocumentToJSON(json: any): ApiSearchResponseComponentDocument { return ApiSearchResponseComponentDocumentToJSONTyped(json, false); } export function ApiSearchResponseComponentDocumentToJSONTyped(value?: ApiSearchResponseComponentDocument | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'aggregations': value['aggregations'], 'hits': value['hits'] == null ? undefined : ((value['hits'] as Array).map(ComponentDocumentToJSON)), 'limit': value['limit'], 'offset': value['offset'], 'total': value['total'], }; }