/* 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 { IngestersSecretMatch } from './IngestersSecretMatch';
import {
    IngestersSecretMatchFromJSON,
    IngestersSecretMatchFromJSONTyped,
    IngestersSecretMatchToJSON,
} from './IngestersSecretMatch';
import type { IngestersSecretRule } from './IngestersSecretRule';
import {
    IngestersSecretRuleFromJSON,
    IngestersSecretRuleFromJSONTyped,
    IngestersSecretRuleToJSON,
} from './IngestersSecretRule';
import type { IngestersSecretSeverity } from './IngestersSecretSeverity';
import {
    IngestersSecretSeverityFromJSON,
    IngestersSecretSeverityFromJSONTyped,
    IngestersSecretSeverityToJSON,
} from './IngestersSecretSeverity';

/**
 * 
 * @export
 * @interface IngestersSecret
 */
export interface IngestersSecret {
    /**
     * 
     * @type {string}
     * @memberof IngestersSecret
     */
    ImageLayerId?: string;
    /**
     * 
     * @type {IngestersSecretMatch}
     * @memberof IngestersSecret
     */
    Match?: IngestersSecretMatch;
    /**
     * 
     * @type {IngestersSecretRule}
     * @memberof IngestersSecret
     */
    Rule?: IngestersSecretRule;
    /**
     * 
     * @type {IngestersSecretSeverity}
     * @memberof IngestersSecret
     */
    Severity?: IngestersSecretSeverity;
    /**
     * 
     * @type {string}
     * @memberof IngestersSecret
     */
    scan_id?: string;
}

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

    return isInstance;
}

export function IngestersSecretFromJSON(json: any): IngestersSecret {
    return IngestersSecretFromJSONTyped(json, false);
}

export function IngestersSecretFromJSONTyped(json: any, ignoreDiscriminator: boolean): IngestersSecret {
    if ((json === undefined) || (json === null)) {
        return json;
    }
    return {
        
        'ImageLayerId': !exists(json, 'ImageLayerId') ? undefined : json['ImageLayerId'],
        'Match': !exists(json, 'Match') ? undefined : IngestersSecretMatchFromJSON(json['Match']),
        'Rule': !exists(json, 'Rule') ? undefined : IngestersSecretRuleFromJSON(json['Rule']),
        'Severity': !exists(json, 'Severity') ? undefined : IngestersSecretSeverityFromJSON(json['Severity']),
        'scan_id': !exists(json, 'scan_id') ? undefined : json['scan_id'],
    };
}

export function IngestersSecretToJSON(value?: IngestersSecret | null): any {
    if (value === undefined) {
        return undefined;
    }
    if (value === null) {
        return null;
    }
    return {
        
        'ImageLayerId': value.ImageLayerId,
        'Match': IngestersSecretMatchToJSON(value.Match),
        'Rule': IngestersSecretRuleToJSON(value.Rule),
        'Severity': IngestersSecretSeverityToJSON(value.Severity),
        'scan_id': value.scan_id,
    };
}

