wallee
Version:
TypeScript/JavaScript client for wallee
36 lines (35 loc) • 1.66 kB
JavaScript
import { SubscriptionProductComponentReferenceStateFromJSON, SubscriptionProductComponentReferenceStateToJSON, } from './SubscriptionProductComponentReferenceState';
/**
* Check if a given object implements the SubscriptionProductComponentReference interface.
*/
export function instanceOfSubscriptionProductComponentReference(value) {
return true;
}
export function SubscriptionProductComponentReferenceFromJSON(json) {
return SubscriptionProductComponentReferenceFromJSONTyped(json, false);
}
export function SubscriptionProductComponentReferenceFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'linkedSpaceId': json['linkedSpaceId'] == null ? undefined : json['linkedSpaceId'],
'name': json['name'] == null ? undefined : json['name'],
'plannedPurgeDate': json['plannedPurgeDate'] == null ? undefined : (new Date(json['plannedPurgeDate'])),
'id': json['id'] == null ? undefined : json['id'],
'state': json['state'] == null ? undefined : SubscriptionProductComponentReferenceStateFromJSON(json['state']),
'sku': json['sku'] == null ? undefined : json['sku'],
'version': json['version'] == null ? undefined : json['version'],
};
}
export function SubscriptionProductComponentReferenceToJSON(json) {
return SubscriptionProductComponentReferenceToJSONTyped(json, false);
}
export function SubscriptionProductComponentReferenceToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'state': SubscriptionProductComponentReferenceStateToJSON(value['state']),
};
}