/* tslint:disable */ /* eslint-disable */ /** * Sonatype Lifecycle Public REST API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 1.207.0-01 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import { mapValues } from '../runtime'; import type { Action } from './Action'; import { ActionFromJSON, ActionFromJSONTyped, ActionToJSON, ActionToJSONTyped, } from './Action'; import type { PolicyFact } from './PolicyFact'; import { PolicyFactFromJSON, PolicyFactFromJSONTyped, PolicyFactToJSON, PolicyFactToJSONTyped, } from './PolicyFact'; /** * * @export * @interface PolicyAlert */ export interface PolicyAlert { /** * * @type {Array} * @memberof PolicyAlert */ actions?: Array; /** * * @type {PolicyFact} * @memberof PolicyAlert */ trigger?: PolicyFact; } /** * Check if a given object implements the PolicyAlert interface. */ export function instanceOfPolicyAlert(value: object): value is PolicyAlert { return true; } export function PolicyAlertFromJSON(json: any): PolicyAlert { return PolicyAlertFromJSONTyped(json, false); } export function PolicyAlertFromJSONTyped(json: any, ignoreDiscriminator: boolean): PolicyAlert { if (json == null) { return json; } return { 'actions': json['actions'] == null ? undefined : ((json['actions'] as Array).map(ActionFromJSON)), 'trigger': json['trigger'] == null ? undefined : PolicyFactFromJSON(json['trigger']), }; } export function PolicyAlertToJSON(json: any): PolicyAlert { return PolicyAlertToJSONTyped(json, false); } export function PolicyAlertToJSONTyped(value?: PolicyAlert | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'actions': value['actions'] == null ? undefined : ((value['actions'] as Array).map(ActionToJSON)), 'trigger': PolicyFactToJSON(value['trigger']), }; }