/* 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 { FeatureLink } from './FeatureLink';
import {
    FeatureLinkFromJSON,
    FeatureLinkFromJSONTyped,
    FeatureLinkToJSON,
} from './FeatureLink';

/**
 * 
 * @export
 * @interface FeatureLatency
 */
export interface FeatureLatency {
    /**
     * 
     * @type {FeatureLink}
     * @memberof FeatureLatency
     */
    feature: FeatureLink;
    /**
     * 
     * @type {Date}
     * @memberof FeatureLatency
     */
    entry_created_date: Date;
    /**
     * 
     * @type {number}
     * @memberof FeatureLatency
     */
    shipped_milestone: number;
    /**
     * 
     * @type {Date}
     * @memberof FeatureLatency
     */
    shipped_date: Date;
    /**
     * 
     * @type {Array<string>}
     * @memberof FeatureLatency
     */
    owner_emails: Array<string>;
}

/**
 * Check if a given object implements the FeatureLatency interface.
 */
export function instanceOfFeatureLatency(value: object): value is FeatureLatency {
    if (!('feature' in value) || value['feature'] === undefined) return false;
    if (!('entry_created_date' in value) || value['entry_created_date'] === undefined) return false;
    if (!('shipped_milestone' in value) || value['shipped_milestone'] === undefined) return false;
    if (!('shipped_date' in value) || value['shipped_date'] === undefined) return false;
    if (!('owner_emails' in value) || value['owner_emails'] === undefined) return false;
    return true;
}

export function FeatureLatencyFromJSON(json: any): FeatureLatency {
    return FeatureLatencyFromJSONTyped(json, false);
}

export function FeatureLatencyFromJSONTyped(json: any, ignoreDiscriminator: boolean): FeatureLatency {
    if (json == null) {
        return json;
    }
    return {
        
        'feature': FeatureLinkFromJSON(json['feature']),
        'entry_created_date': (new Date(json['entry_created_date'])),
        'shipped_milestone': json['shipped_milestone'],
        'shipped_date': (new Date(json['shipped_date'])),
        'owner_emails': json['owner_emails'],
    };
}

export function FeatureLatencyToJSON(value?: FeatureLatency | null): any {
    if (value == null) {
        return value;
    }
    return {
        
        'feature': FeatureLinkToJSON(value['feature']),
        'entry_created_date': ((value['entry_created_date']).toISOString().substring(0,10)),
        'shipped_milestone': value['shipped_milestone'],
        'shipped_date': ((value['shipped_date']).toISOString().substring(0,10)),
        'owner_emails': value['owner_emails'],
    };
}

