/* 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';
/**
 * Payload for updating the review status or text of an AI summary suggestion.
 * @export
 * @interface SummarySuggestionPatchRequest
 */
export interface SummarySuggestionPatchRequest {
    /**
     * Updated lifecycle status for the suggestion. Null if status is unchanged:
     * - APPLIED: Approves suggestion, updating FeatureEntry.summary and setting summary_source to AI_APPLIED.
     * - REJECTED: Declines suggestion, preserving manual summary and setting summary_source to HUMAN.
     * - DISCARDED: Obsoletes suggestion (e.g. feature deleted or re-generated).
     * 
     * @type {string}
     * @memberof SummarySuggestionPatchRequest
     */
    status?: SummarySuggestionPatchRequestStatusEnum;
    /**
     * Updated summary text edited by reviewer.
     * @type {string}
     * @memberof SummarySuggestionPatchRequest
     */
    suggested_summary?: string;
    /**
     * Pre-existing feature summary text active prior to AI generation.
     * @type {string}
     * @memberof SummarySuggestionPatchRequest
     */
    original_summary?: string;
    /**
     * Expected current version_token of the suggestion being patched for Optimistic Concurrency Control (OCC).
     * Must match the server's current version_token, otherwise the server rejects the request with HTTP 409 Conflict.
     * (TODO: Migrate to standard HTTP ETag / If-Match headers if the repo adopts header-based OCC across REST endpoints.)
     * 
     * @type {number}
     * @memberof SummarySuggestionPatchRequest
     */
    version_token: number;
}


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


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

export function SummarySuggestionPatchRequestFromJSON(json: any): SummarySuggestionPatchRequest {
    return SummarySuggestionPatchRequestFromJSONTyped(json, false);
}

export function SummarySuggestionPatchRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SummarySuggestionPatchRequest {
    if (json == null) {
        return json;
    }
    return {
        
        'status': json['status'] == null ? undefined : json['status'],
        'suggested_summary': json['suggested_summary'] == null ? undefined : json['suggested_summary'],
        'original_summary': json['original_summary'] == null ? undefined : json['original_summary'],
        'version_token': json['version_token'],
    };
}

export function SummarySuggestionPatchRequestToJSON(value?: SummarySuggestionPatchRequest | null): any {
    if (value == null) {
        return value;
    }
    return {
        
        'status': value['status'],
        'suggested_summary': value['suggested_summary'],
        'original_summary': value['original_summary'],
        'version_token': value['version_token'],
    };
}

