box-node-sdk
Version:
Official SDK for Box Platform APIs
43 lines • 1.73 kB
JavaScript
import { serializeEnterpriseConfigurationItemV2025R0 } from './enterpriseConfigurationItemV2025R0.js';
import { serializeEnterpriseFeatureSettingV2025R0 } from './enterpriseFeatureSettingV2025R0.js';
import { deserializeEnterpriseFeatureSettingV2025R0 } from './enterpriseFeatureSettingV2025R0.js';
import { BoxSdkError } from '../../box/errors.js';
import { sdIsBoolean } from '../../serialization/json.js';
import { sdIsMap } from '../../serialization/json.js';
export function serializeEnterpriseFeatureSettingsItemV2025R0(val) {
const base = serializeEnterpriseConfigurationItemV2025R0(val);
if (!sdIsMap(base)) {
throw new BoxSdkError({
message: 'Expecting a map for "EnterpriseFeatureSettingsItemV2025R0"',
});
}
return {
...base,
...{
['value']: val.value == void 0
? val.value
: serializeEnterpriseFeatureSettingV2025R0(val.value),
},
};
}
export function deserializeEnterpriseFeatureSettingsItemV2025R0(val) {
if (!sdIsMap(val)) {
throw new BoxSdkError({
message: 'Expecting a map for "EnterpriseFeatureSettingsItemV2025R0"',
});
}
const value = val.value == void 0
? void 0
: deserializeEnterpriseFeatureSettingV2025R0(val.value);
if (!(val.is_used == void 0) && !sdIsBoolean(val.is_used)) {
throw new BoxSdkError({
message: 'Expecting boolean for "is_used" of type "EnterpriseFeatureSettingsItemV2025R0"',
});
}
const isUsed = val.is_used == void 0 ? void 0 : val.is_used;
return {
value: value,
isUsed: isUsed,
};
}
//# sourceMappingURL=enterpriseFeatureSettingsItemV2025R0.js.map