/* 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 { LinkPreview } from './LinkPreview';
import {
    LinkPreviewFromJSON,
    LinkPreviewFromJSONTyped,
    LinkPreviewToJSON,
} from './LinkPreview';
import type { OutstandingReview } from './OutstandingReview';
import {
    OutstandingReviewFromJSON,
    OutstandingReviewFromJSONTyped,
    OutstandingReviewToJSON,
} from './OutstandingReview';

/**
 * 
 * @export
 * @interface ExternalReviewsResponse
 */
export interface ExternalReviewsResponse {
    /**
     * 
     * @type {Array<OutstandingReview>}
     * @memberof ExternalReviewsResponse
     */
    reviews: Array<OutstandingReview>;
    /**
     * 
     * @type {Array<LinkPreview>}
     * @memberof ExternalReviewsResponse
     */
    link_previews: Array<LinkPreview>;
}

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

export function ExternalReviewsResponseFromJSON(json: any): ExternalReviewsResponse {
    return ExternalReviewsResponseFromJSONTyped(json, false);
}

export function ExternalReviewsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ExternalReviewsResponse {
    if (json == null) {
        return json;
    }
    return {
        
        'reviews': ((json['reviews'] as Array<any>).map(OutstandingReviewFromJSON)),
        'link_previews': ((json['link_previews'] as Array<any>).map(LinkPreviewFromJSON)),
    };
}

export function ExternalReviewsResponseToJSON(value?: ExternalReviewsResponse | null): any {
    if (value == null) {
        return value;
    }
    return {
        
        'reviews': ((value['reviews'] as Array<any>).map(OutstandingReviewToJSON)),
        'link_previews': ((value['link_previews'] as Array<any>).map(LinkPreviewToJSON)),
    };
}

