@simplyhomes/sos-sdk
Version:
TypeScript SDK for Simply Homes SoS API v4
60 lines (59 loc) • 2.54 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 { SoSInspectionEntityStatusFromJSON, SoSInspectionEntityStatusToJSON, } from './SoSInspectionEntityStatus';
/**
* Check if a given object implements the V4InspectionsUpdateInspectionBody interface.
*/
export function instanceOfV4InspectionsUpdateInspectionBody(value) {
return true;
}
export function V4InspectionsUpdateInspectionBodyFromJSON(json) {
return V4InspectionsUpdateInspectionBodyFromJSONTyped(json, false);
}
export function V4InspectionsUpdateInspectionBodyFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
...json, // Preserve relation fields from views
'name': json['name'] == null ? undefined : json['name'],
'pid': json['pid'] == null ? undefined : json['pid'],
'transactionId': json['transactionId'] == null ? undefined : json['transactionId'],
'unitId': json['unitId'] == null ? undefined : json['unitId'],
'status': json['status'] == null ? undefined : SoSInspectionEntityStatusFromJSON(json['status']),
'notes': json['notes'] == null ? undefined : json['notes'],
'deadline': json['deadline'] == null ? undefined : json['deadline'],
'walkthroughDate': json['walkthroughDate'] == null ? undefined : json['walkthroughDate'],
'createdAt': json['createdAt'] == null ? undefined : json['createdAt'],
};
}
export function V4InspectionsUpdateInspectionBodyToJSON(json) {
return V4InspectionsUpdateInspectionBodyToJSONTyped(json, false);
}
export function V4InspectionsUpdateInspectionBodyToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'name': value['name'],
'pid': value['pid'],
'transactionId': value['transactionId'],
'unitId': value['unitId'],
'status': SoSInspectionEntityStatusToJSON(value['status']),
'notes': value['notes'],
'deadline': value['deadline'] == null ? value['deadline'] : value['deadline'],
'walkthroughDate': value['walkthroughDate'] == null ? value['walkthroughDate'] : value['walkthroughDate'],
'createdAt': value['createdAt'] == null ? value['createdAt'] : value['createdAt'],
};
}