@codingame/kubevirt-api
Version:
kubevirt OpenAPI automation for TypeScript
60 lines • 2.58 kB
JavaScript
/* tslint:disable */
/* eslint-disable */
/**
* KubeVirt API
* This is KubeVirt API an add-on for Kubernetes.
*
* The version of the OpenAPI document: 1.0.0
* Contact: kubevirt-dev@googlegroups.com
*
* 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';
import { K8sIoApiCoreV1ExecActionFromJSON, K8sIoApiCoreV1ExecActionToJSON, K8sIoApiCoreV1HTTPGetActionFromJSON, K8sIoApiCoreV1HTTPGetActionToJSON, K8sIoApiCoreV1TCPSocketActionFromJSON, K8sIoApiCoreV1TCPSocketActionToJSON, } from './';
export function V1ProbeFromJSON(json) {
return V1ProbeFromJSONTyped(json, false);
}
export function V1ProbeFromJSONTyped(json, _ignoreDiscriminator) {
if (json === undefined || json === null) {
return json;
}
return {
exec: !exists(json, 'exec') ? undefined : K8sIoApiCoreV1ExecActionFromJSON(json['exec']),
failureThreshold: !exists(json, 'failureThreshold') ? undefined : json['failureThreshold'],
guestAgentPing: !exists(json, 'guestAgentPing') ? undefined : json['guestAgentPing'],
httpGet: !exists(json, 'httpGet')
? undefined
: K8sIoApiCoreV1HTTPGetActionFromJSON(json['httpGet']),
initialDelaySeconds: !exists(json, 'initialDelaySeconds')
? undefined
: json['initialDelaySeconds'],
periodSeconds: !exists(json, 'periodSeconds') ? undefined : json['periodSeconds'],
successThreshold: !exists(json, 'successThreshold') ? undefined : json['successThreshold'],
tcpSocket: !exists(json, 'tcpSocket')
? undefined
: K8sIoApiCoreV1TCPSocketActionFromJSON(json['tcpSocket']),
timeoutSeconds: !exists(json, 'timeoutSeconds') ? undefined : json['timeoutSeconds'],
};
}
export function V1ProbeToJSON(value) {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
exec: K8sIoApiCoreV1ExecActionToJSON(value.exec),
failureThreshold: value.failureThreshold,
guestAgentPing: value.guestAgentPing,
httpGet: K8sIoApiCoreV1HTTPGetActionToJSON(value.httpGet),
initialDelaySeconds: value.initialDelaySeconds,
periodSeconds: value.periodSeconds,
successThreshold: value.successThreshold,
tcpSocket: K8sIoApiCoreV1TCPSocketActionToJSON(value.tcpSocket),
timeoutSeconds: value.timeoutSeconds,
};
}
//# sourceMappingURL=V1Probe.js.map