/* 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 { ApiPolicyViolationDTOV2 } from './ApiPolicyViolationDTOV2'; import { ApiPolicyViolationDTOV2FromJSON, ApiPolicyViolationDTOV2FromJSONTyped, ApiPolicyViolationDTOV2ToJSON, ApiPolicyViolationDTOV2ToJSONTyped, } from './ApiPolicyViolationDTOV2'; import type { ComponentIdentifier } from './ComponentIdentifier'; import { ComponentIdentifierFromJSON, ComponentIdentifierFromJSONTyped, ComponentIdentifierToJSON, ComponentIdentifierToJSONTyped, } from './ComponentIdentifier'; /** * List of items for the current page * @export * @interface ApiFirewallComponentDTO */ export interface ApiFirewallComponentDTO { /** * * @type {ComponentIdentifier} * @memberof ApiFirewallComponentDTO */ componentIdentifier?: ComponentIdentifier; /** * * @type {Date} * @memberof ApiFirewallComponentDTO */ dateCleared?: Date; /** * * @type {string} * @memberof ApiFirewallComponentDTO */ displayName?: string; /** * * @type {string} * @memberof ApiFirewallComponentDTO */ hash?: string; /** * * @type {string} * @memberof ApiFirewallComponentDTO */ matchState?: string; /** * * @type {string} * @memberof ApiFirewallComponentDTO */ pathname?: string; /** * * @type {Date} * @memberof ApiFirewallComponentDTO */ quarantineDate?: Date; /** * * @type {Array} * @memberof ApiFirewallComponentDTO */ quarantinePolicyViolations?: Array; /** * * @type {boolean} * @memberof ApiFirewallComponentDTO */ quarantined?: boolean; /** * * @type {string} * @memberof ApiFirewallComponentDTO */ repository?: string; /** * * @type {string} * @memberof ApiFirewallComponentDTO */ repositoryId?: string; } /** * Check if a given object implements the ApiFirewallComponentDTO interface. */ export function instanceOfApiFirewallComponentDTO(value: object): value is ApiFirewallComponentDTO { return true; } export function ApiFirewallComponentDTOFromJSON(json: any): ApiFirewallComponentDTO { return ApiFirewallComponentDTOFromJSONTyped(json, false); } export function ApiFirewallComponentDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): ApiFirewallComponentDTO { if (json == null) { return json; } return { 'componentIdentifier': json['componentIdentifier'] == null ? undefined : ComponentIdentifierFromJSON(json['componentIdentifier']), 'dateCleared': json['dateCleared'] == null ? undefined : (new Date(json['dateCleared'])), 'displayName': json['displayName'] == null ? undefined : json['displayName'], 'hash': json['hash'] == null ? undefined : json['hash'], 'matchState': json['matchState'] == null ? undefined : json['matchState'], 'pathname': json['pathname'] == null ? undefined : json['pathname'], 'quarantineDate': json['quarantineDate'] == null ? undefined : (new Date(json['quarantineDate'])), 'quarantinePolicyViolations': json['quarantinePolicyViolations'] == null ? undefined : ((json['quarantinePolicyViolations'] as Array).map(ApiPolicyViolationDTOV2FromJSON)), 'quarantined': json['quarantined'] == null ? undefined : json['quarantined'], 'repository': json['repository'] == null ? undefined : json['repository'], 'repositoryId': json['repositoryId'] == null ? undefined : json['repositoryId'], }; } export function ApiFirewallComponentDTOToJSON(json: any): ApiFirewallComponentDTO { return ApiFirewallComponentDTOToJSONTyped(json, false); } export function ApiFirewallComponentDTOToJSONTyped(value?: ApiFirewallComponentDTO | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'componentIdentifier': ComponentIdentifierToJSON(value['componentIdentifier']), 'dateCleared': value['dateCleared'] == null ? value['dateCleared'] : value['dateCleared'].toISOString(), 'displayName': value['displayName'], 'hash': value['hash'], 'matchState': value['matchState'], 'pathname': value['pathname'], 'quarantineDate': value['quarantineDate'] == null ? value['quarantineDate'] : value['quarantineDate'].toISOString(), 'quarantinePolicyViolations': value['quarantinePolicyViolations'] == null ? undefined : ((value['quarantinePolicyViolations'] as Array).map(ApiPolicyViolationDTOV2ToJSON)), 'quarantined': value['quarantined'], 'repository': value['repository'], 'repositoryId': value['repositoryId'], }; }