@simplyhomes/sos-sdk
Version:
TypeScript SDK for Simply Homes SoS API v4
66 lines (65 loc) • 2.4 kB
JavaScript
/* tslint:disable */
/* eslint-disable */
/**
* API v4
* Swagger documentation for API v4
*
* The version of the OpenAPI document: 4.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { SoSMessageEntityEntityTypeFromJSON, SoSMessageEntityEntityTypeToJSON, } from './SoSMessageEntityEntityType';
/**
* Check if a given object implements the SoSMessageSubscriptionEntityBase interface.
*/
export function instanceOfSoSMessageSubscriptionEntityBase(value) {
if (!('userId' in value) || value['userId'] === undefined)
return false;
if (!('propertyId' in value) || value['propertyId'] === undefined)
return false;
if (!('entityType' in value) || value['entityType'] === undefined)
return false;
if (!('entityId' in value) || value['entityId'] === undefined)
return false;
if (!('organizationId' in value) || value['organizationId'] === undefined)
return false;
if (!('createdAt' in value) || value['createdAt'] === undefined)
return false;
return true;
}
export function SoSMessageSubscriptionEntityBaseFromJSON(json) {
return SoSMessageSubscriptionEntityBaseFromJSONTyped(json, false);
}
export function SoSMessageSubscriptionEntityBaseFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
...json, // Preserve relation fields from views
'userId': json['userId'],
'propertyId': json['propertyId'],
'entityType': SoSMessageEntityEntityTypeFromJSON(json['entityType']),
'entityId': json['entityId'],
'organizationId': json['organizationId'],
'createdAt': json['createdAt'],
};
}
export function SoSMessageSubscriptionEntityBaseToJSON(json) {
return SoSMessageSubscriptionEntityBaseToJSONTyped(json, false);
}
export function SoSMessageSubscriptionEntityBaseToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'userId': value['userId'],
'propertyId': value['propertyId'],
'entityType': SoSMessageEntityEntityTypeToJSON(value['entityType']),
'entityId': value['entityId'],
'organizationId': value['organizationId'],
'createdAt': value['createdAt'],
};
}