@simplyhomes/sos-sdk
Version:
TypeScript SDK for Simply Homes SoS API v4
66 lines (65 loc) • 2.38 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 { AirtableCommentNotificationEntityTypeFromJSON, AirtableCommentNotificationEntityTypeToJSON, } from './AirtableCommentNotificationEntityType';
/**
* Check if a given object implements the SoSAirtableCommentNotificationEntityBase interface.
*/
export function instanceOfSoSAirtableCommentNotificationEntityBase(value) {
if (!('type' in value) || value['type'] === undefined)
return false;
if (!('id' in value) || value['id'] === undefined)
return false;
if (!('userId' in value) || value['userId'] === undefined)
return false;
if (!('commentId' in value) || value['commentId'] === undefined)
return false;
if (!('read' in value) || value['read'] === undefined)
return false;
if (!('createdAt' in value) || value['createdAt'] === undefined)
return false;
return true;
}
export function SoSAirtableCommentNotificationEntityBaseFromJSON(json) {
return SoSAirtableCommentNotificationEntityBaseFromJSONTyped(json, false);
}
export function SoSAirtableCommentNotificationEntityBaseFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
...json, // Preserve relation fields from views
'type': AirtableCommentNotificationEntityTypeFromJSON(json['type']),
'id': json['id'],
'userId': json['userId'],
'commentId': json['commentId'],
'read': json['read'],
'createdAt': json['createdAt'],
};
}
export function SoSAirtableCommentNotificationEntityBaseToJSON(json) {
return SoSAirtableCommentNotificationEntityBaseToJSONTyped(json, false);
}
export function SoSAirtableCommentNotificationEntityBaseToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'type': AirtableCommentNotificationEntityTypeToJSON(value['type']),
'id': value['id'],
'userId': value['userId'],
'commentId': value['commentId'],
'read': value['read'],
'createdAt': value['createdAt'],
};
}