/* 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';
/**
 * 
 * @export
 * @interface Vote
 */
export interface Vote {
    /**
     * 
     * @type {number}
     * @memberof Vote
     */
    feature_id: number;
    /**
     * 
     * @type {number}
     * @memberof Vote
     */
    gate_id: number;
    /**
     * 
     * @type {number}
     * @memberof Vote
     */
    gate_type?: number;
    /**
     * 
     * @type {string}
     * @memberof Vote
     */
    set_by: string;
    /**
     * 
     * @type {string}
     * @memberof Vote
     */
    set_on: string;
    /**
     * 
     * @type {number}
     * @memberof Vote
     */
    state: number;
}

/**
 * Check if a given object implements the Vote interface.
 */
export function instanceOfVote(value: object): value is Vote {
    if (!('feature_id' in value) || value['feature_id'] === undefined) return false;
    if (!('gate_id' in value) || value['gate_id'] === undefined) return false;
    if (!('set_by' in value) || value['set_by'] === undefined) return false;
    if (!('set_on' in value) || value['set_on'] === undefined) return false;
    if (!('state' in value) || value['state'] === undefined) return false;
    return true;
}

export function VoteFromJSON(json: any): Vote {
    return VoteFromJSONTyped(json, false);
}

export function VoteFromJSONTyped(json: any, ignoreDiscriminator: boolean): Vote {
    if (json == null) {
        return json;
    }
    return {
        
        'feature_id': json['feature_id'],
        'gate_id': json['gate_id'],
        'gate_type': json['gate_type'] == null ? undefined : json['gate_type'],
        'set_by': json['set_by'],
        'set_on': json['set_on'],
        'state': json['state'],
    };
}

export function VoteToJSON(value?: Vote | null): any {
    if (value == null) {
        return value;
    }
    return {
        
        'feature_id': value['feature_id'],
        'gate_id': value['gate_id'],
        'gate_type': value['gate_type'],
        'set_by': value['set_by'],
        'set_on': value['set_on'],
        'state': value['state'],
    };
}

