/* 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 { exists } from '../runtime'; /** * RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType. * @export * @interface IoK8sApiAppsV1RollingUpdateStatefulSetStrategy */ export interface IoK8sApiAppsV1RollingUpdateStatefulSetStrategy { /** * IntOrString is a type that can hold an int32 or a string. When used in JSON or YAML marshalling and unmarshalling, it produces or consumes the inner type. This allows you to have, for example, a JSON field that can accept a name or number. * @type {string} * @memberof IoK8sApiAppsV1RollingUpdateStatefulSetStrategy */ maxUnavailable?: string; /** * Partition indicates the ordinal at which the StatefulSet should be partitioned for updates. During a rolling update, all pods from ordinal Replicas-1 to Partition are updated. All pods from ordinal Partition-1 to 0 remain untouched. This is helpful in being able to do a canary based deployment. The default value is 0. * @type {number} * @memberof IoK8sApiAppsV1RollingUpdateStatefulSetStrategy */ partition?: number; } export function IoK8sApiAppsV1RollingUpdateStatefulSetStrategyFromJSON( json: any, ): IoK8sApiAppsV1RollingUpdateStatefulSetStrategy { return IoK8sApiAppsV1RollingUpdateStatefulSetStrategyFromJSONTyped(json, false); } export function IoK8sApiAppsV1RollingUpdateStatefulSetStrategyFromJSONTyped( json: any, _ignoreDiscriminator: boolean, ): IoK8sApiAppsV1RollingUpdateStatefulSetStrategy { if (json === undefined || json === null) { return json; } return { maxUnavailable: !exists(json, 'maxUnavailable') ? undefined : json['maxUnavailable'], partition: !exists(json, 'partition') ? undefined : json['partition'], }; } export function IoK8sApiAppsV1RollingUpdateStatefulSetStrategyToJSON( value?: IoK8sApiAppsV1RollingUpdateStatefulSetStrategy | null, ): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { maxUnavailable: value.maxUnavailable, partition: value.partition, }; }