UNPKG

wallee

Version:
44 lines (43 loc) 1.51 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.instanceOfAccountCreate = instanceOfAccountCreate; exports.AccountCreateFromJSON = AccountCreateFromJSON; exports.AccountCreateFromJSONTyped = AccountCreateFromJSONTyped; exports.AccountCreateToJSON = AccountCreateToJSON; exports.AccountCreateToJSONTyped = AccountCreateToJSONTyped; /** * Check if a given object implements the AccountCreate interface. */ function instanceOfAccountCreate(value) { if (!('scope' in value) || value['scope'] === undefined) return false; return true; } function AccountCreateFromJSON(json) { return AccountCreateFromJSONTyped(json, false); } function AccountCreateFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'name': json['name'] == null ? undefined : json['name'], 'subaccountLimit': json['subaccountLimit'] == null ? undefined : json['subaccountLimit'], 'scope': json['scope'], 'parentAccount': json['parentAccount'] == null ? undefined : json['parentAccount'], }; } function AccountCreateToJSON(json) { return AccountCreateToJSONTyped(json, false); } function AccountCreateToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'name': value['name'], 'subaccountLimit': value['subaccountLimit'], 'scope': value['scope'], 'parentAccount': value['parentAccount'], }; }