/* 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';
/**
 * Individual feature entry formatted for public release notes.
 * @export
 * @interface ReleaseNoteFeature
 */
export interface ReleaseNoteFeature {
    /**
     * Unique feature identifier.
     * @type {number}
     * @memberof ReleaseNoteFeature
     */
    id: number;
    /**
     * Feature title or display name.
     * @type {string}
     * @memberof ReleaseNoteFeature
     */
    name: string;
    /**
     * Release note summary text (either human-written summary or applied AI suggestion).
     * @type {string}
     * @memberof ReleaseNoteFeature
     */
    summary: string;
    /**
     * Numeric category identifier.
     * @type {number}
     * @memberof ReleaseNoteFeature
     */
    category: number;
    /**
     * Human-readable category label (e.g., 'DOM', 'CSS', 'JavaScript').
     * @type {string}
     * @memberof ReleaseNoteFeature
     */
    category_name: string;
    /**
     * Numeric feature launch type identifier (e.g., New Feature, Deprecation).
     * @type {number}
     * @memberof ReleaseNoteFeature
     */
    feature_type: number;
    /**
     * WebDX Baseline interoperability state. Null if Baseline status is un-tracked.
     * @type {string}
     * @memberof ReleaseNoteFeature
     */
    baseline_status?: ReleaseNoteFeatureBaselineStatusEnum;
    /**
     * Source provenance of the active feature summary text returned in this release note:
     * - AI_APPLIED: The active summary text was generated by AI and explicitly approved by an editor (SummarySuggestion.status == APPLIED).
     * - HUMAN: The active summary text was manually authored by a human developer or editor.
     * Note: Unapproved draft suggestions sitting in state PENDING do not alter the active summary text or its provenance until approved.
     * 
     * @type {string}
     * @memberof ReleaseNoteFeature
     */
    summary_source: ReleaseNoteFeatureSummarySourceEnum;
}


/**
 * @export
 */
export const ReleaseNoteFeatureBaselineStatusEnum = {
    none: 'none',
    limited: 'limited',
    newly: 'newly',
    widely: 'widely'
} as const;
export type ReleaseNoteFeatureBaselineStatusEnum = typeof ReleaseNoteFeatureBaselineStatusEnum[keyof typeof ReleaseNoteFeatureBaselineStatusEnum];

/**
 * @export
 */
export const ReleaseNoteFeatureSummarySourceEnum = {
    HUMAN: 'HUMAN',
    AI_APPLIED: 'AI_APPLIED'
} as const;
export type ReleaseNoteFeatureSummarySourceEnum = typeof ReleaseNoteFeatureSummarySourceEnum[keyof typeof ReleaseNoteFeatureSummarySourceEnum];


/**
 * Check if a given object implements the ReleaseNoteFeature interface.
 */
export function instanceOfReleaseNoteFeature(value: object): value is ReleaseNoteFeature {
    if (!('id' in value) || value['id'] === undefined) return false;
    if (!('name' in value) || value['name'] === undefined) return false;
    if (!('summary' in value) || value['summary'] === undefined) return false;
    if (!('category' in value) || value['category'] === undefined) return false;
    if (!('category_name' in value) || value['category_name'] === undefined) return false;
    if (!('feature_type' in value) || value['feature_type'] === undefined) return false;
    if (!('summary_source' in value) || value['summary_source'] === undefined) return false;
    return true;
}

export function ReleaseNoteFeatureFromJSON(json: any): ReleaseNoteFeature {
    return ReleaseNoteFeatureFromJSONTyped(json, false);
}

export function ReleaseNoteFeatureFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReleaseNoteFeature {
    if (json == null) {
        return json;
    }
    return {
        
        'id': json['id'],
        'name': json['name'],
        'summary': json['summary'],
        'category': json['category'],
        'category_name': json['category_name'],
        'feature_type': json['feature_type'],
        'baseline_status': json['baseline_status'] == null ? undefined : json['baseline_status'],
        'summary_source': json['summary_source'],
    };
}

export function ReleaseNoteFeatureToJSON(value?: ReleaseNoteFeature | null): any {
    if (value == null) {
        return value;
    }
    return {
        
        'id': value['id'],
        'name': value['name'],
        'summary': value['summary'],
        'category': value['category'],
        'category_name': value['category_name'],
        'feature_type': value['feature_type'],
        'baseline_status': value['baseline_status'],
        'summary_source': value['summary_source'],
    };
}

