/* 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'; /** * * @export * @interface ApiPolicyDTO */ export interface ApiPolicyDTO { /** * * @type {string} * @memberof ApiPolicyDTO */ id?: string; /** * * @type {string} * @memberof ApiPolicyDTO */ name?: string; /** * * @type {string} * @memberof ApiPolicyDTO */ ownerId?: string; /** * * @type {string} * @memberof ApiPolicyDTO */ ownerType?: ApiPolicyDTOOwnerTypeEnum; /** * * @type {string} * @memberof ApiPolicyDTO */ policyType?: string; /** * * @type {number} * @memberof ApiPolicyDTO */ threatLevel?: number; } /** * @export */ export const ApiPolicyDTOOwnerTypeEnum = { Application: 'APPLICATION', Organization: 'ORGANIZATION', RepositoryContainer: 'REPOSITORY_CONTAINER', RepositoryManager: 'REPOSITORY_MANAGER', Repository: 'REPOSITORY' } as const; export type ApiPolicyDTOOwnerTypeEnum = typeof ApiPolicyDTOOwnerTypeEnum[keyof typeof ApiPolicyDTOOwnerTypeEnum]; /** * Check if a given object implements the ApiPolicyDTO interface. */ export function instanceOfApiPolicyDTO(value: object): value is ApiPolicyDTO { return true; } export function ApiPolicyDTOFromJSON(json: any): ApiPolicyDTO { return ApiPolicyDTOFromJSONTyped(json, false); } export function ApiPolicyDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): ApiPolicyDTO { if (json == null) { return json; } return { 'id': json['id'] == null ? undefined : json['id'], 'name': json['name'] == null ? undefined : json['name'], 'ownerId': json['ownerId'] == null ? undefined : json['ownerId'], 'ownerType': json['ownerType'] == null ? undefined : json['ownerType'], 'policyType': json['policyType'] == null ? undefined : json['policyType'], 'threatLevel': json['threatLevel'] == null ? undefined : json['threatLevel'], }; } export function ApiPolicyDTOToJSON(json: any): ApiPolicyDTO { return ApiPolicyDTOToJSONTyped(json, false); } export function ApiPolicyDTOToJSONTyped(value?: ApiPolicyDTO | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'id': value['id'], 'name': value['name'], 'ownerId': value['ownerId'], 'ownerType': value['ownerType'], 'policyType': value['policyType'], 'threatLevel': value['threatLevel'], }; }