/* 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 { ComponentDisplayName } from './ComponentDisplayName'; import { ComponentDisplayNameFromJSON, ComponentDisplayNameFromJSONTyped, ComponentDisplayNameToJSON, ComponentDisplayNameToJSONTyped, } from './ComponentDisplayName'; import type { ApiComponentIdentifierDTOV2 } from './ApiComponentIdentifierDTOV2'; import { ApiComponentIdentifierDTOV2FromJSON, ApiComponentIdentifierDTOV2FromJSONTyped, ApiComponentIdentifierDTOV2ToJSON, ApiComponentIdentifierDTOV2ToJSONTyped, } from './ApiComponentIdentifierDTOV2'; import type { ConstraintFact } from './ConstraintFact'; import { ConstraintFactFromJSON, ConstraintFactFromJSONTyped, ConstraintFactToJSON, ConstraintFactToJSONTyped, } from './ConstraintFact'; /** * * @export * @interface ApiPolicyWaiverRequestDTO */ export interface ApiPolicyWaiverRequestDTO { /** * * @type {string} * @memberof ApiPolicyWaiverRequestDTO */ associatedPackageUrl?: string; /** * * @type {boolean} * @memberof ApiPolicyWaiverRequestDTO */ canReview?: boolean; /** * * @type {string} * @memberof ApiPolicyWaiverRequestDTO */ comment?: string; /** * * @type {ApiComponentIdentifierDTOV2} * @memberof ApiPolicyWaiverRequestDTO */ componentIdentifier?: ApiComponentIdentifierDTOV2; /** * * @type {string} * @memberof ApiPolicyWaiverRequestDTO */ componentName?: string; /** * * @type {boolean} * @memberof ApiPolicyWaiverRequestDTO */ componentUpgradeAvailable?: boolean; /** * * @type {Array} * @memberof ApiPolicyWaiverRequestDTO */ constraintFacts?: Array; /** * * @type {string} * @memberof ApiPolicyWaiverRequestDTO */ constraintFactsJson?: string; /** * * @type {ComponentDisplayName} * @memberof ApiPolicyWaiverRequestDTO */ displayName?: ComponentDisplayName; /** * * @type {boolean} * @memberof ApiPolicyWaiverRequestDTO */ expireWhenRemediationAvailable?: boolean; /** * * @type {Date} * @memberof ApiPolicyWaiverRequestDTO */ expiryTime?: Date; /** * * @type {string} * @memberof ApiPolicyWaiverRequestDTO */ hash?: string; /** * * @type {boolean} * @memberof ApiPolicyWaiverRequestDTO */ isObsolete?: boolean; /** * * @type {string} * @memberof ApiPolicyWaiverRequestDTO */ matcherStrategy?: ApiPolicyWaiverRequestDTOMatcherStrategyEnum; /** * * @type {string} * @memberof ApiPolicyWaiverRequestDTO */ noteToReviewer?: string; /** * * @type {string} * @memberof ApiPolicyWaiverRequestDTO */ policyId?: string; /** * * @type {string} * @memberof ApiPolicyWaiverRequestDTO */ policyName?: string; /** * * @type {string} * @memberof ApiPolicyWaiverRequestDTO */ policyViolationId?: string; /** * * @type {string} * @memberof ApiPolicyWaiverRequestDTO */ policyWaiverReasonId?: string; /** * * @type {string} * @memberof ApiPolicyWaiverRequestDTO */ policyWaiverRequestId?: string; /** * * @type {string} * @memberof ApiPolicyWaiverRequestDTO */ reasonText?: string; /** * * @type {string} * @memberof ApiPolicyWaiverRequestDTO */ rejectionReason?: string; /** * * @type {Date} * @memberof ApiPolicyWaiverRequestDTO */ requestTime?: Date; /** * * @type {string} * @memberof ApiPolicyWaiverRequestDTO */ requesterId?: string; /** * * @type {string} * @memberof ApiPolicyWaiverRequestDTO */ requesterName?: string; /** * * @type {string} * @memberof ApiPolicyWaiverRequestDTO */ reviewerId?: string; /** * * @type {string} * @memberof ApiPolicyWaiverRequestDTO */ reviewerName?: string; /** * * @type {string} * @memberof ApiPolicyWaiverRequestDTO */ scopeOwnerId?: string; /** * * @type {string} * @memberof ApiPolicyWaiverRequestDTO */ scopeOwnerName?: string; /** * * @type {string} * @memberof ApiPolicyWaiverRequestDTO */ scopeOwnerType?: string; /** * * @type {string} * @memberof ApiPolicyWaiverRequestDTO */ status?: string; /** * * @type {number} * @memberof ApiPolicyWaiverRequestDTO */ threatLevel?: number; /** * * @type {string} * @memberof ApiPolicyWaiverRequestDTO */ vulnerabilityId?: string; } /** * @export */ export const ApiPolicyWaiverRequestDTOMatcherStrategyEnum = { Default: 'DEFAULT', ExactComponent: 'EXACT_COMPONENT', AllComponents: 'ALL_COMPONENTS', AllVersions: 'ALL_VERSIONS' } as const; export type ApiPolicyWaiverRequestDTOMatcherStrategyEnum = typeof ApiPolicyWaiverRequestDTOMatcherStrategyEnum[keyof typeof ApiPolicyWaiverRequestDTOMatcherStrategyEnum]; /** * Check if a given object implements the ApiPolicyWaiverRequestDTO interface. */ export function instanceOfApiPolicyWaiverRequestDTO(value: object): value is ApiPolicyWaiverRequestDTO { return true; } export function ApiPolicyWaiverRequestDTOFromJSON(json: any): ApiPolicyWaiverRequestDTO { return ApiPolicyWaiverRequestDTOFromJSONTyped(json, false); } export function ApiPolicyWaiverRequestDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): ApiPolicyWaiverRequestDTO { if (json == null) { return json; } return { 'associatedPackageUrl': json['associatedPackageUrl'] == null ? undefined : json['associatedPackageUrl'], 'canReview': json['canReview'] == null ? undefined : json['canReview'], 'comment': json['comment'] == null ? undefined : json['comment'], 'componentIdentifier': json['componentIdentifier'] == null ? undefined : ApiComponentIdentifierDTOV2FromJSON(json['componentIdentifier']), 'componentName': json['componentName'] == null ? undefined : json['componentName'], 'componentUpgradeAvailable': json['componentUpgradeAvailable'] == null ? undefined : json['componentUpgradeAvailable'], 'constraintFacts': json['constraintFacts'] == null ? undefined : ((json['constraintFacts'] as Array).map(ConstraintFactFromJSON)), 'constraintFactsJson': json['constraintFactsJson'] == null ? undefined : json['constraintFactsJson'], 'displayName': json['displayName'] == null ? undefined : ComponentDisplayNameFromJSON(json['displayName']), 'expireWhenRemediationAvailable': json['expireWhenRemediationAvailable'] == null ? undefined : json['expireWhenRemediationAvailable'], 'expiryTime': json['expiryTime'] == null ? undefined : (new Date(json['expiryTime'])), 'hash': json['hash'] == null ? undefined : json['hash'], 'isObsolete': json['isObsolete'] == null ? undefined : json['isObsolete'], 'matcherStrategy': json['matcherStrategy'] == null ? undefined : json['matcherStrategy'], 'noteToReviewer': json['noteToReviewer'] == null ? undefined : json['noteToReviewer'], 'policyId': json['policyId'] == null ? undefined : json['policyId'], 'policyName': json['policyName'] == null ? undefined : json['policyName'], 'policyViolationId': json['policyViolationId'] == null ? undefined : json['policyViolationId'], 'policyWaiverReasonId': json['policyWaiverReasonId'] == null ? undefined : json['policyWaiverReasonId'], 'policyWaiverRequestId': json['policyWaiverRequestId'] == null ? undefined : json['policyWaiverRequestId'], 'reasonText': json['reasonText'] == null ? undefined : json['reasonText'], 'rejectionReason': json['rejectionReason'] == null ? undefined : json['rejectionReason'], 'requestTime': json['requestTime'] == null ? undefined : (new Date(json['requestTime'])), 'requesterId': json['requesterId'] == null ? undefined : json['requesterId'], 'requesterName': json['requesterName'] == null ? undefined : json['requesterName'], 'reviewerId': json['reviewerId'] == null ? undefined : json['reviewerId'], 'reviewerName': json['reviewerName'] == null ? undefined : json['reviewerName'], 'scopeOwnerId': json['scopeOwnerId'] == null ? undefined : json['scopeOwnerId'], 'scopeOwnerName': json['scopeOwnerName'] == null ? undefined : json['scopeOwnerName'], 'scopeOwnerType': json['scopeOwnerType'] == null ? undefined : json['scopeOwnerType'], 'status': json['status'] == null ? undefined : json['status'], 'threatLevel': json['threatLevel'] == null ? undefined : json['threatLevel'], 'vulnerabilityId': json['vulnerabilityId'] == null ? undefined : json['vulnerabilityId'], }; } export function ApiPolicyWaiverRequestDTOToJSON(json: any): ApiPolicyWaiverRequestDTO { return ApiPolicyWaiverRequestDTOToJSONTyped(json, false); } export function ApiPolicyWaiverRequestDTOToJSONTyped(value?: ApiPolicyWaiverRequestDTO | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'associatedPackageUrl': value['associatedPackageUrl'], 'canReview': value['canReview'], 'comment': value['comment'], 'componentIdentifier': ApiComponentIdentifierDTOV2ToJSON(value['componentIdentifier']), 'componentName': value['componentName'], 'componentUpgradeAvailable': value['componentUpgradeAvailable'], 'constraintFacts': value['constraintFacts'] == null ? undefined : ((value['constraintFacts'] as Array).map(ConstraintFactToJSON)), 'constraintFactsJson': value['constraintFactsJson'], 'displayName': ComponentDisplayNameToJSON(value['displayName']), 'expireWhenRemediationAvailable': value['expireWhenRemediationAvailable'], 'expiryTime': value['expiryTime'] == null ? value['expiryTime'] : value['expiryTime'].toISOString(), 'hash': value['hash'], 'isObsolete': value['isObsolete'], 'matcherStrategy': value['matcherStrategy'], 'noteToReviewer': value['noteToReviewer'], 'policyId': value['policyId'], 'policyName': value['policyName'], 'policyViolationId': value['policyViolationId'], 'policyWaiverReasonId': value['policyWaiverReasonId'], 'policyWaiverRequestId': value['policyWaiverRequestId'], 'reasonText': value['reasonText'], 'rejectionReason': value['rejectionReason'], 'requestTime': value['requestTime'] == null ? value['requestTime'] : value['requestTime'].toISOString(), 'requesterId': value['requesterId'], 'requesterName': value['requesterName'], 'reviewerId': value['reviewerId'], 'reviewerName': value['reviewerName'], 'scopeOwnerId': value['scopeOwnerId'], 'scopeOwnerName': value['scopeOwnerName'], 'scopeOwnerType': value['scopeOwnerType'], 'status': value['status'], 'threatLevel': value['threatLevel'], 'vulnerabilityId': value['vulnerabilityId'], }; }