/* 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 ModelSecretRule
 */
export interface ModelSecretRule {
    /**
     * 
     * @type {string}
     * @memberof ModelSecretRule
     */
    level: string;
    /**
     * 
     * @type {boolean}
     * @memberof ModelSecretRule
     */
    masked: boolean;
    /**
     * 
     * @type {string}
     * @memberof ModelSecretRule
     */
    part?: string;
    /**
     * 
     * @type {string}
     * @memberof ModelSecretRule
     */
    payload: string;
    /**
     * 
     * @type {string}
     * @memberof ModelSecretRule
     */
    rule_id?: string;
    /**
     * 
     * @type {string}
     * @memberof ModelSecretRule
     */
    severity: string;
    /**
     * 
     * @type {string}
     * @memberof ModelSecretRule
     */
    signature_to_match?: string;
    /**
     * 
     * @type {string}
     * @memberof ModelSecretRule
     */
    summary: string;
    /**
     * 
     * @type {number}
     * @memberof ModelSecretRule
     */
    updated_at: number;
}

/**
 * Check if a given object implements the ModelSecretRule interface.
 */
export function instanceOfModelSecretRule(value: object): boolean {
    let isInstance = true;
    isInstance = isInstance && "level" in value;
    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 ModelSecretRuleFromJSON(json: any): ModelSecretRule {
    return ModelSecretRuleFromJSONTyped(json, false);
}

export function ModelSecretRuleFromJSONTyped(json: any, ignoreDiscriminator: boolean): ModelSecretRule {
    if ((json === undefined) || (json === null)) {
        return json;
    }
    return {
        
        'level': json['level'],
        'masked': json['masked'],
        'part': !exists(json, 'part') ? undefined : json['part'],
        'payload': json['payload'],
        'rule_id': !exists(json, 'rule_id') ? undefined : json['rule_id'],
        'severity': json['severity'],
        'signature_to_match': !exists(json, 'signature_to_match') ? undefined : json['signature_to_match'],
        'summary': json['summary'],
        'updated_at': json['updated_at'],
    };
}

export function ModelSecretRuleToJSON(value?: ModelSecretRule | null): any {
    if (value === undefined) {
        return undefined;
    }
    if (value === null) {
        return null;
    }
    return {
        
        'level': value.level,
        'masked': value.masked,
        'part': value.part,
        'payload': value.payload,
        'rule_id': value.rule_id,
        'severity': value.severity,
        'signature_to_match': value.signature_to_match,
        'summary': value.summary,
        'updated_at': value.updated_at,
    };
}

