/* tslint:disable */
/* eslint-disable */
/**
 * chomestatus API
 * The API for chromestatus.com. chromestatus.com is the official tool used for tracking feature launches in Blink (the browser engine that powers Chrome and many other web browsers). This tool guides feature owners through our launch process and serves as a primary source for developer information that then ripples throughout the web developer ecosystem. More details at: https://github.com/GoogleChrome/chromium-dashboard
 *
 * The version of the OpenAPI document: 1.0.0
 * 
 *
 * 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 { SummarySuggestion } from './SummarySuggestion';
import {
    SummarySuggestionFromJSON,
    SummarySuggestionFromJSONTyped,
    SummarySuggestionToJSON,
} from './SummarySuggestion';

/**
 * Paginated response containing a list of pending AI summary suggestions for the review queue.
 * @export
 * @interface SummarySuggestionListResponse
 */
export interface SummarySuggestionListResponse {
    /**
     * List of pending summary suggestion objects for the current page.
     * @type {Array<SummarySuggestion>}
     * @memberof SummarySuggestionListResponse
     */
    suggestions: Array<SummarySuggestion>;
    /**
     * Opaque cursor token for requesting the next page of suggestions. Null when on the last page.
     * @type {string}
     * @memberof SummarySuggestionListResponse
     */
    next_cursor?: string;
    /**
     * Total count of matching pending summary suggestions across all pages.
     * @type {number}
     * @memberof SummarySuggestionListResponse
     */
    total_count: number;
}

/**
 * Check if a given object implements the SummarySuggestionListResponse interface.
 */
export function instanceOfSummarySuggestionListResponse(value: object): value is SummarySuggestionListResponse {
    if (!('suggestions' in value) || value['suggestions'] === undefined) return false;
    if (!('total_count' in value) || value['total_count'] === undefined) return false;
    return true;
}

export function SummarySuggestionListResponseFromJSON(json: any): SummarySuggestionListResponse {
    return SummarySuggestionListResponseFromJSONTyped(json, false);
}

export function SummarySuggestionListResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): SummarySuggestionListResponse {
    if (json == null) {
        return json;
    }
    return {
        
        'suggestions': ((json['suggestions'] as Array<any>).map(SummarySuggestionFromJSON)),
        'next_cursor': json['next_cursor'] == null ? undefined : json['next_cursor'],
        'total_count': json['total_count'],
    };
}

export function SummarySuggestionListResponseToJSON(value?: SummarySuggestionListResponse | null): any {
    if (value == null) {
        return value;
    }
    return {
        
        'suggestions': ((value['suggestions'] as Array<any>).map(SummarySuggestionToJSON)),
        'next_cursor': value['next_cursor'],
        'total_count': value['total_count'],
    };
}

