/* 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 { CounterEntry } from './CounterEntry';
import {
    CounterEntryFromJSON,
    CounterEntryFromJSONTyped,
    CounterEntryToJSON,
} from './CounterEntry';

/**
 * 
 * @export
 * @interface FeatureLinksSummaryResponse
 */
export interface FeatureLinksSummaryResponse {
    /**
     * 
     * @type {number}
     * @memberof FeatureLinksSummaryResponse
     */
    total_count?: number;
    /**
     * 
     * @type {number}
     * @memberof FeatureLinksSummaryResponse
     */
    covered_count?: number;
    /**
     * 
     * @type {number}
     * @memberof FeatureLinksSummaryResponse
     */
    uncovered_count?: number;
    /**
     * 
     * @type {number}
     * @memberof FeatureLinksSummaryResponse
     */
    error_count?: number;
    /**
     * 
     * @type {number}
     * @memberof FeatureLinksSummaryResponse
     */
    http_error_count?: number;
    /**
     * 
     * @type {Array<CounterEntry>}
     * @memberof FeatureLinksSummaryResponse
     */
    link_types?: Array<CounterEntry>;
    /**
     * 
     * @type {Array<CounterEntry>}
     * @memberof FeatureLinksSummaryResponse
     */
    uncovered_link_domains?: Array<CounterEntry>;
    /**
     * 
     * @type {Array<CounterEntry>}
     * @memberof FeatureLinksSummaryResponse
     */
    error_link_domains?: Array<CounterEntry>;
}

/**
 * Check if a given object implements the FeatureLinksSummaryResponse interface.
 */
export function instanceOfFeatureLinksSummaryResponse(value: object): value is FeatureLinksSummaryResponse {
    return true;
}

export function FeatureLinksSummaryResponseFromJSON(json: any): FeatureLinksSummaryResponse {
    return FeatureLinksSummaryResponseFromJSONTyped(json, false);
}

export function FeatureLinksSummaryResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): FeatureLinksSummaryResponse {
    if (json == null) {
        return json;
    }
    return {
        
        'total_count': json['total_count'] == null ? undefined : json['total_count'],
        'covered_count': json['covered_count'] == null ? undefined : json['covered_count'],
        'uncovered_count': json['uncovered_count'] == null ? undefined : json['uncovered_count'],
        'error_count': json['error_count'] == null ? undefined : json['error_count'],
        'http_error_count': json['http_error_count'] == null ? undefined : json['http_error_count'],
        'link_types': json['link_types'] == null ? undefined : ((json['link_types'] as Array<any>).map(CounterEntryFromJSON)),
        'uncovered_link_domains': json['uncovered_link_domains'] == null ? undefined : ((json['uncovered_link_domains'] as Array<any>).map(CounterEntryFromJSON)),
        'error_link_domains': json['error_link_domains'] == null ? undefined : ((json['error_link_domains'] as Array<any>).map(CounterEntryFromJSON)),
    };
}

export function FeatureLinksSummaryResponseToJSON(value?: FeatureLinksSummaryResponse | null): any {
    if (value == null) {
        return value;
    }
    return {
        
        'total_count': value['total_count'],
        'covered_count': value['covered_count'],
        'uncovered_count': value['uncovered_count'],
        'error_count': value['error_count'],
        'http_error_count': value['http_error_count'],
        'link_types': value['link_types'] == null ? undefined : ((value['link_types'] as Array<any>).map(CounterEntryToJSON)),
        'uncovered_link_domains': value['uncovered_link_domains'] == null ? undefined : ((value['uncovered_link_domains'] as Array<any>).map(CounterEntryToJSON)),
        'error_link_domains': value['error_link_domains'] == null ? undefined : ((value['error_link_domains'] as Array<any>).map(CounterEntryToJSON)),
    };
}

