/* tslint:disable */
/* eslint-disable */
/**
 * Deepfence ThreatMapper
 * Deepfence Runtime API provides programmatic control over Deepfence microservice securing your container, kubernetes and cloud deployments. The API abstracts away underlying infrastructure details like cloud provider,  container distros, container orchestrator and type of deployment. This is one uniform API to manage and control security alerts, policies and response to alerts for microservices running anywhere i.e. managed pure greenfield container deployments or a mix of containers, VMs and serverless paradigms like AWS Fargate.
 *
 * The version of the OpenAPI document: v2.5.0
 * Contact: community@deepfence.io
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */

import { exists, mapValues } from '../runtime';
/**
 * 
 * @export
 * @interface ModelScanInfo
 */
export interface ModelScanInfo {
    /**
     * 
     * @type {number}
     * @memberof ModelScanInfo
     */
    created_at: number;
    /**
     * 
     * @type {string}
     * @memberof ModelScanInfo
     */
    node_id: string;
    /**
     * 
     * @type {string}
     * @memberof ModelScanInfo
     */
    node_name: string;
    /**
     * 
     * @type {string}
     * @memberof ModelScanInfo
     */
    node_type: string;
    /**
     * 
     * @type {string}
     * @memberof ModelScanInfo
     */
    scan_id: string;
    /**
     * 
     * @type {{ [key: string]: number; }}
     * @memberof ModelScanInfo
     */
    severity_counts: { [key: string]: number; } | null;
    /**
     * 
     * @type {string}
     * @memberof ModelScanInfo
     */
    status: ModelScanInfoStatusEnum;
    /**
     * 
     * @type {string}
     * @memberof ModelScanInfo
     */
    status_message: string;
    /**
     * 
     * @type {number}
     * @memberof ModelScanInfo
     */
    updated_at: number;
}


/**
 * @export
 */
export const ModelScanInfoStatusEnum = {
    Complete: 'COMPLETE',
    Starting: 'STARTING',
    InProgress: 'IN_PROGRESS',
    Error: 'ERROR',
    CancelPending: 'CANCEL_PENDING',
    Cancelling: 'CANCELLING',
    Cancelled: 'CANCELLED',
    DeletePending: 'DELETE_PENDING'
} as const;
export type ModelScanInfoStatusEnum = typeof ModelScanInfoStatusEnum[keyof typeof ModelScanInfoStatusEnum];


/**
 * Check if a given object implements the ModelScanInfo interface.
 */
export function instanceOfModelScanInfo(value: object): boolean {
    let isInstance = true;
    isInstance = isInstance && "created_at" in value;
    isInstance = isInstance && "node_id" in value;
    isInstance = isInstance && "node_name" in value;
    isInstance = isInstance && "node_type" in value;
    isInstance = isInstance && "scan_id" in value;
    isInstance = isInstance && "severity_counts" in value;
    isInstance = isInstance && "status" in value;
    isInstance = isInstance && "status_message" in value;
    isInstance = isInstance && "updated_at" in value;

    return isInstance;
}

export function ModelScanInfoFromJSON(json: any): ModelScanInfo {
    return ModelScanInfoFromJSONTyped(json, false);
}

export function ModelScanInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): ModelScanInfo {
    if ((json === undefined) || (json === null)) {
        return json;
    }
    return {
        
        'created_at': json['created_at'],
        'node_id': json['node_id'],
        'node_name': json['node_name'],
        'node_type': json['node_type'],
        'scan_id': json['scan_id'],
        'severity_counts': json['severity_counts'],
        'status': json['status'],
        'status_message': json['status_message'],
        'updated_at': json['updated_at'],
    };
}

export function ModelScanInfoToJSON(value?: ModelScanInfo | null): any {
    if (value === undefined) {
        return undefined;
    }
    if (value === null) {
        return null;
    }
    return {
        
        'created_at': value.created_at,
        'node_id': value.node_id,
        'node_name': value.node_name,
        'node_type': value.node_type,
        'scan_id': value.scan_id,
        'severity_counts': value.severity_counts,
        'status': value.status,
        'status_message': value.status_message,
        'updated_at': value.updated_at,
    };
}

