/* 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';
import type { IngestersMetaRules } from './IngestersMetaRules';
import {
    IngestersMetaRulesFromJSON,
    IngestersMetaRulesFromJSONTyped,
    IngestersMetaRulesToJSON,
} from './IngestersMetaRules';

/**
 * 
 * @export
 * @interface IngestersMalware
 */
export interface IngestersMalware {
    /**
     * 
     * @type {string}
     * @memberof IngestersMalware
     */
    _class?: string;
    /**
     * 
     * @type {string}
     * @memberof IngestersMalware
     */
    complete_filename?: string;
    /**
     * 
     * @type {number}
     * @memberof IngestersMalware
     */
    file_sev_score?: number;
    /**
     * 
     * @type {string}
     * @memberof IngestersMalware
     */
    file_severity?: string;
    /**
     * 
     * @type {string}
     * @memberof IngestersMalware
     */
    image_layer_id?: string;
    /**
     * 
     * @type {Array<string>}
     * @memberof IngestersMalware
     */
    meta?: Array<string> | null;
    /**
     * 
     * @type {IngestersMetaRules}
     * @memberof IngestersMalware
     */
    meta_rules?: IngestersMetaRules;
    /**
     * 
     * @type {string}
     * @memberof IngestersMalware
     */
    rule_name?: string;
    /**
     * 
     * @type {string}
     * @memberof IngestersMalware
     */
    scan_id?: string;
    /**
     * 
     * @type {number}
     * @memberof IngestersMalware
     */
    severity_score?: number;
    /**
     * 
     * @type {Array<string>}
     * @memberof IngestersMalware
     */
    strings_to_match?: Array<string> | null;
    /**
     * 
     * @type {string}
     * @memberof IngestersMalware
     */
    summary?: string;
    /**
     * 
     * @type {Date}
     * @memberof IngestersMalware
     */
    timestamp?: Date;
}

/**
 * Check if a given object implements the IngestersMalware interface.
 */
export function instanceOfIngestersMalware(value: object): boolean {
    let isInstance = true;

    return isInstance;
}

export function IngestersMalwareFromJSON(json: any): IngestersMalware {
    return IngestersMalwareFromJSONTyped(json, false);
}

export function IngestersMalwareFromJSONTyped(json: any, ignoreDiscriminator: boolean): IngestersMalware {
    if ((json === undefined) || (json === null)) {
        return json;
    }
    return {
        
        '_class': !exists(json, 'class') ? undefined : json['class'],
        'complete_filename': !exists(json, 'complete_filename') ? undefined : json['complete_filename'],
        'file_sev_score': !exists(json, 'file_sev_score') ? undefined : json['file_sev_score'],
        'file_severity': !exists(json, 'file_severity') ? undefined : json['file_severity'],
        'image_layer_id': !exists(json, 'image_layer_id') ? undefined : json['image_layer_id'],
        'meta': !exists(json, 'meta') ? undefined : json['meta'],
        'meta_rules': !exists(json, 'meta_rules') ? undefined : IngestersMetaRulesFromJSON(json['meta_rules']),
        'rule_name': !exists(json, 'rule_name') ? undefined : json['rule_name'],
        'scan_id': !exists(json, 'scan_id') ? undefined : json['scan_id'],
        'severity_score': !exists(json, 'severity_score') ? undefined : json['severity_score'],
        'strings_to_match': !exists(json, 'strings_to_match') ? undefined : json['strings_to_match'],
        'summary': !exists(json, 'summary') ? undefined : json['summary'],
        'timestamp': !exists(json, 'timestamp') ? undefined : (new Date(json['timestamp'])),
    };
}

export function IngestersMalwareToJSON(value?: IngestersMalware | null): any {
    if (value === undefined) {
        return undefined;
    }
    if (value === null) {
        return null;
    }
    return {
        
        'class': value._class,
        'complete_filename': value.complete_filename,
        'file_sev_score': value.file_sev_score,
        'file_severity': value.file_severity,
        'image_layer_id': value.image_layer_id,
        'meta': value.meta,
        'meta_rules': IngestersMetaRulesToJSON(value.meta_rules),
        'rule_name': value.rule_name,
        'scan_id': value.scan_id,
        'severity_score': value.severity_score,
        'strings_to_match': value.strings_to_match,
        'summary': value.summary,
        'timestamp': value.timestamp === undefined ? undefined : (value.timestamp.toISOString()),
    };
}

