/* 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 ModelMalwareRule
 */
export interface ModelMalwareRule {
    /**
     * 
     * @type {string}
     * @memberof ModelMalwareRule
     */
    author?: string;
    /**
     * 
     * @type {string}
     * @memberof ModelMalwareRule
     */
    date?: string;
    /**
     * 
     * @type {string}
     * @memberof ModelMalwareRule
     */
    description?: string;
    /**
     * 
     * @type {string}
     * @memberof ModelMalwareRule
     */
    file_severity?: string;
    /**
     * 
     * @type {string}
     * @memberof ModelMalwareRule
     */
    filetype?: string;
    /**
     * 
     * @type {string}
     * @memberof ModelMalwareRule
     */
    info?: string;
    /**
     * 
     * @type {boolean}
     * @memberof ModelMalwareRule
     */
    masked: boolean;
    /**
     * 
     * @type {string}
     * @memberof ModelMalwareRule
     */
    payload: string;
    /**
     * 
     * @type {string}
     * @memberof ModelMalwareRule
     */
    rule_id?: string;
    /**
     * 
     * @type {string}
     * @memberof ModelMalwareRule
     */
    rule_name?: string;
    /**
     * 
     * @type {string}
     * @memberof ModelMalwareRule
     */
    severity: string;
    /**
     * 
     * @type {string}
     * @memberof ModelMalwareRule
     */
    summary: string;
    /**
     * 
     * @type {number}
     * @memberof ModelMalwareRule
     */
    updated_at: number;
    /**
     * 
     * @type {string}
     * @memberof ModelMalwareRule
     */
    version?: string;
}

/**
 * Check if a given object implements the ModelMalwareRule interface.
 */
export function instanceOfModelMalwareRule(value: object): boolean {
    let isInstance = true;
    isInstance = isInstance && "masked" in value;
    isInstance = isInstance && "payload" in value;
    isInstance = isInstance && "severity" in value;
    isInstance = isInstance && "summary" in value;
    isInstance = isInstance && "updated_at" in value;

    return isInstance;
}

export function ModelMalwareRuleFromJSON(json: any): ModelMalwareRule {
    return ModelMalwareRuleFromJSONTyped(json, false);
}

export function ModelMalwareRuleFromJSONTyped(json: any, ignoreDiscriminator: boolean): ModelMalwareRule {
    if ((json === undefined) || (json === null)) {
        return json;
    }
    return {
        
        'author': !exists(json, 'author') ? undefined : json['author'],
        'date': !exists(json, 'date') ? undefined : json['date'],
        'description': !exists(json, 'description') ? undefined : json['description'],
        'file_severity': !exists(json, 'file_severity') ? undefined : json['file_severity'],
        'filetype': !exists(json, 'filetype') ? undefined : json['filetype'],
        'info': !exists(json, 'info') ? undefined : json['info'],
        'masked': json['masked'],
        'payload': json['payload'],
        'rule_id': !exists(json, 'rule_id') ? undefined : json['rule_id'],
        'rule_name': !exists(json, 'rule_name') ? undefined : json['rule_name'],
        'severity': json['severity'],
        'summary': json['summary'],
        'updated_at': json['updated_at'],
        'version': !exists(json, 'version') ? undefined : json['version'],
    };
}

export function ModelMalwareRuleToJSON(value?: ModelMalwareRule | null): any {
    if (value === undefined) {
        return undefined;
    }
    if (value === null) {
        return null;
    }
    return {
        
        'author': value.author,
        'date': value.date,
        'description': value.description,
        'file_severity': value.file_severity,
        'filetype': value.filetype,
        'info': value.info,
        'masked': value.masked,
        'payload': value.payload,
        'rule_id': value.rule_id,
        'rule_name': value.rule_name,
        'severity': value.severity,
        'summary': value.summary,
        'updated_at': value.updated_at,
        'version': value.version,
    };
}

