@bitblit/ratchet-misc
Version:
Ratchet miscellaneous tooling that requires smallish dependant libraries
33 lines • 1.3 kB
JavaScript
import { exists } from '../runtime.js';
import { GetChildInfoAllOfApiKeysV2FromJSON, GetChildInfoAllOfApiKeysV2ToJSON } from './GetChildInfoAllOfApiKeysV2.js';
import { GetChildInfoAllOfApiKeysV3FromJSON, GetChildInfoAllOfApiKeysV3ToJSON } from './GetChildInfoAllOfApiKeysV3.js';
export function instanceOfGetChildInfoAllOfApiKeys(value) {
let isInstance = true;
isInstance = isInstance && 'v2' in value;
return isInstance;
}
export function GetChildInfoAllOfApiKeysFromJSON(json) {
return GetChildInfoAllOfApiKeysFromJSONTyped(json, false);
}
export function GetChildInfoAllOfApiKeysFromJSONTyped(json, ignoreDiscriminator) {
if (json === undefined || json === null) {
return json;
}
return {
v2: json['v2'].map(GetChildInfoAllOfApiKeysV2FromJSON),
v3: !exists(json, 'v3') ? undefined : json['v3'].map(GetChildInfoAllOfApiKeysV3FromJSON),
};
}
export function GetChildInfoAllOfApiKeysToJSON(value) {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
v2: value.v2.map(GetChildInfoAllOfApiKeysV2ToJSON),
v3: value.v3 === undefined ? undefined : value.v3.map(GetChildInfoAllOfApiKeysV3ToJSON),
};
}
//# sourceMappingURL=GetChildInfoAllOfApiKeys.js.map