/* 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';
/**
 * AI-generated summary suggestion entity tracking proposed release notes text, provenance status, confidence score, grounding reasoning, and optimistic concurrency version token.
 * @export
 * @interface SummarySuggestion
 */
export interface SummarySuggestion {
    /**
     * Associated feature identifier.
     * @type {number}
     * @memberof SummarySuggestion
     */
    feature_id: number;
    /**
     * AI-suggested release notes summary text.
     * @type {string}
     * @memberof SummarySuggestion
     */
    suggested_summary?: string;
    /**
     * Feature summary text active prior to AI generation, used for visual diffing and revert workflows.
     * @type {string}
     * @memberof SummarySuggestion
     */
    original_summary?: string;
    /**
     * Lifecycle status of the summary suggestion:
     * - PENDING: Awaiting review
     * - APPLIED: Approved and applied to feature
     * - REJECTED: Suggestion declined
     * - DISCARDED: Obsolete or feature deleted
     * 
     * @type {string}
     * @memberof SummarySuggestion
     */
    status: SummarySuggestionStatusEnum;
    /**
     * WebDX Baseline interoperability state at suggestion generation time. Null if un-tracked.
     * @type {string}
     * @memberof SummarySuggestion
     */
    baseline_status?: SummarySuggestionBaselineStatusEnum;
    /**
     * Grounding rationale and source links evaluated during generation.
     * @type {string}
     * @memberof SummarySuggestion
     */
    reasoning?: string;
    /**
     * List of verified external documentation links associated with the feature.
     * @type {Array<string>}
     * @memberof SummarySuggestion
     */
    suggested_doc_links?: Array<string>;
    /**
     * Monotonically increasing Optimistic Concurrency Control (OCC) version counter.
     * Increments on every mutation to prevent mid-air collision overwrites during concurrent editorial reviews.
     * (TODO: Migrate to standard HTTP ETag / If-Match headers if the repo adopts header-based OCC across REST endpoints.)
     * 
     * @type {number}
     * @memberof SummarySuggestion
     */
    version_token: number;
    /**
     * UTC timestamp when the suggestion was created.
     * @type {Date}
     * @memberof SummarySuggestion
     */
    created: Date;
    /**
     * UTC timestamp when the suggestion was last modified.
     * @type {Date}
     * @memberof SummarySuggestion
     */
    updated: Date;
}


/**
 * @export
 */
export const SummarySuggestionStatusEnum = {
    PENDING: 'PENDING',
    APPLIED: 'APPLIED',
    REJECTED: 'REJECTED',
    DISCARDED: 'DISCARDED'
} as const;
export type SummarySuggestionStatusEnum = typeof SummarySuggestionStatusEnum[keyof typeof SummarySuggestionStatusEnum];

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


/**
 * Check if a given object implements the SummarySuggestion interface.
 */
export function instanceOfSummarySuggestion(value: object): value is SummarySuggestion {
    if (!('feature_id' in value) || value['feature_id'] === undefined) return false;
    if (!('status' in value) || value['status'] === undefined) return false;
    if (!('version_token' in value) || value['version_token'] === undefined) return false;
    if (!('created' in value) || value['created'] === undefined) return false;
    if (!('updated' in value) || value['updated'] === undefined) return false;
    return true;
}

export function SummarySuggestionFromJSON(json: any): SummarySuggestion {
    return SummarySuggestionFromJSONTyped(json, false);
}

export function SummarySuggestionFromJSONTyped(json: any, ignoreDiscriminator: boolean): SummarySuggestion {
    if (json == null) {
        return json;
    }
    return {
        
        'feature_id': json['feature_id'],
        'suggested_summary': json['suggested_summary'] == null ? undefined : json['suggested_summary'],
        'original_summary': json['original_summary'] == null ? undefined : json['original_summary'],
        'status': json['status'],
        'baseline_status': json['baseline_status'] == null ? undefined : json['baseline_status'],
        'reasoning': json['reasoning'] == null ? undefined : json['reasoning'],
        'suggested_doc_links': json['suggested_doc_links'] == null ? undefined : json['suggested_doc_links'],
        'version_token': json['version_token'],
        'created': (new Date(json['created'])),
        'updated': (new Date(json['updated'])),
    };
}

export function SummarySuggestionToJSON(value?: SummarySuggestion | null): any {
    if (value == null) {
        return value;
    }
    return {
        
        'feature_id': value['feature_id'],
        'suggested_summary': value['suggested_summary'],
        'original_summary': value['original_summary'],
        'status': value['status'],
        'baseline_status': value['baseline_status'],
        'reasoning': value['reasoning'],
        'suggested_doc_links': value['suggested_doc_links'],
        'version_token': value['version_token'],
        'created': ((value['created']).toISOString()),
        'updated': ((value['updated']).toISOString()),
    };
}

