@bitblit/ratchet-misc
Version:
Ratchet miscellaneous tooling that requires smallish dependant libraries
52 lines • 1.74 kB
JavaScript
import { exists } from '../runtime.js';
export var CreateChildLanguageEnum;
(function (CreateChildLanguageEnum) {
CreateChildLanguageEnum["Fr"] = "fr";
CreateChildLanguageEnum["Es"] = "es";
CreateChildLanguageEnum["Pt"] = "pt";
CreateChildLanguageEnum["It"] = "it";
CreateChildLanguageEnum["De"] = "de";
CreateChildLanguageEnum["En"] = "en";
})(CreateChildLanguageEnum || (CreateChildLanguageEnum = {}));
export function instanceOfCreateChild(value) {
let isInstance = true;
isInstance = isInstance && 'email' in value;
isInstance = isInstance && 'firstName' in value;
isInstance = isInstance && 'lastName' in value;
isInstance = isInstance && 'companyName' in value;
isInstance = isInstance && 'password' in value;
return isInstance;
}
export function CreateChildFromJSON(json) {
return CreateChildFromJSONTyped(json, false);
}
export function CreateChildFromJSONTyped(json, ignoreDiscriminator) {
if (json === undefined || json === null) {
return json;
}
return {
email: json['email'],
firstName: json['firstName'],
lastName: json['lastName'],
companyName: json['companyName'],
password: json['password'],
language: !exists(json, 'language') ? undefined : json['language'],
};
}
export function CreateChildToJSON(value) {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
email: value.email,
firstName: value.firstName,
lastName: value.lastName,
companyName: value.companyName,
password: value.password,
language: value.language,
};
}
//# sourceMappingURL=CreateChild.js.map