/* tslint:disable */ /* eslint-disable */ /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: unversioned * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import { IoK8sApiBatchV1SuccessPolicyRule, IoK8sApiBatchV1SuccessPolicyRuleFromJSON, IoK8sApiBatchV1SuccessPolicyRuleToJSON, } from './'; /** * SuccessPolicy describes when a Job can be declared as succeeded based on the success of some indexes. * @export * @interface IoK8sApiBatchV1SuccessPolicy */ export interface IoK8sApiBatchV1SuccessPolicy { /** * rules represents the list of alternative rules for the declaring the Jobs as successful before `.status.succeeded >= .spec.completions`. Once any of the rules are met, the "SucceededCriteriaMet" condition is added, and the lingering pods are removed. The terminal state for such a Job has the "Complete" condition. Additionally, these rules are evaluated in order; Once the Job meets one of the rules, other rules are ignored. At most 20 elements are allowed. * @type {Array} * @memberof IoK8sApiBatchV1SuccessPolicy */ rules: Array; } export function IoK8sApiBatchV1SuccessPolicyFromJSON(json: any): IoK8sApiBatchV1SuccessPolicy { return IoK8sApiBatchV1SuccessPolicyFromJSONTyped(json, false); } export function IoK8sApiBatchV1SuccessPolicyFromJSONTyped( json: any, _ignoreDiscriminator: boolean, ): IoK8sApiBatchV1SuccessPolicy { if (json === undefined || json === null) { return json; } return { rules: (json['rules'] as Array).map(IoK8sApiBatchV1SuccessPolicyRuleFromJSON), }; } export function IoK8sApiBatchV1SuccessPolicyToJSON( value?: IoK8sApiBatchV1SuccessPolicy | null, ): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { rules: (value.rules as Array).map(IoK8sApiBatchV1SuccessPolicyRuleToJSON), }; }